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

1423 lines
2.5 MiB

This file contains ambiguous Unicode characters!

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

(self.webpackChunk=self.webpackChunk||[]).push([[4340],{89489:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},59477:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},40001:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},26227:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},49198:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},41464:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},87169:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},73331:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},15277:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},52671:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},8657:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},56082:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},33853:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},12893:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},15075:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},32134:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},43531:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},61485:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},38819:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},47472:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Xe,Et){return Oe.createElement(Ge.Z,(0,ge.Z)({},Xe,{ref:Et,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le},78780:function(){"use strict"},19136:function(){"use strict"},11570:function(Vn,Pn){"use strict";Pn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},31687:function(Vn,Pn){"use strict";Pn.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"}},83882:function(Vn,Pn){"use strict";Pn.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"}},92394:function(Vn,Pn,pe){"use strict";var ge=pe(59301),Oe=Object.defineProperty,Ke=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,_e=(Pt,Xe,Et)=>Xe in Pt?Oe(Pt,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Et}):Pt[Xe]=Et,Le=(Pt,Xe)=>{for(var Et in Xe||(Xe={}))st.call(Xe,Et)&&_e(Pt,Et,Xe[Et]);if(Ke)for(var Et of Ke(Xe))Ge.call(Xe,Et)&&_e(Pt,Et,Xe[Et]);return Pt};const Tt=Pt=>React.createElement("svg",Le({className:"jiangxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},Pt),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"}));Pn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},65799:function(Vn,Pn,pe){"use strict";var ge=pe(59301),Oe=Object.defineProperty,Ke=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,_e=(Pt,Xe,Et)=>Xe in Pt?Oe(Pt,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Et}):Pt[Xe]=Et,Le=(Pt,Xe)=>{for(var Et in Xe||(Xe={}))st.call(Xe,Et)&&_e(Pt,Et,Xe[Et]);if(Ke)for(var Et of Ke(Xe))Ge.call(Xe,Et)&&_e(Pt,Et,Xe[Et]);return Pt};const Tt=Pt=>React.createElement("svg",Le({className:"shengxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},Pt),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"}));Pn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},29277:function(){"use strict";function Vn(Be,ne,ee,ce){ee===void 0&&(ee=0),ce===void 0&&(ce=1/0),this._name=Be,this._defaultValue=ne,this._minimum=ee,this._maximum=ce}Object.defineProperty(Vn.prototype,"name",{get:function(){return this._name},set:function(Be){if(typeof Be!="string"||Be==="")throw new Error("Shape name must be a valid string.");this._name=Be}}),Object.defineProperty(Vn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Be){if(typeof Be!="number"||isNaN(Be))throw new Error("The default value must be a real number, not: "+Be);this._defaultValue=Be}}),Object.defineProperty(Vn.prototype,"minimum",{get:function(){return this._minimum},set:function(Be){if(typeof Be!="number"||isNaN(Be))throw new Error("Minimum must be a real number, not: "+Be);this._minimum=Be}}),Object.defineProperty(Vn.prototype,"maximum",{get:function(){return this._maximum},set:function(Be){if(typeof Be!="number"||isNaN(Be))throw new Error("Maximum must be a real number, not: "+Be);this._maximum=Be}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Be,ne){var ee=go.Shape._FigureParameters[Be];return ee?ee[ne]:null},go.Shape.setFigureParameter=function(Be,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[Be];ce||(ce=[],go.Shape._FigureParameters[Be]=ce),ce[ne]=ee};var Pn=[];function pe(Be,ne){var ee=Pn.pop();return ee===void 0?new go.Point(Be,ne):(ee.x=Be,ee.y=ne,ee)}function ge(){var Be=Pn.pop();return Be===void 0?new go.Point:Be}function Oe(Be){Pn.push(Be)}function Ke(Be,ne,ee,ce,se,he,ve,be,ke){ke||(ke=new go.Point);var Ae=Be-ee,ze=se-ve,Ze=NaN,ot=NaN;if(Ae===0)if(ze===0)Be===ee&&(Ze=Be,ot=ne);else{var qe=(he-be)/ze,bt=he-qe*se;Ze=Be,ot=qe*Ze+bt}else if(ze===0){var He=(ne-ce)/Ae,wt=ne-He*Be;Ze=se,ot=He*Ze+wt}else{var He=(ne-ce)/Ae,qe=(he-be)/ze,wt=ne-He*Be,bt=he-qe*se;Ze=(bt-wt)/(He-qe),ot=He*Ze+wt}return ke.x=Ze,ke.y=ot,ke}function st(Be,ne,ee,ce,se,he,ve,be,ke,Ae,ze,Ze,ot,qe){var bt=1-ke,He=ke,wt=Be*bt+ee*He,nt=ne*bt+ce*He,Dt=ee*bt+se*He,ht=ce*bt+he*He,zt=se*bt+ve*He,Yt=he*bt+be*He,Ut=wt*bt+Dt*He,it=nt*bt+ht*He,Ve=Dt*bt+zt*He,Wt=ht*bt+Yt*He,Ln=Ut*bt+Ve*He,Nn=it*bt+Wt*He;Ae.x=wt,Ae.y=nt,ze.x=Ut,ze.y=it,Ze.x=Ln,Ze.y=Nn,ot.x=Ve,ot.y=Wt,qe.x=zt,qe.y=Yt}var Ge=new go.Spot(.156,.156),_e=new go.Spot(.844,.844),Le=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Vn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=5),ce=Math.min(ce,ne/3),ce=Math.min(ce,ee/3);var se=ce*Le,he=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&&(he.spot1=new go.Spot(0,0,se,se),he.spot2=new go.Spot(1,1,-se,-se)),he}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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=Ge,se.spot2=_e,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Be,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(Be,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(Be,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,Le*ne,0,ne,(1-Le)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(Be,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,0,Le*ee,(1-Le)*ne,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(Be,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,ne,Le*ee,Le*ne,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(Be,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Le)*ne,0,0,(1-Le)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Be,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(Be,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(Be,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(Be,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(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)?ce=.1:ce<-1?ce=-1:ce>1&&(ce=1);var se=Math.abs(ce)*ne;if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=ne,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.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())):he.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&&he.setSpots(se/ne,0,(ne-se)/ne,1),he}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Vn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)?ce=10:ce<-ne?ce=-ne:ce>ne&&(ce=ne);var se=Math.abs(ce);if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=ne,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.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())):he.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&&he.setSpots(se/ne,0,(ne-se)/ne,1),he}}),go.Shape.setFigureParameter("Trapezoid1",0,new Vn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)?ce=.2:ce<.5?ce=-.5:ce>.5&&(ce=.5);var se=Math.abs(ce)*ne;if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=ne,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.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())):he.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&&he.setSpots(se/ne,0,(ne-se)/ne,1),he}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Vn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Be,ne,ee){var ce=Be?Be.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 he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=ne,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.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())):he.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&&he.setSpots(se/ne,0,(ne-se)/ne,1),he}}),go.Shape.setFigureParameter("ManualOperation",0,new Vn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Be,ne,ee){var ce=Be?Be.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 he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=ne,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.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())):he.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&&he.setSpots(se/ne,0,(ne-se)/ne,1),he}});var Tt=[];function Pt(){var Be=Tt.pop();return Be===void 0?[]:Be}function Xe(Be){Be.length=0,Tt.push(Be)}function Et(Be){for(var ne=Pt(),ee=.5,ce=.5,se=Math.PI*1.5,he=0,ve=0;ve<Be;ve++)he=2*Math.PI/Be*ve+se,ne[ve]=new go.Point(ce+ee*Math.cos(he),ce+ee*Math.sin(he));return ne.push(ne[0]),ne}function ct(Be){var ne=It(Be),ee=Pt();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 Xe(ne),ee}function It(Be){for(var ne=Et(Be),ee=Pt(),ce=Math.floor(ne.length/2),se=ne.length-1,he=Be%2===0?2:1,ve=0;ve<se;ve++){var be=ne[ve],ke=ne[ve+1],Ae=ne[(ce+ve-1)%se],ze=ne[(ce+ve+he)%se];ee[ve*2]=be,ee[ve*2+1]=Ke(be.x,be.y,Ae.x,Ae.y,ke.x,ke.y,ze.x,ze.y,new go.Point)}return ee[ee.length]=ee[0],Xe(ne),ee}go.Shape.defineFigureGenerator("Pentagon",function(Be,ne,ee){var ce=Et(5),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<5;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Be,ne,ee){var ce=Et(6),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<6;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Be,ne,ee){var ce=Et(7),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<7;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Be,ne,ee){var ce=Et(8),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<8;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Be,ne,ee){var ce=Et(9),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<9;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Be,ne,ee){var ce=Et(10),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Be,ne,ee){var ce=Et(12),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Be,ne,ee){var ce=It(5),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Be,ne,ee){var ce=It(6),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Be,ne,ee){var ce=It(7),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<14;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Be,ne,ee){var ce=It(8),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<16;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Be,ne,ee){var ce=It(9),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<18;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Be,ne,ee){var ce=It(10),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<20;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Xe(ce),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Be,ne,ee){var ce=ct(5),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Xe(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Be,ne,ee){var ce=ct(6),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Xe(ce),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Be,ne,ee){var ce=ct(7),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Xe(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Be,ne,ee){var ce=ct(8),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Xe(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Be,ne,ee){var ce=ct(9),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Xe(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Be,ne,ee){var ce=ct(10),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Xe(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(Be,ne,ee){var ce=Be?Be.parameter1:NaN,se=Be?Be.parameter2:NaN;isNaN(ce)&&(ce=8),isNaN(se)&&(se=8);var he=new go.Geometry,ve=new go.PathFigure(0,0,!0);return he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce<ne/2&&se<ee/2&&(ve.add(new go.PathSegment(go.PathSegment.Move,ce,se)),ve.add(new go.PathSegment(go.PathSegment.Line,ce,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ce,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ce,se).close())),he.setSpots(0,0,1,1,ce,se,-ce,-se),he}),go.Shape.setFigureParameter("Ring",0,new Vn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=8);var se=ne/2,he=new go.Geometry,ve=new go.PathFigure(ne,ne/2,!0);he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var be=Math.max(se-ce,0);return be>0&&(ve.add(new go.PathSegment(go.PathSegment.Move,ne/2+be,ne/2)),ve.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,be,be).close())),he.spot1=Ge,he.spot2=_e,he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Cloud",function(Be,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(Be,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(Be,ne,ee){var ce=Be?Be.parameter1:NaN,se=Be?Be.parameter2:NaN;isNaN(ce)&&(ce=0),isNaN(se)&&(se=315);var he=ce%360;he<0&&(he+=360);var ve=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,he,ve,be,be,be,be).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Be,ne,ee){var ce=Le/Math.SQRT2*.5,se=Math.SQRT2/2,he=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(ne,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*ne,he*ee,ne,(1-ce)*ee,(se+ce)*ne,(he+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(Be,ne,ee){var ce=Be?Be.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=30);var se=Math.min(ce,ne)/2,he=ne/2,ve=ee/2;return new go.Geometry().add(new go.PathFigure(he-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,he+se,0)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Vn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=10);var se=Math.min(ce,ne)/2,he=ne/2,ve=ee/2;return new go.Geometry().add(new go.PathFigure(he-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,he+se,0)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new Vn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Be,ne,ee){var ce=Be?Be.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 he=ne/2,ve=ee/2,be=Math.atan2(ee,ne),ke=ce-Math.min(Math.cos(be)*ce/2,he),Ae=ce-Math.min(Math.sin(be)*ce/2,ve),se=new go.Geometry,ze=new go.PathFigure(ke,0,!0);return se.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,he,.2*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,ne-ke,0)),ze.add(new go.PathSegment(go.PathSegment.Line,ne,Ae)),ze.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,ne,ee-Ae)),ze.add(new go.PathSegment(go.PathSegment.Line,ne-ke,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,he,.8*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,ke,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,0,ee-Ae)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,0,Ae).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new Vn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=10);var se=new go.Geometry,he=new go.PathFigure(.1*ne,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*ee)),he.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(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=.2);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ce*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+ce/2)*ne,ce*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+ce/2)*ne,(1-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,(1-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-ce/2)*ne,(1-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-ce/2)*ne,ce*ee)),he.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(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=.5);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,Math.abs(1-ce)*ne,.25*ee,Math.abs(1-ce)*ne,.75*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ce*ne,.75*ee,ce*ne,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Be,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,Le*ne,0,ne,(.5-Le/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,ne,(.5+Le/2)*ee,Le*ne,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Be,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(Be,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(Be,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(Be,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 he=.2,ve=.3,be=0,ke=he*Le;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5+he+be)*ee,(.5-he+ve)*ne,(.5+ke+be)*ee,(.5-ke+ve)*ne,(.5+he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*ne,(.5+be)*ee,(.5+ke+ve)*ne,(.5+he+be)*ee,(.5+he+ve)*ne,(.5+ke+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5-he+be)*ee,(1-.5+he+ve)*ne,(.5-ke+be)*ee,(.5+ke+ve)*ne,(.5-he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*ne,.36771243*ee,(.5-ke+ve)*ne,(.5-he+be)*ee,(.5-he+ve+.05)*ne,(.5-ke+be-.02)*ee)),he=.2,ve=0,be=-.3,ke=he*Le,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*ne,(.5+be)*ee,(.5+ke+ve)*ne,(.5+he+be)*ee,(.5+he+ve)*ne,(.5+ke+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5-he+be)*ee,(1-.5+he+ve)*ne,(.5-ke+be)*ee,(.5+ke+ve)*ne,(.5-he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*ne,(.5+be)*ee,(.5-ke+ve)*ne,(.5-he+be)*ee,(.5-he+ve)*ne,(.5-ke+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ke+ve)*ne,(.5+he+be)*ee,(.5-he+ve)*ne,(.5+ke+be)*ee,(.5-ke+ve)*ne,(.5+he+be)*ee)),he=.2,ve=-.3,be=0,ke=he*Le,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5-he+be)*ee,(1-.5+he+ve-.05)*ne,(.5-ke+be-.02)*ee,(.5+ke+ve)*ne,(.5-he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*ne,(.5+be)*ee,(.5-ke+ve)*ne,(.5-he+be)*ee,(.5-he+ve)*ne,(.5-ke+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5+he+be)*ee,(.5-he+ve)*ne,(.5+ke+be)*ee,(.5-ke+ve)*ne,(.5+he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.6*ee,(.5+ke+ve)*ne,(.5+he+be)*ee,(.5+he+ve)*ne,(.5+ke+be)*ee).close()),ce.setSpots(.06,.33,.93,.68),ce}),go.Shape.defineFigureGenerator("YinYang",function(Be,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 he=.1,ve=.5,be=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(ve+he)*ne,be*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ne*ve,ee*be,he*ne,he*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((ve+he)*ne,be*ee,!0),ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,ne*ve,ee*be,he*ne,he*ne).close()),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("Peace",function(Be,ne,ee){var ce=.8535533905932737,se=.5*ne,he=.5*ee;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,he,se,he)).add(new go.PathSegment(go.PathSegment.Line,se,ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,ce*ne,ce*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Be,ne,ee){var ce=new go.Geometry,se=Le*.5,he=.5,ve=.5,be=.5,ke=new go.PathFigure(ve*ne,(be-he)*ee);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),he=.4,se=Le*.4;var Ae=ge(),ze=ge(),Ze=ge(),ot=ge();st(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.42,Ae,ze,Ze,ot,ot);var qe=ge(),bt=ge(),He=ge();st(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.58,ot,ot,He,qe,bt);var wt=ge(),nt=ge(),Dt=ge();st(ve,be+he,ve-se,be+he,ve-he,be+se,ve-he,be,.42,wt,nt,Dt,ot,ot);var ht=ge(),zt=ge(),Yt=ge();return st(ve,be+he,ve-se,be+he,ve-he,be+se,ve-he,be,.58,ot,ot,Yt,ht,zt),ke.add(new go.PathSegment(go.PathSegment.Move,Yt.x*ne,Yt.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,ht.x*ne,ht.y*ee,zt.x*ne,zt.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,Ze.x*ne,Ze.y*ee,Ae.x*ne,Ae.y*ee,ze.x*ne,ze.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,Yt.x*ne,Yt.y*ee).close()),ke.add(new go.PathSegment(go.PathSegment.Move,Dt.x*ne,Dt.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,He.x*ne,He.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,qe.x*ne,qe.y*ee,bt.x*ne,bt.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,Dt.x*ne,Dt.y*ee,wt.x*ne,wt.y*ee,nt.x*ne,nt.y*ee).close()),Oe(Ae),Oe(ze),Oe(Ze),Oe(ot),Oe(qe),Oe(bt),Oe(He),Oe(wt),Oe(nt),Oe(Dt),Oe(ht),Oe(zt),Oe(Yt),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("Fragile",function(Be,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(Be,ne,ee){var ce=Be?Be.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=30),ce>ne&&(ce=ne);var se=(ne-ce)/2,he=se+ce;return new go.Geometry().add(new go.PathFigure(he,.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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Le*.4,he=.4,ve=.5,be=.5,ke=ge(),Ae=ge(),ze=ge(),Ze=ge(),ot=new go.PathFigure((ve-he)*ne,be*ee,!1);ce.add(ot),ot.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee)),st(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.44,ze,Ze,Ae,ke,ke),ot.add(new go.PathSegment(go.PathSegment.Bezier,Ae.x*ne,Ae.y*ee,ze.x*ne,ze.y*ee,Ze.x*ne,Ze.y*ee));var qe=pe(Ae.x,Ae.y);st(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.56,ke,ke,Ae,ze,Ze);var bt=pe(Ae.x,Ae.y);ot.add(new go.PathSegment(go.PathSegment.Line,(qe.x*.1+.95*.9)*ne,qe.y*.1*ee)),ot.add(new go.PathSegment(go.PathSegment.Line,.85*ne,qe.y*.1*ee)),ot.add(new go.PathSegment(go.PathSegment.Line,.85*ne,0)),ot.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ot.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),ot.add(new go.PathSegment(go.PathSegment.Line,(bt.x*.1+.9)*ne,.15*ee)),ot.add(new go.PathSegment(go.PathSegment.Line,(bt.x*.1+.9)*ne,(bt.y*.1+.05*.9)*ee)),ot.add(new go.PathSegment(go.PathSegment.Line,bt.x*ne,bt.y*ee)),ot.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,ze.x*ne,ze.y*ee,Ze.x*ne,Ze.y*ee)),ot.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee)),ot.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee)),he=.35,se=Le*.35;var He=new go.PathFigure(ve*ne,(be-he)*ee,!1);ce.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee));var wt=new go.PathFigure((ve-he)*ne,be*ee,!1);return ce.add(wt),Oe(ke),Oe(Ae),Oe(ze),Oe(Ze),Oe(qe),Oe(bt),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(Be,ne,ee){var ce=new go.Geometry,se=.375,he=0,ve=-.125,be=se*Le,ke=new go.PathFigure((.525+he)*ne,(.5+se+ve)*ee,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+he)*ne,(.5+ve)*ee,(.5+be+he)*ne,(.5+se+ve)*ee,(.5+se+he)*ne,(.5+be+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*ne,(.5-se+ve)*ee,(1-.5+se+he)*ne,(.5-be+ve)*ee,(.5+be+he)*ne,(.5-se+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*ne,(.5+ve)*ee,(.5-be+he)*ne,(.5-se+ve)*ee,(.5-se+he)*ne,(.5-be+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.475+he)*ne,(.5+se+ve)*ee,(.5-se+he)*ne,(.5+be+ve)*ee,(.5-be+he)*ne,(.5+se+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.85*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.85*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.9*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.9*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.475*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.525*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.9*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.9*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.85*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.85*ee).close()),se=.325,he=0,ve=-.125,be=se*Le;var ke=new go.PathFigure((1-.5+se+he)*ne,(.5+ve)*ee,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*ne,(.5+se+ve)*ee,(.5+se+he)*ne,(.5+be+ve)*ee,(.5+be+he)*ne,(.5+se+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*ne,(.5+ve)*ee,(.5-be+he)*ne,(.5+se+ve)*ee,(.5-se+he)*ne,(.5+be+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*ne,(.5-se+ve)*ee,(.5-se+he)*ne,(.5-be+ve)*ee,(.5-be+he)*ne,(.5-se+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+he)*ne,(.5+ve)*ee,(.5+be+he)*ne,(.5-se+ve)*ee,(1-.5+se+he)*ne,(.5-be+ve)*ee));var ke=new go.PathFigure((.525+he)*ne,(.5+se+ve)*ee,!1);return ce.add(ke),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(Be,ne,ee){var ce=Be?Be.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(Be,ne,ee){var ce=Be?Be.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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=Be?Be.parameter2:NaN;isNaN(se)&&(se=.3);var he=(1-ce)*ne,ve=(.5-se/2)*ee,be=(.5+se/2)*ee,ke=new go.Geometry,Ae=new go.PathFigure(0,ve,!0);ke.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,he,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,he,be)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),ke.spot1=new go.Spot(0,ve/ee);var ze=Ke(0,be/ee,1,be/ee,he/ne,1,1,.5,ge());return ke.spot2=new go.Spot(ze.x,ze.y),Oe(ze),ke}),go.Shape.setFigureParameter("Arrow2",0,new Vn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Vn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=30),ce>ne&&(ce=ne);var se=Be?Be.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var he=ne-ce,ve=(ee-se)/2,be=ve+se,ke=new go.Geometry,Ae=new go.PathFigure(0,ve,!0);ke.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,he,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,he,be)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),ke.spot1=new go.Spot(0,ve/ee);var ze=Ke(0,be/ee,1,be/ee,he/ne,1,1,.5,ge());return ke.spot2=new go.Spot(ze.x,ze.y),Oe(ze),ke}),go.Shape.defineFigureGenerator("Chevron",function(Be,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(Be,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(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=(.5-ce/2)*ee,he=(.5+ce/2)*ee,ve=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),be.add(new go.PathSegment(go.PathSegment.Line,.3*ne,he)),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 ke=Ke(0,.5,.3,0,0,se/ee,.1,se/ee,ge());return ve.spot1=new go.Spot(ke.x,ke.y),ke=Ke(.7,1,1,.5,0,he/ee,1,he/ee,ke),ve.spot2=new go.Spot(ke.x,ke.y),Oe(ke),ve}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Vn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Vn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=40);var se=Be?Be.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-ce)/2,ve=he+ce,be=(ee-se)/2,ke=be+se;(ce>ee||se>ee)&&(se>ce?(ce=ce*ee/se,he=(ee-ce)/2,ve=he+ce,be=0,ke=ee):(he=0,ve=ee,be=0,ke=ee));var Ae=new go.Geometry,ze=new go.PathFigure(ne,.5*ee,!0);Ae.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ke)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ke)),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,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,be).close());var Ze=Ke(0,.5,.3,be/ee,0,he/ee,1,he/ee,ge());return Ae.spot1=new go.Spot(Ze.x,Ze.y),Ze=Ke(.7,ke/ee,1,.5,0,ve/ee,1,ve/ee,Ze),Ae.spot2=new go.Spot(Ze.x,Ze.y),Oe(Ze),Ae}),go.Shape.setFigureParameter("IBeamArrow",0,new Vn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=(.5-ce/2)*ee,he=(.5+ce/2)*ee,ve=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,he)),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()),ve.spot1=new go.Spot(0,se/ee);var ke=Ke(.7,1,1,.5,0,he/ee,1,he/ee,ge());return ve.spot2=new go.Spot(ke.x,ke.y),Oe(ke),ve}),go.Shape.setFigureParameter("IBeamArrow2",0,new Vn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Vn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=40);var se=Be?Be.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-ce)/2,ve=he+ce,be=(ee-se)/2,ke=be+se;(ce>ee||se>ee)&&(se>ce?(ce=ce*ee/se,he=(ee-ce)/2,ve=he+ce,be=0,ke=ee):(he=0,ve=ee,be=0,ke=ee));var Ae=new go.Geometry,ze=new go.PathFigure(ne,.5*ee,!0);Ae.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ke)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ke)),ze.add(new go.PathSegment(go.PathSegment.Line,0,ke)),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,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,be).close()),Ae.spot1=new go.Spot(0,he/ee);var Ze=Ke(.7,ke/ee,1,.5,0,ve/ee,1,ve/ee,ge());return Ae.spot2=new go.Spot(Ze.x,Ze.y),Oe(Ze),Ae}),go.Shape.setFigureParameter("Pointer",0,new Vn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=.1);var se=new go.Geometry,he=new go.PathFigure(ne,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,ce*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(ce,.35);var ve=Ke(.2,.65,1,.65,0,1,1,.5,ge());return se.spot2=new go.Spot(ve.x,ve.y),Oe(ve),se}),go.Shape.setFigureParameter("RoundedPointer",0,new Vn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=new go.Geometry,he=new go.PathFigure(ne,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.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 ve=Ke(0,.65,1,.65,0,1,1,.5,ge());return se.spot2=new go.Spot(ve.x,ve.y),Oe(ve),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new Vn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=.4);var se=(.5-ce/2)*ee,he=(.5+ce/2)*ee,ve=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),be.add(new go.PathSegment(go.PathSegment.Line,0,he)),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()),ve.spot1=new go.Spot(.2,.3);var ke=Ke(.7,1,1,.5,0,he/ee,1,he/ee,ge());return ve.spot2=new go.Spot(ke.x,ke.y),Oe(ke),ve}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Vn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=50);var se=(ee-ce)/2,he=se+ce;ce>ee&&(se=0,he=ee);var ve=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),be.add(new go.PathSegment(go.PathSegment.Line,0,he)),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()),ve.spot1=new go.Spot(.2,se/ee);var ke=Ke(.7,1,1,.5,0,he/ee,1,he/ee,ge());return ve.spot2=new go.Spot(ke.x,ke.y),Oe(ke),ve}),go.Shape.setFigureParameter("SquareArrow",0,new Vn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=.7);var se=new go.Geometry,he=new go.PathFigure(ne,.5*ee,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ce*ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.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(Be,ne,ee){var ce=new go.Geometry,se=Le*.5,he=Le*.1,ve=new go.PathFigure(0,.9*ee,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.9+he)*ee,(.5+se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*ne,ee,0,(.9+he)*ee).close()),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.97),ce}),go.Shape.defineFigureGenerator("Cone2",function(Be,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 he=new go.PathFigure(0,.9*ee,!1);return ce.add(he),he.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(Be,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 he=new go.PathFigure(.5*ne,ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.3*ee)),he.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(Be,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 he=new go.PathFigure(0,.3*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Move,.7*ne,.3*ee)),he.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(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ee/3);var se=new go.Geometry,he=Le*.5,ve=new go.PathFigure(0,ce,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,Le*ce,(.5-he)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,1*ne,ce,(.5+he)*ne,0,1*ne,Le*ce)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee-ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,1*ee,1*ne,ee-Le*ce,(.5+he)*ne,1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,(.5-he)*ne,1*ee,0,ee-Le*ce)),ve.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-Le*ce,(.5+he)*ne,2*ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,ce,(.5-he)*ne,2*ce,0,2*ce-Le*ce)),se.spot1=new go.Spot(0,0,0,2*ce),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ee/3);var se=new go.Geometry,he=Le*.5,ve=new go.PathFigure(0,ee-ce,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,Le*ce,(.5-he)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,ce,(.5+he)*ne,0,ne,Le*ce)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee-ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,ee-Le*ce,(.5+he)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,(.5-he)*ne,ee,0,ee-Le*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-Le*ce,(.5-he)*ne,ee-2*ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne,ee-ce,(.5+he)*ne,ee-2*ce,ne,ee-ce-Le*ce)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*ce),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ne/3);var se=new go.Geometry,he=Le*.5,ve=new go.PathFigure(ce,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ce,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,ne-Le*ce,0,ne,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne,(.5+he)*ee,ne-Le*ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Le*ce,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,(.5-he)*ee,Le*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+Le*ce,0,2*ce,(.5-he)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ce,ee,2*ce,(.5+he)*ee,ce+Le*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(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ne/3);var se=new go.Geometry,he=Le*.5,ve=new go.PathFigure(ne-ce,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,ne-Le*ce,0,ne,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne,(.5+he)*ee,ne-Le*ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Le*ce,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,(.5-he)*ee,Le*ce,0)),ve.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-Le*ce,0,ne-2*ce,(.5-he)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne-2*ce,(.5+he)*ee,ne-ce-Le*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(Be,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 he=new go.PathFigure(.25*ne,.25*ee,!1);return ce.add(he),he.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(Be,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 he=new go.PathFigure(0,ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),he.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(Be,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 he=new go.PathFigure(.5*ne,0,!1);return ce.add(he),he.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(Be,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 he=new go.PathFigure(.5*ne,0,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*ee)),he.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(Be,ne,ee){var ce=new go.Geometry,se=.2,he=.1,ve=Le*se,be=Le*he,ke=.5,Ae=.1,ze=new go.PathFigure(ke*ne,(Ae+he)*ee,!0);ce.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ke-se)*ne,Ae*ee,(ke-ve)*ne,(Ae+he)*ee,(ke-se)*ne,(Ae+be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae-he)*ee,(ke-se)*ne,(Ae-be)*ee,(ke-ve)*ne,(Ae-he)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ke+se)*ne,Ae*ee,(ke+ve)*ne,(Ae-he)*ee,(ke+se)*ne,(Ae-be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae+he)*ee,(ke+se)*ne,(Ae+be)*ee,(ke+ve)*ne,(Ae+he)*ee));var Ze=.05,ot=Le*Ze;ke=.05,Ae=.25;var qe=new go.PathFigure(.5*ne,.2*ee,!0);return ce.add(qe),qe.add(new go.PathSegment(go.PathSegment.Line,.95*ne,.2*ee)),ke=.95,Ae=.25,qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke+Ze)*ne,Ae*ee,(ke+ot)*ne,(Ae-Ze)*ee,(ke+Ze)*ne,(Ae-ot)*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,ne,.6*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.35*ee)),Ze=.025,ot=Le*Ze,ke=.825,Ae=.35,qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae-Ze)*ee,(ke+Ze)*ne,(Ae-ot)*ee,(ke+ot)*ne,(Ae-Ze)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-Ze)*ne,Ae*ee,(ke-ot)*ne,(Ae-Ze)*ee,(ke-Ze)*ne,(Ae-ot)*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*ee)),Ze=.05,ot=Le*Ze,ke=.5,Ae=.7,qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae-Ze)*ee,(ke+Ze)*ne,(Ae-ot)*ee,(ke+ot)*ne,(Ae-Ze)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-Ze)*ne,Ae*ee,(ke-ot)*ne,(Ae-Ze)*ee,(ke-Ze)*ne,(Ae-ot)*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.45*ne,ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.35*ee)),Ze=.025,ot=Le*Ze,ke=.175,Ae=.35,qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae-Ze)*ee,(ke+Ze)*ne,(Ae-ot)*ee,(ke+ot)*ne,(Ae-Ze)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-Ze)*ne,Ae*ee,(ke-ot)*ne,(Ae-Ze)*ee,(ke-Ze)*ne,(Ae-ot)*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),Ze=.05,ot=Le*Ze,ke=.05,Ae=.25,qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae-Ze)*ee,(ke-Ze)*ne,(Ae-ot)*ee,(ke-ot)*ne,(Ae-Ze)*ee)),qe.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(Be,ne,ee){var ce=Be?Be.parameter1:NaN;isNaN(ce)&&(ce=.2);var se=new go.Geometry,he=new go.PathFigure(ne,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ce*ee)),he.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(Be,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 he=new go.PathFigure(.5*ne,.5*ee,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.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(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*ee)),ce}),go.Shape.defineFigureGenerator("Database",function(Be,ne,ee){var ce=new go.Geometry,se=Le*.5,he=Le*.1,ve=new go.PathFigure(ne,.1*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.9+he)*ee,(.5+se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*ne,ee,0,(.9+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-he)*ee,(.5-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*ee,(.5+se)*ne,0,ne,(.1-he)*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+he)*ee,(.5+se)*ne,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*ne,.2*ee,0,(.1+he)*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+he)*ee,(.5+se)*ne,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*ne,.3*ee,0,(.2+he)*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+he)*ee,(.5+se)*ne,.4*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-se)*ne,.4*ee,0,(.3+he)*ee)),ce.spot1=new go.Spot(0,.4),ce.spot2=new go.Spot(1,.9),ce}),go.Shape.defineFigureGenerator("DataStorage",function(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Le*.5,he=Le*.1,ve=new go.PathFigure(ne,.1*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.9+he)*ee,(.5+se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*ne,ee,0,(.9+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-he)*ee,(.5-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*ee,(.5+se)*ne,0,ne,(.1-he)*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+he)*ee,(.5+se)*ne,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*ne,.2*ee,0,(.1+he)*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+he)*ee,(.5+se)*ne,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*ne,.3*ee,0,(.2+he)*ee)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(1,.9),ce}),go.Shape.defineFigureGenerator("Display",function(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var he=Le*.2,ve=new go.PathFigure(0,.2*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,0,(.2-he)*ee,(.2-he)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.2*ee,(.8+he)*ne,0,ne,(.2-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,ee,ne,(.8+he)*ee,(.8+he)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-he)*ne,ee,0,(.8+he)*ee)),ve.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(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,se*ee)),ce}),go.Shape.defineFigureGenerator("Document",function(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*ne,0,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,ne,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*ee)),ce}),go.Shape.defineFigureGenerator("ExternalProcess",function(Be,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 he=new go.PathFigure(.1*ne,.4*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.9*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.6*ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.4*ne,.9*ee)),he.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(Be,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 he=new go.PathFigure(.75*ne,0,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.25*ee)),he.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(Be,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 he=new go.PathFigure(ne,.5*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee));var ve=new go.PathFigure(ne,.5*ee,!1);return ce.add(ve),ve.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(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN,he=Be?Be.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.1);var ve=new go.PathFigure(0,0,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ve.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,he*ee)),be.add(new go.PathSegment(go.PathSegment.Line,ne,he*ee)),ce}),go.Shape.defineFigureGenerator("Junction",function(Be,ne,ee){var ce=new go.Geometry,se=1/Math.SQRT2,he=(1-1/Math.SQRT2)/2,ve=Le*.5,be=.5,ke=new go.PathFigure(ne,be*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,be*ne,ee,ne,(be+ve)*ee,(be+ve)*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,0,be*ee,(be-ve)*ne,ee,0,(be+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,be*ne,0,0,(be-ve)*ee,(be-ve)*ne,0)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ne,be*ee,(be+ve)*ne,0,ne,(be-ve)*ee));var Ae=new go.PathFigure((he+se)*ne,(he+se)*ee,!1);return ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,he*ne,he*ee)),Ae.add(new go.PathSegment(go.PathSegment.Move,he*ne,(he+se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,(he+se)*ne,he*ee)),ce}),go.Shape.defineFigureGenerator("LinedDocument",function(Be,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 he=new go.PathFigure(.1*ne,0,!1);return ce.add(he),he.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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Le*.5,he=.5,ve=new go.PathFigure(.5*ne,ee,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*ne,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*ne,0,0,(he-se)*ee,(he-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,he*ee,(he+se)*ne,0,ne,(he-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(he+.1)*ne,.9*ee,ne,(he+se)*ee,(he+se)*ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ve.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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;isNaN(se)&&(se=.7);var he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,se*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=go.Spot.TopLeft,ce}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,se*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("MicroformRecording",function(Be,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(Be,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 he=new go.PathFigure(.1*ne,.2*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*ee)),he.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(Be,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 he=new go.PathFigure(.2*ne,.1*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.1*ne,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),he.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(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;isNaN(se)&&(se=.1);var he=1-se,ve=new go.PathFigure(0,0,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Le*.5,he=.5,ve=new go.PathFigure(ne,he*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*ne,ee,ne,(he+se)*ee,(he+se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*ne,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*ne,0,0,(he-se)*ee,(he-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,he*ee,(he+se)*ne,0,ne,(he-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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN,he=Be?Be.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*ne,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN,he=Be?Be.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("Procedure",function(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure((1-se)*ne,0,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,se*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ce}),go.Shape.defineFigureGenerator("Process",function(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*ne,0,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("Sort",function(Be,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 he=new go.PathFigure(0,.5*ee,!1);return ce.add(he),he.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(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(se*ne,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ne,.5*ee,.25*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ne,.5*ee,.25*ne,.5*ee));var ve=new go.PathFigure(se*ne,0,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,0)),ve.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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Be?Be.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*ne,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*ee).close()),ce.spot1=go.Spot.TopLeft,ce}),go.Shape.defineFigureGenerator("AndGate",function(Be,ne,ee){var ce=new go.Geometry,se=Le*.5,he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,(.5+se)*ne,0,ne,(.5-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.5+se)*ee,(.5+se)*ne,ee)),he.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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Le*.5,he=.5,ve=new go.PathFigure(ne,he*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*ne,ee,ne,(he+se)*ee,(he+se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*ne,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*ne,0,0,(he-se)*ee,(he-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,he*ee,(he+se)*ne,0,ne,(he-se)*ee));var be=new go.PathFigure(ne,he*ee,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne,he*ee));var ke=new go.PathFigure(.8*ne,.75*ee,!1);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.25*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.25*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.75*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.75*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.25*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.25*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.75*ee)),ce}),go.Shape.defineFigureGenerator("Ground",function(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Le*.1,he=.1,ve=.9,be=.5,ke=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,0,0)),ke.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*ee));var Ae=new go.PathFigure((ve+he)*ne,be*ee,!0);return ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,(ve+se)*ne,(be-he)*ee,(ve+he)*ne,(be-se)*ee)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.4,.75),ce}),go.Shape.defineFigureGenerator("NandGate",function(Be,ne,ee){var ce=new go.Geometry,se=Le*.5,he=Le*.4,ve=Le*.1,be=.1,ke=.9,Ae=.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+he)*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-he)*ee));var Ze=new go.PathFigure((ke+be)*ne,Ae*ee,!0);return ce.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae+be)*ee,(ke+be)*ne,(Ae+ve)*ee,(ke+ve)*ne,(Ae+be)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be)*ne,Ae*ee,(ke-ve)*ne,(Ae+be)*ee,(ke-be)*ne,(Ae+ve)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae-be)*ee,(ke-be)*ne,(Ae-ve)*ee,(ke-ve)*ne,(Ae-be)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be)*ne,Ae*ee,(ke+ve)*ne,(Ae-be)*ee,(ke+be)*ne,(Ae-ve)*ee)),ce.spot1=new go.Spot(0,.05),ce.spot2=new go.Spot(.55,.95),ce}),go.Shape.defineFigureGenerator("NorGate",function(Be,ne,ee){var ce=new go.Geometry,se=.5,he=Le*se,ve=0,be=.5,ke=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*ee,.25*ne,.25*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*ee,(ve+he)*ne,(be-se)*ee,.7*ne,(be-he)*ee)),se=.1,he=Le*.1,ve=.9,be=.5;var Ae=new go.PathFigure((ve-se)*ne,be*ee,!0);return ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee)),ce.spot1=new go.Spot(.2,.25),ce.spot2=new go.Spot(.6,.75),ce}),go.Shape.defineFigureGenerator("OrGate",function(Be,ne,ee){var ce=new go.Geometry,se=.5,he=Le*se,ve=0,be=.5,ke=new go.PathFigure(0,0,!0);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,(ve+he+he)*ne,(be-se)*ee,.8*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*ne,(be+he)*ee,(ve+he+he)*ne,(be+se)*ee)),ke.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(Be,ne,ee){var ce=new go.Geometry,se=.5,he=Le*se,ve=.2,be=.5,ke=new go.PathFigure(.1*ne,0,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,ee,.35*ne,.25*ee,.35*ne,.75*ee));var Ae=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,ee,.7*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*ee,.45*ne,.25*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*ee,(ve+he)*ne,(be-se)*ee,.7*ne,(be-he)*ee)),se=.1,he=Le*.1,ve=.9,be=.5;var ze=new go.PathFigure((ve-se)*ne,be*ee,!0);return ce.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee)),ce.spot1=new go.Spot(.4,.25),ce.spot2=new go.Spot(.65,.75),ce}),go.Shape.defineFigureGenerator("XorGate",function(Be,ne,ee){var ce=new go.Geometry,se=.5,he=Le*se,ve=.2,be=.5,ke=new go.PathFigure(.1*ne,0,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,ee,.35*ne,.25*ee,.35*ne,.75*ee));var Ae=new go.PathFigure(.2*ne,0,!0);return ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,(ve+he)*ne,(be-se)*ee,.9*ne,(be-he)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,ee,.9*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),Ae.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(Be,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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=Le*.1,he=.1,ve=.1,be=.5,ke=new go.PathFigure((ve-se*.5)*ne,ee,!1);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,0,(ve-se)*ne,ee,(ve-he)*ne,0)),ve=.3,ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,ee,(ve+he)*ne,0,(ve+se)*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,0,(ve-se)*ne,ee,(ve-he)*ne,0)),ve=.5,ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,ee,(ve+he)*ne,0,(ve+se)*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,0,(ve-se)*ne,ee,(ve-he)*ne,0)),ve=.7,ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,ee,(ve+he)*ne,0,(ve+se)*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,0,(ve-se)*ne,ee,(ve-he)*ne,0)),ve=.9,ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se*.5)*ne,ee,(ve+he)*ne,0,(ve+se)*ne,ee)),ce}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Be,ne,ee){var ce=new go.Geometry,se=Le*.5,he=.5,ve=.5,be=.5,ke=new go.PathFigure((ve-he)*ne,be*ee,!1);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,(ve+se)*ne,(be-he)*ee,(ve+he)*ne,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Move,(ve-he+.1)*ne,be*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he-.1)*ne,be*ee,ve*ne,(be-he)*ee,ve*ne,(be+he)*ee)),ce}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Be,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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=ne,he=ee;ne=ne*.38,ee=ee*.6;var ve=Le*.8,be=.8,ke=0,Ae=.5,ze=(se-ne)/2,Ze=(he-ee)/2,ot=new go.PathFigure(ke*ne+ze,(Ae+be)*ee+Ze,!0);ce.add(ot),ot.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be)*ne+ze,Ae*ee+Ze,(ke-ve)*ne+ze,(Ae+be)*ee+Ze,(ke-be)*ne+ze,(Ae+ve)*ee+Ze)),ot.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+ze,(Ae-be)*ee+Ze,(ke-be)*ne+ze,(Ae-ve)*ee+Ze,(ke-ve)*ne+ze,(Ae-be)*ee+Ze)),ot.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be+ve*.5)*ne+ze,Ae*ee+Ze,ke*ne+ze,(Ae-be)*ee+Ze,(ke-be+ve*.5)*ne+ze,(Ae-ve)*ee+Ze)),ot.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+ze,(Ae+be)*ee+Ze,(ke-be+ve*.5)*ne+ze,(Ae+ve)*ee+Ze,ke*ne+ze,(Ae+be)*ee+Ze).close()),ve=Le*.4,be=.4,ke=.2,Ae=.5;var qe=new go.PathFigure(ke*ne+ze,(Ae+be)*ee+Ze,!0);ce.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be)*ne+ze,Ae*ee+Ze,(ke-ve)*ne+ze,(Ae+be)*ee+Ze,(ke-be)*ne+ze,(Ae+ve)*ee+Ze)),qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+ze,(Ae-be)*ee+Ze,(ke-be)*ne+ze,(Ae-ve)*ee+Ze,(ke-ve)*ne+ze,(Ae-be)*ee+Ze)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be+ve*.5)*ne+ze,Ae*ee+Ze,ke*ne+ze,(Ae-be)*ee+Ze,(ke-be+ve*.5)*ne+ze,(Ae-ve)*ee+Ze)),qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+ze,(Ae+be)*ee+Ze,(ke-be+ve*.5)*ne+ze,(Ae+ve)*ee+Ze,ke*ne+ze,(Ae+be)*ee+Ze).close()),ve=Le*.2,be=.2,ke=.5,Ae=.5;var bt=new go.PathFigure((ke-be)*ne+ze,Ae*ee+Ze,!0);ce.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+ze,(Ae-be)*ee+Ze,(ke-be)*ne+ze,(Ae-ve)*ee+Ze,(ke-ve)*ne+ze,(Ae-be)*ee+Ze)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be)*ne+ze,Ae*ee+Ze,(ke+ve)*ne+ze,(Ae-be)*ee+Ze,(ke+be)*ne+ze,(Ae-ve)*ee+Ze)),bt.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+ze,(Ae+be)*ee+Ze,(ke+be)*ne+ze,(Ae+ve)*ee+Ze,(ke+ve)*ne+ze,(Ae+be)*ee+Ze)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be)*ne+ze,Ae*ee+Ze,(ke-ve)*ne+ze,(Ae+be)*ee+Ze,(ke-be)*ne+ze,(Ae+ve)*ee+Ze)),ve=Le*.4,be=.4,ke=.8,Ae=.5;var He=new go.PathFigure(ke*ne+ze,(Ae-be)*ee+Ze,!0);ce.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be)*ne+ze,Ae*ee+Ze,(ke+ve)*ne+ze,(Ae-be)*ee+Ze,(ke+be)*ne+ze,(Ae-ve)*ee+Ze)),He.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+ze,(Ae+be)*ee+Ze,(ke+be)*ne+ze,(Ae+ve)*ee+Ze,(ke+ve)*ne+ze,(Ae+be)*ee+Ze)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be-ve*.5)*ne+ze,Ae*ee+Ze,ke*ne+ze,(Ae+be)*ee+Ze,(ke+be-ve*.5)*ne+ze,(Ae+ve)*ee+Ze)),He.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+ze,(Ae-be)*ee+Ze,(ke+be-ve*.5)*ne+ze,(Ae-ve)*ee+Ze,ke*ne+ze,(Ae-be)*ee+Ze).close()),ve=Le*.8,be=.8,ke=1,Ae=.5;var wt=new go.PathFigure(ke*ne+ze,(Ae-be)*ee+Ze,!0);return ce.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be)*ne+ze,Ae*ee+Ze,(ke+ve)*ne+ze,(Ae-be)*ee+Ze,(ke+be)*ne+ze,(Ae-ve)*ee+Ze)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+ze,(Ae+be)*ee+Ze,(ke+be)*ne+ze,(Ae+ve)*ee+Ze,(ke+ve)*ne+ze,(Ae+be)*ee+Ze)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be-ve*.5)*ne+ze,Ae*ee+Ze,ke*ne+ze,(Ae+be)*ee+Ze,(ke+be-ve*.5)*ne+ze,(Ae+ve)*ee+Ze)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+ze,(Ae-be)*ee+Ze,(ke+be-ve*.5)*ne+ze,(Ae-ve)*ee+Ze,ke*ne+ze,(Ae-be)*ee+Ze).close()),ce}),go.Shape.defineFigureGenerator("Email",function(Be,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 he=new go.PathFigure(0,0,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Move,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.54*ee)),ce}),go.Shape.defineFigureGenerator("Ethernet",function(Be,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 he=new go.PathFigure(.1*ne,ee,!0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*ne,ee).close());var ve=new go.PathFigure(.6*ne,ee,!0,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.6*ee)),ve.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(Be,ne,ee){var ce=new go.Geometry,se=Le*.4,he=.4,ve=.5,be=.5,ke=ge(),Ae=ge(),ze=ge(),Ze=ge();st(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.5,ke,ke,Ae,ze,Ze);var ot=pe(Ae.x,Ae.y),qe=new go.PathFigure(Ae.x*ne,Ae.y*ee,!0);ce.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,ze.x*ne,ze.y*ee,Ze.x*ne,Ze.y*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee)),st(ve-he,be,ve-he,be-se,ve-se,be-he,ve,be-he,.5,ze,Ze,Ae,ke,ke),qe.add(new go.PathSegment(go.PathSegment.Bezier,Ae.x*ne,Ae.y*ee,ze.x*ne,ze.y*ee,Ze.x*ne,Ze.y*ee)),se=Le*.3,he=.3,st(ve-he,be,ve-he,be-se,ve-se,be-he,ve,be-he,.5,ze,Ze,Ae,ke,ke),qe.add(new go.PathSegment(go.PathSegment.Line,Ae.x*ne,Ae.y*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,Ze.x*ne,Ze.y*ee,ze.x*ne,ze.y*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),st(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.5,ke,ke,Ae,ze,Ze),qe.add(new go.PathSegment(go.PathSegment.Bezier,Ae.x*ne,Ae.y*ee,Ze.x*ne,Ze.y*ee,ze.x*ne,ze.y*ee).close());var qe=new go.PathFigure(.45*ne,0,!0);return ce.add(qe),qe.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.5*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.5*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,0).close()),Oe(ke),Oe(Ae),Oe(ze),Oe(Ze),Oe(ot),ce.spot1=new go.Spot(.25,.45),ce.spot2=new go.Spot(.75,.8),ce}),go.Shape.defineFigureGenerator("Fallout",function(Be,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 he(ve,be,ke){ve.add(new go.PathSegment(go.PathSegment.Move,(.3+be)*ne,(.8+ke)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.5+be)*ne,(.5+ke)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.1+be)*ne,(.5+ke)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.3+be)*ne,(.8+ke)*ee).close())}return he(se,0,0),he(se,.4,0),he(se,.2,-.3),ce}),go.Shape.defineFigureGenerator("IrritationHazard",function(Be,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(Be,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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=.5,he=0,ve=0,be=se*Le,ke=.4*Math.SQRT2/2+.5,Ae=.5-.5*Math.SQRT2/2,ze=1,Ze=.5,ot=.5,qe=0,bt=new go.PathFigure(ke*ne,(1-Ae)*ee,!1);return ce.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,ze*ne,Ze*ee,ze*ne,.7*ee,ze*ne,Ze*ee)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ot+he)*ne,(qe+he)*ee,(.5+se+he)*ne,(.5-be+he)*ee,(.5+be+he)*ne,(.5-se+he)*ee)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*ne,(.5+ve)*ee,(.5-be+he)*ne,(.5-se+ve)*ee,(.5-se+he)*ne,(.5-be+ve)*ee)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+he)*ne,.9*ee,(.5-se+he)*ne,(.5+be+ve)*ee,(.5-be+he)*ne,.9*ee)),bt.add(new go.PathSegment(go.PathSegment.Move,(.25+he)*ne,.8*ee)),bt.add(new go.PathSegment(go.PathSegment.Line,(.35+he)*ne,.9*ee)),bt.add(new go.PathSegment(go.PathSegment.Line,(.2+he)*ne,.95*ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Be,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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var he=new go.PathFigure(ne,ee,!1);ce.add(he);var ve=new go.PathFigure(0,.5*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.5*ee,.2*ne,.35*ee,.3*ne,.35*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,.7*ne,.65*ee,.8*ne,.65*ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Be,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(Be,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(Be,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 he=new go.PathFigure(.45*ne,.73*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.73*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.38*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.63*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.31*ne,.27*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.56*ne,.27*ee)),ce}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Be,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var he=new go.PathFigure(.335*ne,(1-.555)*ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,ne,.68*ee,(1-.12)*ne,.46*ee,(1-.02)*ne,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.335*ne,(1-.555)*ee,.02*ne,.54*ee,.12*ne,.46*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.365*ne,(1-.595)*ee));var ve=.5-.285,be=.5,ke=ve,Ae=Math.PI/4,ze=4*(1-Math.cos(Ae))/(3*Math.sin(Ae)),Ze=ze*.5,ot=ve,qe=ve,bt=ze*ot,He=ze*qe;he.add(new go.PathSegment(go.PathSegment.Bezier,(be-ot)*ne,ke*ee,(be-(bt+ot)/2)*ne,(ke+(qe+He)/2)*ee,(be-ot)*ne,(ke+He)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,be*ne,(ke-qe)*ee,(be-ot)*ne,(ke-He)*ee,(be-bt)*ne,(ke-qe)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(be+ot)*ne,ke*ee,(be+bt)*ne,(ke-qe)*ee,(be+ot)*ne,(ke-He)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ne,(1-.595)*ee,(be+ot)*ne,(ke+He)*ee,(be+(bt+ot)/2)*ne,(ke+(qe+He)/2)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*ne,(1-.595)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*ee));var wt=new go.PathFigure(.2*ne,ee,!1);ce.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.8*ee));var nt=new go.PathFigure(.8*ne,ee,!1);return ce.add(nt),nt.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*ee)),ce}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Be,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 he=new go.PathFigure(.2*ne,.2*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*ee)),ce}),go.Shape.defineFigureGenerator("BpmnEventError",function(Be,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(Be,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var he=new go.PathFigure(ne,ee,!1);ce.add(he);var ve=new go.PathFigure(.1*ne,ee,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("Caution",function(Be,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 he=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-he)*ne,.875*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*ne,.875*ee,he*ne,he*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(Be,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 he=new go.PathFigure(.475*ne,.2*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.225*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.275*ne,.175*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.325*ne,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.05*ee,.35*ne,0,.375*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.375*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.475*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.315*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.32*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.575*ne,0,.65*ne,.05*ee,.625*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,.38*ne,.0105*ee));var ve=new go.PathFigure(.675*ne,.575*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.875*ne,.525*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.85*ne,.95*ee,ne,.8*ee,ne,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.95*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.725*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,.675*ne,.575*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.775*ne,.775*ee)),ce}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Be,ne,ee){var ce=new go.Geometry,se=.5,he=Le*.5,ve=new go.PathFigure(ne,se*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,ee,ne,(se+he)*ee,(se+he)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-he)*ne,ee,0,(se+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,0,0,(se-he)*ee,(se-he)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,se*ee,(se+he)*ne,0,ne,(se-he)*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(Be,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 he=new go.PathFigure(0,.15*ee,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),he.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(Be,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 he=new go.PathFigure(0,.2*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee).close());var ve=new go.PathFigure(0,.5*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("Component",function(Be,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 he=new go.PathFigure(0,.2*ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ve=new go.PathFigure(0,.6*ee,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),ce}),go.Shape.defineFigureGenerator("Boat Shipment",function(Be,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 he=new go.PathFigure(.15*ne,.6*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*ee)),ce}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Be,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(Be,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(Be,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(Be,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 he=new go.PathFigure(ne,.8*ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee).close());var ve=.1,be=Le*.1,ke=.2,Ae=.9,ze=new go.PathFigure((ke-ve)*ne,Ae*ee,!0);ce.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae-ve)*ee,(ke-ve)*ne,(Ae-be)*ee,(ke-be)*ne,(Ae-ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ke+ve)*ne,Ae*ee,(ke+be)*ne,(Ae-ve)*ee,(ke+ve)*ne,(Ae-be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae+ve)*ee,(ke+ve)*ne,(Ae+be)*ee,(ke+be)*ne,(Ae+ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ke-ve)*ne,Ae*ee,(ke-be)*ne,(Ae+ve)*ee,(ke-ve)*ne,(Ae+be)*ee).close()),ve=.1,be=Le*.1,ke=.8,Ae=.9;var Ze=new go.PathFigure((ke-ve)*ne,Ae*ee,!0);return ce.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae-ve)*ee,(ke-ve)*ne,(Ae-be)*ee,(ke-be)*ne,(Ae-ve)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ke+ve)*ne,Ae*ee,(ke+be)*ne,(Ae-ve)*ee,(ke+ve)*ne,(Ae-be)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Ae+ve)*ee,(ke+ve)*ne,(Ae+be)*ee,(ke+be)*ne,(Ae+ve)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ke-ve)*ne,Ae*ee,(ke-be)*ne,(Ae+ve)*ee,(ke-ve)*ne,(Ae+be)*ee).close()),ce}),go.Shape.defineFigureGenerator("KanbanPost",function(Be,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(Be,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 he=new go.PathFigure(0,.5*ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ve=new go.PathFigure(.5*ne,.8*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.8*ee)),ve.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 ke=.1,Ae=Le*.1,ze=.1,Ze=.9,ot=new go.PathFigure((ze-ke)*ne,Ze*ee,!0);ce.add(ot),ot.add(new go.PathSegment(go.PathSegment.Bezier,ze*ne,(Ze-ke)*ee,(ze-ke)*ne,(Ze-Ae)*ee,(ze-Ae)*ne,(Ze-ke)*ee)),ot.add(new go.PathSegment(go.PathSegment.Bezier,(ze+ke)*ne,Ze*ee,(ze+Ae)*ne,(Ze-ke)*ee,(ze+ke)*ne,(Ze-Ae)*ee)),ot.add(new go.PathSegment(go.PathSegment.Bezier,ze*ne,(Ze+ke)*ee,(ze+ke)*ne,(Ze+Ae)*ee,(ze+Ae)*ne,(Ze+ke)*ee)),ot.add(new go.PathSegment(go.PathSegment.Bezier,(ze-ke)*ne,Ze*ee,(ze-Ae)*ne,(Ze+ke)*ee,(ze-ke)*ne,(Ze+Ae)*ee)),ke=.1,Ae=Le*.1,ze=.4,Ze=.9;var qe=new go.PathFigure((ze-ke)*ne,Ze*ee,!0);return ce.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,ze*ne,(Ze-ke)*ee,(ze-ke)*ne,(Ze-Ae)*ee,(ze-Ae)*ne,(Ze-ke)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ze+ke)*ne,Ze*ee,(ze+Ae)*ne,(Ze-ke)*ee,(ze+ke)*ne,(Ze-Ae)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,ze*ne,(Ze+ke)*ee,(ze+ke)*ne,(Ze+Ae)*ee,(ze+Ae)*ne,(Ze+ke)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ze-ke)*ne,Ze*ee,(ze-Ae)*ne,(Ze+ke)*ee,(ze-ke)*ne,(Ze+Ae)*ee)),ce}),go.Shape.defineFigureGenerator("RailShipment",function(Be,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 he=new go.PathFigure(.45*ne,.7*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*ee));var ve=new go.PathFigure(.55*ne,.4*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.4*ee).close());var ze=.05,Ze=Le*.05,ot=.175,qe=.95,be=new go.PathFigure((ot-ze)*ne,qe*ee,!0);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ot*ne,(qe-ze)*ee,(ot-ze)*ne,(qe-Ze)*ee,(ot-Ze)*ne,(qe-ze)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ot+ze)*ne,qe*ee,(ot+Ze)*ne,(qe-ze)*ee,(ot+ze)*ne,(qe-Ze)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ot*ne,(qe+ze)*ee,(ot+ze)*ne,(qe+Ze)*ee,(ot+Ze)*ne,(qe+ze)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ot-ze)*ne,qe*ee,(ot-Ze)*ne,(qe+ze)*ee,(ot-ze)*ne,(qe+Ze)*ee));var ze=.05,Ze=Le*.05,ot=.375,qe=.95,ke=new go.PathFigure((ot-ze)*ne,qe*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ot*ne,(qe-ze)*ee,(ot-ze)*ne,(qe-Ze)*ee,(ot-Ze)*ne,(qe-ze)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ot+ze)*ne,qe*ee,(ot+Ze)*ne,(qe-ze)*ee,(ot+ze)*ne,(qe-Ze)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ot*ne,(qe+ze)*ee,(ot+ze)*ne,(qe+Ze)*ee,(ot+Ze)*ne,(qe+ze)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ot-ze)*ne,qe*ee,(ot-Ze)*ne,(qe+ze)*ee,(ot-ze)*ne,(qe+Ze)*ee));var ze=.05,Ze=Le*.05,ot=.625,qe=.95,Ae=new go.PathFigure((ot-ze)*ne,qe*ee,!0);ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ot*ne,(qe-ze)*ee,(ot-ze)*ne,(qe-Ze)*ee,(ot-Ze)*ne,(qe-ze)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ot+ze)*ne,qe*ee,(ot+Ze)*ne,(qe-ze)*ee,(ot+ze)*ne,(qe-Ze)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ot*ne,(qe+ze)*ee,(ot+ze)*ne,(qe+Ze)*ee,(ot+Ze)*ne,(qe+ze)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ot-ze)*ne,qe*ee,(ot-Ze)*ne,(qe+ze)*ee,(ot-ze)*ne,(qe+Ze)*ee));var ze=.05,Ze=Le*.05,ot=.825,qe=.95,bt=new go.PathFigure((ot-ze)*ne,qe*ee,!0);ce.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,ot*ne,(qe-ze)*ee,(ot-ze)*ne,(qe-Ze)*ee,(ot-Ze)*ne,(qe-ze)*ee)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ot+ze)*ne,qe*ee,(ot+Ze)*ne,(qe-ze)*ee,(ot+ze)*ne,(qe-Ze)*ee)),bt.add(new go.PathSegment(go.PathSegment.Bezier,ot*ne,(qe+ze)*ee,(ot+ze)*ne,(qe+Ze)*ee,(ot+Ze)*ne,(qe+ze)*ee)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ot-ze)*ne,qe*ee,(ot-Ze)*ne,(qe+ze)*ee,(ot-ze)*ne,(qe+Ze)*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(Be,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 he=new go.PathFigure(0,.2*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee).close());var ve=new go.PathFigure(.15*ne,ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.15*ne,ee).close());var be=.05,ke=Le*.05,Ae=.35,ze=.775,Ze=new go.PathFigure((Ae-be)*ne,ze*ee,!0);return ce.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ne,(ze-be)*ee,(Ae-be)*ne,(ze-ke)*ee,(Ae-ke)*ne,(ze-be)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+be)*ne,ze*ee,(Ae+ke)*ne,(ze-be)*ee,(Ae+be)*ne,(ze-ke)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ne,(ze+be)*ee,(Ae+be)*ne,(ze+ke)*ee,(Ae+ke)*ne,(ze+be)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-be)*ne,ze*ee,(Ae-ke)*ne,(ze+be)*ee,(Ae-be)*ne,(ze+ke)*ee).close()),ce}),go.Shape.defineFigureGenerator("ControlCenter",function(Be,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(Be,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(Be,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(Be,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(Be,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(Be,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(Be,ne,ee){var ce=new go.Geometry,se=.3,he=Le*.3,ve=.5,be=.7,ke=new go.PathFigure((ve-se)*ne,be*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee));var Ae=new go.PathFigure(0,.7*ee,!1);return ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ne,.7*ee,0,0,ne,0)),ce}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Be,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(Be,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(Be,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 he=new go.PathFigure(0,.6*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.4*ee)),ce}),go.Shape.defineFigureGenerator("Delete",function(Be,ne,ee){var ce=new go.Geometry,se=.5,he=Le*.5,ve=.5,be=.5,ke=new go.PathFigure((ve-se)*ne,be*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee));var Ae=new go.PathFigure(.15*ne,.5*ee,!1);return ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.5*ee)),ce}),go.Shape.defineFigureGenerator("Flag",function(Be,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(Be,ne,ee){var ce=new go.Geometry,se=.5,he=Le*.5,ve=.5,be=.5,ke=new go.PathFigure((ve-se)*ne,be*ee,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee).close()),se=.05,he=Le*.05,ve=.5,be=.8;var Ae=new go.PathFigure((ve-se)*ne,be*ee,!1);return ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee).close()),Ae.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*ee,.75*ne,.475*ee,.75*ne,.225*ee)),Ae.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(Be,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(Be,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 he=new go.PathFigure(.2*ne,.5*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*ee,.25*ne,0,.75*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.3*ee)),ce}),go.Shape.defineFigureGenerator("Unlocked",function(Be,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 he=new go.PathFigure(.2*ne,.5*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*ee,.25*ne,0,.75*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.35*ee)),ce}),go.Shape.defineFigureGenerator("Gear",function(Be,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(Be,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(Be,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(Be,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 he=new go.PathFigure(0,ee*.6,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0).close()),ce}),go.Shape.defineFigureGenerator("Pencil",function(Be,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(Be,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 he=new go.PathFigure(.126*ne,.85*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.126*ne,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.85*ee).close());var ve=new go.PathFigure(.402*ne,.85*ee,!1);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.402*ne,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.45*ee)),ve.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 ke=new go.PathFigure(.5*ne,.1*ee,!1);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*ne,.3*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*ne,.3*ee).close()),ce}),go.Shape.defineFigureGenerator("Staircase",function(Be,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(Be,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 he=new go.PathFigure(ne*.204,ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*.204,ee*(1-.184))),he.add(new go.PathSegment(go.PathSegment.Line,ne*.388,ee*(1-.184*2))),he.add(new go.PathSegment(go.PathSegment.Line,ne*.388,ee*1).close());var ve=new go.PathFigure(ne*.408,ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.408,ee*(1-.184*2))),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.592,ee*(1-.184*3))),ve.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 ke=new go.PathFigure(ne*.816,ee,!0);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.816,ee*(1-.184*4))),ke.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*(1-.184*5))),ke.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1).close()),ce}),go.Shape.defineFigureGenerator("PC",function(Be,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 he=new go.PathFigure(ne*.055,.07*ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.07)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.055,ee*.1).close());var ve=new go.PathFigure(ne*.055,.13*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.13)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.16)),ve.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 ke=new go.PathFigure(ne*1,0,!0);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.4,0)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.65)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.65).close()),ce}),go.Shape.defineFigureGenerator("Plane",function(Be,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(Be,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(Be,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 he=new go.PathFigure(0,0,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*0)),he.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*1,ne*.3,ne*.055)),he.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1));var ve=new go.PathFigure(ne*.11,ee*.1,!1);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),ee*.1)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),ee*.8)),ve.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 ke=new go.PathFigure(ne*(.11+.24133333*2+.028*2),ee*.1,!1);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),ee*.1)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),ee*.8)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*2),ee*.8).close()),ce}),go.Shape.defineFigureGenerator("FloppyDisk",function(Be,ne,ee){var ce=new go.Geometry,se=8,he=se*Le,ve=new go.PathFigure(se,0,!1);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.86,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.14)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,ee,ne,ee-he,ne-he,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,he,ee,0,ee-he)),ve.add(new go.PathSegment(go.PathSegment.Line,0,se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,he,he,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 ke=new go.PathFigure(ne*.83,ee*1,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.83,ee*.5)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.17,ee*.5)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.17,ee*1).close());var Ae=new go.PathFigure(ne*.78,ee*.05,!1);return ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.05)),Ae.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.25)),Ae.add(new go.PathSegment(go.PathSegment.Line,ne*.78,ee*.25).close()),ce}),go.Shape.defineFigureGenerator("SpeechBubble",function(Be,ne,ee){var ce=Be?Be.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=15),ce=Math.min(ce,ne/3),ce=Math.min(ce,ee/3);var se=ce*Le,he=ee*.8,ve=new go.Geometry,be=new go.PathFigure(ce,0,!0);return ve.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,he-ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,he,ne,he-se,ne-se,he)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.7,he)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.55,he)),be.add(new go.PathSegment(go.PathSegment.Line,ce,he)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,he-ce,se,he,0,he-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?(ve.spot1=new go.Spot(0,0,se,se),ve.spot2=new go.Spot(1,.8,-se,-se)):(ve.spot1=go.Spot.TopLeft,ve.spot2=new go.Spot(1,.8)),ve}),go.Shape.defineFigureGenerator("Repeat",function(Be,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 he=new go.PathFigure(ne*1,ee*.55,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*1)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*.55).close()),ce}),go.Shape.defineFigureGenerator("Windows",function(Be,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(Be,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 he=new go.PathFigure(ne*.1,ee*.2,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*.1,ee*.25)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.22,ee*.285)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.1,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.1,ee*.37)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.275,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.275,ee*.25).close());var ve=new go.PathFigure(ne*.28,ee*.37,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.37)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.41)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.28,ee*.41).close()),ce}),go.Shape.defineFigureGenerator("Beaker",function(Be,ne,ee){var ce=new go.Geometry,se=15,he=se*Le,ve=new go.PathFigure(ne*.62,ee*.475,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,ee,ne,ee-he,ne-he,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,he,ee,0,ee-he)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.38,ee*.475)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.38,ee*.03)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.36,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.62,ee*.03).close()),he>1?(ce.spot1=new go.Spot(0,0,he,he),ce.spot2=new go.Spot(1,1,-he,-he)):(ce.spot1=go.Spot.TopLeft,ce.spot2=go.Spot.BottomRight),ce}),go.Shape.defineFigureGenerator("Download",function(Be,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*1,!0);ce.add(se);var he=.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-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*(1-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,ee*(1-he))),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-he)).close());var ve=new go.PathFigure(ne*.4,ee*0,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.26,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.66)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.26),ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*0).close()),ce}),go.Shape.defineFigureGenerator("Bin",function(Be,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*1,!0);ce.add(se);var he=.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-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*(1-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,ee*(1-he))),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-he)).close()),ce}),go.Shape.defineFigureGenerator("Upload",function(Be,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*1,!0);ce.add(se);var he=.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-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*(1-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,ee*(1-he))),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-he)).close());var ve=new go.PathFigure(ne*.5,ee*0,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.26,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.74,ee*.25).close()),ce}),go.Shape.defineFigureGenerator("EmptyDrink",function(Be,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(Be,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 he=new go.PathFigure(ne*.235,ee*.28,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*.765,ee*.28)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.655,ee*.97)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.345,ee*.97).close()),ce}),go.Shape.defineFigureGenerator("4Arrows",function(Be,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")},5559:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Vn={},Pn="5.0",pe={},ge=null,Oe=!1,Ke=!1,st=null,Ge=!1,_e=null,Le=null,Tt=0;Tt<arguments.length;Tt++){var Pt=arguments[Tt];if(Pt!==null)switch(typeof Pt){case"number":Pn=Pt.toFixed(1);break;case"string":Pt.match(new RegExp("^[0-9]\\.[0-9]+$"))?Pn=Pt:st=Pt;break;case"object":typeof Pt.is3D!="undefined"?ge=Pt:pe=Pt;break;case"boolean":Oe=Pt,Ke=!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&&!Ke&&(Oe=!0)),st!==null&&pe.id===void 0&&(pe.id=st);var Xe="",Et="",ct=!1,It=null,Be=null,ne=null,ee=!1,ce=null,se=null,he=null,ve=null,be=null;pe.height!==void 0&&(pe.height=Math.round(pe.height)),pe.width!==void 0&&(pe.width=Math.round(pe.width));var ke=function($t){return parseFloat($t)>4?parseFloat($t):5};Vn.setHTML5Codebase=function($t,rn){Le=$t,Wt($t,rn)},Vn.setJavaCodebase=Vn.setJavaCodebaseVersion=Vn.isCompiledInstalled=Vn.setPreCompiledScriptPath=Vn.setPreCompiledResourcePath=function(){},Vn.setHTML5CodebaseVersion=function($t,rn){var An=parseFloat($t);if(An!==NaN&&An<5){console.log("The GeoGebra HTML5 codebase version "+An+" is deprecated. Using version latest instead.");return}_e=$t,Ve($t,rn)},Vn.getHTML5CodebaseVersion=function(){return Be},Vn.getParameters=function(){return pe},Vn.setFontsCSSURL=function($t){ve=$t},Vn.setGiacJSURL=function($t){},Vn.setJNLPFile=function($t){Xe=$t},Vn.setJNLPBaseDir=function($t){},Vn.inject=function(){function $t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var rn="auto",An=pe.id,ti,xn=!1,Qn=0;Qn<arguments.length;Qn++){var Ot=arguments[Qn];typeof Ot=="string"?(Ot=Ot.toLowerCase(),Ot.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?rn=Ot:An=arguments[Qn]):typeof Ot=="boolean"?xn=Ot:Ot instanceof HTMLElement&&(ti=Ot)}Cn();function Cn(){if(!Ge){setTimeout(Cn,200);return}rn=Ut(rn);var Wn=ti||document.getElementById(An);if(!Wn){console.log("possibly bug on ajax loading? ");return}if(Vn.removeExistingApplet(Wn,!1),pe.width===void 0&&Wn.clientWidth&&(pe.width=Wn.clientWidth),pe.height===void 0&&Wn.clientHeight&&(pe.height=Wn.clientHeight),!(pe.width&&pe.height)&&rn==="html5"&&(delete pe.width,delete pe.height),It=rn,rn==="screenshot")nt(Wn,pe);else{var We=!1;pe.hasOwnProperty("playButton")&&pe.playButton||pe.hasOwnProperty("clickToLoad")&&pe.clickToLoad?We=!0:pe.hasOwnProperty("playButtonAutoDecide")&&pe.playButtonAutoDecide&&(We=(!Ae()||$t())&&ze()),We?(It="screenshot",ht(Wn,pe,xn,rn)):wt(Wn,pe,xn)}}};function Ae(){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 Ze=function($t){var rn=function(Qn){var Ot=JSON.parse(Qn),Cn=function(Ee){return Ee.type=="G"||Ee.type=="E"},Wn=Ot.elements?Ot.elements.filter(Cn)[0]:Ot;if(!Wn||!Wn.url){An();return}pe.fileName=Wn.url,ot(Wn.settings||{}),ge.is3D=!0;var We="https://www.geogebra.org/images/";Vn.setPreviewImage(ce||Wn.previewUrl,We+"GeoGebra_loading.png",We+"applet_play.png"),$t()},An=function(){pe.onError&&pe.onError(),Ln("Error: Fetching material (id "+pe.material_id+") failed.",pe)},ti=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",xn="/materials/"+pe.material_id+"?scope=basic";qe("https://"+ti+"/api/proxy.php?path="+encodeURIComponent(xn),rn,An)};function ot($t){var rn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(An){$t[An]=!!$t[An]}),rn.forEach(function(An){pe[An]===void 0&&$t[An]!==void 0&&(pe[An]=$t[An])}),pe.showToolBarHelp===void 0&&(pe.showToolBarHelp=pe.showToolBar)}function qe($t,rn,An){var ti=new XMLHttpRequest;ti.open("GET",$t),ti.onload=function(){rn(ti.responseText)},ti.onerror=An,ti.send()}Vn.isHTML5Installed=function(){return!0},Vn.getLoadedAppletType=function(){return It},Vn.setPreviewImage=function($t,rn,An){ce=$t,se=rn,he=An},Vn.removeExistingApplet=function($t,rn){var An;typeof $t=="string"&&($t=document.getElementById($t)),It=null;var ti=null;for(An=0;An<$t.childNodes.length;An++){var xn=$t.childNodes[An],Qn=xn.className;Qn==="applet_screenshot"?rn?(xn.style.display="block",It="screenshot"):xn.style.display="none":Qn!=="applet_scaler prerender"&&($t.removeChild(xn),ti=Qn&&Qn.indexOf("appletParameters")!=-1?xn.id:null,An--)}var Ot=pe.id!==void 0?pe.id:ti,Cn=window[Ot];Cn&&typeof Cn.getBase64=="function"&&(Cn.remove(),window[Ot]=null)},Vn.refreshHitPoints=function(){if(ke(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 bt=function($t,rn,An){var ti=document.createElement("param");ti.setAttribute("name",rn),ti.setAttribute("value",An),$t.appendChild(ti)},He=function($t){return $t&&$t!=="false"},wt=function($t,rn,An){ke(Be)<=4.2&&(An=!0);var ti=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Be||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(ti=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var xn=document.createElement("div");xn.classList.add("appletParameters","notranslate");var Qn=rn.width,Ot=rn.height;if(rn.disableAutoScale=rn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():rn.disableAutoScale,rn.width!==void 0)if(ke(Be)<=4.4)He(rn.showToolBar)&&(rn.height-=7),He(rn.showAlgebraInput)&&(rn.height-=37),rn.width<605&&He(rn.showToolBar)&&(rn.width=605,Qn=605);else{var Cn=100;(He(rn.showToolBar)||He(rn.showMenuBar))&&(rn.hasOwnProperty("customToolBar")&&(rn.customToolbar=rn.customToolBar),Cn=He(rn.showMenuBar)?245:155),Qn<Cn&&(rn.width=Cn,Qn=Cn)}xn.style.border="none",xn.style.display="inline-block";for(var Wn in rn)rn.hasOwnProperty(Wn)&&Wn!=="appletOnLoad"&&xn.setAttribute("data-param-"+Wn,rn[Wn]);ve&&xn.setAttribute("data-param-fontscssurl",ve),Vn.resize=function(){GGBAppletUtils.responsiveResize($t,rn)},window.addEventListener("resize",function(rt){Vn.resize()});var We=typeof rn.appletOnLoad=="function"?rn.appletOnLoad:function(){};if(!An&&rn.width!==void 0){rn.hasOwnProperty("showSplash")||xn.setAttribute("data-param-showSplash","false");var Ee=$t.querySelector(".applet_scaler.prerender"),Pe=Ee!==null;if(Pe)var De=Ee.querySelector(".ggb_preview");else{var De=Yt(Qn,Ot,rn.borderColor,!1);Ee=document.createElement("div"),Ee.className="applet_scaler",Ee.style.position="relative",Ee.style.display="block",Ee.style.width=Qn+"px",Ee.style.height=Ot+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ee,"66%"),ke(Be)>=5?(rn.appletOnLoad=function(rt){var Zt=$t.querySelector(".ggb_preview");Zt&&Zt.parentNode.removeChild(Zt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ee),window.GGBT_wsf_view&&$(window).trigger("resize"),We(rt)},Pe||Ee.appendChild(De)):xn.appendChild(De),Ee.appendChild(xn),Pe||$t.appendChild(Ee),setTimeout(function(){Vn.resize()},1)}else{var Fe=document.createElement("div");Fe.className="applet_scaler",Fe.style.position="relative",Fe.style.display="block",Fe.appendChild(xn),$t.appendChild(Fe),rn.appletOnLoad=function(rt){Vn.resize(),We(rt)}}function ye(rt,Zt){Zt&&typeof Zt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(rt,Zt.appletOnLoad):renderGGBElement(rt),Ln("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Zt)}function Qe(rt,Zt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:rt,params:Zt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(dn){ye(dn.article,dn.params)}),html5AppletsToProcess=null)},ke(Be)<5&&(rt.className+=" geogebraweb")):ye(rt,Zt)}if(ti){scriptLoadStarted=!0;for(var vt=0;vt<xn.childNodes.length;vt++){var Ye=xn.childNodes[vt].tagName;Ye==="TABLE"&&(xn.removeChild(xn.childNodes[vt]),vt--)}if(ggbHTML5LoadedScript!==null){var Je=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Je!=null&&Je.parentNode.removeChild(Je)}var yt=document.createElement("script"),St=function(){Qe(xn,rn)};yt.src=Et+ne,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=Be,ggbHTML5LoadedScript=yt.src,Ln("GeoGebra HTML5 codebase loaded: '"+Et+"'.",rn),!Le&&(!_e||_e=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),St()):Et.requirejs?__webpack_require__.e(777).then(function(){var rt=[__webpack_require__(70777)];St.apply(null,rt)}.bind(this)).catch(__webpack_require__.oe):(yt.onload=St,$t.appendChild(yt))}else Qe(xn,rn);rn.height=Ot,rn.width=Qn},nt=function($t,rn,An){var ti=Yt(rn.width,rn.height,rn.borderColor,An),xn=document.createElement("div");xn.style.position="relative",xn.style.display="block",xn.style.width=rn.width+"px",xn.style.height=rn.height+"px",xn.className="applet_screenshot applet_scaler"+(An?" applet_screenshot_play":""),xn.appendChild(ti);var Qn=GGBAppletUtils.getScale(rn,$t,An);An?($t.appendChild(zt()),window.GGBT_wsf_view||($t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(xn,"66%"),$t.appendChild(xn),Qn!==1&&!isNaN(Qn)&&(GGBAppletUtils.scaleElement(xn,Qn),xn.style.width=rn.width+"px",xn.style.height=rn.height+"px",xn.parentNode.style.width=rn.width*Qn+"px",xn.parentNode.style.height=rn.height*Qn+"px"),Vn.resize=function(){Dt($t,ti,xn,An)},window.addEventListener("resize",function(Ot){Vn.resize()}),Vn.resize()};function Dt($t,rn,An,ti){if($t.contains(rn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if($t.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition($t)}var xn=GGBAppletUtils.getScale(pe,$t,ti);An.parentNode!==null&&(!isNaN(xn)&&xn!==1?(GGBAppletUtils.scaleElement(An,xn),An.parentNode.style.width=pe.width*xn+"px",An.parentNode.style.height=pe.height*xn+"px"):(GGBAppletUtils.scaleElement(An,1),An.parentNode.style.width=pe.width+"px",An.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,rn){rn.appendChild($t)};var ht=function($t,rn,An,ti){nt($t,rn,!0);for(var xn=function(){var Cn=[];for(Ot=0;Ot<$t.childNodes.length;Ot++)Cn.push($t.childNodes[Ot]);if(window.GGBT_wsf_view){var Wn=window.GGBT_wsf_view.renderFullScreen($t,rn.id),We=document.getElementById("fullscreencontainer"),Ee=jQuery($t).find(".fullscreencontent");Ee.length>0?(Wn.remove(),Ee.attr("id","fullscreencontent").show(),jQuery(We).append(Ee),window.dispatchEvent(new Event("resize"))):wt(Wn,rn,!1),window.GGBT_wsf_view.launchFullScreen(We)}else It=ti,wt($t,rn,!1);if(!window.GGBT_wsf_view)for(Ot=0;Ot<Cn.length;Ot++)$t.removeChild(Cn[Ot])},Qn=$t.getElementsByClassName("ggb_preview_play"),Ot=0;Ot<Qn.length;Ot++)Qn[Ot].addEventListener("click",xn,!1),Qn[Ot].addEventListener("ontouchstart",xn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload($t),ze()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},zt=function(){var $t=document.createElement("div");if($t.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var rn='.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");}',An=document.createElement("style");An.styleSheet?An.styleSheet.cssText=rn:An.appendChild(document.createTextNode(rn)),document.getElementsByTagName("head")[0].appendChild(An)}return $t},Yt=function($t,rn,An,ti){var xn=document.createElement("div");xn.className="ggb_preview",xn.style.position="absolute",xn.style.zIndex="90",xn.style.width=$t-2+"px",xn.style.height=rn-2+"px",xn.style.top="0px",xn.style.left="0px",xn.style.overflow="hidden",xn.style.backgroundColor="white";var Qn="lightgrey";An!==void 0&&(An==="none"?Qn="transparent":Qn=An),xn.style.border="1px solid "+Qn;var Ot=document.createElement("img");if(Ot.style.position="relative",Ot.style.zIndex="1000",Ot.style.top="-1px",Ot.style.left="-1px",ce!==null&&Ot.setAttribute("src",ce),Ot.style.opacity=.7,se!==null){var Cn,Wn,We;if(!ti){Cn=document.createElement("img"),Cn.style.position="absolute",Cn.style.zIndex="1001",Cn.style.opacity=1,Ot.style.opacity=.3,Wn=360,Wn>$t/4*3&&(Wn=$t/4*3),We=Wn/5.8,Cn.setAttribute("src",se),Cn.setAttribute("width",Wn),Cn.setAttribute("height",We);var Ee=($t-Wn)/2,Pe=(rn-We)/2;Cn.style.left=Ee+"px",Cn.style.top=Pe+"px",xn.appendChild(Cn)}}return xn.appendChild(Ot),xn},Ut=function($t){return $t=$t.toLowerCase(),$t==="html5"||$t==="screenshot"?$t:"html5"},it=["web","webSimple","web3d","tablet","tablet3d","phone"],Ve=function($t,rn){if(Be=$t,rn){Wt(Be,!0);return}var An=!Oe;if(An){var ti=ke(Be);!isNaN(ti)&&ti<4.4&&(An=!1)}var xn,Qn;window.location.protocol.substr(0,4)==="http"?xn=window.location.protocol:xn="http:";var Ot=Be.indexOf("//");Ot>0?Qn=Be:Ot===0?Qn=xn+Be:Qn="https://www.geogebra.org/apps/5.2.814.0/";for(var Cn in it)if(Be.slice(it[Cn].length*-1)===it[Cn]||Be.slice((it[Cn].length+1)*-1)===it[Cn]+"/"){Wt(Qn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&An&&!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")?Qn+="webSimple/":Qn+="web3d/",Wt(Qn,!1)},Wt=function($t,rn){if($t.requirejs){Et=$t;return}$t.slice(-1)!=="/"&&($t+="/"),Et=$t,rn===null&&(rn=$t.indexOf("http")===-1),ct=rn,ne="web.nocache.js",ee=!1;var An=Et.split("/");An.length>1&&(!rn&&An[An.length-2]==="webSimple"?(ne="webSimple.nocache.js",ee=!0):it.indexOf(An[An.length-2])>=0&&(ne=An[An.length-2]+".nocache.js")),An=$t.split("/"),Be=An[An.length-3],Be.substr(0,4)==="test"?Be=Be.substr(4,1)+"."+Be.substr(5,1):(Be.substr(0,3)==="war"||Be.substr(0,4)==="beta")&&(Be="5.0");var ti=parseFloat(Be);ti!==NaN&&ti<5&&$t.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+ti+" is deprecated. Using version latest instead."),Ve("5.0",rn))},Ln=function($t,rn){window.console&&window.console.log&&(!rn||typeof rn.showLogging=="undefined"||rn.showLogging&&rn.showLogging!=="false")&&console.log($t)};pe.material_id!==void 0?Ze(Nn):Nn();function Nn(){var $t=Pn;_e!==null?$t=_e:parseFloat($t)<5&&($t="5.0"),Ve($t,!1),Le!==null&&Wt(Le,ct),Ge=!0}return Vn},GGBAppletUtils=function(){"use strict";function Vn(){return window.GGBT_wsf_edit!==void 0}function Pn(Ge,_e){_e!=1?(Ge.style.transformOrigin="0% 0% 0px",Ge.style.webkitTransformOrigin="0% 0% 0px",Ge.style.transform="scale("+_e+","+_e+")",Ge.style.webkitTransform="scale("+_e+","+_e+")",Ge.style.maxWidth="initial",Ge.querySelector(".ggb_preview")!==null&&(Ge.querySelector(".ggb_preview").style.maxWidth="initial"),Ge.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ge.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ge.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ge.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ge.style.transform="none",Ge.style.webkitTransform="none")}function pe(Ge,_e,Le,Tt,Pt,Xe){var Et=null;if(Xe!=null&&Xe!="")for(var ct=Ge.parentNode;ct!=null;)if((" "+ct.className+" ").indexOf(" "+Xe+" ")>-1){Et=ct;break}else ct=ct.parentNode;var It=0,Be=0,ne=0,ee=0,ce=0,se=0,he=0;if(Et)It=Et.offsetWidth,Be=Math.max(Tt?Et.offsetWidth:0,Et.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(It=Math.min(window.innerWidth,document.documentElement.clientWidth),Be=Math.min(window.innerHeight,document.documentElement.clientHeight),ne=It):(It=window.innerWidth,Be=window.innerHeight,ne=window.innerWidth),Ge){var ve=Ge.getBoundingClientRect();ve.left>0&&ve.left<=It&&(Pt===void 0||!Pt)&&(document.dir==="rtl"?(ce=It-ve.width-ve.left,se=ne<=480?10:30):(se=ve.left,ce=ne<=480?10:30),ee=se+ce)}if(Ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var be=Ge.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,he=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,he=40)}}return Ge&&((Le===void 0||!Le)&&_e>0&&_e+ee<It?It=_e:It-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Le===void 0||!Le)&&(Be-=he)),{width:It,height:Be}}function ge(Ge,_e,Le,Tt,Pt){if(Ge.isScreenshoGenerator)return 1;var Xe=Tt!==void 0&&Tt,Et=Ge.noScaleMargin!=null&&Ge.noScaleMargin,ct=function(be){return be&&be!=="false"},It=ct(Ge.autoHeight),Be=pe(_e,Ge.width,Le,It,Xe&&window.GGBT_wsf_view||Et,Pt),ne=parseInt(Be.width),ee=Ge.width,ce=Ge.height;if(ee===void 0){var se=_e.querySelector(".appletParameters");se&&(ee=se.offsetWidth,ce=se.offsetHeight)}var he=ne/ee,ve=Xe?1:Be.height/ce;return Le!==void 0&&!Le&&(he=Math.min(1,he),ve=Math.min(1,ve)),Math.min(he,ve)}function Oe(Ge,_e,Le){var Tt=1,Pt,Xe=!1;if(Ge.hasOwnProperty("allowUpscale")&&(Xe=Ge.allowUpscale),Ge.hasOwnProperty("scale")&&(Tt=parseFloat(Ge.scale),(isNaN(Tt)||Tt===null||Tt===0)&&(Tt=1),Tt>1&&(Xe=!0)),_e&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Xe=!0),!(Ge.hasOwnProperty("disableAutoScale")&&Ge.disableAutoScale))Pt=ge(Ge,_e,Xe,Le,Ge.scaleContainerClass);else return Tt;return Xe&&(!Ge.hasOwnProperty("scale")||Tt===1)?Pt:Math.min(Tt,Pt)}function Ke(Ge){var _e=Math.min(window.innerWidth,document.documentElement.clientWidth),Le=Math.min(window.innerHeight,document.documentElement.clientHeight),Tt=Ge.getBoundingClientRect(),Pt=(_e-Tt.width)/2,Xe=(Le-Tt.height)/2;Xe<0&&(Xe=0),Ge.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Pt<40?Ge.style.left="40px":Ge.style.left=Pt+"px",Ge.style.top=Xe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Xe<40?Ge.style.top="40px":Ge.style.top=Xe+"px",Ge.style.left=Pt+"px")}function st(Ge,_e){var Le=Ge.querySelector(".appletParameters");if(Le){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(_e.id!==Le.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ge)}if(Le.parentElement&&/fullscreen/.test(Le.parentElement.className))return;var Tt=Oe(_e,Ge);Vn()&&Le.setAttribute("data-param-scale",Tt);for(var Pt=null,Xe=0;Xe<Ge.childNodes.length;Xe++)if(Ge.childNodes[Xe].className!==void 0&&Ge.childNodes[Xe].className.match(/^applet_scaler/)){Pt=Ge.childNodes[Xe];break}if(Pt!==null&&Pt.querySelector(".noscale")!==null)return;var Et=_e.id!==void 0?_e.id:"ggbApplet",ct=window[Et];(ct==null||!ct.recalculateEnvironments)&&Pt!==null&&!Pt.className.match(/fullscreen/)&&(Pt.parentNode.style.transform="",!isNaN(Tt)&&Tt!==1?(Pt.parentNode.style.width=_e.width*Tt+"px",Pt.parentNode.style.height=_e.height*Tt+"px",Pn(Pt,Tt)):(Pn(Pt,1),Pt.parentNode.style.width=_e.width+"px",Pt.parentNode.style.height=_e.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ke(Ge),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Le).parents(".content-added-content"))}}return{responsiveResize:st,isFlexibleWorksheetEditor:Vn,positionCenter:Ke,getScale:Oe,scaleElement:Pn}}();__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,Pn){}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 Pn=s[L].bindings;s[L].bindings=function(){for(var pe=Pn?Pn():{},ge=Vn[webModule.__softPermutationId],Oe=O;Oe<ge.length;Oe++){var Ke=ge[Oe];pe[Ke[O]]=Ke[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 Pn=document.compatMode==U?V:W;t.write(Pn+X),t.close()}}}function w(Vn){function Pn(ge){function Oe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ke=Oe();if(Ke){ge();return}function st(){if(!Ke){if(!Oe())return;Ke=!0,ge(),o.removeEventListener&&o.removeEventListener(Z,st,!1),Ge&&clearInterval(Ge)}}o.addEventListener&&o.addEventListener(Z,st,!1);var Ge=setInterval(function(){st()},$)}function pe(ge){var Oe=u(),Ke=Oe.body,st=Oe.createElement(_);st.language=ab,st.crossOrigin=W,st.src=ge,webModule.__errFn&&(st.onerror=function(){webModule.__errFn(L,new Error(bb+ge))}),Ke.appendChild(st)}Pn(function(){pe(Vn)})}webModule.__startLoadingFragment=function(Vn){return C(Vn)},webModule.__installRunAsyncCode=function(Vn){var Pn=u(),pe=Pn.body,ge=Pn.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 Pn=c[Vn];return Pn==null?null:Pn},r=d,webModule.__errFn=e}function B(){function Vn(Ge){var _e=Ge.lastIndexOf(rb);_e==-1&&(_e=Ge.length);var Le=Ge.indexOf(sb);Le==-1&&(Le=Ge.length);var Tt=Ge.lastIndexOf(tb,Math.min(Le,_e));return Tt>=O?Ge.substring(O,Tt+P):W}function Pn(Ge){if(!Ge.match(/^\w+:\/\//)){var _e=o.createElement(ub);_e.src=Ge+vb,Ge=Vn(_e.src)}return Ge}function pe(){var Ge=__gwt_getMetaProperty(wb);return Ge!=null?Ge:W}function ge(){for(var Ge=o.getElementsByTagName(_),_e=O;_e<Ge.length;++_e)if(Ge[_e].src.indexOf(xb)!=-1)return Vn(Ge[_e].src);return W}function Oe(){var Ge=o.getElementsByTagName(yb);return Ge.length>O?Ge[Ge.length-P].href:W}function Ke(){var Ge=o.location;return Ge.href==Ge.protocol+zb+Ge.host+Ge.pathname+Ge.search+Ge.hash}var st=pe();return st==W&&(st=ge()),st==W&&(st=Oe()),st==W&&Ke()&&(st=Vn(o.location.href)),st=Pn(st),st}function C(Vn){return Vn.match(/^\//)||Vn.match(/^[a-zA-Z]+:\/\//)?Vn:webModule.__moduleBase+Vn}function D(){var Vn=[],Pn=O,pe=[],ge=[];function Oe(Ge){var _e=ge[Ge](),Le=pe[Ge];if(_e in Le)return _e;var Tt=[];for(var Pt in Le)Tt[Le[Pt]]=Pt;throw r&&r(Ge,Tt,_e),null}if(__gwt_isKnownPropertyValue=function(Ge,_e){return _e in pe[Ge]},webModule.__getPropMap=function(){var Ge={};for(var _e in pe)pe.hasOwnProperty(_e)&&(Ge[_e]=Oe(_e));return Ge},webModule.__computePropValue=Oe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ke;try{Ke=Cb;var st=Ke.indexOf(Db);st!=-1&&(Pn=parseInt(Ke.substring(st+P),$),Ke=Ke.substring(O,st))}catch(Ge){}return webModule.__softPermutationId=Pn,C(Ke+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},49291:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Ax:function(){return st},Ds:function(){return Ge},KI:function(){return Le},SI:function(){return Ke},f1:function(){return Oe}});var ge=pe(38446);function Oe(Tt){let Pt=!0;if(Tt.length>0){for(let Xe=0;Xe<Tt.length;Xe++)if(Tt[Xe].compile_success==0||!Tt[Xe].compile_success){Pt=!1;break}}else Pt=!1;return Pt}function Ke(Tt,Pt=""){let Xe=[];for(let Et=0;Et<Tt.length;Et++){let ct=Tt[Et],It=Pt?`${Pt}/${ct.name}`:`${ct.name}`;Xe.push({title:ct.name,type:ct.type,isLeaf:ct.type!=="tree",key:It})}return Xe}function st(Tt,Pt,Xe){for(let Et=0;Et<Tt.length;Et++){let ct=Tt[Et];if(ct.key===Pt){ct.children=Xe;break}ct.children&&st(ct.children,Pt,Xe)}return Tt}function Ge(Tt,Pt,Xe){let Et;return function(){let ct=this,It=arguments,Be=function(){Et=null,Xe||Tt.apply(ct,It)},ne=Xe&&!Et;clearTimeout(Et),Et=setTimeout(Be,Pt),ne&&Tt.apply(ct,It)}}const _e=!0,Le=ge.Z.API_SERVER},94556:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return st}});var ge=pe(59301),Oe={digitalLabel:"digitalLabel___tImKs",active:"active___Ck70Q"},st=({number:Ge,active:_e,className:Le})=>ge.createElement("div",{className:`${Oe.digitalLabel} ${_e?Oe.active:""} ${Le}`},Ge)},38290:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return se}});var ge=pe(59301),Oe=pe(17574),Ke={folderWrapper:"folderWrapper___G__0a",folderIcon:"folderIcon___oTG6c"},st=pe(73631),Ge=pe(5623),_e=pe(57973),Le=Object.defineProperty,Tt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,It=(he,ve,be)=>ve in he?Le(he,ve,{enumerable:!0,configurable:!0,writable:!0,value:be}):he[ve]=be,Be=(he,ve)=>{for(var be in ve||(ve={}))Et.call(ve,be)&&It(he,be,ve[be]);if(Xe)for(var be of Xe(ve))ct.call(ve,be)&&It(he,be,ve[be]);return he},ne=(he,ve)=>Tt(he,Pt(ve)),ee=(he,ve,be)=>new Promise((ke,Ae)=>{var ze=qe=>{try{ot(be.next(qe))}catch(bt){Ae(bt)}},Ze=qe=>{try{ot(be.throw(qe))}catch(bt){Ae(bt)}},ot=qe=>qe.done?ke(qe.value):Promise.resolve(qe.value).then(ze,Ze);ot((be=be.apply(he,ve)).next())}),se=({value:he,onChange:ve,scrollId:be})=>{const[ke,Ae]=(0,ge.useState)([]);(0,ge.useEffect)(()=>{ze()},[]);const ze=()=>ee(void 0,null,function*(){const wt=yield(0,_e.NZ)({});if(wt!=null&&wt.data){const nt=[{title:"\u6839\u76EE\u5F55",value:0,key:0,icon:ge.createElement("img",{src:st,className:Ke.folderIcon}),isLeaf:!1,children:Ze(wt.data||[])}];Ae(nt)}}),Ze=wt=>wt.map(nt=>({title:nt.name,key:nt.group_id,icon:ge.createElement("img",{src:st,className:Ke.folderIcon}),isLeaf:nt.children.length===0,children:Ze(nt.children)})),ot=(wt,nt,Dt)=>wt.map(ht=>ht.key===nt?Be(Be({},ht),Dt):ht.children?ne(Be({},ht),{children:ot(ht.children,nt,Dt)}):ht),qe=(wt,nt,Dt)=>wt.map(ht=>{if(ht.key===nt)return ne(Be({},ht),{icon:Dt?ge.createElement("img",{src:Ge,className:Ke.folderIcon}):ge.createElement("img",{src:st,className:Ke.folderIcon})});if(ht.children)return ne(Be({},ht),{children:qe(ht.children,nt,Dt)})}),bt=(wt,nt)=>{Ae(Dt=>qe(Dt,nt.node.key,nt.expanded))},He=he?{selectedKeys:he,defaultExpandedKeys:he}:{};return ke.length>0&&ge.createElement("div",{id:be||""},ge.createElement(Oe.default,Be({showLine:{showLeafIcon:!1},showIcon:!0,treeData:ke,className:Ke.folderWrapper,onSelect:ve,onExpand:bt},He)))}},72559:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return _e}});var ge=pe(60324),Oe={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},Ke=pe(32637),st=pe(59301),_e=({type:Le,style:Tt})=>{const Pt=st.createElement("div",{className:Oe.wrap,onClick:Xe=>{Xe.preventDefault(),Xe.stopPropagation()}},st.createElement("p",null,Le==="shixun"||Le==="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",st.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Le==="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"),st.createElement("div",{className:Oe.contact},st.createElement("div",{className:Oe.img},st.createElement("img",{src:Ke,width:"124px",height:"124px"})),st.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return st.createElement(ge.Z,{content:Pt},st.createElement("span",{className:Oe.text,style:Tt},"\u9AD8\u6D88\u8017"))}},14573:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Et}});var ge=pe(59301),Oe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ke=pe(92310),st=pe.n(Ke),Ge=pe(71418),_e=pe(2859),Le=pe(7660),Tt=pe(88230),Pt=(ct,It,Be)=>new Promise((ne,ee)=>{var ce=ve=>{try{he(Be.next(ve))}catch(be){ee(be)}},se=ve=>{try{he(Be.throw(ve))}catch(be){ee(be)}},he=ve=>ve.done?ne(ve.value):Promise.resolve(ve.value).then(ce,se);he((Be=Be.apply(ct,It)).next())}),Et=({data:ct,className:It,fullWidth:Be,style:ne={},onClose:ee,onOk:ce,showFullTools:se,noAssociationId:he})=>{const ve=(0,ge.useRef)(null),be=(0,ge.useRef)(null),ke=(0,ge.useRef)(null),Ae=(0,ge.useRef)(null),[ze,Ze]=(0,ge.useState)(!1),[ot,qe]=(0,ge.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ge.useEffect)(()=>{ke.current||(ke.current=document.createElement("style"),document.head.appendChild(ke.current)),ct!=null&&ct.visible?(document.body.setAttribute("data-custom","y-hidden"),ke.current.innerHTML=" html { overflow-y: hidden; }",ct!=null&&ct.src&&bt()):(document.body.removeAttribute("data-custom"),ke.current&&(document.head.removeChild(ke.current),ke.current=null))},[ct==null?void 0:ct.visible]);const bt=()=>Pt(void 0,null,function*(){Ze(!0),qe("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Dt=yield(0,Tt.ZJ)(ct==null?void 0:ct.src);ve.current.src="",ve.current.src=Dt,ve.current.onload=function(){nt()},Ze(!1),qe("")}),He=Dt=>Pt(void 0,null,function*(){Ze(!0),qe("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ht=yield(0,Le.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ct.title,file:Dt.dataUrl}});ht!=null&&ht.id&&!he?(yield(0,Le.ZP)(`/api/attachments/${ct.id}/add_subitem.json`,{method:"post",body:{subitem_id:ht==null?void 0:ht.id,settings:JSON.stringify(Dt.state)}})).status===0&&ce():ht!=null&&ht.id&&ce(ht),Ze(!1),qe("")}),wt=()=>{const Dt=document.querySelector('a[href="https://markerjs.com/"]');Dt&&Dt.parentNode&&(Dt.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(zt=>{const Yt=document.querySelector(zt.name);Yt&&Yt.setAttribute("title",zt.title)})},nt=()=>{be.current=new _e.hP(ve.current),be.current.targetRoot=Ae.current,be.current.addEventListener("render",He),be.current.addEventListener("beforeclose",ee),se&&(be.current.availableMarkerTypes=be.current.ALL_MARKER_TYPES,be.current.uiStyleSettings.redoButtonVisible=!0,be.current.uiStyleSettings.notesButtonVisible=!0,be.current.uiStyleSettings.zoomButtonVisible=!0,be.current.uiStyleSettings.zoomOutButtonVisible=!0,be.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=be.current.uiStyleSettings,be.current.show(),ct!=null&&ct.snapshotData&&be.current.restoreState(ct.snapshotData),setTimeout(()=>{window.scrollTo(0,0),wt()},300)};return ge.createElement(ge.Fragment,null,(ct==null?void 0:ct.visible)&&ge.createElement(Ge.Z,{spinning:ze,tip:ot,style:{position:"absolute"}},ge.createElement("div",{ref:Ae,className:st()(Oe.imageDimensions,It,Be?Oe.fullWidth:""),style:ne},ge.createElement("img",{className:Oe.img,ref:ve}))))}},81968:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Fe},$:function(){return De}});var ge=pe(59301),Oe={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"},Ke=pe(92310),st=pe.n(Ke),Ge=pe(78241),_e=pe(8591),Le=pe(43418),Tt=pe(5871),Pt=pe(95237),Xe=pe(24905),Et=pe(38854),ct=pe(54580),It=pe(3113),Be=pe(93948),ne=pe(19842),ee=pe(92832),ce=pe(5112),se=pe(6848),he=pe(43604),ve=pe(15965),be=pe(38446),ke="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",Ae="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==",Ze="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",ot=pe(7660),qe=pe(38290),bt=pe(5623),He=pe(2878),wt=pe(72714),nt=pe(56030),Dt=pe(15342),ht=pe.n(Dt),zt=(ye,Qe,vt)=>new Promise((Ye,Je)=>{var yt=Zt=>{try{rt(vt.next(Zt))}catch(dn){Je(dn)}},St=Zt=>{try{rt(vt.throw(Zt))}catch(dn){Je(dn)}},rt=Zt=>Zt.done?Ye(Zt.value):Promise.resolve(Zt.value).then(yt,St);rt((vt=vt.apply(ye,Qe)).next())}),Ut=ge.memo(({tagName:ye="div",value:Qe="",className:vt,style:Ye={},onBlur:Je,id:yt})=>{const St=(0,ge.useRef)(null);(0,ge.useEffect)(()=>{if(!St.current)return;zt(void 0,null,function*(){const dn=St.current;dn.innerHTML="";const mn=Qe==null?void 0:Qe.split(/(`?\$\$[\s\S]*?\$\$`?)/g);for(const qt of mn)if(qt.startsWith("$$")&&qt.endsWith("$$")||qt.startsWith("`$$")&&qt.endsWith("$$`")){const Gn=qt.startsWith("`$$")?qt.slice(3,-3):qt.slice(2,-2),Kn=document.createElement("span");Kn.setAttribute("contentEditable","false"),Kn.setAttribute("title",qt),Kn.className="edu_latex",dn.appendChild(Kn),ht().render(Gn,Kn,{throwOnError:!1})}else{const Gn=qt==null?void 0:qt.replace(/<[^>]*>/g,Kn=>Kn.startsWith("<img")?Kn:Kn.replace(/</g,"&lt;"));dn.insertAdjacentHTML("beforeend",Gn)}})},[yt]);const rt=()=>{var Zt,dn;if(Je&&St.current){const qt=St.current.cloneNode(!0),Gn=qt.querySelectorAll("span.edu_latex");for(let Kn of Gn){const Nt=Kn.getAttribute("title"),sn=document.createTextNode(Nt||""),Fn=Kn;(dn=(Zt=Fn.parentNode)==null?void 0:Zt.replaceChild)==null||dn.call(Zt,sn,Fn)}Je(qt.innerHTML)}};return ge.createElement(ge.Fragment,null,ge.createElement(ye,{ref:St,contentEditable:!0,className:vt,style:Ye,onBlur:rt}))}),it=pe(73898),Ve=pe(50484),Wt=Object.defineProperty,Ln=Object.defineProperties,Nn=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,ti=(ye,Qe,vt)=>Qe in ye?Wt(ye,Qe,{enumerable:!0,configurable:!0,writable:!0,value:vt}):ye[Qe]=vt,xn=(ye,Qe)=>{for(var vt in Qe||(Qe={}))rn.call(Qe,vt)&&ti(ye,vt,Qe[vt]);if($t)for(var vt of $t(Qe))An.call(Qe,vt)&&ti(ye,vt,Qe[vt]);return ye},Qn=(ye,Qe)=>Ln(ye,Nn(Qe)),Ot=(ye,Qe,vt)=>new Promise((Ye,Je)=>{var yt=Zt=>{try{rt(vt.next(Zt))}catch(dn){Je(dn)}},St=Zt=>{try{rt(vt.throw(Zt))}catch(dn){Je(dn)}},rt=Zt=>Zt.done?Ye(Zt.value):Promise.resolve(Zt.value).then(yt,St);rt((vt=vt.apply(ye,Qe)).next())});const Cn=ye=>{ye.preventDefault();let vt=(ye.clipboardData||window.clipboardData).getData("Text");document.execCommand("insertText",!1,vt)},Wn=ye=>{ye.key==="Enter"&&ye.preventDefault()},We=({children:ye,style:Qe})=>ge.createElement("div",{className:Oe.leftBox,style:Qe,onPaste:Cn},ye),Ee=({children:ye,style:Qe,className:vt})=>ge.createElement("div",{className:st()(Oe.rightBox,vt),style:Qe,onPaste:Cn},ye),Pe=({className:ye,style:Qe={},width:vt=1200,onCancel:Ye=()=>{},onSuccess:Je=()=>{},gather:yt={},mode:St=1,stickyTop:rt=0,subDisciplineId:Zt=[],hideWordFeatures:dn,dataSource:mn=[],customLeftHeadNode:qt,customRightHeadNode:Gn,customLeftContent:Kn,hideRecognition:Nt=!1,onExchange:sn,isSingleSelection:Fn=!1,underpinBackgroundStyle:hn={},headExtraNode:Mn,isRefreshItemBank:li=!1,okText:pi="\u786E\u5B9A\u5BFC\u5165"})=>{var mi;const[Li,Gi]=(0,ge.useState)(1),[ar,Xi]=(0,ge.useState)(0),[wr,vr]=(0,ge.useState)(""),[ji,Lr]=(0,ge.useState)(!1),[jn,Ne]=(0,ge.useState)([]),[Ei,Oi]=(0,ge.useState)([]),[on,ui]=(0,ge.useState)(!1),[vi,bi]=(0,ge.useState)(!1),[In,Gt]=(0,ge.useState)(!1),[Kt,jt]=(0,ge.useState)(!1),[ft,an]=(0,ge.useState)([]),[vn,Bt]=(0,ge.useState)(1),[at,cn]=(0,ge.useState)(!1),[Sn,Un]=(0,ge.useState)(!1),[un,Rt]=(0,ge.useState)(!0),[zn,ni]=(0,ge.useState)(0),[gi,tn]=(0,ge.useState)(1),[Bn,Ft]=(0,ge.useState)(""),[wn,gn]=(0,ge.useState)([]),[yn,On]=(0,ge.useState)(0),[$n,Yn]=(0,ge.useState)(0),[ii,Xn]=(0,ge.useState)(0),[di,Hi]=(0,ge.useState)(0),[$i,Wi]=(0,ge.useState)(0),[Xt]=Ge.default.useForm(),[Si]=Ge.default.useForm(),Ki=(0,ge.useRef)(null),Ti=(0,ge.useRef)(null),cr=(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"],yr=["C","C++","Java","Python","JavaScript","Ruby"];(0,ge.useEffect)(()=>{mn!=null&&mn.length&&sa(mn)},[mn]),(0,ge.useEffect)(()=>{Li===2&&Ki.current.focus()},[Li]),(0,ge.useEffect)(()=>{In&&Vi()},[In]);const fr=()=>{if(Li===1){_e.ZP.warning("\u8BF7\u5148\u4E0A\u4F20\u8BD5\u9898\uFF01");return}Le.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:()=>Ot(void 0,null,function*(){Gi(1)})})},Vi=()=>Ot(void 0,null,function*(){const Lt=yield(0,ot.ZP)("/api/disciplines.json",{method:"get",params:{source:St===1?"new_question":"subject"}});an(Lt.disciplines||[])}),Mr=Lt=>{const wi=[],_t=(Yi,Ci)=>{Yi.length>=2&&wi.push(Yi.join(""));for(let Cr=Ci;Cr<Lt.length;Cr++)Yi.push(Lt[Cr]),_t(Yi,Cr+1),Yi.pop()};return _t([],0),wi},Dn=Lt=>(Lt=Lt||"",Lt=String(Lt),Lt=Lt.replace(/\s+/g,""),Lt),Wr=Lt=>(Lt=Lt||"",Lt=String(Lt),Lt=Lt.replace(/<div>/g,""),Lt=Lt.replace(/<br>/g,`
`),Lt=Lt.replace(/<\/div>/g,`
`),Lt=Ir(Lt),Lt),_n=Lt=>Lt.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Ir=Lt=>Lt.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'"),eo=Lt=>{var wi;const _t=Lt.clipboardData;if(_t){const Yi=_t.types.toString(),Ci=_t.items;if(Yi==="Files"||_t.types.indexOf("Files")>-1){Lt.preventDefault();try{let Cr=Ci[1];((wi=Ci[0])==null?void 0:wi.kind)==="file"&&(Cr=Ci[0]);const Ri=Cr.getAsFile();(0,nt.I)(Ri,Ii=>{var er;if(Ii.id){if(((er=Ri==null?void 0:Ri.type)==null?void 0:er.indexOf("image"))>-1){const tr=`<img src='${be.Z.API_SERVER}${Ii.url}'>`;document.execCommand("insertText",!1,tr)}}else(Ii==null?void 0:Ii.status)===401&&(document.location.href="/user/login")})}catch(Cr){_e.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};function xr(Lt,wi){return Ot(this,null,function*(){if(typeof Lt=="string")return yield wi(Lt);if(typeof Lt!="object"||Lt===null)return Lt;if(Array.isArray(Lt))return yield Promise.all(Lt.map(Ci=>Ot(this,null,function*(){return yield xr(Ci,wi)})));const _t={};for(const Yi in Lt)if(Object.prototype.hasOwnProperty.call(Lt,Yi)){const Ci=Lt[Yi];typeof Ci=="string"?_t[Yi]=yield wi(Ci):typeof Ci=="object"?_t[Yi]=yield xr(Ci,wi):_t[Yi]=Ci}return _t})}const bo=()=>Ot(void 0,null,function*(){var Lt;Lr(!0),vr("\u5904\u7406\u4E2D"),yield new Promise(Yi=>setTimeout(Yi,1e3));let wi=(Lt=Ti.current)==null?void 0:Lt.querySelectorAll('[data-text="edit"]'),_t="";try{wi.forEach(function(Yi){var Ci,Cr,Ri,Ii;const er=Yi.cloneNode(!0),tr=er.querySelectorAll("span.edu_latex");for(let Sr of tr){const kr=Sr.getAttribute("title"),Er=document.createTextNode(kr),Br=Sr;(Cr=(Ci=Br.parentNode)==null?void 0:Ci.replaceChild)==null||Cr.call(Ci,Er,Br)}const hr=er.querySelectorAll("span[style]");for(let Sr of hr)if(Sr.style.fontFamily){const kr=Sr.innerHTML,Er=document.createTextNode(kr),Br=Sr;(Ii=(Ri=Br.parentNode)==null?void 0:Ri.replaceChild)==null||Ii.call(Ri,Er,Br)}er==null||er.childNodes.forEach(function(Sr){Sr.nodeType===Node.ELEMENT_NODE&&Sr.localName!=="h5"&&Sr.localName!=="h4"?_t+=`<p>${Sr.innerHTML}</p>`:Sr.nodeType===Node.TEXT_NODE&&(_t+=`<p>${Sr.textContent}</p>`)})}),ko("/api/intelligent_imports/import.json",{html:Ir(_t)})}catch(Yi){console.error("\u5904\u7406\u8282\u70B9\u9519\u8BEF:",Yi)}}),Yr=Lt=>{let wi=Lt.filter(_t=>!!(_t!=null&&_t.type));return wi=wi.map(_t=>{var Yi;const Ci=(Yi=hi.find(Ri=>Ri.id===(_t==null?void 0:_t.type)))==null?void 0:Yi.deal,Cr=Qn(xn({},_t),{id:String(Math.random()).slice(-6),knowledgePoint:Dn(_t==null?void 0:_t.knowledgePoint)});return Ci?Ci(Cr):Cr}),wi},ur=()=>{if(Li===1){_e.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898!");return}Le.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:bo})},ir=()=>ge.createElement("div",{className:Oe.row},ge.createElement("div",{className:Oe.leftLayout},ge.createElement(We,{style:{height:675}},Li===1&&ge.createElement("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center"},onClick:()=>Gi(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:Oe.imgBox,style:{marginTop:75}},ge.createElement("img",{width:56,src:Ae}),ge.createElement("span",null,"\u7F16\u8F91\u533A"))),Li===2&&ge.createElement("div",{"data-text":"edit",onBlur:()=>{Ki.current.innerHTML||Gi(1)},ref:Ki,contentEditable:!0,style:{color:"#9096A3",height:"100%",overflow:"auto"}}))),ge.createElement("div",{className:Oe.rightLayout,style:{display:"flex",alignItems:"start",justifyContent:"center"}},ge.createElement("div",{className:Oe.imgBox,style:{marginTop:240}},ge.createElement("img",{width:56,src:ze}),ge.createElement("span",null,"\u9884\u89C8\u533A")))),qi=(Lt,wi,_t,Yi)=>{var Ci;console.log(Lt,wi,_t,Yi,"onDataChange\u4FEE\u6539\u6570\u503C");const Cr=JSON.parse(JSON.stringify(Ei));Yi===void 0?Cr[wi][Lt]=_t:Cr[wi].questions[Yi][Lt]=_t;const Ri=xn({},Cr[wi]),Ii=(Ci=hi.find(er=>er.id===(Ri==null?void 0:Ri.type)))==null?void 0:Ci.deal;Cr[wi]=Ii(Ri),Oi(Cr)},Dr=(Lt,wi,_t)=>{var Yi;const Ci=_t!==void 0,Cr=(Yi=hi.find(er=>er.id===(Lt==null?void 0:Lt.type)))==null?void 0:Yi.type,Ri=`${wi+1}.${_t===void 0?"":_t+1+"."}`,Ii=`${(Lt==null?void 0:Lt.type)==="7"?"{{":""}${Ri}\u3010${Cr}\u3011${(Lt==null?void 0:Lt.question)||""}`;return ge.createElement(ge.Fragment,null,Ci&&ge.createElement("h4",{contentEditable:!0}),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,tagName:"div",value:Ii}))},Ai=(Lt,wi)=>Ot(void 0,null,function*(){var _t;const Yi=yield sn(Lt,wi),Ci=(_t=Yi==null?void 0:Yi.data)==null?void 0:_t.content;if(Ci!=null&&Ci.length){const Cr=Yr(Ci)[0];jn.splice(wi,1,Cr),Ei.splice(wi,1,Cr),Ne([...jn]),Oi([...Ei])}}),et=(Lt,wi,_t)=>{var Yi;const Ci=_t!==void 0,Cr=(Yi=hi.find(Ii=>Ii.id===(Lt==null?void 0:Lt.type)))==null?void 0:Yi.type,Ri=`${wi+1}.${_t===void 0?"":_t+1+"."}`;return Ci?ge.createElement("div",{style:{padding:"10px 18px"}},`${Ri}\u3010${Cr}\u3011`,ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,tagName:"span",className:Oe.edit,onBlur:Ii=>qi("question",wi,Ii,_t),value:(Lt==null?void 0:Lt.question)||""})):ge.createElement(ge.Fragment,null,ge.createElement("div",{className:Oe.actionHead},ge.createElement("div",{className:"c-light-primary"},`${Ri}\u3010${Cr}\u3011`),St!==1&&ge.createElement(Tt.Z,{disabled:(Lt==null?void 0:Lt.type)==="7",min:0,max:100,style:{width:100,marginLeft:10},addonAfter:"\u5206",precision:1,size:"middle",onChange:Ii=>qi("score",wi,Ii,_t),value:Lt==null?void 0:Lt.score}),ge.createElement(Pt.Z,{align:"middle",style:{marginLeft:"auto"}},!!sn&&ge.createElement("span",{className:"current c-light-primary mr30",onClick:()=>Ai(Lt,wi)},ge.createElement("i",{className:"iconfont icon-huanyihuan mr5"}),"\u6362\u4E00\u6362"),ge.createElement(Xe.default,{onChange:Ii=>qi("checked",wi,Ii.target.checked,_t),checked:!!(Lt!=null&&Lt.checked)},"\u4E0D\u5BFC\u5165\u6B64\u9898"))),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,tagName:"div",style:{padding:"10px 18px"},className:Oe.edit,onBlur:Ii=>qi("question",wi,Ii,_t),value:Lt==null?void 0:Lt.question}))},jr=(Lt,wi,_t)=>ge.createElement(ge.Fragment,null,["0","1","2","4"].includes(Lt==null?void 0:Lt.type)&&ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u7B54\u6848\uFF1A${wi||""}`,tagName:"p"}),!_t&&ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u96BE\u5EA6\uFF1A${(Lt==null?void 0:Lt.difficulty)||""}`,tagName:"p"}),(Lt==null?void 0:Lt.type)!=="7"&&ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u89E3\u6790\uFF1A${(Lt==null?void 0:Lt.analyze)||""}`,tagName:"p"}),!_t&&ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u77E5\u8BC6\u70B9\uFF1A${(Lt==null?void 0:Lt.knowledgePoint)||""}`,tagName:"p"})),yo=(Lt,wi,_t,Yi)=>{const Ci=Yi!==void 0,Cr=["\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],Ri=Ci&&!Lt.last&&!Lt.errorMsg?{marginBottom:10}:{},Ii=Cr.map(er=>({key:er,label:er,onClick:()=>qi("difficulty",_t,er,Yi)}));return ge.createElement("div",{className:Oe.liWrap,style:Ri},["4"].includes(Lt==null?void 0:Lt.type)&&ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u7B54\xA0\xA0\xA0\xA0\u6848\uFF1A"),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,tagName:"div",className:`${Oe.edit} c-black`,onBlur:er=>qi("answer",_t,[er],Yi),value:wi})),!Ci&&ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u96BE\xA0\xA0\xA0\xA0\u5EA6\uFF1A"),ge.createElement("div",{className:"c-black"},ge.createElement(Et.Z,{menu:{items:Ii}},ge.createElement("span",{className:"c-light-primary"},Lt==null?void 0:Lt.difficulty,ge.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),(Lt==null?void 0:Lt.type)!=="7"&&ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u89E3\xA0\xA0\xA0\xA0\u6790\uFF1A"),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,tagName:"div",className:`${Oe.edit} c-grey-333`,onBlur:er=>qi("analyze",_t,er,Yi),value:Lt==null?void 0:Lt.analyze})),!Ci&&ge.createElement("div",{onKeyDown:Wn,className:Oe.li},ge.createElement("aside",null,"\u77E5\u8BC6\u70B9\uFF1A"),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,tagName:"div",value:(Lt==null?void 0:Lt.knowledgePoint)||"",className:`${Oe.edit} c-grey-333`,onBlur:er=>qi("knowledgePoint",_t,Dn(Wr(er)),Yi)})))},Or=Lt=>ge.createElement(ge.Fragment,null,typeof(Lt==null?void 0:Lt.errorMsg)=="string"&&!!(Lt!=null&&Lt.errorMsg)&&ge.createElement("h5",{contentEditable:!1},ge.createElement("i",{className:"iconfont icon-shanchuhuanjing"}),ge.createElement("div",null,Lt==null?void 0:Lt.errorMsg))),wo=Lt=>ge.createElement(ge.Fragment,null,typeof(Lt==null?void 0:Lt.errorMsg)=="string"&&!!(Lt!=null&&Lt.errorMsg)&&ge.createElement("h5",null,ge.createElement("i",{className:"iconfont icon-shanchuhuanjing"}),ge.createElement("div",null,Lt==null?void 0:Lt.errorMsg))),co=(Lt,wi,_t,Yi)=>{let Ci="flex";return(Fn&&zn!==Yi||on&&!(_t!=null&&_t.errorMsg))&&(Ci="none"),ge.createElement("div",{className:Oe.row,style:{display:Ci}},ge.createElement("div",{className:Oe.leftLayout},Kn||ge.createElement(We,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Oe.question},Lt))),ge.createElement("div",{className:Oe.rightLayout},ge.createElement(Ee,{className:_t!=null&&_t.errorMsg?Oe.error:""},wi)))},hi=[{id:"0",type:"\u5355\u9009\u9898",element:(Lt,wi,_t)=>{var Yi,Ci;const Cr=_t!==void 0;let Ri=(Yi=Lt==null?void 0:Lt.answer)==null?void 0:Yi[0];const Ii=ge.createElement(ge.Fragment,null,Dr(Lt,wi,_t),(Ci=Lt==null?void 0:Lt.options)==null?void 0:Ci.map((Sr,kr)=>ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,key:kr,value:`${Qi[kr]}.${Sr}`,tagName:"p"})),jr(Lt,Ri,Cr),Or(Lt));let er=Cr?Lt:Ei[wi];const tr=er==null?void 0:er.options,hr=ge.createElement(ge.Fragment,null,et(er,wi,_t),tr==null?void 0:tr.map((Sr,kr)=>{var Er;return ge.createElement("div",{key:kr,className:Oe.option},ge.createElement("aside",{className:((Er=er==null?void 0:er.answer)==null?void 0:Er[0])===Qi[kr]?Oe.active:"",onClick:()=>qi("answer",wi,[Qi[kr]],_t)},Qi[kr]),ge.createElement(Ut,{id:er==null?void 0:er.id,tagName:"div",className:`${Oe.text}`,onBlur:Br=>{tr[kr]=Br,qi("options",wi,tr,_t)},value:Sr}))}),yo(er,"",wi,_t),wo(er));return Cr?[Ii,hr]:co(Ii,hr,er,wi)},deal:Lt=>{var wi,_t,Yi;Lt.score=Lt.score===void 0?2:Lt.score;let Ci=Dn((wi=Lt==null?void 0:Lt.answer)==null?void 0:wi[0]).toUpperCase();Lt.answer=Ci?[Ci]:[];let Cr=[];if(!(Lt!=null&&Lt.options))Cr.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{Lt.options=(_t=Lt.options)==null?void 0:_t.slice(0,8);const Ri=Lt.options.map(er=>er==null?void 0:er.trim().replace(/^\s+|\s+$/g,""));new Set(Ri).size!==Ri.length&&Cr.push("\u9009\u9879\u5185\u5BB9\u91CD\u590D")}return Ci||Cr.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AA \u201D"),Ci&&(Qi.slice(0,((Yi=Lt==null?void 0:Lt.options)==null?void 0:Yi.length)||8).includes(Ci)||Cr.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")),Dn(Lt==null?void 0:Lt.question)||Cr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Lt.errorMsg=Cr.join(`
`),Lt}},{id:"1",type:"\u591A\u9009\u9898",element:(Lt,wi,_t)=>{var Yi,Ci;const Cr=_t!==void 0;let Ri=(Yi=Lt==null?void 0:Lt.answer)==null?void 0:Yi[0];const Ii=ge.createElement(ge.Fragment,null,Dr(Lt,wi,_t),(Ci=Lt==null?void 0:Lt.options)==null?void 0:Ci.map((Sr,kr)=>ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,key:kr,value:`${Qi[kr]}.${Sr}`,tagName:"p"})),jr(Lt,Ri,Cr),Or(Lt));let er=Cr?Lt:Ei[wi];const tr=er==null?void 0:er.options,hr=ge.createElement(ge.Fragment,null,et(er,wi,_t),tr==null?void 0:tr.map((Sr,kr)=>{var Er,Br;return ge.createElement("div",{key:kr,className:Oe.option},ge.createElement("aside",{className:(Br=(Er=er==null?void 0:er.answer)==null?void 0:Er[0])!=null&&Br.includes(Qi[kr])?Oe.active:"",onClick:()=>{var Zr;let zi=((Zr=er==null?void 0:er.answer)==null?void 0:Zr[0])||"";const oa=Qi[kr];zi.includes(oa)?zi=zi.replace(new RegExp(oa,"g"),""):zi+=oa,zi=zi.split("").sort().join(""),qi("answer",wi,[zi],_t)}},Qi[kr]),ge.createElement(Ut,{id:er==null?void 0:er.id,tagName:"div",className:`${Oe.text}`,onBlur:Zr=>{tr[kr]=Zr,qi("options",wi,tr,_t)},value:Sr}))}),yo(er,"",wi,_t),wo(er));return Cr?[Ii,hr]:co(Ii,hr,er,wi)},deal:Lt=>{var wi,_t,Yi;Lt.score=Lt.score===void 0?2:Lt.score;let Ci=Dn((wi=Lt==null?void 0:Lt.answer)==null?void 0:wi[0]).toUpperCase().split("").sort().join("");Lt.answer=Ci?[Ci]:[];let Cr=[];if(!(Lt!=null&&Lt.options))Cr.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{Lt.options=(_t=Lt.options)==null?void 0:_t.slice(0,8);const Ri=Lt.options.map(er=>er==null?void 0:er.trim().replace(/^\s+|\s+$/g,""));new Set(Ri).size!==Ri.length&&Cr.push("\u9009\u9879\u5185\u5BB9\u91CD\u590D")}if(Ci||Cr.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AAB \u201D"),Ci){const Ri=Qi.slice(0,((Yi=Lt==null?void 0:Lt.options)==null?void 0:Yi.length)||8);Mr(Ri).includes(Ci)||Cr.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 Dn(Lt==null?void 0:Lt.question)||Cr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Lt.errorMsg=Cr.join(`
`),Lt}},{id:"2",type:"\u5224\u65AD\u9898",element:(Lt,wi,_t)=>{var Yi,Ci;const Cr=_t!==void 0;let Ri=(Yi=Lt==null?void 0:Lt.answer)==null?void 0:Yi[0];const Ii=ge.createElement(ge.Fragment,null,Dr(Lt,wi,_t),jr(Lt,Ri,Cr),Or(Lt));let er=Cr?Lt:Ei[wi];const tr=["\u6B63\u786E","\u9519\u8BEF"];let hr=((Ci=er==null?void 0:er.answer)==null?void 0:Ci[0])||"";["\u6B63\u786E","\u5BF9","T","True","t","true"].includes(hr)?hr="\u6B63\u786E":["\u9519\u8BEF","\u9519","T","true","t","false"].includes(hr)&&(hr="\u9519\u8BEF");const Sr=ge.createElement(ge.Fragment,null,et(er,wi,_t),tr==null?void 0:tr.map((kr,Er)=>ge.createElement("div",{key:Er,className:Oe.option},ge.createElement("aside",{style:{borderRadius:2},className:hr===kr?Oe.active:"",onClick:()=>qi("answer",wi,[kr],_t)},kr==="\u6B63\u786E"?"T":"F"),ge.createElement("div",{style:{pointerEvents:"none"},className:`${Oe.text}`},kr))),yo(er,"",wi,_t),wo(er));return Cr?[Ii,Sr]:co(Ii,Sr,er,wi)},deal:Lt=>{var wi;Lt.score=Lt.score===void 0?2:Lt.score;let _t=Dn((wi=Lt==null?void 0:Lt.answer)==null?void 0:wi[0]);Lt.answer=_t?[_t]:[];let Yi=[];return _t||Yi.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)&&Yi.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"),Dn(Lt==null?void 0:Lt.question)||Yi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Lt.errorMsg=Yi.join(`
`),Lt}},{id:"3",type:"\u586B\u7A7A\u9898",element:(Lt,wi,_t)=>{var Yi,Ci;const Cr=_t!==void 0,Ri=ge.createElement(ge.Fragment,null,Dr(Lt,wi,_t),(Yi=Lt==null?void 0:Lt.answer)==null?void 0:Yi.map((tr,hr)=>ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,key:hr,tagName:"p",value:`\u7B54\u6848${hr+1}\uFF1A${tr.text||""}`})),jr(Lt,"",Cr),Or(Lt));let Ii=Cr?Lt:Ei[wi];const er=ge.createElement(ge.Fragment,null,et(Ii,wi,_t),(Ci=Ii==null?void 0:Ii.answer)==null?void 0:Ci.map((tr,hr)=>ge.createElement("div",{key:hr,className:Oe.option},ge.createElement("aside",{className:Oe.fill},"\u586B\u7A7A\u9879",hr+1),tr.model===1&&ge.createElement(Ut,{id:Ii==null?void 0:Ii.id,tagName:"div",onBlur:Sr=>{Ii.answer[hr].latex=Wr(Sr),qi("answer",wi,Ii.answer,_t)},className:`${Oe.text}`,value:tr.latex}),tr.model===2&&ge.createElement(wt.Z,{value:tr.latex,onChange:Sr=>{Ii.answer[hr].latex=Sr,qi("answer",wi,Ii.answer,_t)}}))),yo(Ii,"",wi,_t),wo(Ii));return Cr?[Ri,er]:co(Ri,er,Ii,wi)},deal:Lt=>{var wi,_t,Yi,Ci;Lt.score=Lt.score===void 0?2:Lt.score,Lt.question=(wi=Lt.question)==null?void 0:wi.replaceAll("\u2581","_");const Cr=(_t=Lt.answer)==null?void 0:_t.map(Ii=>{if(Object.prototype.toString.call(Ii)==="[object Object]")return Ii;const er={model:1,text:Ii,latex:Ii};return Ii.startsWith("$$")&&Ii.endsWith("$$")||Ii.startsWith("`$$")&&Ii.endsWith("$$`")?(er.model=2,er.latex=Ii.slice(2,-2)):er.latex=Wr(Ii),er});Lt.answer=Cr;let Ri=[];return Cr||Ri.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u7B54\u68481\uFF1A\u4E2D\u56FD\uFF1B\u7B54\u68482\uFF1A\u4E16\u754C"),Dn(Lt==null?void 0:Lt.question)?Lt!=null&&Lt.question.includes("_")?(Yi=Lt==null?void 0:Lt.answer)!=null&&Yi.length&&((Lt==null?void 0:Lt.question.match(/_+/g))||[]).length!==((Ci=Lt==null?void 0:Lt.answer)==null?void 0:Ci.length)&&Ri.push("\u586B\u7A7A\u9879\u4E0E\u7B54\u6848\u4E2A\u6570\u4E0D\u5339\u914D\uFF0C\u8BF7\u8FDB\u884C\u8C03\u6574"):Ri.push("\u586B\u7A7A\u9879\u672A\u8BBE\u7F6E\uFF0C\u8BF7\u4F7F\u7528\u82F1\u6587\u4E0B\u5212\u7EBF\u201C___\u201D\u8868\u793A\u586B\u7A7A\u9879"):Ri.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Lt.errorMsg=Ri.join(`
`),Lt}},{id:"4",type:"\u7B80\u7B54\u9898",element:(Lt,wi,_t)=>{var Yi,Ci;const Cr=_t!==void 0;let Ri=(Yi=Lt==null?void 0:Lt.answer)==null?void 0:Yi[0];const Ii=ge.createElement(ge.Fragment,null,Dr(Lt,wi,_t),jr(Lt,Ri,Cr),Or(Lt));let er=Cr?Lt:Ei[wi];const tr=ge.createElement(ge.Fragment,null,et(er,wi,_t),yo(er,(Ci=er==null?void 0:er.answer)==null?void 0:Ci[0],wi,_t),wo(er));return Cr?[Ii,tr]:co(Ii,tr,er,wi)},deal:Lt=>{Lt.score=Lt.score===void 0?5:Lt.score;let wi=[];return Dn(Lt==null?void 0:Lt.question)||wi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Lt.errorMsg=wi.join(`
`),Lt}},{id:"6",type:"\u7F16\u7A0B\u9898",element:(Lt,wi)=>{var _t,Yi;const Ci=Ei[wi],Cr=yr.slice(0,4).map(Ri=>({key:Ri,label:Ri,onClick:()=>qi("platform",wi,Ri)}));return ge.createElement("div",{className:Oe.row,style:{display:on?Ci!=null&&Ci.errorMsg?"flex":"none":"flex"}},ge.createElement("div",{className:Oe.leftLayout},ge.createElement(We,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Oe.question},Dr(Lt,wi),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u8BD5\u9898\u63CF\u8FF0\uFF1A${(Lt==null?void 0:Lt.description)||""}`,tagName:"p"}),jr(Lt),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A${Lt==null?void 0:Lt.timeLimit}`,tagName:"p"}),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u7F16\u7A0B\u8BED\u8A00\uFF1A${(Lt==null?void 0:Lt.platform)||""}`,tagName:"p"}),ge.createElement("p",{contentEditable:!0},"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\uFF1A"),ge.createElement("h4",null),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:(Lt==null?void 0:Lt.code)||"",tagName:"div"}),(_t=Lt==null?void 0:Lt.inputs)==null?void 0:_t.map((Ri,Ii)=>{var er;return ge.createElement(ge.Fragment,{key:Ii},ge.createElement("h4",null),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u6D4B\u8BD5\u7528\u4F8B(${Ii+1})\u8F93\u5165\uFF1A${Ri||""}`,tagName:"div"}),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u6D4B\u8BD5\u7528\u4F8B(${Ii+1})\u8F93\u51FA\uFF1A${((er=Lt==null?void 0:Lt.outputs)==null?void 0:er[Ii])||""}`,tagName:"div"}))}),Or(Lt)))),ge.createElement("div",{className:Oe.rightLayout},ge.createElement(Ee,{className:Ci!=null&&Ci.errorMsg?Oe.error:""},et(Ci,wi),ge.createElement("div",{className:Oe.liWrap,style:{background:"transparent",marginBottom:0,padding:0}},ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u8BD5\u9898\u63CF\u8FF0\uFF1A"),ge.createElement(Ut,{className:Oe.edit,id:Ci==null?void 0:Ci.id,value:Ci==null?void 0:Ci.description,tagName:"div",onBlur:Ri=>qi("description",wi,Ri)}))),yo(Ci,"",wi),ge.createElement("div",{className:Oe.liWrap},ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A"),ge.createElement(Ut,{className:Oe.edit,id:Ci==null?void 0:Ci.id,value:Ci==null?void 0:Ci.timeLimit,tagName:"div",onBlur:Ri=>qi("timeLimit",wi,Wr(Ri))})),ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u7F16\u7A0B\u8BED\u8A00\uFF1A"),ge.createElement("div",{className:"c-black"},ge.createElement(Et.Z,{menu:{items:Cr}},ge.createElement("span",{className:"c-light-primary"},Ci==null?void 0:Ci.platform,ge.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),ge.createElement("div",{className:Oe.li,style:{flexDirection:"column",alignItems:"start"}},ge.createElement("aside",{className:"mb10"},"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\uFF1A"),ge.createElement(Ut,{className:Oe.edit,id:Ci==null?void 0:Ci.id,value:(Ci==null?void 0:Ci.code)||"",onBlur:Ri=>qi("code",wi,Wr(Ri)),tagName:"div"}))),(Yi=Ci==null?void 0:Ci.inputs)==null?void 0:Yi.map((Ri,Ii)=>{var er;return ge.createElement("div",{className:Oe.liWrap,key:Ii},ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B(",Ii+1,")\u8F93\u5165\uFF1A"),ge.createElement(Ut,{id:Ci==null?void 0:Ci.id,value:Ri||"",className:Oe.edit,onBlur:tr=>{const hr=[...(Ci==null?void 0:Ci.inputs)||[]];hr[Ii]=Wr(tr),qi("inputs",wi,hr)},tagName:"div"})),ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B(",Ii+1,")\u8F93\u51FA\uFF1A"),ge.createElement(Ut,{id:Ci==null?void 0:Ci.id,value:((er=Ci==null?void 0:Ci.outputs)==null?void 0:er[Ii])||"",className:Oe.edit,onBlur:tr=>{const hr=[...(Ci==null?void 0:Ci.outputs)||[]];hr[Ii]=Wr(tr),qi("outputs",wi,hr)},tagName:"div"})))}),wo(Ci))))},deal:Lt=>{var wi,_t,Yi;Lt.score=Lt.score===void 0?10:Lt.score,Lt.code=(wi=Lt.code)==null?void 0:wi.trim();let Ci=[];Dn(Lt==null?void 0:Lt.question)?((_t=Lt==null?void 0:Lt.question)==null?void 0:_t.length)>60&&Ci.push("\u7F16\u7A0B\u9898\u540D\u79F0\u9650\u523660\u4E2A\u5B57\u7B26"):Ci.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Dn(Lt==null?void 0:Lt.description)||Ci.push("\u672A\u8BC6\u522B\u5230\u8BD5\u9898\u63CF\u8FF0");const Cr=Dn(String((Lt==null?void 0:Lt.timeLimit)||""));if(Lt.timeLimit=Cr,(!Cr||Cr&&!["3","4","5","6","7","8","9","10"].includes(Cr))&&Ci.push("\u65F6\u95F4\u9650\u5236\u4E3A\u5FC5\u586B\u9879\uFF0C\u53EA\u652F\u63013-10\u7684\u6574\u6570"),Lt.platform=Dn(Lt==null?void 0:Lt.platform),Lt!=null&&Lt.platform){const Ri=["c","c++","java","python"],Ii=(Yi=Lt==null?void 0:Lt.platform)==null?void 0:Yi.toLowerCase(),er=Ri.findIndex(tr=>tr===Ii);er>-1?Lt.platform=yr[er]:Ci.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u8BED\u8A00")}else Ci.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u8BED\u8A00");if(!(Lt!=null&&Lt.inputs)||!(Lt!=null&&Lt.outputs))Lt.inputs=[],Lt.outputs=[],Ci.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 Ri=Math.min(Lt.inputs.length,Lt.outputs.length);Lt.inputs=Lt.inputs.slice(0,Ri),Lt.outputs=Lt.outputs.slice(0,Ri),Lt.outputs.some(Ii=>!Dn(Ii))&&Ci.push("\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\u4E3A\u5FC5\u586B\u9879")}return Lt.errorMsg=Ci.join(`
`),Lt}},{id:"7",type:"\u7EC4\u5408\u9898",element:(Lt,wi)=>{var _t,Yi;const Ci=Ei[wi];return ge.createElement("div",{className:Oe.row,style:{display:on?Ci!=null&&Ci.errorMsg?"flex":"none":"flex"}},ge.createElement("div",{className:Oe.leftLayout},ge.createElement(We,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Oe.question},Dr(Lt,wi),jr(Lt),(_t=Lt==null?void 0:Lt.questions)==null?void 0:_t.map((Cr,Ri)=>{var Ii;const er=(Ii=hi.find(tr=>tr.id===(Cr==null?void 0:Cr.type)))==null?void 0:Ii.element;return ge.createElement(ge.Fragment,{key:`left-${Lt.id}-${Ri}`},er(Cr,wi,Ri)[0])}),Or(Lt),ge.createElement("p",{contentEditable:!0},"}}")))),ge.createElement("div",{className:Oe.rightLayout},ge.createElement(Ee,{className:Ci!=null&&Ci.errorMsg?Oe.error:""},et(Ci,wi),yo(Ci,"",wi),(Yi=Ci==null?void 0:Ci.questions)==null?void 0:Yi.map((Cr,Ri)=>{var Ii;const er=(Ii=hi.find(tr=>tr.id===(Cr==null?void 0:Cr.type)))==null?void 0:Ii.element;return ge.createElement(ge.Fragment,{key:`right-${Ci.id}-${Ri}`},er(Cr,wi,Ri)[1])}),wo(Ci))))},deal:Lt=>{var wi,_t,Yi,Ci,Cr;const Ri=Yr,Ii=[...hi],er=Ii.findIndex(kr=>kr.id==="0"),tr=Ii.findIndex(kr=>kr.id==="1");if(er!==-1){const kr=Ii[er].deal;Ii[er].deal=Er=>{const Br=kr(Er);return Br.errorMsg&&(Br.errorMsg=Br.errorMsg.split(`
`).filter(Zr=>Zr!=="\u9009\u9879\u5185\u5BB9\u91CD\u590D").join(`
`)),Br}}if(tr!==-1){const kr=Ii[tr].deal;Ii[tr].deal=Er=>{const Br=kr(Er);return Br.errorMsg&&(Br.errorMsg=Br.errorMsg.split(`
`).filter(Zr=>Zr!=="\u9009\u9879\u5185\u5BB9\u91CD\u590D").join(`
`)),Br}}Lt.questions=(wi=Lt.questions)!=null&&wi.length?Yr(Lt.questions.slice(0,20)):[],Lt.questions=(_t=Lt.questions)==null?void 0:_t.map((kr,Er)=>{var Br;if(kr.type==="0"||kr.type==="1"){const Zr=(Br=kr.options)==null?void 0:Br.map(zi=>zi==null?void 0:zi.trim().replace(/^\s+|\s+$/g,""));Zr&&new Set(Zr).size!==Zr.length&&(kr.errorMsg=(kr.errorMsg?kr.errorMsg+`
`:"")+"\u9009\u9879\u5185\u5BB9\u91CD\u590D")}return Qn(xn({},kr),{last:Er===Lt.questions.length-1})});const hr=(Yi=Lt.questions)==null?void 0:Yi.reduce((kr,Er)=>{const Br=parseFloat(Er.score);return isNaN(Br)?kr:kr+Br},0);Lt.score=hr;let Sr=[];return(Ci=Lt.questions)!=null&&Ci.length?Lt.errorMsg=((Cr=Lt.questions)==null?void 0:Cr.findIndex(kr=>!!kr.errorMsg))>-1:Sr.push("\u8BF7\u6DFB\u52A0\u5C0F\u9898"),Dn(Lt==null?void 0:Lt.question)||Sr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Sr.length&&(Lt.errorMsg=Sr.join(`
`)),Lt}},{id:"8",type:"\u7A0B\u5E8F\u586B\u7A7A\u9898",element:(Lt,wi)=>{var _t,Yi;const Ci=Ei[wi],Cr=yr.map(Ri=>({key:Ri,label:Ri,onClick:()=>qi("platform",wi,Ri)}));return ge.createElement("div",{className:Oe.row,style:{display:on?Ci!=null&&Ci.errorMsg?"flex":"none":"flex"}},ge.createElement("div",{className:Oe.leftLayout},ge.createElement(We,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Oe.question},Dr(Lt,wi),jr(Lt),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A${Lt==null?void 0:Lt.timeLimit}`,tagName:"p"}),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u7F16\u7A0B\u8BED\u8A00\uFF1A${(Lt==null?void 0:Lt.platform)||""}`,tagName:"p"}),ge.createElement("p",{contentEditable:!0},"\u7A0B\u5E8F\u4EE3\u7801\uFF1A"),ge.createElement("h4",null),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:(Lt==null?void 0:Lt.code)||"",tagName:"div"}),ge.createElement("h4",null),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u6D4B\u8BD5\u7528\u4F8B\u8F93\u5165\uFF1A${(Lt==null?void 0:Lt.input)||""}`,tagName:"p"}),ge.createElement(Ut,{id:Lt==null?void 0:Lt.id,value:`\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\uFF1A${(Lt==null?void 0:Lt.output)||""}`,tagName:"p"}),(_t=Lt==null?void 0:Lt.answer)==null?void 0:_t.map((Ri,Ii)=>ge.createElement(Ut,{key:Ii,id:Lt==null?void 0:Lt.id,value:`\u7B54\u6848${Ii+1}\uFF1A${Ri||""}`,tagName:"p"})),Or(Lt)))),ge.createElement("div",{className:Oe.rightLayout},ge.createElement(Ee,{className:Ci!=null&&Ci.errorMsg?Oe.error:""},et(Ci,wi),yo(Ci,"",wi),ge.createElement("div",{className:Oe.liWrap},ge.createElement("div",{className:Oe.li,onKeyDown:Wn},ge.createElement("aside",null,"\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A"),ge.createElement(Ut,{className:Oe.edit,id:Ci==null?void 0:Ci.id,value:Ci==null?void 0:Ci.timeLimit,tagName:"div",onBlur:Ri=>qi("timeLimit",wi,Wr(Ri))})),ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u7F16\u7A0B\u8BED\u8A00\uFF1A"),ge.createElement("div",{className:"c-black"},ge.createElement(Et.Z,{menu:{items:Cr}},ge.createElement("span",{className:"c-light-primary"},Ci==null?void 0:Ci.platform,ge.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),ge.createElement("div",{className:Oe.li,style:{flexDirection:"column",alignItems:"start"}},ge.createElement("aside",{className:"mb10"},"\u7A0B\u5E8F\u4EE3\u7801\uFF1A"),ge.createElement(Ut,{className:Oe.edit,id:Ci==null?void 0:Ci.id,value:(Ci==null?void 0:Ci.code)||"",onBlur:Ri=>qi("code",wi,Wr(Ri)),tagName:"div"})),ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B\u8F93\u5165\uFF1A"),ge.createElement(Ut,{className:Oe.edit,id:Ci==null?void 0:Ci.id,value:(Ci==null?void 0:Ci.input)||"",onBlur:Ri=>qi("input",wi,Wr(Ri)),tagName:"div"})),ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\uFF1A"),ge.createElement(Ut,{className:Oe.edit,id:Ci==null?void 0:Ci.id,value:(Ci==null?void 0:Ci.output)||"",onBlur:Ri=>qi("output",wi,Wr(Ri)),tagName:"div"}))),ge.createElement("div",{className:Oe.liWrap},(Yi=Ci==null?void 0:Ci.answer)==null?void 0:Yi.map((Ri,Ii)=>ge.createElement("div",{className:Oe.li,key:Ii},ge.createElement("aside",null,"\u7B54\u6848",Ii+1,"\uFF1A"),ge.createElement(Ut,{id:Ci==null?void 0:Ci.id,value:Ri||"",className:Oe.edit,onBlur:er=>{const tr=[...(Ci==null?void 0:Ci.answer)||[]];tr[Ii]=Wr(er),qi("output",wi,tr)},tagName:"div"})))),wo(Ci))))},deal:Lt=>{var wi,_t,Yi,Ci,Cr,Ri,Ii,er;Lt.score=Lt.score===void 0?10:Lt.score,Lt.code=(Yi=(_t=(wi=Lt.code)==null?void 0:wi.trim())==null?void 0:_t.replace(/@_@/g,"@\u2581@"))==null?void 0:Yi.replace(/@__@/g,"@\u2581\u2581@");let tr=[];if(Dn(Lt==null?void 0:Lt.question)||tr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Dn(Lt==null?void 0:Lt.code)?/@▁@|@▁▁@/.test(Lt==null?void 0:Lt.code)?(Ci=Lt==null?void 0:Lt.answer)!=null&&Ci.length&&((Cr=Lt==null?void 0:Lt.code.match(/@▁@|@▁▁@/g))==null?void 0:Cr.length)!==((Ri=Lt==null?void 0:Lt.answer)==null?void 0:Ri.length)&&tr.push("\u586B\u7A7A\u9879\u4E0E\u7B54\u6848\u4E2A\u6570\u4E0D\u5339\u914D\uFF0C\u8BF7\u8FDB\u884C\u8C03\u6574"):tr.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"):tr.push("\u672A\u8BC6\u522B\u5230\u7A0B\u5E8F\u4EE3\u7801"),Lt!=null&&Lt.answer?(Ii=Lt.answer)!=null&&Ii.some(Sr=>!Dn(Sr))&&tr.push("\u7B54\u6848\u4E3A\u5FC5\u586B\u9879"):tr.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u7B54\u68481\uFF1AHello\uFF1B\u7B54\u68482\uFF1AWorld"),Lt.platform=Dn(Lt==null?void 0:Lt.platform),Lt!=null&&Lt.platform){const Sr=["c","c++","java","python","javascript","ruby"],kr=(er=Lt==null?void 0:Lt.platform)==null?void 0:er.toLowerCase(),Er=Sr.findIndex(Br=>Br===kr);Er>-1?Lt.platform=yr[Er]:tr.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u3001JavaScript\u3001Ruby\u8BED\u8A00")}else tr.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u3001JavaScript\u3001Ruby\u8BED\u8A00");Dn(Lt==null?void 0:Lt.output)||tr.push("\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\u4E3A\u5FC5\u586B\u9879");const hr=Dn(String((Lt==null?void 0:Lt.timeLimit)||""));return Lt.timeLimit=hr,(!hr||hr&&!["3","4","5","6","7","8","9","10"].includes(hr))&&tr.push("\u65F6\u95F4\u9650\u5236\u4E3A\u5FC5\u586B\u9879\uFF0C\u53EA\u652F\u63013-10\u7684\u6574\u6570"),Lt.errorMsg=tr.join(`
`),Lt}}],Ao=()=>ge.createElement(ge.Fragment,null,jn.filter(Lt=>{var wi;return!!((wi=hi.find(Yi=>Yi.id===(Lt==null?void 0:Lt.type)))==null?void 0:wi.element)}).map((Lt,wi)=>{var _t;const Yi=(_t=hi.find(Ci=>Ci.id===(Lt==null?void 0:Lt.type)))==null?void 0:_t.element;return ge.createElement(ge.Fragment,{key:Lt.id},Yi(Lt,wi))})),Vo=()=>Ot(void 0,null,function*(){const Lt=Ei.filter(wi=>!wi.checked);if(Li!==3||!Lt.length){_e.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898\uFF01");return}Xt.setFieldsValue({sub_discipline_id:Zt}),Gt(!0)}),sa=Lt=>Ot(void 0,null,function*(){const wi=Yr(Lt);Ne(wi),Oi(JSON.parse(JSON.stringify(wi))),Gi(3),Lr(!1),cn(!1),ui(!1)});(0,ge.useEffect)(()=>{if(un)return;const Lt=()=>{Xi(wi=>wi>=90?(clearInterval(cr.current),90):wi+1)};return cr.current=setInterval(Lt,5e4/90),()=>clearInterval(cr.current)},[un]);const ko=(Lt,wi)=>{Rt(!1);const _t=new FormData;Object.keys(wi).forEach(Ci=>{_t.append(Ci,wi[Ci])});const Yi=new window.XMLHttpRequest;Yi.withCredentials=!0,Yi.addEventListener("load",function(Ci){return Ot(this,null,function*(){var Cr,Ri;try{const Ii=JSON.parse((Cr=Ci==null?void 0:Ci.target)==null?void 0:Cr.response);if(Rt(!0),Xi(100),yield new Promise(er=>setTimeout(()=>er(),780)),Ii.status===0){if(!((Ri=Ii==null?void 0:Ii.data)!=null&&Ri.length)){_e.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898!"),Lr(!1);return}sa((Ii==null?void 0:Ii.data)||[])}else Lr(!1),_e.ZP.warning(Ii==null?void 0:Ii.message)}catch(Ii){console.log("\u8BF7\u6C42\u9519\u8BEF\uFF1A",Ii)}})}),Yi.addEventListener("error",()=>{Lr(!1)}),Yi.open("POST",`${be.Z.API_SERVER}${Lt}`),Yi.send(_t)},Io=Lt=>Ot(void 0,null,function*(){const wi=Lt.name.split(".").slice(-1)[0].toLowerCase();return["docx"].indexOf(wi)==-1?(_e.ZP.error(`${Lt.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()):(Lr(!0),vr("\u5904\u7406\u4E2D"),ko("/api/intelligent_imports/import.json",{file:Lt}),Promise.reject())}),_o=Lt=>Ot(void 0,null,function*(){const wi=Lt.name.split(".").slice(-1)[0].toLowerCase();return["docx","doc","pdf","png","jpg"].indexOf(wi)==-1?(_e.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()):Lt.size/1024/1024>200?(_e.ZP.warning("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E200M"),Promise.reject()):(wn!=null&&wn.length?Le.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:()=>gn([Lt])}):gn([Lt]),Promise.reject())});let la=[{key:1,label:ge.createElement(ct.default,{showUploadList:!1,accept:".docx",maxCount:1,beforeUpload:Io},ge.createElement("div",{style:{padding:"0 5px",width:108,height:35,lineHeight:"35px"}},"\u672C\u5730\u5BFC\u5165"))}];((0,it.Ny)()||(0,it.$O)())&&la.push({key:2,label:ge.createElement("div",{style:{padding:"0 5px"}},"\u5927\u6A21\u578B\u667A\u80FD\u51FA\u9898"),onClick:()=>{cn(!0)}});const pa=[Ei.length,(mi=Ei.filter(Lt=>!!(Lt!=null&&Lt.errorMsg)))==null?void 0:mi.length];return ge.createElement("div",{className:st()(Oe.intelligentBox,"intelligent-body-curb",ye),style:Qn(xn({},Qe),{width:vt}),ref:Ti},ge.createElement("div",{className:Oe.underpin},ge.createElement("b",{style:hn}),ge.createElement("b",{style:hn})),ge.createElement("div",{className:Oe.head,style:{top:rt}},ge.createElement("div",{className:Oe.leftLayout},qt||ge.createElement(ge.Fragment,null,ge.createElement(Pt.Z,{align:"middle"},ge.createElement("div",{className:Oe.title},"\u8BD5\u9898\u7F16\u8F91"),!dn&&ge.createElement(ve.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(ve.op,{onClick:fr,shape:"default"},"\u4E00\u952E\u6E05\u7A7A"),!dn&&ge.createElement(Et.Z,{overlayClassName:Oe.menu,menu:{items:la}},ge.createElement(ve.op,{className:"ml20",type:"primary",shape:"default"},"\u5BFC\u5165\u8BD5\u9898")),!!Mn&&Mn),ge.createElement("div",{className:Oe.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(Pt.Z,{className:Oe.rightLayout,style:{alignItems:"start"}},Gn||ge.createElement(ge.Fragment,null,ge.createElement("div",{className:Oe.title,style:{marginRight:0}},"\u8BD5\u9898\u9884\u89C8"),[3].includes(Li)&&ge.createElement(Xe.default,{className:"ml20",checked:on,onChange:Lt=>ui(Lt.target.checked)},"\u4EC5\u67E5\u770B\u9519\u8BEF\u8BD5\u9898"),[3].includes(Li)&&ge.createElement("div",{style:{color:"#5F6368",marginLeft:"auto"}},"\u5171\u8BC6\u522B",ge.createElement("span",{className:"ml5 mr5 c-light-primary"},pa[0]),"\u9898\uFF0C\u5176\u4E2D\u8BC6\u522B\u6709\u8BEF",ge.createElement("span",{className:"ml5 mr5 c-red-e53"},pa[1]),"\u9898")),Fn&&ge.createElement("div",{className:Oe.tabs},jn==null?void 0:jn.map((Lt,wi)=>ge.createElement("div",{onClick:()=>{ni(wi)},className:zn===wi&&Oe.active,key:wi},"\u65B0\u9898",wi+1)))),ge.createElement("div",{className:Oe.centerBox},ge.createElement("img",{className:"mb10",src:Ze,width:56}),!Nt&&ge.createElement(ve.op,{onClick:ur},"\u8BC6\u522B"))),[1,2].includes(Li)&&ir(),[3].includes(Li)&&Ao(),ge.createElement("div",{className:"pb10"}),ge.createElement("div",{className:Oe.buttonFixed},ge.createElement("div",{className:Oe.buttonWrap},ge.createElement(It.ZP,{size:"middle",className:`${Oe.button} mr20`,onClick:Ye},"\u53D6\u6D88"),ge.createElement(It.ZP,{size:"middle",type:"primary",className:`${Oe.button}`,onClick:Vo},pi))),ge.createElement(Le.default,{centered:!0,closable:!1,destroyOnClose:!0,open:ji,title:null,footer:null,width:320,afterClose:()=>Xi(0)},ge.createElement(Pt.Z,{align:"middle",style:{flexDirection:"column"}},ge.createElement("b",{style:{color:"#5F6368"},className:"font16 mb5 mt20"},wr,ge.createElement("span",{className:Oe.dotLoading},ge.createElement("span",null,"."),ge.createElement("span",null,"."),ge.createElement("span",null,"."))),ge.createElement(Be.Z,{style:{width:"auto"},size:[200,8],showInfo:!1,percent:ar}),ge.createElement("div",{style:{color:"#5F6368"},className:"mb20"},"\u6B63\u5728\u8BC6\u522B\uFF0C\u5DF2\u5B8C\u6210",ge.createElement("span",{className:"ml5 c-light-primary"},ar,"%")))),ge.createElement(Le.default,{centered:!0,open:In,title:"\u8BD5\u9898\u5BFC\u5165\u8BBE\u7F6E",confirmLoading:vi,width:480,onCancel:()=>Gt(!1),onOk:()=>Xt.submit(),afterClose:()=>{Xt.resetFields()}},ge.createElement(Ge.default,{style:{maxHeight:550},form:Xt,layout:"horizontal",colon:!1,size:"large",onFinish:Lt=>Ot(void 0,null,function*(){var wi,_t,Yi,Ci,Cr;const Ri=Ei.filter(tr=>!tr.checked&&!tr.errorMsg);bi(!0);const Ii=()=>Ot(void 0,null,function*(){var tr,hr;const Sr=yield(0,ot.ZP)("/api/intelligent_imports/save.json",{method:"post",body:Qn(xn(xn({},yt),Lt),{list:Ri,mode:St})});Sr.status===0&&(li&&((tr=Sr==null?void 0:Sr.data)!=null&&tr.success)&&window.location.pathname==="/problemset"&&(Ve.Z.publish("refresh-item-bank",Lt.group_id),yield new Promise(kr=>setTimeout(()=>kr(),1500))),_e.ZP.success(`\u6210\u529F\u5BFC\u5165${(hr=Sr==null?void 0:Sr.data)==null?void 0:hr.success}\u9053\u8BD5\u9898`,3),Je(),Gt(!1)),bi(!1)});if(St!==1){yield Ii();return}const er=yield(0,ot.ZP)("/api/intelligent_imports/is_repeated.json",{method:"post",body:{list:Ei,mode:St}});if(er.status===0){if(!((wi=er==null?void 0:er.data)!=null&&wi.error_size)){yield Ii();return}Le.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onCancel:()=>{bi(!1)},title:"\u63D0\u793A",content:ge.createElement("div",{style:{overflow:"auto",maxHeight:500}},"\u5171",ge.createElement("span",{className:"c-light-primary ml5 mr5"},(_t=er==null?void 0:er.data)==null?void 0:_t.all_size),"\u9053\u8BD5\u9898\uFF0C\u5176\u4E2D",ge.createElement("span",{style:{color:"#FF9D18"},className:"ml5 mr5"},(Yi=er==null?void 0:er.data)==null?void 0:Yi.error_size),"\u9053\u8BD5\u9898\u91CD\u590D\uFF08\u7B2C",ge.createElement("span",{className:"ml5 mr5"},(Cr=(Ci=er==null?void 0:er.data)==null?void 0:Ci.index)==null?void 0:Cr.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:Ii})}})},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(Ge.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:ft})),St===1&&ge.createElement(Ge.default.Item,{label:ge.createElement(Pt.Z,{align:"middle",style:{justifyContent:"space-between"}},ge.createElement("span",null,"\u653E\u5165\u6587\u4EF6\u5939\u76EE\u5F55"),ge.createElement("div",{onClick:()=>jt(!0),style:{marginLeft:211,transform:"translateX(14px)",display:"flex",color:"#5F6368",cursor:"pointer"}},ge.createElement("img",{className:"mr5 primary-hover",src:bt}),"\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(qe.Z,{key:vn})))),ge.createElement(Le.default,{centered:!0,open:Kt,title:"\u65B0\u5EFA\u6587\u4EF6\u5939",destroyOnClose:!0,width:480,confirmLoading:Sn,onCancel:()=>jt(!1),onOk:()=>Si.submit(),afterClose:()=>{Si.resetFields()}},ge.createElement(Ge.default,{style:{maxHeight:550},form:Si,layout:"horizontal",colon:!1,size:"large",onFinish:Lt=>Ot(void 0,null,function*(){var wi;Un(!0),(yield(0,ot.ZP)("/api/item_banks_groups.json",{method:"post",body:{name:Lt.name,parent_id:(wi=Lt==null?void 0:Lt.parent_id)==null?void 0:wi[0]}})).status===0?(Bt(vn+1),setTimeout(()=>{_e.ZP.success("\u64CD\u4F5C\u6210\u529F"),jt(!1),Un(!1)},1e3)):Un(!1)})},ge.createElement(Ge.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(Ge.default.Item,{label:"\u6587\u4EF6\u5939\u4F4D\u7F6E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939"}],name:"parent_id"},ge.createElement(qe.Z,null)))),ge.createElement(Le.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(gi===1&&!Dn(Bn)){_e.ZP.warning("\u8BF7\u5148\u8F93\u5165\u51FA\u9898\u8981\u6C42");return}if(gi===2&&!Dn(Bn)&&!(wn!=null&&wn.length)){_e.ZP.warning("\u8BF7\u4E0A\u4F20\u6750\u6599\u6587\u6863\u6216\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6750\u6599\u5185\u5BB9");return}const Lt=[{name:"\u5355\u9009\u9898",num:yn||0},{name:"\u591A\u9009\u9898",num:$n||0},{name:"\u5224\u65AD\u9898",num:ii||0},{name:"\u586B\u7A7A\u9898",num:di||0},{name:"\u7B80\u7B54\u9898",num:$i||0}];if(Lt.reduce((Yi,Ci)=>Yi+Ci.num,0)===0){_e.ZP.warning("\u8BF7\u8BBE\u7F6E\u51FA\u9898\u6570\u91CF");return}console.log(gi,yn,$n),Lr(!0),vr("\u5904\u7406\u4E2D");const _t={type:gi,query:Bn,item_types:JSON.stringify(Lt)};gi===2&&(_t.file=(wn==null?void 0:wn[0])||null),ko("/api/intelligent_imports/large_model_intelligent_qa.json",_t)}},ge.createElement(Pt.Z,{align:"middle",className:"mb10 c-black"},ge.createElement("div",{className:"mr10"},"\u51FA\u9898\u8981\u6C42"),ge.createElement(ce.ZP.Group,{value:gi,onChange:Lt=>tn(Lt.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:gi===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:Lt=>{Ft(Lt.target.value)}}),gi===2&&ge.createElement(ge.Fragment,null,ge.createElement(ct.default,{accept:".doc,.docx,.pdf,.png,.jpg",maxCount:1,fileList:wn,beforeUpload:_o,className:"mb20",onRemove:()=>gn([])},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(ve.op,{style:{borderRadius:2}},ge.createElement("i",{className:"icon-shangchuan3 mr5"}),"\u4E0A\u4F20\u6750\u6599"))),ge.createElement("div",{style:{height:20}})),ge.createElement(Pt.Z,{align:"middle",className:"c-black"},ge.createElement("div",{className:"mb10"},"\u51FA\u9898\u6570\u91CF"),ge.createElement(Pt.Z,{gutter:16},ge.createElement(he.Z,null,ge.createElement("label",null,"\u5355\u9009\u9898"),ge.createElement(Tt.Z,{min:0,max:10,value:yn,onChange:On,style:{marginLeft:"8px"}})),ge.createElement(he.Z,null,ge.createElement("label",null,"\u591A\u9009\u9898"),ge.createElement(Tt.Z,{min:0,max:10,value:$n,onChange:Yn,style:{marginLeft:"8px"}})),ge.createElement(he.Z,null,ge.createElement("label",null,"\u5224\u65AD\u9898"),ge.createElement(Tt.Z,{min:0,max:10,value:ii,onChange:Xn,style:{marginLeft:"8px"}})),ge.createElement(he.Z,null,ge.createElement("label",null,"\u586B\u7A7A\u9898"),ge.createElement(Tt.Z,{min:0,max:10,value:di,onChange:Hi,style:{marginLeft:"8px"}})),ge.createElement(he.Z,null,ge.createElement("label",null,"\u7B80\u7B54\u9898"),ge.createElement(Tt.Z,{min:0,max:10,value:$i,onChange:Wi,style:{marginLeft:"8px"}}))))))},De=ke;var Fe=Pe},72714:function(Vn,Pn,pe){"use strict";var ge=pe(59301),Oe=pe(11570),Ke=pe(48136),st=pe(46531),Ge=pe(43418),_e=pe(59301);const Le=(0,ge.forwardRef)(({callback:Tt,width:Pt,onChange:Xe,disabled:Et,readOnly:ct,type:It="",value:Be="",style:ne={}},ee)=>{const ce=(0,ge.useRef)(),se=(0,ge.useRef)(),[he,ve]=(0,ge.useState)(0),[be,ke]=(0,ge.useState)(0),[Ae,ze]=(0,ge.useState)(!1),Ze=()=>{var He=document.createElement("div");He.innerHTML=ce.current.getValue();var wt=He.innerText;return Tt&&Tt(wt),wt};(0,ge.useImperativeHandle)(ee,()=>({getData:Ze}));const ot=He=>{He.preventDefault();const wt=He.clientX-he,nt=He.clientY-be;document.body.onmousemove=Dt=>{let ht=Dt.clientX-wt,zt=Dt.clientY-nt;const Yt=document.getElementsByClassName("markdown-popup-form")[0],Ut=window.innerWidth-Yt.offsetWidth,it=window.innerHeight-Yt.offsetHeight;ht=Math.max(0,Math.min(ht,Ut)),zt=Math.max(0,Math.min(zt,it)),qe(Dt.clientX,Dt.clientY,wt,nt)&&(ve(ht),ke(zt))},document.body.onmouseup=function(){document.body.onmousemove=null}},qe=(He,wt,nt,Dt)=>{const ht=document.body.clientHeight,zt=document.body.clientWidth;return He<20&&nt>He||He>zt-20&&nt<He||wt<20&&Dt>wt||wt>ht-20&&Dt<wt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,ge.useEffect)(()=>{Ae&&setTimeout(()=>{const He=document.getElementsByClassName("markdown-popup-form")[0],wt=window.innerWidth/2-He.offsetWidth/2,nt=window.innerHeight/2-He.offsetHeight/2;ve(wt),ke(nt)},0)},[Ae]);const bt=()=>{Et||ct||ze(!0)};return _e.createElement("div",{style:ne},_e.createElement("div",{style:{width:Pt||"100%",position:"relative"},className:`${Oe.Z.mathFillWrap} ${Et||ct?"cursorDefault":""}`,onClick:()=>bt()},_e.createElement("math-field",{disabled:Et,locale:"zh_cn",class:`${Oe.Z.mathField} ${It}`,readOnly:ct,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:ce,style:{width:"100%",fontSize:Be?18:14},value:Be||""})),_e.createElement(Ge.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:he,top:be},title:_e.createElement("div",{style:{cursor:"move"},onMouseDown:ot},"\u8F93\u5165\u516C\u5F0F"),open:Ae,onOk:()=>{const He=se.current.getData();ce.current.setValue(He),Xe(He),ze(!1)},onCancel:()=>{ze(!1)},destroyOnClose:!0,className:"markdown-popup-form"},_e.createElement(st.Z,{value:Be,ref:se,onChange:Xe,showSaveButton:!1})))});Pn.Z=Le},46531:function(Vn,Pn,pe){"use strict";var ge=pe(59301),Oe=pe(95237),Ke=pe(43604),st=pe(99313),Ge=pe(3113),_e=pe(99325),Le=pe(11570),Tt=pe(48136),Pt=pe(59301);const Xe=(0,ge.forwardRef)(({callback:Et,showSaveButton:ct,value:It=""},Be)=>{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+" ")},he=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Pt.createElement(Oe.Z,{className:Le.Z.lists,gutter:[10,10]},ee.map((be,ke)=>Pt.createElement(Ke.Z,{flex:"110px",className:Le.Z.item},Pt.createElement("div",null,Pt.createElement(_e.Z,{value:`$$${be.value}$$`}),be.name),Pt.createElement("div",{className:Le.Z.children},be.children.map((Ae,ze)=>Pt.createElement("div",{key:ze},Pt.createElement("h1",null,Ae.name),Pt.createElement(Oe.Z,{gutter:[10,10]},Ae.data.map((Ze,ot)=>Pt.createElement(Ke.Z,{key:ot,onClick:()=>se(Ze),className:Le.Z.diamond},Pt.createElement(_e.Z,{value:"`$$"+Ze.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Pt.createElement(Oe.Z,{className:Le.Z.lists,gutter:[10,10]},ce.map((be,ke)=>Pt.createElement(Ke.Z,{flex:"110px",className:Le.Z.item},Pt.createElement("div",null,Pt.createElement(_e.Z,{value:"`$$"+be.value+"$$`"}),be.name),Pt.createElement("div",{className:Le.Z.children},be.children.map((Ae,ze)=>Pt.createElement("div",{key:ze},Ae.name&&Pt.createElement("h1",null,Ae.name),Pt.createElement(Oe.Z,{gutter:[10,10]},Ae.data.map((Ze,ot)=>Pt.createElement(Ke.Z,{key:ot,onClick:()=>se(Ze),className:Le.Z.diamond},Pt.createElement(_e.Z,{value:"`$$"+Ze.value+"$$`"}))))))))))}],ve=()=>{var be=document.createElement("div");be.innerHTML=ne.current.getValue();var ke=be.innerText;return Et&&Et(ke),ke};return(0,ge.useImperativeHandle)(Be,()=>({getData:ve})),Pt.createElement("div",{className:Le.Z.mathWrap},Pt.createElement(st.default,{defaultActiveKey:"1",items:he}),Pt.createElement("math-field",{locale:"zh_cn",className:Le.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ne,style:{width:800,marginTop:30,fontSize:18}},It||""),ct&&Pt.createElement("div",{className:Le.Z.button},Pt.createElement(Ge.ZP,{size:"large",onClick:ve,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Pn.Z=Xe},94184:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ct}});var ge=pe(59301),Oe=pe(78241),Ke=pe(43418),st=pe(92832),Ge=pe(87169),_e=pe(7660),Le={publicQuest:"publicQuest___iYvzo",publicQuestContent:"publicQuestContent___vgbKh",public_tips:"public_tips___UX0Dn",concat:"concat___wOfND"},Tt=pe(66231),Pt=pe(59301),Xe=(It,Be,ne)=>new Promise((ee,ce)=>{var se=be=>{try{ve(ne.next(be))}catch(ke){ce(ke)}},he=be=>{try{ve(ne.throw(be))}catch(ke){ce(ke)}},ve=be=>be.done?ee(be.value):Promise.resolve(be.value).then(se,he);ve((ne=ne.apply(It,Be)).next())}),ct=({type:It="subject",open:Be,onCancel:ne,onOkClick:ee,subDisciplineId:ce})=>{const[se]=Oe.default.useForm(),[he,ve]=(0,ge.useState)([]),[be,ke]=(0,ge.useState)(!1);(0,ge.useEffect)(()=>{},[]);const Ae=()=>Xe(void 0,null,function*(){if(It){const ze=yield(0,_e.ZP)("/api/disciplines.json",{method:"get",params:{source:It}});ve(ze.disciplines||[])}});return Pt.createElement(Ke.default,{title:Pt.createElement("div",{style:{fontWeight:"bold"}},"\u65B0\u5EFA\u77E5\u8BC6\u70B9"),open:Be,width:558,centered:!0,className:Le.publicQuest,onCancel:()=>{ne(),se.resetFields()},onOk:()=>{se.validateFields().then(ze=>Xe(void 0,null,function*(){const Ze=yield(0,_e.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:ze==null?void 0:ze.name,sub_discipline_id:ce}});(Ze==null?void 0:Ze.status)===0&&ee({name:ze==null?void 0:ze.name,id:Ze==null?void 0:Ze.tag_discipline_id,public:!1,type:"personal"}),se.resetFields(),ne()}))}},Pt.createElement("div",{className:Le.publicQuestContent},Pt.createElement("div",{className:Le.public_tips},Pt.createElement(Ge.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"),Pt.createElement(Oe.default,{labelAlign:"left",form:se,colon:!1},Pt.createElement(Oe.default.Item,{label:"\u77E5\u8BC6\u70B9\u540D\u79F0",name:"name",rules:[{required:!0}]},Pt.createElement(st.default,{showCount:!0,maxLength:20,placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"}))),Pt.createElement(Tt.Z,{open:be,onCancel:()=>{ke(!1)}})))}},57816:function(Vn,Pn,pe){"use strict";var ge=pe(59301),Oe=pe(93314),Ke=pe(3113),st=Object.defineProperty,Ge=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,Xe=(Be,ne,ee)=>ne in Be?st(Be,ne,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Be[ne]=ee,Et=(Be,ne)=>{for(var ee in ne||(ne={}))Tt.call(ne,ee)&&Xe(Be,ee,ne[ee]);if(Le)for(var ee of Le(ne))Pt.call(ne,ee)&&Xe(Be,ee,ne[ee]);return Be},ct=(Be,ne)=>Ge(Be,_e(ne));const It=({img:Be,buttonProps:ne={},styles:ee={},customText:ce,ButtonText:se,ButtonClick:he,Buttonclass:ve,ButtonTwo:be,imgStyles:ke,loading:Ae=!1})=>ge.createElement("section",{className:"tc animated fadeIn",style:Et(Et({},{color:"#999",margin:"100px auto",visibility:Ae?"hidden":"visible"}),ee)},ge.createElement("img",{src:Be||Oe,style:ct(Et({},ke),{pointerEvents:"none",userSelect:"none"})}),ge.createElement("p",{className:"mt20 font14"},ce||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&ge.createElement(Ke.ZP,Et({className:ve,onClick:he},ne),se),be&&be);Pn.Z=It},90853:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ve}});var ge=pe(59301),Oe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ke=pe(3113),st=pe(70557),Ge=pe(57800),_e=pe(6848),Le=pe(88230),Tt=pe(30897),Pt=pe(57816),Xe=pe(38446),Et=pe(89282),ct=pe(59301),It=Object.defineProperty,Be=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(be,ke,Ae)=>ke in be?It(be,ke,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):be[ke]=Ae,se=(be,ke)=>{for(var Ae in ke||(ke={}))ne.call(ke,Ae)&&ce(be,Ae,ke[Ae]);if(Be)for(var Ae of Be(ke))ee.call(ke,Ae)&&ce(be,Ae,ke[Ae]);return be},he=(be,ke,Ae)=>new Promise((ze,Ze)=>{var ot=He=>{try{bt(Ae.next(He))}catch(wt){Ze(wt)}},qe=He=>{try{bt(Ae.throw(He))}catch(wt){Ze(wt)}},bt=He=>He.done?ze(He.value):Promise.resolve(He.value).then(ot,qe);bt((Ae=Ae.apply(be,ke)).next())}),ve=({editOffice:be="view",data:ke,theme:Ae,type:ze,filename:Ze,monacoEditor:ot,className:qe,style:bt,close:He,onClose:wt,hasMask:nt,disabledDownload:Dt,onImgDimensions:ht,showNodata:zt,recordInfo:Yt})=>{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"),[Ve,Wt]=(0,ge.useState)(""),[Ln,Nn]=(0,ge.useState)(),$t=window.ENV==="build"?"/react/build":"",rn=location.host.startsWith("localhost")?Xe.Z.PROXY_SERVER:Xe.Z.API_SERVER,ti=10*(1024*1024),xn=(0,ge.useRef)();ke!=null&&ke.startsWith("/api")&&ze!=="txt"&&(ke=Xe.Z.API_SERVER+ke);const Qn=We=>We.substring(We.lastIndexOf("/")+1).split(".").pop();Ze&&ot&&(ot.filename=Ze),(0,ge.useEffect)(()=>{var We,Ee;const Pe=(Ee=(We=document.cookie)==null?void 0:We.replace(/\s/g,""))==null?void 0:Ee.split(";");Pe==null||Pe.map(De=>{let Fe=De.split("=");Fe[0]==="_educoder_session"&&Wt(Fe[1])})},[]),(0,ge.useEffect)(()=>{ze==="office"&&(ke.indexOf("bigfilescdn.")>-1||ke.indexOf("bigfiles1")>-1?Nn({url:ke,fileType:Qn(ke),model:ke.indexOf("model=edit")?"edit":"view"}):Ot())},[ze,ke]);const Ot=()=>he(void 0,null,function*(){console.log("data:",ke);let We=ke;ke.startsWith("http")||(We=location.origin+We);let Ee=new URL(We).pathname.split("/").pop();const Pe=yield(0,Tt.gJ)({attachment_id:Ee});Pe.url=rn+Pe.url,Nn(Pe)}),Cn=()=>{if(ke.startsWith("http")||ke.startsWith("blob:")){Wn();return}(0,Le.Sv)(Ze||"educoder",ke,Ze)},Wn=()=>{Yt&&(0,Et.fc)({id:Yt==null?void 0:Yt.id,watch_type:1,course_id:Yt==null?void 0:Yt.course_id}),(0,Le.Nd)(Ze||"educoder",decodeURIComponent(ke))};return ct.createElement("div",{style:se({},bt||{}),className:`${nt&&Oe.bgBlack} ${ze?Oe.wrp:"hide"}`},He&&ct.createElement("div",{className:Oe.close,ref:xn},!!ht&&ct.createElement(_e.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>xn.current},ct.createElement("span",{onClick:()=>{wt(),ht()}},ct.createElement("i",{className:"icon-yulanpizhu"}))),!Dt&&ct.createElement(_e.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>xn.current},ct.createElement("span",{onClick:Wn},ct.createElement("i",{className:"icon-quxiaozhiding"}))),ct.createElement(_e.Z,{title:"\u5173\u95ED",getPopupContainer:()=>xn.current},ct.createElement("span",{className:"",onClick:wt},ct.createElement("i",{className:"icon-guanbi1"})))),ct.createElement("div",{className:`${Oe[qe]} ${qe} ${Oe.monaco} ${ze==="txt"?"show":"hide"}`},ze==="txt"&&ct.createElement(ct.Fragment,null,ct.createElement(Ge.ZP,se({},ot)))),ze==="audio"&&ct.createElement("audio",{src:`${(ke==null?void 0:ke.indexOf("http://"))>-1||(ke==null?void 0:ke.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${ke}`,autoPlay:!0}),ze==="video"&&ct.createElement(ct.Fragment,null,(ke==null?void 0:ke.indexOf("http"))>-1?ct.createElement("video",{controls:!0,src:`${ke}`,autoPlay:!0}):ct.createElement("video",{controls:!0,src:`data:video/mp4;base64,${ke}`,autoPlay:!0})),ze==="office"&&Ln&&ct.createElement("iframe",{src:`${$t}/office.html?key=${Ln.key}&url=${btoa(Ln.url)}&callbackUrl=${rn+(Ln.callbackUrl||"")}&fileType=${Ln.fileType}&title=${Ln.title||""}&model=${be}&officeServer=${Xe.Z.ONLYOFFICE}&disabledDownload=${!!Dt}`}),ze==="html"&&ct.createElement("iframe",{src:ke+"&disposition=inline"}),ze==="pdf"&&ct.createElement("iframe",{src:`${$t}/js/pdfview/index.html?filename=${Ze||"educoder.pdf"}&url=${encodeURIComponent(ke)}&disabledDownload=${!!Dt}`}),ze==="image"&&ct.createElement("img",{src:`${(ke==null?void 0:ke.indexOf("http://"))>-1||(ke==null?void 0:ke.indexOf("https://"))>-1?"":"data:image/png;base64,"}${ke}`}),(ze==="other"||ze==="download")&&ct.createElement(ct.Fragment,null,zt?ct.createElement(Pt.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ct.createElement(Ke.ZP,{icon:ct.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Cn,disabled:Dt},"\u4E0B\u8F7D")}):ct.createElement(Ke.ZP,{type:"primary",size:"middle",onClick:Cn,disabled:Dt},ct.createElement(st.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},46610:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Q:function(){return Pt},Z:function(){return Et}});var ge=pe(59301),Oe={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"},Ke=pe(92310),st=pe.n(Ke),Ge=pe(43418),_e=pe(8591),Le=pe(24905),Tt=(ct,It,Be)=>new Promise((ne,ee)=>{var ce=ve=>{try{he(Be.next(ve))}catch(be){ee(be)}},se=ve=>{try{he(Be.throw(ve))}catch(be){ee(be)}},he=ve=>ve.done?ne(ve.value):Promise.resolve(ve.value).then(ce,se);he((Be=Be.apply(ct,It)).next())});const Pt=({title:ct="\u8BBE\u7F6E\u7F16\u7A0B\u8BED\u8A00",dataSource:It=[],visible:Be,setVisible:ne,tip:ee,onOk:ce})=>{const[se,he]=(0,ge.useState)([]),[ve,be]=(0,ge.useState)(!1);return(0,ge.useEffect)(()=>{Be&&he(It)},[Be]),ge.createElement(Ge.default,{centered:!0,open:Be,title:ct,confirmLoading:ve,width:564,onOk:()=>Tt(void 0,null,function*(){if(!se.length){_e.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(Le.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:ke=>{he(ke)}})))};var Et=({title:ct="\u5141\u8BB8\u7F16\u7A0B\u7684\u8BED\u8A00",className:It,style:Be={},onEdit:ne,dataSource:ee=[]})=>{const ce={C:ge.createElement("div",{className:Oe.c},"C"),"C++":ge.createElement("div",{className:Oe.cpp},"C++"),Java:ge.createElement("div",{className:Oe.java},"Java"),Python:ge.createElement("div",{className:Oe.python},"Python")};return ge.createElement("div",{className:st()(Oe.tags,It),style:Be},!!ct&&ge.createElement("div",{className:Oe.text},ct),ge.createElement("div",{className:Oe.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 ${Oe.edit}`}))}},32285:function(Vn,Pn,pe){"use strict";pe.d(Pn,{t:function(){return Pe}});var ge=pe(59301),Oe=pe(92832),Ke=pe(78241),st=pe(43418),Ge=pe(95237),_e=pe(43604),Le=pe(5871),Tt=pe(57809),Pt=pe(5112),Xe=pe(70941),Et=pe(24459),ct=pe(31687),It=pe(8591),Be=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(7660),he=pe(5247),ve=pe(64726),be=pe(56102),ke=pe(76826),Ae=pe(59301),ze=Object.defineProperty,Ze=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,wt=(De,Fe,ye)=>Fe in De?ze(De,Fe,{enumerable:!0,configurable:!0,writable:!0,value:ye}):De[Fe]=ye,nt=(De,Fe)=>{for(var ye in Fe||(Fe={}))bt.call(Fe,ye)&&wt(De,ye,Fe[ye]);if(qe)for(var ye of qe(Fe))He.call(Fe,ye)&&wt(De,ye,Fe[ye]);return De},Dt=(De,Fe)=>Ze(De,ot(Fe)),ht=(De,Fe,ye)=>new Promise((Qe,vt)=>{var Ye=St=>{try{yt(ye.next(St))}catch(rt){vt(rt)}},Je=St=>{try{yt(ye.throw(St))}catch(rt){vt(rt)}},yt=St=>St.done?Qe(St.value):Promise.resolve(St.value).then(Ye,Je);yt((ye=ye.apply(De,Fe)).next())}),Yt=({buttonProps:De,buttonText:Fe,form:ye,hackIdentifier:Qe="",answerKey:vt,data:Ye})=>{const[Je,yt]=(0,ge.useState)(!1),[St,rt]=(0,ge.useState)(!1),[Zt,dn]=(0,ge.useState)(!1),[mn,qt]=(0,ge.useState)({}),[Gn,Kn]=(0,ge.useState)(""),[Nt,sn]=(0,ge.useState)(""),Fn=(0,ge.useRef)(Qe),hn=(0,ge.useRef)(""),Mn=(0,ge.useRef)(!1);(0,ge.useEffect)(()=>{Zt&&Li()},[Zt]),(0,ge.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const li=()=>new Date().getTime(),pi=Ye==null?void 0:Ye.code,mi=()=>{var Xi,wr;let vr=pi?Ye==null?void 0:Ye.code:(Xi=ye.getFieldValue("hack_codes"))==null?void 0:Xi.code,ji=pi?Ye==null?void 0:Ye.answer_content:ye.getFieldValue(vt),Lr=pi?Ye==null?void 0:Ye.input:(wr=ye.getFieldValue("hack_sets"))==null?void 0:wr.input;ji==null||ji.forEach(jn=>{const Ne=jn.value||jn.answer_text||"";vr=vr.replace(/(@▁@|@▁▁@)/,Ne)}),sn(Lr),Kn(vr),qt({}),dn(!0)},Li=()=>ht(void 0,null,function*(){var Xi,wr,vr,ji;const Lr=li(),jn=pi?Ye==null?void 0:Ye.time_limit:(Xi=ye.getFieldsValue())==null?void 0:Xi.hack.time_limit,Ne=pi?(wr=Ye==null?void 0:Ye.answer_content)==null?void 0:wr.length:(ji=(vr=ye.getFieldsValue())==null?void 0:vr.standard_answers)==null?void 0:ji.length;yt(!0),yield(0,he.bM)(hn.current,{test_hack_code:Gn,test_input:Nt});function Ei(){return ht(this,null,function*(){const{status:Oi,data:on}=yield(0,he.rX)(hn.current,"submit"),vi=li()-Lr>(jn+3)*1e3*Ne;if(Mn.current){if(vi){It.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),yt(!1);return}if(Oi===0){yt(!1),qt(Dt(nt({},on),{showText:!0}));return}setTimeout(Ei,1e3)}})}Ei()}),Gi=()=>ht(void 0,null,function*(){var Xi,wr,vr,ji,Lr,jn,Ne;if(!Ye){try{yield ye.validateFields()}catch(ui){(vr=(wr=(Xi=ui==null?void 0:ui.errorFields)==null?void 0:Xi[0])==null?void 0:wr.name)!=null&&vr.includes("standard_answers")?It.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):It.ZP.error(ui.errorFields[0].errors[0]),ye.scrollToField(ui.errorFields[0].name,{behavior:"smooth",block:"center"});return}rt(!0);let Oi="";const on=ye.getFieldsValue();Fn.current?Oi=yield(0,se.ZP)(`/api/problems/${Fn.current}.json`,{method:"put",body:Dt(nt({},on),{hack:Dt(nt({},on==null?void 0:on.hack),{sub_discipline_id:(Ne=(jn=on==null?void 0:on.hack)==null?void 0:jn.sub_discipline_id)==null?void 0:Ne[1],difficult:on.difficulty,item_banks_group_id:on.item_banks_group_id}),hack_codes:Dt(nt({},on.hack_codes),{code:ee.Base64.encode(on.hack_codes.code)}),update_hack_sets:[nt({},on.hack_sets)],is_blank:!0})}):(Oi=yield(0,se.ZP)("/api/problems.json",{method:"post",body:Dt(nt({},on),{hack:Dt(nt({},on==null?void 0:on.hack),{sub_discipline_id:(Lr=(ji=on==null?void 0:on.hack)==null?void 0:ji.sub_discipline_id)==null?void 0:Lr[1],difficult:on.difficulty,item_banks_group_id:on.item_banks_group_id}),hack_codes:Dt(nt({},on.hack_codes),{code:ee.Base64.encode(on.hack_codes.code)}),hack_sets:[nt({},on.hack_sets)],is_blank:!0})}),Fn.current=Oi==null?void 0:Oi.identifier,sessionStorage.projectFill=Oi==null?void 0:Oi.identifier)}const Ei=yield(0,se.ZP)(`/api/problems/${Fn.current}/start.json`,{method:"get"});if((Ei==null?void 0:Ei.status)===0){hn.current=Ei==null?void 0:Ei.identifier,Mn.current=!0,rt(!1),mi();return}rt(!1)}),ar=Xi=>{const{status:wr,error_msg:vr,execute_time:ji,output:Lr,input:jn,expected_output:Ne}=Xi;let Ei=null;switch(wr){case ke.h.OK:Ei=Ae.createElement(Ae.Fragment,null,Ae.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",ji/1e3,"\u79D2"),Ae.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case ke.h.NOMATCH:Ei=Ae.createElement(Ae.Fragment,null,Ae.createElement("div",null,"\u8F93\u5165\uFF1A"),Ae.createElement("pre",{style:{fontFamily:"initial"}},jn),Ae.createElement("div",null,"\u8F93\u51FA\uFF1A"),Ae.createElement("pre",{style:{fontFamily:"initial"}},Lr&&ee.Base64.decode(Lr)),Ae.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Ae.createElement("pre",{style:{fontFamily:"initial"}},Ne&&ee.Base64.decode(Ne)));break;case ke.h.EXECUTEFAILURE:Ei=Ae.createElement(Ae.Fragment,null,Ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Ae.createElement("pre",null,jn)),Ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Ae.createElement("pre",{className:"error"},ee.Base64.decode(vr)));break;case ke.h.COMPILEFAILURE:Ei=Ae.createElement(Ae.Fragment,null,Ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Ae.createElement("pre",null,jn)),Ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Ae.createElement("pre",{className:"error"},ee.Base64.decode(vr)));break;case ke.h.PODFAILURE:Ei=Ae.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case ke.h.TIMEOUT:Ei=Ae.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Ae.createElement(Ae.Fragment,null," ",Ei," ")};return Ae.createElement("div",null,Ae.createElement(Be.ZP,Dt(nt({loading:St},De),{onClick:Gi}),Fe),Ae.createElement(st.default,{open:Zt,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:Je,cancelButtonProps:{style:{display:"none"}},onOk:()=>Li(),onCancel:()=>{Mn.current=!1,dn(!1)}},Ae.createElement("div",{className:ce.result},Ae.createElement("div",{className:ce.left},Ae.createElement("div",{className:"mb20"},Ae.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!Ye&&Ae.createElement(be.CopyToClipboard,{text:Gn,onCopy:()=>It.ZP.success("\u590D\u5236\u6210\u529F")},Ae.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Ae.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Ae.createElement(ve.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:Gn,onChange:Xi=>Kn(Xi)})),Ae.createElement("div",{className:ce.right},Ae.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Ae.createElement("div",{className:ce.box},Ae.createElement("div",{className:ce.li},Ae.createElement(Oe.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:Nt,onChange:Xi=>sn(Xi.target.value),bordered:!1,style:{height:180}}))),Ae.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Ae.createElement("div",{className:ce.box},Ae.createElement(ne.Z,{spinning:Je,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Ae.createElement("div",{className:ce.li,style:{height:196,overflow:"auto",padding:10}},ar(mn))))))))},Ut=pe(87169),it=pe(59301),Ve=Object.defineProperty,Wt=Object.defineProperties,Ln=Object.getOwnPropertyDescriptors,Nn=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,An=(De,Fe,ye)=>Fe in De?Ve(De,Fe,{enumerable:!0,configurable:!0,writable:!0,value:ye}):De[Fe]=ye,ti=(De,Fe)=>{for(var ye in Fe||(Fe={}))$t.call(Fe,ye)&&An(De,ye,Fe[ye]);if(Nn)for(var ye of Nn(Fe))rn.call(Fe,ye)&&An(De,ye,Fe[ye]);return De},xn=(De,Fe)=>Wt(De,Ln(Fe)),Qn=(De,Fe)=>{var ye={};for(var Qe in De)$t.call(De,Qe)&&Fe.indexOf(Qe)<0&&(ye[Qe]=De[Qe]);if(De!=null&&Nn)for(var Qe of Nn(De))Fe.indexOf(Qe)<0&&rn.call(De,Qe)&&(ye[Qe]=De[Qe]);return ye};const{TextArea:Ot}=Oe.default,Cn=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],Wn=({value:De,onChange:Fe})=>it.createElement(Switch,{checked:De,onChange:ye=>{Fe(ye)}}),We="@\u2581@",Ee="@\u2581\u2581@",Pe=({questionTitlePlaceholder:De,form:Fe,scoreByBlank:ye=!1,hackidentifier:Qe,answerKey:vt})=>{const[Ye,Je]=(0,ge.useState)(!1),[yt,St]=(0,ge.useState)(!1),Zt=(0,Et.useParams)().type==="edit",dn=(hn,Mn)=>{const li=Mn.line;let pi=0;for(let Li=0;Li<li;Li++)pi+=hn.getLine(Li).split(We).length-1;for(let Li=0;Li<li;Li++)pi+=hn.getLine(Li).split(Ee).length-1;const mi=hn.getLine(li).substring(0,Mn.ch);return pi+=mi.split(We).length-1,pi+=mi.split(Ee).length-1,pi},mn=(hn,Mn,li,pi)=>{const mi=hn.getRange(Mn.from,Mn.to);let Li=0;if(Mn.text.forEach(Gi=>{Li+=Gi.split(We).length-1}),Mn.text.forEach(Gi=>{Li+=Gi.split(Ee).length-1}),Mn.origin!=="setValue"){if(mi&&(mi.indexOf(We)!==-1||mi.indexOf(Ee)!==-1)){const Gi=mi.split(We).length-1+mi.split(Ee).length-1,ar=dn(hn,Mn.from);if(console.log(`\u5220\u9664${Gi}\u4E2A\uFF0C \u524D\u9762\u6709${ar}\u4E2A\uFF0C\u65B0\u589E${Li}\u4E2A`),Gi>1){const Xi=Array.from({length:Gi},(wr,vr)=>ar+vr);pi(Xi)}else pi(ar)}else if(Li>0){const Gi=dn(hn,Mn.from);console.log(`\u65B0\u589E${Li}\u4E2A\uFF0C\u4E4B\u524D\u6709${Gi}\u4E2A`),li(Li,Gi)}}},qt=()=>{const hn=Fe.getFieldValue(vt);Fe.setFieldsValue({[vt]:hn==null?void 0:hn.map((Mn,li)=>xn(ti({},Mn),{position:li+1}))})},Gn=(0,ge.useRef)(),Kn=(hn,Mn)=>{for(let li=0;li<hn;li++)Gn.current({position:null,answer_text:""},Mn+li);qt()},Nt=(0,ge.useRef)(),sn=hn=>{Nt.current(hn),qt()},Fn=Ke.default.useWatch(vt,Fe);return it.createElement("div",{className:ct.Z.wrap},it.createElement(Ke.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},it.createElement(Xe.h,{scrollId:"name",watch:!0,height:140})),it.createElement("div",{className:ct.Z.questionTitleEditorWrap},it.createElement(Ke.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},it.createElement(Xe.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(hn,Mn)=>{const li=Fe.getFieldValue(vt);console.log("--preAnswerData",li,Mn),Fe.setFieldsValue({[vt]:li==null?void 0:li.map((pi,mi)=>{var Li;return xn(ti({},pi),{position:mi+1,multi_line:(Li=Mn==null?void 0:Mn[mi])==null?void 0:Li.multiLine})})})},placeholder:De,onCMBeforeChange:(hn,Mn)=>{mn(hn,Mn,Kn,sn)}}))),it.createElement(Ke.default.List,{name:vt,rules:[{validator(hn,Mn){if(!(Mn!=null&&Mn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const li of Mn){const{answer_text:pi}=li||{};if((pi==null?void 0:pi.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(hn,{add:Mn,remove:li},{errors:pi})=>(Gn.current=Mn,Nt.current=li,it.createElement(it.Fragment,null,it.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},it.createElement(Ke.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),it.createElement("div",{onClick:()=>{st.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((mi,Li)=>{var Gi=mi,{key:ar,name:Xi}=Gi,wr=Qn(Gi,["key","name"]),vr,ji;return it.createElement(Ge.Z,{className:"mb20",key:ar,align:"middle",wrap:!1},it.createElement(_e.Z,{flex:"0 0 auto",className:`${ct.Z.blankIndex}`},"\u586B\u7A7A\u9879",Li+1),it.createElement(_e.Z,{flex:1},it.createElement(Ge.Z,{align:"top",justify:"space-between",wrap:!1},it.createElement(_e.Z,null,it.createElement(Ke.default.Item,xn(ti({},wr),{name:[Xi,"answer_text"],noStyle:!0}),(vr=Fn==null?void 0:Fn[Xi])!=null&&vr.multi_line||(ji=Fn==null?void 0:Fn[Xi])!=null&&ji.multiLine?it.createElement(Ot,{spellCheck:!1,style:{marginLeft:10,width:550}}):it.createElement(Oe.default,{style:{marginLeft:10,width:550},className:ct.Z.blankInput,size:"large",maxLength:1e3,onBlur:Lr=>{}}))),ye&&it.createElement(_e.Z,{flex:"224px"},it.createElement(Ke.default.Item,xn(ti({},wr),{name:[Xi,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),it.createElement(Le.Z,{size:"large",className:ct.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),it.createElement("div",{onClick:()=>Je(!0)},it.createElement(Ke.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},it.createElement(Xe.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ye}))),it.createElement(Ke.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(Tt.default,{size:"large"},Cn.map(hn=>it.createElement(Tt.default.Option,{key:hn.title,value:hn.key}," ",hn.title)))),it.createElement(Ke.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},it.createElement(Ke.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(Le.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),it.createElement("span",{className:"ml10 font14"},"\u79D2")),it.createElement(Ke.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(Pt.ZP.Group,{style:{marginTop:-10}},it.createElement(Pt.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),it.createElement(Pt.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),it.createElement(Pt.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),it.createElement(Ke.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),it.createElement("div",{style:{background:"#F6F7F9",padding:15}},it.createElement(Ke.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},it.createElement(Ot,{rows:4})),it.createElement(Ke.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(Ot,{rows:4}))),it.createElement(Yt,{form:Fe,answerKey:vt,hackIdentifier:Qe,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"}}}))}},31674:function(Vn,Pn,pe){"use strict";pe.d(Pn,{u:function(){return Ae}});var ge=pe(59301),Oe=pe(95237),Ke=pe(43604),st=pe(6848),Ge=pe(78241),_e=pe(31687),Le=pe(32134),Tt=pe(12893),Pt=pe(70941),Xe=pe(59301),Et=Object.defineProperty,ct=Object.defineProperties,It=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(ze,Ze,ot)=>Ze in ze?Et(ze,Ze,{enumerable:!0,configurable:!0,writable:!0,value:ot}):ze[Ze]=ot,se=(ze,Ze)=>{for(var ot in Ze||(Ze={}))ne.call(Ze,ot)&&ce(ze,ot,Ze[ot]);if(Be)for(var ot of Be(Ze))ee.call(Ze,ot)&&ce(ze,ot,Ze[ot]);return ze},he=(ze,Ze)=>ct(ze,It(Ze)),ve=(ze,Ze)=>{var ot={};for(var qe in ze)ne.call(ze,qe)&&Ze.indexOf(qe)<0&&(ot[qe]=ze[qe]);if(ze!=null&&Be)for(var qe of Be(ze))Ze.indexOf(qe)<0&&ee.call(ze,qe)&&(ot[qe]=ze[qe]);return ot};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"],ke=({value:ze,onChange:Ze,choiceTextKey:ot,answerKey:qe,index:bt,isEdit:He,setInputActive:wt,form:nt,choiceOptionsPath:Dt,allowChangeMode:ht,showAddIcon:zt,addItem:Yt,deleteItem:Ut})=>{console.log(ze,"value");const it=(ze==null?void 0:ze[qe])===1,Ve=()=>{const Ln=nt.getFieldValue(Dt);nt.setFieldValue(Dt,Ln.map(Nn=>he(se({},Nn),{[qe]:0})))},Wt=()=>{it?Ze(he(se({},ze),{[qe]:0})):(ht||Ve(),Ze(he(se({},ze),{[qe]:1})))};return Xe.createElement(Oe.Z,{className:_e.Z.choiceWrap,align:"middle",wrap:!1},Xe.createElement(Ke.Z,{onClick:Wt,className:`${_e.Z.choiceIndex} ${it?_e.Z.activeAnswer:""}`},be[bt]),Xe.createElement(Ke.Z,{flex:1,className:`${_e.Z.editorWrap} ml15`,onClick:wt},Xe.createElement(Pt.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:He,value:ze==null?void 0:ze[ot],onChange:Ln=>{Ze(he(se({},ze),{[ot]:Ln}))}})),Xe.createElement(Ke.Z,{flex:"0 0 auto",className:"ml15"},Xe.createElement("div",{onClick:Wt,className:`${_e.Z.setAnswerBtn} ${it?_e.Z.activeAnswer:""}`},it?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Xe.createElement(Ke.Z,{className:_e.Z.actionWrapper},Xe.createElement(st.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Xe.createElement(Le.Z,{className:_e.Z.addIcon,onClick:Yt,style:{visibility:zt?"visible":"hidden"}})),Xe.createElement(st.Z,{title:"\u5220\u9664"},Xe.createElement(Tt.Z,{className:_e.Z.deleteIcon,onClick:Ut,style:{visibility:bt>1?"visible":"hidden"}}))))},Ae=({questionTitlePlaceholder:ze,titleKey:Ze,choiceKey:ot,analysisKey:qe,choiceTextKey:bt,answerKey:He,choiceOptionsPath:wt,allowChangeMode:nt=!0,form:Dt,showAnalysis:ht=!0})=>{const[zt,Yt]=(0,ge.useState)(),[Ut,it]=(0,ge.useState)(!1);return Xe.createElement("div",{className:_e.Z.wrap},Xe.createElement("div",{className:_e.Z.questionTitleEditorWrap},Xe.createElement(Ge.default.Item,{label:"\u9898\u5E72",name:Ze,labelCol:{span:24},rules:[{required:!0}]},Xe.createElement(Pt.h,{scrollId:Array.isArray(Ze)?Ze.join("_"):`${Ze}`,watch:!0,height:140,placeholder:ze}))),Xe.createElement(Ge.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Xe.createElement(Ge.default.List,{name:ot,rules:[{validator(Ve,Wt){const Ln=Wt.some($t=>$t[He]===1),Nn=Wt.findIndex($t=>{var rn;return((rn=$t[bt])==null?void 0:rn.length)<=0});return Nn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${be[Nn]}\u9009\u9879\u7684\u5185\u5BB9`)):Ln?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ve,{add:Wt,remove:Ln})=>Xe.createElement("div",{id:Array.isArray(wt)?wt.join("_"):`${wt}`},Ve.map((Nn,$t)=>{var rn=Nn,{key:An,name:ti}=rn,xn=ve(rn,["key","name"]);const Qn=zt===An,Ot=()=>{Yt(An)},Cn=$t<7&&$t===Ve.length-1,Wn=()=>Wt({[bt]:"",[He]:0}),We=()=>Ln(ti);return Xe.createElement(Ge.default.Item,he(se({},xn),{key:An,name:ti,className:_e.Z.choiceListWrap,rules:[{validator(Ee,Pe){return Pe!=null&&Pe.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${be[$t]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),Xe.createElement(ke,{choiceTextKey:bt,answerKey:He,index:$t,isEdit:Qn,setInputActive:Ot,form:Dt,choiceOptionsPath:wt,allowChangeMode:nt,showAddIcon:Cn,addItem:Wn,deleteItem:We}))}),Ve.length<8&&Xe.createElement("div",{className:`${_e.Z.addBtn} mb30`,onClick:()=>Wt({[bt]:"",[He]:0})},"\u6DFB\u52A0\u9009\u9879"))),ht&&Xe.createElement("div",{onClick:()=>it(!0)},Xe.createElement(Ge.default.Item,{name:qe,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Xe.createElement(Pt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ut}))))}},20386:function(Vn,Pn,pe){"use strict";pe.d(Pn,{u:function(){return nt}});var ge=pe(59301),Oe=pe(43418),Ke=pe(95237),st=pe(43604),Ge=pe(92832),_e=pe(6848),Le=pe(78673),Tt=pe(78241),Pt=pe(5112),Xe=pe(5871),Et=pe(70941),ct=pe(12893),It=pe(61485),Be=pe(31687),ne=pe(72714),ee=pe(59301),ce=Object.defineProperty,se=Object.defineProperties,he=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Ae=(Dt,ht,zt)=>ht in Dt?ce(Dt,ht,{enumerable:!0,configurable:!0,writable:!0,value:zt}):Dt[ht]=zt,ze=(Dt,ht)=>{for(var zt in ht||(ht={}))be.call(ht,zt)&&Ae(Dt,zt,ht[zt]);if(ve)for(var zt of ve(ht))ke.call(ht,zt)&&Ae(Dt,zt,ht[zt]);return Dt},Ze=(Dt,ht)=>se(Dt,he(ht)),ot=(Dt,ht)=>{var zt={};for(var Yt in Dt)be.call(Dt,Yt)&&ht.indexOf(Yt)<0&&(zt[Yt]=Dt[Yt]);if(Dt!=null&&ve)for(var Yt of ve(Dt))ht.indexOf(Yt)<0&&ke.call(Dt,Yt)&&(zt[Yt]=Dt[Yt]);return zt};const qe=({value:Dt,onChange:ht})=>{const zt=Ut=>{Oe.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:Be.Z.modal,onOk:()=>{const it=[...Dt];it.splice(Ut,1),ht(it)}})},Yt=()=>{const Ut=[...Dt];Ut.push(""),ht(Ut)};return ee.createElement(Ke.Z,{className:"ml20"},ee.createElement(st.Z,{flex:1},Dt==null?void 0:Dt.map((Ut,it)=>ee.createElement(Ke.Z,{key:`${Ut}_${it}`,className:"mb20"},ee.createElement(Ge.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Ut,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ve=>{const Wt=[...Dt],Ln=Ve.target.value.trim();Wt[it]=Ln,ht(Wt)}}),ee.createElement(_e.Z,{title:"\u5220\u9664"},ee.createElement(ct.Z,{className:Be.Z.deleteIcon,style:{marginLeft:15,visibility:it>0?"visible":"hidden"},onClick:()=>zt(it)}))))),ee.createElement(st.Z,null,ee.createElement("div",{className:`${Be.Z.addBtn}`,onClick:()=>{Yt()}},"\u65B0\u589E\u7B54\u6848")))},bt=({value:Dt,onChange:ht})=>{const zt=Ut=>{Oe.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:Be.Z.modal,onOk:()=>{const it=[...Dt];it.splice(Ut,1),ht(it)}})},Yt=()=>{const Ut=[...Dt];Ut.push(""),ht(Ut)};return ee.createElement(Ke.Z,{className:"ml20"},ee.createElement(st.Z,{flex:1},Dt==null?void 0:Dt.map((Ut,it)=>ee.createElement(Ke.Z,{key:`${Ut}_${it}`,align:"middle",className:"mb20"},ee.createElement(ne.Z,{value:Ut,style:{flex:1},onChange:Ve=>{const Wt=[...Dt];Wt[it]=Ve,ht(Wt)}}),ee.createElement(_e.Z,{title:"\u5220\u9664"},ee.createElement(ct.Z,{className:Be.Z.deleteIcon,style:{marginLeft:15,visibility:it>0?"visible":"hidden"},onClick:()=>zt(it)}))))),ee.createElement(st.Z,null,ee.createElement("div",{className:`${Be.Z.addBtn}`,onClick:()=>{Yt()}},"\u65B0\u589E\u7B54\u6848")))},He=({value:Dt=!0,onChange:ht})=>ee.createElement(Le.Z,{checked:!Dt,onChange:zt=>{ht(!zt)}}),wt="\u2581",nt=({questionTitlePlaceholder:Dt,form:ht,scoreByBlank:zt=!1,answerKey:Yt})=>{const[Ut,it]=(0,ge.useState)(!1),Ve=(xn,Qn)=>{const Ot=Qn.line;let Cn=0;for(let We=0;We<Ot;We++)Cn+=xn.getLine(We).split(wt).length-1;const Wn=xn.getLine(Ot).substring(0,Qn.ch);return Cn+=Wn.split(wt).length-1,Cn},Wt=(xn,Qn,Ot,Cn)=>{const Wn=xn.getRange(Qn.from,Qn.to);let We=0;if(Qn.text.forEach(Ee=>{We+=Ee.split(wt).length-1}),Qn.origin!=="setValue"){if(Wn&&Wn.indexOf(wt)!==-1){const Ee=Wn.split(wt).length-1,Pe=Ve(xn,Qn.from);if(console.log(`\u5220\u9664${Ee}\u4E2A\uFF0C \u524D\u9762\u6709${Pe}\u4E2A\uFF0C\u65B0\u589E${We}\u4E2A`),Ee>1){const De=Array.from({length:Ee},(Fe,ye)=>Pe+ye);Cn(De)}else Cn(Pe)}else if(We>0){const Ee=Ve(xn,Qn.from);console.log(`\u65B0\u589E${We}\u4E2A\uFF0C\u4E4B\u524D\u6709${Ee}\u4E2A`),Ot(We,Ee)}}},Ln=()=>{const xn=ht.getFieldValue(Yt);ht.setFieldsValue({[Yt]:xn.map((Qn,Ot)=>Ze(ze({},Qn),{position:Ot+1}))})},Nn=(0,ge.useRef)(),$t=(xn,Qn)=>{for(let Ot=0;Ot<xn;Ot++)Nn.current({position:null,answer_text:[""],model:1},Qn+Ot);Ln()},rn=(0,ge.useRef)(),An=xn=>{rn.current(xn),Ln()},ti=Tt.default.useWatch(Yt,ht);return ee.createElement("div",{className:Be.Z.wrap},ee.createElement("div",{className:Be.Z.questionTitleEditorWrap},ee.createElement(Tt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(Et.h,{scrollId:"name",watch:!0,height:140,placeholder:Dt,showNullButton:!0,onCMBeforeChange:(xn,Qn)=>{Wt(xn,Qn,$t,An)}}))),ee.createElement(Tt.default.List,{name:Yt,rules:[{validator(xn,Qn){if(!(Qn!=null&&Qn.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const Ot of Qn){const{answer_text:Cn}=Ot||{};if(Cn!=null&&Cn.some(Wn=>(Wn==null?void 0:Wn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(xn,{add:Qn,remove:Ot},{errors:Cn})=>(Nn.current=Qn,rn.current=Ot,ee.createElement(ee.Fragment,null,ee.createElement(Tt.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(xn!=null&&xn.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}}),xn.map((Wn,We)=>{var Ee=Wn,{key:Pe,name:De}=Ee,Fe=ot(Ee,["key","name"]),ye,Qe;return ee.createElement("div",{style:{marginBottom:10},key:Pe},ee.createElement(Ke.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(st.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Be.Z.blankIndex}`},"\u586B\u7A7A\u9879",We+1),ee.createElement(Tt.default.Item,Ze(ze({},Fe),{name:[De,"model"],noStyle:!0}),ee.createElement(Pt.ZP.Group,{onChange:()=>{const vt=ht.getFieldValue(Yt);ht.setFieldsValue({[Yt]:vt.map((Ye,Je)=>Ze(ze({},Ye),{answer_text:De===Je?[""]:Ye.answer_text}))})}},ee.createElement(Pt.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(_e.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(It.Z,null))),ee.createElement(Pt.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(_e.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(It.Z,null)))))),ee.createElement(Ke.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(st.Z,{flex:1},ee.createElement(Ke.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(st.Z,{flex:1},ee.createElement(Tt.default.Item,Ze(ze({},Fe),{name:[De,"answer_text"],noStyle:!0}),((Qe=(ye=ht.getFieldValue(Yt))==null?void 0:ye[De])==null?void 0:Qe.model)===1?ee.createElement(qe,null):ee.createElement(bt,null))),zt&&ee.createElement(st.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(Tt.default.Item,Ze(ze({},Fe),{name:[De,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Be.Z.blankInputNumberWrapper}),ee.createElement(Xe.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(Tt.default.Item,Ze(ze({},Fe),{name:[De,"position"],noStyle:!0}),ee.createElement(Ge.default,{type:"hidden"})))))})))),ee.createElement(Ke.Z,{align:"middle"},ee.createElement(Tt.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Le.Z,null)),ee.createElement(st.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ee.createElement(Ke.Z,{align:"middle"},ee.createElement(Tt.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Le.Z,null)),ee.createElement(st.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(ti==null?void 0:ti.length)>1&&ee.createElement(Ke.Z,{align:"middle",className:(ti==null?void 0:ti.length)>1?"mb30":`${Be.Z.hide}`},ee.createElement(Tt.default.Item,{name:"is_ordered"},ee.createElement(He,null)),ee.createElement(st.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(Tt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(Et.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ut}))))}},69269:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ve}});var ge=pe(59301),Oe=pe(95237),Ke=pe(43604),st=pe(78241),Ge=pe(31687),_e=pe(70941),Le=pe(59301),Tt=Object.defineProperty,Pt=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,Be=(be,ke,Ae)=>ke in be?Tt(be,ke,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):be[ke]=Ae,ne=(be,ke)=>{for(var Ae in ke||(ke={}))ct.call(ke,Ae)&&Be(be,Ae,ke[Ae]);if(Et)for(var Ae of Et(ke))It.call(ke,Ae)&&Be(be,Ae,ke[Ae]);return be},ee=(be,ke)=>Pt(be,Xe(ke)),ce=(be,ke)=>{var Ae={};for(var ze in be)ct.call(be,ze)&&ke.indexOf(ze)<0&&(Ae[ze]=be[ze]);if(be!=null&&Et)for(var ze of Et(be))ke.indexOf(ze)<0&&It.call(be,ze)&&(Ae[ze]=be[ze]);return Ae};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},he=({value:be,onChange:ke,form:Ae})=>{const ze=(be==null?void 0:be.is_answer)===1,Ze=be==null?void 0:be.choice_text,ot=()=>{const qe=Ae.getFieldsValue().choices.map(bt=>({choice_text:bt.choice_text,is_answer:0}));Ae.setFieldsValue({choices:qe}),ke(ee(ne({},be),{is_answer:1}))};return Le.createElement(Oe.Z,{className:Ge.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Le.createElement(Ke.Z,{onClick:ot,className:`${Ge.Z.choiceIndex} ${Ge.Z.judgementIndex} ${ze?Ge.Z.activeAnswer:""}`},se[Ze]),Le.createElement(Ke.Z,{flex:1,className:`${Ge.Z.editorWrap} ml15`},Le.createElement("div",{className:`${Ge.Z.inputBorder} ${Ge.Z.placeholder} ${ze?Ge.Z.activeJudgementAnswer:""}`},Ze)),Le.createElement(Ke.Z,{flex:"0 0 auto",className:"ml15"},Le.createElement("div",{onClick:ot,className:`${Ge.Z.setAnswerBtn} ${ze?Ge.Z.activeAnswer:""}`},ze?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ve=({questionTitlePlaceholder:be,choiceKey:ke,form:Ae})=>{const[ze,Ze]=(0,ge.useState)(!1);return Le.createElement("div",{className:Ge.Z.wrap},Le.createElement("div",{className:Ge.Z.questionTitleEditorWrap},Le.createElement(st.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Le.createElement(_e.h,{scrollId:"name",watch:!0,height:140,placeholder:be}))),Le.createElement(st.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Le.createElement(st.default.List,{name:"choices",rules:[{validator(ot,qe){return qe.some(He=>(He==null?void 0:He.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},ot=>Le.createElement("div",{id:"choices"},ot.map(qe=>{var bt=qe,{key:He,name:wt}=bt,nt=ce(bt,["key","name"]);return Le.createElement(st.default.Item,ee(ne({},nt),{key:He,name:wt,noStyle:!0}),Le.createElement(he,{form:Ae}))})))),Le.createElement("div",{onClick:()=>Ze(!0)},Le.createElement(st.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Le.createElement(_e.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ze}))))}},70941:function(Vn,Pn,pe){"use strict";pe.d(Pn,{h:function(){return ne},x:function(){return ee}});var ge=pe(64726),Oe=pe(31687),Ke=pe(99325),st=pe(59301),Ge=Object.defineProperty,_e=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,Xe=Object.prototype.propertyIsEnumerable,Et=(ce,se,he)=>se in ce?Ge(ce,se,{enumerable:!0,configurable:!0,writable:!0,value:he}):ce[se]=he,ct=(ce,se)=>{for(var he in se||(se={}))Pt.call(se,he)&&Et(ce,he,se[he]);if(Tt)for(var he of Tt(se))Xe.call(se,he)&&Et(ce,he,se[he]);return ce},It=(ce,se)=>_e(ce,Le(se)),Be=(ce,se)=>{var he={};for(var ve in ce)Pt.call(ce,ve)&&se.indexOf(ve)<0&&(he[ve]=ce[ve]);if(ce!=null&&Tt)for(var ve of Tt(ce))se.indexOf(ve)<0&&Xe.call(ce,ve)&&(he[ve]=ce[ve]);return he};const ne=ce=>{var se=ce,{value:he,onChange:ve,scrollId:be}=se,ke=Be(se,["value","onChange","scrollId"]);return st.createElement("div",{id:be||""},st.createElement(ge.Z,It(ct({},ke),{defaultValue:he,onChange:(Ae,ze)=>{ze!=null&&ze.length?ve(Ae,ze):ve(Ae)}})))},ee=({value:ce,onChange:se,placeholder:he,height:ve=140,isEdit:be,miniToolbar:ke,watch:Ae=!0})=>be?st.createElement(ge.Z,{watch:Ae,isFocus:!0,height:ve||void 0,placeholder:he,defaultValue:ce,onChange:se,miniToolbar:ke}):st.createElement("div",{style:{cursor:"pointer"}},ce?st.createElement(Ke.Z,{className:Oe.Z.inputBorder,value:ce}):st.createElement("div",{className:`${Oe.Z.inputBorder} ${Oe.Z.placeholder} inputBorderError`},he))},9489:function(Vn,Pn,pe){"use strict";pe.d(Pn,{W:function(){return bt}});var ge=pe(59301),Oe=pe(8591),Ke=pe(12563),st=pe(78241),Ge=pe(78673),_e=pe(95237),Le=pe(43604),Tt=pe(6848),Pt=pe(92832),Xe=pe(5871),Et=pe(31687),ct=pe(70941),It=pe(64726),Be=pe(61485),ne=Object.defineProperty,ee=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,be=(He,wt,nt)=>wt in He?ne(He,wt,{enumerable:!0,configurable:!0,writable:!0,value:nt}):He[wt]=nt,ke=(He,wt)=>{for(var nt in wt||(wt={}))he.call(wt,nt)&&be(He,nt,wt[nt]);if(se)for(var nt of se(wt))ve.call(wt,nt)&&be(He,nt,wt[nt]);return He},Ae=(He,wt)=>ee(He,ce(wt)),ze=(He,wt)=>{var nt={};for(var Dt in He)he.call(He,Dt)&&wt.indexOf(Dt)<0&&(nt[Dt]=He[Dt]);if(He!=null&&se)for(var Dt of se(He))wt.indexOf(Dt)<0&&ve.call(He,Dt)&&(nt[Dt]=He[Dt]);return nt};const Ze=He=>{var wt=He,{value:nt,onChange:Dt}=wt,ht=ze(wt,["value","onChange"]);const zt=Yt=>{Dt([Yt])};return ge.createElement(It.Z,Ae(ke({},ht),{defaultValue:nt==null?void 0:nt[0],onChange:zt}))},ot=He=>{if(!He)return!1;if(/^s*$/.test(He)||He.trim()===""){Oe.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let wt=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==="|"?(Oe.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},qe=({value:He=[],onClose:wt})=>ge.createElement(Ke.default,{closable:!0,onClose:wt,className:Et.Z.keywordTag},ge.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},He.join(" \u6216 "))),bt=({questionTitlePlaceholder:He,form:wt,showKeywords:nt,isMustKeyWords:Dt=nt})=>{const[ht,zt]=(0,ge.useState)(!1),[Yt,Ut]=(0,ge.useState)(""),it=st.default.useWatch("use_keywords",wt),Ve=st.default.useWatch("question_score",wt);return ge.createElement("div",{className:Et.Z.wrap},ge.createElement("div",{className:Et.Z.questionTitleEditorWrap},ge.createElement(st.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ge.createElement(ct.h,{scrollId:"name",watch:!0,height:140,placeholder:He}))),ge.createElement(st.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},ge.createElement(Ze,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),nt&&!Dt&&ge.createElement(st.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},ge.createElement(Ge.Z,{defaultChecked:!0})),nt&&Dt&&ge.createElement(_e.Z,{align:"middle",className:"mb30"},ge.createElement(st.default.Item,{name:"use_keywords",valuePropName:"checked"},ge.createElement(Ge.Z,null)),ge.createElement(Le.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ge.createElement(Le.Z,null,ge.createElement(Tt.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(Be.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(it||!Dt)&&ge.createElement(st.default.List,{name:"keywords",rules:[{validator(Wt,Ln){return Dt?Ln!=null&&Ln.length?(Ln==null?void 0:Ln.reduce(($t,rn)=>$t+rn.score,0))>parseFloat(Ve)?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:Ln,remove:Nn})=>ge.createElement(ge.Fragment,null,ge.createElement("div",{className:`${Et.Z.title} mb10`},Dt?"\u5173\u952E\u8BCD":ge.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ge.createElement(_e.Z,{align:"middle",className:"font14 mb30"},ge.createElement(Le.Z,{flex:1},ge.createElement(Pt.default,{value:Yt,onChange:$t=>{Ut($t.target.value)},maxLength:50,allowClear:!0,onPressEnter:$t=>{var rn,An,ti,xn;const Qn=`${(rn=$t.target)==null?void 0:rn.value}`,Ot=(ti=(An=Qn==null?void 0:Qn.split("|"))==null?void 0:An.filter(We=>!!We))==null?void 0:ti.map(We=>We==null?void 0:We.trim()),Cn=wt.getFieldValue("keywords"),Wn=((xn=Cn==null?void 0:Cn.map(We=>We==null?void 0:We.keyword))==null?void 0:xn.flat())||[];for(const We of Ot)if(Wn.includes(We)){Oe.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}ot(Qn)&&(Ln({keyword:Ot,score:1}),Ut(""))},className:Et.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),ge.createElement(Le.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Wt.map($t=>{var rn=$t,{key:An,name:ti}=rn,xn=ze(rn,["key","name"]);return ge.createElement(_e.Z,{key:An,className:"mb20",style:{marginRight:148}},ge.createElement(Le.Z,{flex:1},ge.createElement(_e.Z,{align:"middle",justify:"space-between"},ge.createElement(st.default.Item,Ae(ke({},xn),{name:[ti,"keyword"]}),ge.createElement(qe,{onClose:()=>Nn(ti)})),Dt&&ge.createElement(st.default.Item,Ae(ke({},xn),{name:[ti,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Et.Z.blankInputNumberWrapper}),ge.createElement(Xe.Z,{className:Et.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ge.createElement("div",{onClick:()=>zt(!0)},ge.createElement(st.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ge.createElement(ct.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ht}))))}},78151:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Ge}});var ge={text:"text___bQulM",sup:"sup___rX_Y3"},Oe=pe(78241),Ke=pe(59301),Ge=({text:_e,name:Le="question_score"})=>{const Tt=({value:Pt})=>Ke.createElement("div",{className:ge.text},Ke.createElement("span",{className:ge.sup},"*"),Ke.createElement("span",{className:"mr10"},"\u5206\u503C"),Ke.createElement("span",null,Pt||"--"),Ke.createElement("span",{className:"c-grey-999"},_e));return Ke.createElement(Oe.default.Item,{noStyle:!0,name:Le},Ke.createElement(Tt,null))}},99325:function(Vn,Pn,pe){"use strict";pe.d(Pn,{z:function(){return ze},Z:function(){return Ze}});var ge=pe(59301),Oe=pe(2878),Ke=pe(85187),st=pe(64018),Ge=pe(40846),_e=pe(38446),Le=pe(88230),Tt=pe(15342),Pt=pe(1012),Xe=pe(90853),Et=pe(59301),It=({html:ot})=>{const qe=(0,ge.useRef)(null),bt=(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 wt=qe.current.attachShadow({mode:"open"});bt.current=document.createElement("div"),bt.current.className="markdown-body",bt.current.innerHTML=ot,wt.appendChild(bt.current);const nt=document.createElement("style");return nt.textContent=He,wt.appendChild(nt),()=>{wt.innerHTML=""}},[]),(0,ge.useEffect)(()=>{bt.current&&(bt.current.innerHTML=ot)},[ot]),Et.createElement("div",{ref:qe})},Be=Object.defineProperty,ne=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,se=(ot,qe,bt)=>qe in ot?Be(ot,qe,{enumerable:!0,configurable:!0,writable:!0,value:bt}):ot[qe]=bt,he=(ot,qe)=>{for(var bt in qe||(qe={}))ee.call(qe,bt)&&se(ot,bt,qe[bt]);if(ne)for(var bt of ne(qe))ce.call(qe,bt)&&se(ot,bt,qe[bt]);return ot};const ve="@\u2581\u2581@",be="@\u2581@",ke=/<pre[^>]*>/g;function Ae(ot){let qe=document.createElement("div");return qe.innerHTML=ot,qe.childNodes.length===0?"":qe.childNodes[0].nodeValue}const ze=(ot,qe)=>{ot=ot||"";const bt=/(?: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,wt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,nt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return qe?ot.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(bt,(Dt,ht,zt,Yt,Ut,it,Ve)=>{const Wt=ht||Yt||it,Ln=zt||Ut||Ve||"?";return _e.Z.API_SERVER+"/api/attachments/"+Wt+Ln+"&t="+(0,Le.Jn)(Wt,Date.now())+(Dt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ot=ot.replace(nt,(Dt,ht,zt,Yt,Ut,it,Ve)=>{const Wt=ht||Yt||it,Ln=zt||Ut||Ve||"?";return _e.Z.API_SERVER+"/attachments/download/"+Wt+Ln+"&t="+(0,Le.Jn)(Wt,Date.now())+(Dt.indexOf(")")>-1?")":"&")}).replace(bt,(Dt,ht,zt,Yt,Ut,it,Ve)=>{const Wt=ht||Yt||it,Ln=zt||Ut||Ve||"?";return _e.Z.API_SERVER+"/api/attachments/"+Wt+Ln+"&t="+(0,Le.Jn)(Wt,Date.now())+(Dt.indexOf(")")>-1?")":"&")}).replace(He,(Dt,ht,zt,Yt,Ut)=>{const it=ht||Yt,Ve=zt||Ut||"";return'"'+_e.Z.API_SERVER+"/api/attachments/"+it+Ve+it+Ve+"&t="+(0,Le.Jn)(it,Date.now())}).replace(wt,(Dt,ht,zt,Yt,Ut)=>{const it=ht||Yt,Ve=zt||Ut||"";return"("+_e.Z.API_SERVER+"/files/uploads/"+it+Ve+it+Ve+"&t="+(0,Le.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,`
`),ot)};var Ze=({value:ot="",className:qe,showTextOnly:bt,showLines:He,style:wt={},stylesPrev:nt={},highlightKeywords:Dt,showProgramFill:ht,isProgramFill:zt,disabledFill:Yt=!1,programFillValue:Ut,onFillChange:it=Ln=>{},onFillBlur:Ve=()=>{},onFillFocus:Wt=()=>{}})=>{let Ln=String(ot);const[Nn,$t]=(0,ge.useState)(""),[rn,An]=(0,ge.useState)("office"),[ti,xn]=(0,ge.useState)([]),Qn=(0,ge.useRef)("a"+(0,Pt.Z)()),Ot={},Cn=(yt,St,rt)=>{const Zt=document.createElement(yt===be?"input":"textarea");Zt.style.width="100%",Zt.style.height=yt===be?"40px":"151px",Zt.rows=5,Zt.spellcheck=!1,Zt.name="edu-program-fill",Zt.placeholder="\u8BF7\u8F93\u5165",Zt.dataset.id=St;const dn=Object.keys(Ot).length;return Ot[dn]=Zt,`<span class="edu-program-fill-wrap ${yt===be?"":"show"}" style="width:${yt===be?"400px":"100%"}" title=${rt||""}><span>${Zt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Wn(yt){return yt=yt.replace(/!\[.*?\]\(.*?\)/g,""),yt=yt.replace(/\[.*?\]\(.*?\)/g,""),yt=yt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),yt=yt.replace(/<embed.*?>/g,""),yt=yt.replace(/<img.*?>/g,""),yt=yt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),yt=yt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),yt=yt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),yt=yt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),yt}const We=yt=>yt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(St,rt){let Zt=rt.replace(/(\n|\r)/g,"").split("}"),dn=[];return Zt.map(mn=>{mn!=""&&dn.push(`.${Qn.current} ${mn}`)}),`<style>${dn.join("}")}</style>`}),Ee=(0,ge.useMemo)(()=>{try{const Zt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,dn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,mn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,qt=/\(\/attachments\/download\//g;Ln=Ln.replace(qt,"("+_e.Z.API_SERVER+"/attachments/download/").replace(Zt,"("+_e.Z.API_SERVER+"/api/attachments/").replace(dn,'"'+_e.Z.API_SERVER+"/api/attachments/").replace(mn,'"'+_e.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(Zt){}if(ht){let Zt=-1;return Ln=Ln.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(dn,mn,qt){var Gn;return++Zt,Cn(dn,Zt,(Gn=Ut==null?void 0:Ut[Zt])==null?void 0:Gn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${We(Ln||"")}</pre>`}let yt=We(Ln);yt=(0,Ke.ZP)(yt);const St=(0,Ke.ez)();Ln.match(/\[TOC\]/)&&(yt=yt.replace("<p>[TOC]</p>",(0,Ke.Qv)()),(0,Ke.Iy)()),yt=yt.replace(/(__special_katext_id_\d+__)/g,(Zt,dn)=>{const{type:mn,expression:qt}=St[dn];return(0,Tt.renderToString)(Ae(qt)||"",{displayMode:mn==="block",throwOnError:!1,output:"html"})}),yt=yt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ke.AL)();const rt=document.createElement("div");if(rt.innerHTML=yt,bt)return rt.innerText;if(Dt){const Zt=Dt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ye(rt,Zt),rt.innerHTML}return setTimeout(()=>Ye(),500),rt.innerHTML},[Ln,Dt]);(0,ge.useEffect)(()=>{Qe.current&&Qe.current.querySelectorAll(["input","textarea"]).forEach(St=>{St.oninput=Pe,St.onblur=De,St.onfocus=Fe})},[ti]),(0,ge.useEffect)(()=>{var yt,St,rt,Zt,dn;if(Ut!=null&&Ut.length)try{const mn=Qe.current.querySelectorAll(".edu-program-fill-score"),qt=Qe.current.querySelectorAll('[name="edu-program-fill"]');for(const[Gn,Kn]of qt.entries())Kn.value=((yt=Ut==null?void 0:Ut[Gn])==null?void 0:yt.value)||"",((St=Ut==null?void 0:Ut[Gn])==null?void 0:St.type)==="warning"?Kn.className="program-fill-warning":((rt=Ut==null?void 0:Ut[Gn])==null?void 0:rt.type)==="success"?Kn.className="program-fill-success":Kn.className="";for(const[Gn,Kn]of mn.entries())Kn.innerHTML=(Zt=Ut==null?void 0:Ut[Gn])!=null&&Zt.score?`${(dn=Ut==null?void 0:Ut[Gn])==null?void 0:dn.score}\u5206`:"";xn(Ut)}catch(mn){console.log(mn,"error")}},[Ut]);const Pe=yt=>{ti[yt.target.dataset.id]=ti[yt.target.dataset.id]||{},ti[yt.target.dataset.id].value=yt.target.value,xn([...ti]),it(ti,yt.target.dataset.id)},De=yt=>{ti[yt.target.dataset.id]=ti[yt.target.dataset.id]||{},ti[yt.target.dataset.id].value=yt.target.value,xn([...ti]),Ve(ti,yt.target.dataset.id)},Fe=yt=>{ti[yt.target.dataset.id]=ti[yt.target.dataset.id]||{},ti[yt.target.dataset.id].value=yt.target.value,xn([...ti]),Wt(ti,yt.target.dataset.id)};function ye(yt,St){return yt.childNodes.forEach(rt=>{var Zt;if(rt.childNodes.length>0)ye(rt,St);else if(rt.nodeName!=="IMG")if(rt.innerHTML)rt.innerHTML=(Zt=rt.innerHTML)==null?void 0:Zt.replace(new RegExp(St,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const dn=document.createElement("span");dn.innerHTML=rt.textContent.replace(new RegExp(St,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),rt.replaceWith(dn)}})}const Qe=(0,ge.useRef)();Ke.jb.WebkitLineClamp=He,He&&(wt=he(he({},wt),Ke.jb));function vt(yt){let St=yt.target;if(St.tagName.toUpperCase()==="A"){let rt=St.getAttribute("href");if(rt.indexOf("office")>-1)yt.preventDefault(),$t(rt),An("office");else if(rt.indexOf("application/pdf")>-1)yt.preventDefault(),$t(rt),An("pdf");else if(rt.indexOf("text/html")>-1)yt.preventDefault(),$t(rt),An("html");else if(rt.startsWith("#")){yt.preventDefault();let Zt=document.getElementById(rt.replace("#",""));Zt&&Zt.scrollIntoView(!0)}}}const Ye=()=>{var yt;const St=(yt=Qe.current)==null?void 0:yt.querySelectorAll("video");St==null||St.forEach(rt=>{if(rt.oncontextmenu=()=>!1,rt.src.indexOf(".m3u8")>-1&&!rt.canPlayType("application/vnd.apple.mpegurl")){if(Ge.ZP.isSupported()){var Zt=new Ge.ZP;Zt.loadSource(rt.src),Zt.attachMedia(rt)}}})};(0,ge.useEffect)(()=>{if(Qe.current&&Ee&&Ee.match(ke)&&window.PR.prettyPrint(),Qe.current)return Qe.current.addEventListener("click",vt),()=>{var yt;(yt=Qe.current)==null||yt.removeEventListener("click",vt),(0,Ke.AL)(),(0,Ke.Iy)()}},[Ee,Qe.current,vt]),(0,ge.useEffect)(()=>{var yt;const St=rt=>{rt.preventDefault(),rt.clipboardData.setData("text",window.getSelection().toString())};return(yt=Qe.current)==null||yt.addEventListener("copy",St),()=>{var rt;(rt=Qe.current)==null||rt.removeEventListener("copy",St)}},[Qe.current]);const Je=yt=>/<style[\s\S]*?>/i.test(yt||"");return ge.createElement(ge.Fragment,null,bt&&ge.createElement("div",{ref:Qe},Ee),!bt&&!Je(Ee)&&ge.createElement("div",{ref:Qe,style:he({},wt),className:`${qe||""} ${Yt?"disabled-fill":""} markdown-body ${Qn.current}`,dangerouslySetInnerHTML:{__html:Ee}}),!bt&&Je(Ee)&&ge.createElement(It,{html:Ee}),ge.createElement(Xe.Z,{close:!0,data:Nn,type:Nn!=null&&Nn.length?rn:"",style:he({},nt),onClose:()=>$t("")}))}},73278:function(Vn,Pn,pe){"use strict";pe.d(Pn,{h:function(){return be}});var ge=pe(59301),Oe=pe(57809),Ke=pe(78241),st=pe(3113),Ge=pe(89780),_e=pe.n(Ge),Le=pe(78780),Tt=pe(19136),Pt=Object.defineProperty,Xe=Object.defineProperties,Et=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,ne=(ke,Ae,ze)=>Ae in ke?Pt(ke,Ae,{enumerable:!0,configurable:!0,writable:!0,value:ze}):ke[Ae]=ze,ee=(ke,Ae)=>{for(var ze in Ae||(Ae={}))It.call(Ae,ze)&&ne(ke,ze,Ae[ze]);if(ct)for(var ze of ct(Ae))Be.call(Ae,ze)&&ne(ke,ze,Ae[ze]);return ke},ce=(ke,Ae)=>Xe(ke,Et(Ae));const se=Oe.default.Option,he={labelCol:{span:4},wrapperCol:{span:20}},ve={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"]};Pn.Z=({callback:ke,onCancel:Ae})=>{const[ze,Ze]=(0,ge.useState)("python");function ot(bt){Ze(ve[bt][1])}function qe(bt){ke(bt)}return ge.createElement(Ke.default,ce(ee({},he),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:qe,style:{width:500}}),ge.createElement(Ke.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ge.createElement(Oe.default,{getPopupContainer:bt=>bt.parentNode,onChange:ot},Object.keys(ve).map(bt=>ge.createElement(se,{key:bt,value:bt},ve[bt][0])))),ge.createElement(Ke.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(st.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(st.ZP,{type:"ghost",onClick:Ae},"\u53D6\u6D88")))};function be({value:ke,onChange:Ae,mode:ze,options:Ze={}}){const ot=(0,ge.useRef)(),[qe,bt]=(0,ge.useState)();return(0,ge.useEffect)(()=>{if(qe){let He=function(wt){const nt=wt.getValue();Ae&&Ae(nt)};return qe.on("change",He),()=>{qe.off("change",He)}}},[qe,Ae]),(0,ge.useEffect)(()=>{qe&&qe.setOption("mode",ze)},[qe,ze]),(0,ge.useEffect)(()=>{qe&&(ke!==qe.getValue()||ke==="")&&setTimeout(()=>{qe.setValue(ke||"")},300)},[qe,ke]),(0,ge.useEffect)(()=>{if(ot.current&&!qe){const He=_e().fromTextArea(ot.current,ee({mode:ze,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ze));bt(He)}},[ot.current,qe]),ge.createElement("div",{className:"my-codemirror-container"},ge.createElement("textarea",{ref:ot}))}},64726:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return In}});var ge=pe(59301),Oe=pe(89780),Ke=pe.n(Oe),st=pe(76374),Ge=pe(78780),_e=pe(6313),Le=pe(25717),Tt=pe(99498),Pt=pe(25419),Xe=pe(67549),Et=pe(99325),ct=({value:Gt="",className:Kt,showTextOnly:jt,showLines:ft,style:an={}})=>{const vn=(0,ge.useMemo)(()=>"",[Gt]);return ge.createElement(ge.Fragment,null,ge.createElement("div",{dangerouslySetInnerHTML:{__html:vn}}))},It=pe(59301),Be=Object.defineProperty,ne=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(Gt,Kt,jt)=>Kt in Gt?Be(Gt,Kt,{enumerable:!0,configurable:!0,writable:!0,value:jt}):Gt[Kt]=jt,be=(Gt,Kt)=>{for(var jt in Kt||(Kt={}))se.call(Kt,jt)&&ve(Gt,jt,Kt[jt]);if(ce)for(var jt of ce(Kt))he.call(Kt,jt)&&ve(Gt,jt,Kt[jt]);return Gt},ke=(Gt,Kt)=>ne(Gt,ee(Kt));let Ae=[{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:Gt,title:Kt,icon:jt,actionName:ft,className:an="",children:vn}){function Bt(){Gt(ft)}return It.createElement("a",{title:Kt,className:an,onClick:Bt},It.createElement("i",{className:`${jt}`}),vn)}var Ze=({watch:Gt,showNullButton:Kt,showNullProgramButton:jt,onActionCallback:ft,fullScreen:an,insertTemp:vn,hidetoolBar:Bt,extraUse:at})=>{const cn=[...Ae,{title:`${Gt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Gt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return It.createElement("ul",{className:"markdown-toolbar-container"},!Bt&&cn.map((Sn,Un)=>It.createElement("li",{key:Un},Sn.actionName?It.createElement(ze,ke(be({},Sn),{onActionCallback:ft})):It.createElement("span",{className:"v-line"}))),Kt?It.createElement("li",null,It.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ft},It.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,jt?It.createElement(It.Fragment,null,It.createElement("li",null,It.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:ft},It.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),It.createElement("li",null,It.createElement(ze,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:ft},It.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,vn&&It.createElement("li",null,It.createElement(ze,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${vn}`,onActionCallback:ft},It.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),at&&It.createElement("li",null,at),It.createElement("li",{className:"btn-full-screen"},It.createElement(ze,{icon:`${an?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:an?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ft})))},ot=pe(19647),qe=pe(78241),bt=pe(92832),He=pe(3113),wt=Object.defineProperty,nt=Object.defineProperties,Dt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,Ut=(Gt,Kt,jt)=>Kt in Gt?wt(Gt,Kt,{enumerable:!0,configurable:!0,writable:!0,value:jt}):Gt[Kt]=jt,it=(Gt,Kt)=>{for(var jt in Kt||(Kt={}))zt.call(Kt,jt)&&Ut(Gt,jt,Kt[jt]);if(ht)for(var jt of ht(Kt))Yt.call(Kt,jt)&&Ut(Gt,jt,Kt[jt]);return Gt},Ve=(Gt,Kt)=>nt(Gt,Dt(Kt));const Wt={labelCol:{span:4},wrapperCol:{span:20}};var Ln=({callback:Gt,onCancel:Kt})=>{function jt(ft){Gt(ft)}return ge.createElement(qe.default,Ve(it({},Wt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:jt,style:{width:500}}),ge.createElement(qe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ge.createElement(bt.default,null)),ge.createElement(qe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ge.createElement(bt.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")))},Nn=pe(73278),$t=pe(56030),rn=pe(43418),An=pe(95237),ti=pe(14573),xn=pe(59301),Qn=({callback:Gt,onCancel:Kt})=>{const jt=document.createElement("canvas"),ft=jt.getContext("2d");jt.width=1e3,jt.height=800,ft.fillStyle="#ffffff",ft.fillRect(0,0,jt.width,jt.height);const an=jt.toDataURL("image/png");return xn.createElement(rn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},xn.createElement(An.Z,{style:{height:"100vh"}},xn.createElement(ti.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:an,visible:!0,title:String(Date.now())},onOk:vn=>{Gt({src:vn.url})},onClose:Kt})))},Ot=pe(12378);function Cn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Cn,go.CommandHandler),Cn.prototype.canAlignSelection=function(){var Gt=this.diagram;return!(Gt===null||Gt.isReadOnly||Gt.isModelReadOnly||Gt.selection.count<2)},Cn.prototype.alignLeft=function(){var Gt=this.diagram;Gt.startTransaction("aligning left");var Kt=1/0;Gt.selection.each(function(jt){jt instanceof go.Link||(Kt=Math.min(jt.position.x,Kt))}),Gt.selection.each(function(jt){jt instanceof go.Link||jt.move(new go.Point(Kt,jt.position.y))}),Gt.commitTransaction("aligning left")},Cn.prototype.alignRight=function(){var Gt=this.diagram;Gt.startTransaction("aligning right");var Kt=-1/0;Gt.selection.each(function(jt){if(!(jt instanceof go.Link)){var ft=jt.actualBounds.x+jt.actualBounds.width;Kt=Math.max(ft,Kt)}}),Gt.selection.each(function(jt){jt instanceof go.Link||jt.move(new go.Point(Kt-jt.actualBounds.width,jt.position.y))}),Gt.commitTransaction("aligning right")},Cn.prototype.alignTop=function(){var Gt=this.diagram;Gt.startTransaction("alignTop");var Kt=1/0;Gt.selection.each(function(jt){jt instanceof go.Link||(Kt=Math.min(jt.position.y,Kt))}),Gt.selection.each(function(jt){jt instanceof go.Link||jt.move(new go.Point(jt.position.x,Kt))}),Gt.commitTransaction("alignTop")},Cn.prototype.alignBottom=function(){var Gt=this.diagram;Gt.startTransaction("aligning bottom");var Kt=-1/0;Gt.selection.each(function(jt){if(!(jt instanceof go.Link)){var ft=jt.actualBounds.y+jt.actualBounds.height;Kt=Math.max(ft,Kt)}}),Gt.selection.each(function(jt){jt instanceof go.Link||jt.move(new go.Point(jt.actualBounds.x,Kt-jt.actualBounds.height))}),Gt.commitTransaction("aligning bottom")},Cn.prototype.alignCenterX=function(){var Gt=this.diagram,Kt=Gt.selection.first();if(Kt){Gt.startTransaction("aligning Center X");var jt=Kt.actualBounds.x+Kt.actualBounds.width/2;Gt.selection.each(function(ft){ft instanceof go.Link||ft.move(new go.Point(jt-ft.actualBounds.width/2,ft.actualBounds.y))}),Gt.commitTransaction("aligning Center X")}},Cn.prototype.alignCenterY=function(){var Gt=this.diagram,Kt=Gt.selection.first();if(Kt){Gt.startTransaction("aligning Center Y");var jt=Kt.actualBounds.y+Kt.actualBounds.height/2;Gt.selection.each(function(ft){ft instanceof go.Link||ft.move(new go.Point(ft.actualBounds.x,jt-ft.actualBounds.height/2))}),Gt.commitTransaction("aligning Center Y")}},Cn.prototype.alignColumn=function(Gt){var Kt=this.diagram;Kt.startTransaction("align Column"),Gt===void 0&&(Gt=0),Gt=parseFloat(Gt);var jt=new Array;Kt.selection.each(function(at){at instanceof go.Link||jt.push(at)});for(var ft=0;ft<jt.length-1;ft++){var an=jt[ft],vn=an.actualBounds.y+an.actualBounds.height+Gt,Bt=jt[ft+1];Bt.move(new go.Point(an.actualBounds.x,vn))}Kt.commitTransaction("align Column")},Cn.prototype.alignRow=function(Gt){Gt===void 0&&(Gt=0),Gt=parseFloat(Gt);var Kt=this.diagram;Kt.startTransaction("align Row");var jt=new Array;Kt.selection.each(function(at){at instanceof go.Link||jt.push(at)});for(var ft=0;ft<jt.length-1;ft++){var an=jt[ft],vn=an.actualBounds.x+an.actualBounds.width+Gt,Bt=jt[ft+1];Bt.move(new go.Point(vn,an.actualBounds.y))}Kt.commitTransaction("align Row")},Cn.prototype.canRotate=function(Gt){var Kt=this.diagram;return!(Kt===null||Kt.isReadOnly||Kt.isModelReadOnly||Kt.selection.count<1)},Cn.prototype.rotate=function(Gt){Gt===void 0&&(Gt=90);var Kt=this.diagram;Kt.startTransaction("rotate "+Gt.toString());var Kt=this.diagram;Kt.selection.each(function(jt){jt instanceof go.Link||jt instanceof go.Group||(jt.angle+=Gt)}),Kt.commitTransaction("rotate "+Gt.toString())},Cn.prototype.pullToFront=function(){var Gt=this.diagram;Gt.startTransaction("pullToFront");var Kt=new go.Map;Gt.selection.each(function(jt){Kt.set(jt.layer,0)}),Kt.iteratorKeys.each(function(jt){var ft=0;jt.parts.each(function(an){if(!an.isSelected){var vn=an.zOrder;isNaN(vn)?an.zOrder=0:ft=Math.max(ft,vn)}}),Kt.set(jt,ft)}),Gt.selection.each(function(jt){Cn._assignZOrder(jt,Kt.get(jt.layer)+1)}),Gt.commitTransaction("pullToFront")},Cn.prototype.pushToBack=function(){var Gt=this.diagram;Gt.startTransaction("pushToBack");var Kt=new go.Map;Gt.selection.each(function(jt){Kt.set(jt.layer,0)}),Kt.iteratorKeys.each(function(jt){var ft=0;jt.parts.each(function(an){if(!an.isSelected){var vn=an.zOrder;isNaN(vn)?an.zOrder=0:ft=Math.min(ft,vn)}}),Kt.set(jt,ft)}),Gt.selection.each(function(jt){Cn._assignZOrder(jt,Kt.get(jt.layer)-1-Cn._findGroupDepth(jt))}),Gt.commitTransaction("pushToBack")},Cn._assignZOrder=function(Gt,Kt,jt){jt===void 0&&(jt=Gt),Gt.layer===jt.layer&&(Gt.zOrder=Kt),Gt instanceof go.Group&&Gt.memberParts.each(function(ft){Cn._assignZOrder(ft,Kt+1,jt)})},Cn._findGroupDepth=function(Gt){if(Gt instanceof go.Group){var Kt=0;return Gt.memberParts.each(function(jt){Kt=Math.max(Kt,Cn._findGroupDepth(jt))}),Kt+1}else return 0},Cn.prototype.doKeyDown=function(){var Gt=this.diagram;if(Gt!==null){var Kt=Gt.lastInput;if(Kt.key==="Up"||Kt.key==="Down"||Kt.key==="Left"||Kt.key==="Right"){var jt=this.arrowKeyBehavior;if(jt==="none")return;if(jt==="select"){this._arrowKeySelect();return}else if(jt==="move"){this._arrowKeyMove();return}else if(jt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Cn.prototype._getAllParts=function(){var Gt=new Array;return this.diagram.nodes.each(function(Kt){Gt.push(Kt)}),this.diagram.parts.each(function(Kt){Gt.push(Kt)}),Gt},Cn.prototype._arrowKeyMove=function(){var Gt=this.diagram,Kt=Gt.lastInput,jt=0,ft=0;if(Kt.control||Kt.meta)jt=1,ft=1;else if(Gt.grid!==null){var an=Gt.grid.gridCellSize;ft=an.width,jt=an.height}Gt.startTransaction("arrowKeyMove"),Gt.selection.each(function(vn){Kt.key==="Up"?vn.move(new go.Point(vn.actualBounds.x,vn.actualBounds.y-jt)):Kt.key==="Down"?vn.move(new go.Point(vn.actualBounds.x,vn.actualBounds.y+jt)):Kt.key==="Left"?vn.move(new go.Point(vn.actualBounds.x-ft,vn.actualBounds.y)):Kt.key==="Right"&&vn.move(new go.Point(vn.actualBounds.x+ft,vn.actualBounds.y))}),Gt.commitTransaction("arrowKeyMove")},Cn.prototype._arrowKeySelect=function(){var Gt=this.diagram,Kt=Gt.lastInput,jt=null;Kt.key==="Up"?jt=this._findNearestPartTowards(270):Kt.key==="Down"?jt=this._findNearestPartTowards(90):Kt.key==="Left"?jt=this._findNearestPartTowards(180):Kt.key==="Right"&&(jt=this._findNearestPartTowards(0)),jt!==null&&(Kt.shift?jt.isSelected=!0:Kt.control||Kt.meta?jt.isSelected=!jt.isSelected:Gt.select(jt))},Cn.prototype._findNearestPartTowards=function(Gt){var Kt=this.diagram.selection.first();if(Kt===null)return null;for(var jt=Kt.actualBounds.center,ft=this._getAllParts(),an=1/0,vn=Kt,Bt=0;Bt<ft.length;Bt++){var at=ft[Bt];if(at!==Kt&&at.canSelect()){var cn=at.actualBounds.center,Sn=jt.directionPoint(cn),Un=this._angleCloseness(Sn,Gt);if(Un<=45){var un=jt.distanceSquaredPoint(cn);un*=1+Math.sin(Un*Math.PI/180),un<an&&(an=un,vn=at)}}}return vn},Cn.prototype._angleCloseness=function(Gt,Kt){return Math.min(Math.abs(Kt-Gt),Math.min(Math.abs(Kt+360-Gt),Math.abs(Kt-360-Gt)))},Cn.prototype._arrowKeyTree=function(){var Gt=this.diagram,Kt=Gt.selection.first();if(Kt instanceof go.Node){var jt=Gt.lastInput;if(jt.key==="Right"){if(!Kt.isTreeLeaf)if(!Kt.isTreeExpanded)Gt.commandHandler.canExpandTree(Kt)&&Gt.commandHandler.expandTree(Kt);else{var ft=this._sortTreeChildrenByY(Kt).first();ft!==null&&Gt.select(ft)}}else if(jt.key==="Left")if(!Kt.isTreeLeaf&&Kt.isTreeExpanded)Gt.commandHandler.canCollapseTree(Kt)&&Gt.commandHandler.collapseTree(Kt);else{var an=Kt.findTreeParentNode();an!==null&&Gt.select(an)}else if(jt.key==="Up"){var an=Kt.findTreeParentNode();if(an!==null){var vn=this._sortTreeChildrenByY(an),Bt=vn.indexOf(Kt);if(Bt>0){for(var at=vn.elt(Bt-1);at!==null&&at.isTreeExpanded&&!at.isTreeLeaf;){var cn=this._sortTreeChildrenByY(at);at=cn.last()}at!==null&&Gt.select(at)}else Gt.select(an)}}else if(jt.key==="Down")if(Kt.isTreeExpanded&&!Kt.isTreeLeaf){var ft=this._sortTreeChildrenByY(Kt).first();ft!==null&&Gt.select(ft)}else for(;Kt!==null;){var an=Kt.findTreeParentNode();if(an===null)break;var vn=this._sortTreeChildrenByY(an),Bt=vn.indexOf(Kt);if(Bt<vn.length-1){Gt.select(vn.elt(Bt+1));break}else Kt=an}var Sn=Gt.selection.first();Sn!==null&&Gt.scrollToRect(Sn.actualBounds)}},Cn.prototype._sortTreeChildrenByY=function(Gt){var Kt=new go.List().addAll(Gt.findTreeChildrenNodes());return Kt.sort(function(jt,ft){var an=jt.location,vn=ft.location;return an.y<vn.y?-1:an.y>vn.y?1:an.x<vn.x?-1:an.x>vn.x?1:0}),Kt},Cn.prototype.copyToClipboard=function(Gt){go.CommandHandler.prototype.copyToClipboard.call(this,Gt),this._lastPasteOffset.set(this.pasteOffset)},Cn.prototype.pasteFromClipboard=function(){var Gt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Gt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Gt},Object.defineProperty(Cn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Gt){if(Gt!=="move"&&Gt!=="select"&&Gt!=="scroll"&&Gt!=="tree"&&Gt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Gt);this._arrowKeyBehavior=Gt}}),Object.defineProperty(Cn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Gt){if(!(Gt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Gt);this._pasteOffset.set(Gt)}});var Wn=Cn,We=pe(29277),Ee=pe(43604),Pe=pe(7660),De={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Fe=pe(59301),ye=(Gt,Kt,jt)=>new Promise((ft,an)=>{var vn=cn=>{try{at(jt.next(cn))}catch(Sn){an(Sn)}},Bt=cn=>{try{at(jt.throw(cn))}catch(Sn){an(Sn)}},at=cn=>cn.done?ft(cn.value):Promise.resolve(cn.value).then(vn,Bt);at((jt=jt.apply(Gt,Kt)).next())});function Qe({onCancel:Gt,callback:Kt}){let jt=(0,ge.useRef)(),ft=(0,ge.useRef)(),an=(0,ge.useRef)(),vn=(0,ge.useRef)(!1);const Bt=(0,ge.useRef)(!1),[at,cn]=(0,ge.useState)(0);function Sn(){const un=Ot.bx.make,Rt={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"};jt.current=new Ot.S0(ft.current,{padding:20,grid:un(Ot.s_,"Grid",un(Ot.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),un(Ot.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Xt=>{var Si=Xt.diagram.commandHandler.addTopLevelParts(Xt.diagram.selection,!0);Si||Xt.diagram.currentTool.doCancel()},commandHandler:un(Wn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Xt=>{var Si=Xt.subject;Si.location=Si.location.copy().snapToGridPoint(Xt.diagram.grid.gridOrigin,Xt.diagram.grid.gridCellSize),setTimeout(()=>{Xt.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Xt=>{var Si=Xt.subject;setTimeout(()=>{Xt.diagram.commandHandler.editTextBlock()})},LinkRelinked:Xt=>{var Si=Xt.parameter.part;Si.invalidateConnectedLinks();var Ki=Xt.subject;Xt.diagram.toolManager.linkingTool.isForwards?Ki.toNode.invalidateConnectedLinks():Ki.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),jt.current.nodeTemplate=un(Ot.NB,"Auto",{locationSpot:Ot.z6.Center,locationObjectName:"SHAPE",desiredSize:new Ot.$u(120,60),minSize:new Ot.$u(40,40),resizable:!0,resizeCellSize:new Ot.$u(10,10),rotatable:!0},new Ot.KX("location","loc",Ot.E9.parse).makeTwoWay(Ot.E9.stringify),new Ot.KX("desiredSize","size",Ot.$u.parse).makeTwoWay(Ot.$u.stringify),un(Ot.bn,{name:"SHAPE",fill:Rt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ot.z6.AllSides,toSpot:Ot.z6.AllSides},new Ot.KX("figure"),new Ot.KX("fill"),new Ot.KX("stroke","borderColor"),new Ot.KX("strokeWidth","thickness"),new Ot.KX("strokeDashArray","dash")),un(Ot.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),un(Ot.al,{margin:1,textAlign:"center",overflow:Ot.al.OverflowEllipsis,editable:!0},new Ot.KX("text").makeTwoWay(),new Ot.KX("stroke","color"))),jt.current.nodeTemplate.toolTip=un("ToolTip",un(Ot.s_,"Vertical",{maxSize:new Ot.$u(200,NaN)},un(Ot.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ot.KX("text")),un(Ot.al,{font:"10pt sans-serif",textAlign:"center"},new Ot.KX("text","details"))));function zn(Xt,Si){var Ki=(Ti,cr)=>{Ti.handled=!0,Ti.diagram.model.commit(Qi=>{var yr=cr.part.adornedPart,fr=new Ot.E9().setRectSpot(yr.actualBounds,Xt);fr.subtract(yr.location),fr.scale(2,2),fr.x+=Math.sign(fr.x)*130,fr.y+=Math.sign(fr.y)*130,fr.add(yr.location),fr.snapToGridPoint(Ti.diagram.grid.gridOrigin,Ti.diagram.grid.gridCellSize);var Vi=Qi.copyNodeData(yr.data);Qi.setGroupKeyForNodeData(Vi,Qi.getGroupKeyForNodeData(yr.data)),Qi.addNodeData(Vi);var Mr={from:yr.key,to:Qi.getKeyForNodeData(Vi)};Qi.addLinkData(Mr);var Dn=Ti.diagram.findNodeForData(Vi);Dn.location=fr,Ti.diagram.select(Dn),setTimeout(()=>{Ti.diagram.commandHandler.editTextBlock()},20)})};return un(Ot.bn,{figure:Si,alignment:Xt,alignmentFocus:Xt.opposite(),width:Xt.equals(Ot.z6.Top)||Xt.equals(Ot.z6.Bottom)?25:18,height:Xt.equals(Ot.z6.Top)||Xt.equals(Ot.z6.Bottom)?18:25,fill:"orange",stroke:Rt.white,strokeWidth:4,mouseEnter:(Ti,cr)=>cr.fill="dodgerblue",mouseLeave:(Ti,cr)=>cr.fill="orange",isActionable:!0,click:Ki,contextClick:Ki})}function ni(Xt){return un(Ot.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:(Si,Ki)=>Ki.fill="dodgerblue",mouseLeave:(Si,Ki)=>Ki.fill="orange",click:(Si,Ki)=>{Si.diagram.commandHandler.showContextMenu(Ki.part.adornedPart)}},Xt||{})}jt.current.nodeTemplate.selectionAdornmentTemplate=un(Ot.uz,"Spot",un(Ot.Vm,{padding:10}),zn(Ot.z6.Top,"TriangleUp"),zn(Ot.z6.Left,"TriangleLeft"),zn(Ot.z6.Right,"TriangleRight"),zn(Ot.z6.Bottom,"TriangleDown"),ni({alignment:new Ot.z6(.75,0)}));function gi(Xt,Si){return(Ki,Ti)=>{Ki.handled=!0,Ki.diagram.model.commit(cr=>{cr.set(Ti.part.adornedPart.data,Xt,Si)})}}function tn(Xt,Si){return Si||(Si="color"),un(Ot.bn,{width:16,height:16,stroke:"lightgray",fill:Xt,margin:1,background:"transparent",mouseEnter:(Ki,Ti)=>Ti.stroke="dodgerblue",mouseLeave:(Ki,Ti)=>Ti.stroke="lightgray",click:gi(Si,Xt),contextClick:gi(Si,Xt)})}function Bn(){return[un("ContextMenuButton",un(Ot.s_,"Horizontal",tn(Rt.white,"fill"),tn(Rt.beige,"fill"),tn(Rt.extralightblue,"fill"),tn(Rt.extralightred,"fill"))),un("ContextMenuButton",un(Ot.s_,"Horizontal",tn(Rt.lightgray,"fill"),tn(Rt.lightgreen,"fill"),tn(Rt.lightblue,"fill"),tn(Rt.lightred,"fill")))]}function Ft(){return[un("ContextMenuButton",un(Ot.s_,"Horizontal",tn(Rt.black),tn(Rt.green),tn(Rt.blue),tn(Rt.red))),un("ContextMenuButton",un(Ot.s_,"Horizontal",tn(Rt.white),tn(Rt.magenta),tn(Rt.purple),tn(Rt.orange)))]}function wn(Xt,Si){return Si||(Si="thickness"),un(Ot.bn,"LineH",{width:16,height:16,strokeWidth:Xt,margin:1,background:"transparent",mouseEnter:(Ki,Ti)=>Ti.background="dodgerblue",mouseLeave:(Ki,Ti)=>Ti.background="transparent",click:gi(Si,Xt),contextClick:gi(Si,Xt)})}function gn(Xt,Si){return Si||(Si="dash"),un(Ot.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Xt,margin:1,background:"transparent",mouseEnter:(Ki,Ti)=>Ti.background="dodgerblue",mouseLeave:(Ki,Ti)=>Ti.background="transparent",click:gi(Si,Xt),contextClick:gi(Si,Xt)})}function yn(){return[un("ContextMenuButton",un(Ot.s_,"Horizontal",wn(1),wn(2),wn(3),wn(4))),un("ContextMenuButton",un(Ot.s_,"Horizontal",gn(null),gn([2,4]),gn([4,4])))]}function On(Xt,Si){return Si||(Si="figure"),un(Ot.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Xt,margin:1,background:"transparent",mouseEnter:(Ki,Ti)=>Ti.fill="dodgerblue",mouseLeave:(Ki,Ti)=>Ti.fill="lightgray",click:gi(Si,Xt),contextClick:gi(Si,Xt)})}jt.current.nodeTemplate.contextMenu=un("ContextMenu",un("ContextMenuButton",un(Ot.s_,"Horizontal",On("Rectangle"),On("RoundedRectangle"),On("Ellipse"),On("Diamond"))),un("ContextMenuButton",un(Ot.s_,"Horizontal",On("Parallelogram2"),On("ManualOperation"),On("Procedure"),On("Cylinder1"))),un("ContextMenuButton",un(Ot.s_,"Horizontal",On("Terminator"),On("CreateRequest"),On("Document"),On("TriangleDown"))),Bn(),Ft(),yn()),jt.current.groupTemplate=un(Ot.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ot.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Xt,Si)=>{var Ki=Si.addMembers(Si.diagram.selection,!0);Ki||Si.diagram.currentTool.doCancel()},avoidable:!1},new Ot.KX("location","loc",Ot.E9.parse).makeTwoWay(Ot.E9.stringify),un(Ot.s_,"Auto",{name:"BODY"},un(Ot.bn,{parameter1:10,fill:Rt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ot.z6.AllSides,toSpot:Ot.z6.AllSides},new Ot.KX("fill"),new Ot.KX("stroke","color"),new Ot.KX("strokeWidth","thickness"),new Ot.KX("strokeDashArray","dash")),un(Ot.Vm,{background:"transparent",margin:20})),un(Ot.al,{alignment:Ot.z6.Top,alignmentFocus:Ot.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Ot.KX("text"),new Ot.KX("stroke","color"))),jt.current.groupTemplate.selectionAdornmentTemplate=un(Ot.uz,"Spot",un(Ot.s_,"Auto",un(Ot.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),un(Ot.Vm,{margin:1.5})),ni({alignment:Ot.z6.TopRight,alignmentFocus:Ot.z6.BottomRight})),jt.current.groupTemplate.contextMenu=un("ContextMenu",Bn(),Ft(),yn()),jt.current.linkTemplate=un(Ot.rU,{layerName:"Foreground",routing:Ot.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Ot.KX("fromSpot","fromSpot",Ot.z6.parse),new Ot.KX("toSpot","toSpot",Ot.z6.parse),new Ot.KX("fromShortLength","dir",Xt=>Xt>=1?10:0),new Ot.KX("toShortLength","dir",Xt=>Xt>=1?10:0),new Ot.KX("points").makeTwoWay(),un(Ot.bn,{strokeWidth:2},new Ot.KX("stroke","color"),new Ot.KX("strokeWidth","thickness"),new Ot.KX("strokeDashArray","dash")),un(Ot.bn,{segmentIndex:0,segmentOffset:new Ot.E9(15,0),segmentOrientation:Ot.rU.OrientAlong,alignmentFocus:Ot.z6.Right,figure:"circle",width:10,strokeWidth:0},new Ot.KX("fill","color"),new Ot.KX("visible","dir",Xt=>Xt===1)),un(Ot.bn,{segmentIndex:-1,segmentOffset:new Ot.E9(-10,6),segmentOrientation:Ot.rU.OrientPlus90,alignmentFocus:Ot.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ot.KX("fill","color"),new Ot.KX("visible","dir",Xt=>Xt>=1),new Ot.KX("width","thickness",Xt=>7+3*Xt),new Ot.KX("height","thickness",Xt=>7+3*Xt),new Ot.KX("segmentOffset","thickness",Xt=>new Ot.E9(-15,4+1.5*Xt))),un(Ot.bn,{segmentIndex:0,segmentOffset:new Ot.E9(15,-6),segmentOrientation:Ot.rU.OrientMinus90,alignmentFocus:Ot.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ot.KX("fill","color"),new Ot.KX("visible","dir",Xt=>Xt===2),new Ot.KX("width","thickness",Xt=>7+3*Xt),new Ot.KX("height","thickness",Xt=>7+3*Xt),new Ot.KX("segmentOffset","thickness",Xt=>new Ot.E9(-15,4+1.5*Xt))),un(Ot.al,{alignmentFocus:new Ot.z6(0,1,-4,0),editable:!0},new Ot.KX("text").makeTwoWay(),new Ot.KX("stroke","color"))),jt.current.linkTemplate.selectionAdornmentTemplate=un(Ot.uz,un(Ot.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:$n(2)},new Ot.KX("pathPattern","thickness",$n)),ni({alignmentFocus:new Ot.z6(0,0,-6,-4)}));function $n(Xt){return un(Ot.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Xt+4).toString()+" H3"})}function Yn(Xt){var Si="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Xt===0?Si="M0 0 M16 16 M0 8 L16 8":Xt===2&&(Si="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),un(Ot.bn,{geometryString:Si,margin:2,background:"transparent",mouseEnter:(Ki,Ti)=>Ti.background="dodgerblue",mouseLeave:(Ki,Ti)=>Ti.background="transparent",click:gi("dir",Xt),contextClick:gi("dir",Xt)})}function ii(Xt){var Si=(Ki,Ti)=>{Ki.handled=!0,Ki.diagram.model.commit(cr=>{var Qi=Ti.part.adornedPart;cr.set(Qi.data,Xt?"toSpot":"fromSpot",Ot.z6.stringify(Ot.z6.AllSides)),(Xt?Qi.toNode:Qi.fromNode).invalidateConnectedLinks()})};return un(Ot.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Ki,Ti)=>Ti.background="dodgerblue",mouseLeave:(Ki,Ti)=>Ti.background="transparent",click:Si,contextClick:Si})}function Xn(Xt,Si){var Ki=0,Ti=Ot.z6.RightSide;Xt.equals(Ot.z6.Top)?(Ki=270,Ti=Ot.z6.TopSide):Xt.equals(Ot.z6.Left)?(Ki=180,Ti=Ot.z6.LeftSide):Xt.equals(Ot.z6.Bottom)&&(Ki=90,Ti=Ot.z6.BottomSide),Si||(Ki-=180);var cr=(Qi,yr)=>{Qi.handled=!0,Qi.diagram.model.commit(fr=>{var Vi=yr.part.adornedPart;fr.set(Vi.data,Si?"toSpot":"fromSpot",Ot.z6.stringify(Ti)),(Si?Vi.toNode:Vi.fromNode).invalidateConnectedLinks()})};return un(Ot.bn,{alignment:Xt,alignmentFocus:Xt.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Ki,background:"transparent",mouseEnter:(Qi,yr)=>yr.background="dodgerblue",mouseLeave:(Qi,yr)=>yr.background="transparent",click:cr,contextClick:cr})}jt.current.linkTemplate.contextMenu=un("ContextMenu",Ft(),yn(),un("ContextMenuButton",un(Ot.s_,"Horizontal",Yn(0),Yn(1),Yn(2))),un("ContextMenuButton",un(Ot.s_,"Horizontal",un(Ot.s_,"Spot",ii(!1),Xn(Ot.z6.Top,!1),Xn(Ot.z6.Left,!1),Xn(Ot.z6.Right,!1),Xn(Ot.z6.Bottom,!1)),un(Ot.s_,"Spot",{margin:new Ot.Zt(0,0,0,2)},ii(!0),Xn(Ot.z6.Top,!0),Xn(Ot.z6.Left,!0),Xn(Ot.z6.Right,!0),Xn(Ot.z6.Bottom,!0)))));const di=`{ "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 Hi=["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 $i(Xt){return console.log("shapeName:",Xt),Hi.indexOf(Xt)>=0}var Wi=new Ot.YI(an.current,{maxSelectionCount:1,linkTemplate:un(Ot.rU,{locationSpot:Ot.z6.Center,selectionAdornmentTemplate:un(Ot.uz,"Link",{locationSpot:Ot.z6.Center},un(Ot.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),un(Ot.bn,{toArrow:"Standard",stroke:null}))},{routing:Ot.rU.AvoidsNodes,curve:Ot.rU.JumpOver,corner:5,toShortLength:4},new Ot.KX("points"),un(Ot.bn,{isPanelMain:!0,strokeWidth:2}),un(Ot.bn,{toArrow:"Standard",stroke:null})),model:new Ot.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Ot.bn.getFigureGenerators().toArray().map(Xt=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Xt.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return jt.current.addDiagramListener("TextEdited",function(Xt){var Si;const Ki=Xt.subject.part;var Ti=(Si=document.activeElement)==null?void 0:Si.value;typeof Ti=="string"&&Ti.trim()===""&&jt.current.model.commit(function(cr){cr.set(Ki.data,"text","\u672A\u547D\u540D"),jt.current.commandHandler.stopCommand()},"increment")}),Wi.nodeTemplate=un(Ot.NB,"Auto",{locationSpot:Ot.z6.Center},new Ot.KX("location","location",Ot.E9.parse).makeTwoWay(Ot.E9.stringify),un(Ot.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 Ot.KX("stroke").makeTwoWay(),new Ot.KX("fill").makeTwoWay(),new Ot.KX("figure")),un(Ot.al,{margin:new Ot.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Ot.$u(16,16),maxSize:new Ot.$u(10,NaN),textAlign:"center",editable:!0},new Ot.KX("key").makeTwoWay())),setTimeout(()=>{jt.current.grid=un(Ot.s_,"Grid",un(Ot.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),un(Ot.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),jt.current.grid.visible=!0,jt.current.grid.gridCellStroke="darkgray",jt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=jt.current,jt.current}const Un=()=>ye(this,null,function*(){var un=jt.current.makeImage();const Rt=yield(0,Pe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:un.src}});Kt({src:Rt.url})});return(0,ge.useEffect)(()=>(setTimeout(()=>{Sn()},500),cn(at+1),()=>{jt.current=null}),[]),Fe.createElement("div",{ref:Bt,className:vn.current?`${De.maxH60} body-overflow-initial`:"body-overflow-initial"},Fe.createElement(rn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!at,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Fe.createElement(An.Z,null,Fe.createElement(Ee.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Fe.createElement(Ee.Z,{onClick:()=>{var un,Rt,zn=jt.current.selection.first();if(vn.current=!vn.current,document.activeElement&&zn){let ni=(Rt=(un=document.activeElement)==null?void 0:un.value)==null?void 0:Rt.trim();typeof ni=="string"&&jt.current.model.commit(function(gi){gi.set(zn.data,"text",ni||"\u672A\u547D\u540D"),jt.current.commandHandler.stopCommand()},"increment")}cn(at+1)}},Fe.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Gt},Fe.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:De.flowChartWrp},Fe.createElement("div",{style:{display:"flex",height:"100%"}},Fe.createElement("div",{style:{width:"300px",height:"100%"}},Fe.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Fe.createElement("div",{style:{height:"calc(100% - 50px)"},className:De.myPaletteDiv,ref:an})),Fe.createElement("div",{style:{flex:1,position:"relative"}},Fe.createElement("div",{ref:ft,style:{height:"80vh"}}))),Fe.createElement("div",{className:"tr"},Fe.createElement(He.ZP,{size:"large",onClick:Un,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var vt=Qe,Ye=pe(5112),Je=pe(5871);const yt=Ye.ZP.Group,St={margin:"0 8px"};var rt=({callback:Gt,onCancel:Kt})=>{function jt(ft){Gt(ft)}return ge.createElement(qe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:jt},ge.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ge.createElement("span",{style:St},"\u5355\u5143\u683C\u6570\uFF1A"),ge.createElement("span",{style:St},"\u884C\u6570"),ge.createElement(qe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ge.createElement(Je.Z,null)),ge.createElement("span",{style:St},"\u5217\u6570"),ge.createElement(qe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ge.createElement(Je.Z,null))),ge.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ge.createElement("span",{style:St},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ge.createElement(qe.default.Item,{name:"align"},ge.createElement(yt,null,ge.createElement(Ye.ZP,{value:"default"},ge.createElement("i",{className:"fa fa-align-justify"})),ge.createElement(Ye.ZP,{value:"left"},ge.createElement("i",{className:"fa fa-align-left"})),ge.createElement(Ye.ZP,{value:"center"},ge.createElement("i",{className:"fa fa-align-center"})),ge.createElement(Ye.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")))},Zt=pe(78673),dn=pe(5559),mn=pe.n(dn),Gn=(0,ge.forwardRef)(({use3d:Gt,width:Kt,height:jt,callback:ft,showSaveButton:an},vn)=>{const Bt=(0,ge.useRef)(),at=(0,ge.useRef)(),[cn,Sn]=(0,ge.useState)(!1),Un=(0,ge.useRef)({id:Bt,appName:"graphing",width:Kt||1e3,height:jt||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)(()=>{at.current=new(mn())(Un.current,!0),window.onload=function(){at.current.inject("applet_container")}},[]);const un=()=>{var Rt=window.ggbApplet.getPNGBase64(1,!0,72);return ft&&ft(Rt),Rt};return(0,ge.useEffect)(()=>{Un.current.appName=cn?"3D":"graphing",at.current.inject("applet_container")},[cn]),(0,ge.useEffect)(()=>{Sn(Gt)},[Gt]),(0,ge.useImperativeHandle)(vn,()=>({getImgData:un})),ge.createElement(ge.Fragment,null,ge.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Bt}),ge.createElement(An.Z,{align:"middle"},ge.createElement(Ee.Z,{flex:1},ge.createElement(Zt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:cn,onChange:Rt=>Sn(Rt)})),ge.createElement(Ee.Z,null,ge.createElement(He.ZP,{size:"large",onClick:un,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Kn=pe(46531),Nt=pe(8591);const sn="link",Fn="upload-image",hn="add-flowchart",Mn="draw-image",li="add-flowchart",pi="code-block",mi="add-table",Li="------------",Gi={default:Li,left:`:${Li}`,center:`:${Li}:`,right:`${Li}:`};var ar=pe(50505);function Xi(){}let wr=0;const vr=1e4,ji="\u2581",Lr="@\u2581\u2581@",jn="@\u2581@",Ne=`
**\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`,Ei=["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 Oi(Gt){return/^\d+$/.test(Gt)?`${Gt}px`:Gt}const ui=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",vi={[ui+"-B"]:"bold",[ui+"-I"]:"italic"},bi={[sn]:"\u6DFB\u52A0\u94FE\u63A5",[pi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Fn]:"\u6DFB\u52A0\u56FE\u7247",[Mn]:"\u6DFB\u52A0\u753B\u56FE",[hn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[mi]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var In=({defaultValue:Gt="",onChange:Kt,width:jt="100%",height:ft=400,miniToolbar:an=!1,isFocus:vn=!1,watch:Bt,insertTemp:at,mode:cn="markdown",id:Sn="markdown-editor-id",showResizeBar:Un=!1,noStorage:un=!1,showNullButton:Rt=!1,showNullProgramButton:zn=!1,hidetoolBar:ni=!1,fullScreen:gi=!1,onBlur:tn,onCMBeforeChange:Bn,onFullScreen:Ft,className:wn="",disablePaste:gn=!1,disabled:yn=!1,disabledFill:On=!1,placeholder:$n="",values:Yn="",extraUse:ii})=>{const[Xn,di]=(0,ge.useState)(null),[Hi,$i]=(0,ge.useState)(Gt),[Wi,Xt]=(0,ge.useState)(Bt),[Si,Ki]=(0,ge.useState)(gi),[Ti,cr]=(0,ge.useState)(""),[Qi,yr]=(0,ge.useState)(0),[fr,Vi]=(0,ge.useState)(ft),[Mr,Dn]=(0,ge.useState)(!1),[Wr,_n]=(0,ge.useState)(0),[Ir,eo]=(0,ge.useState)(0),xr=(0,ge.useRef)(),bo=(0,ge.useRef)(),Yr=(0,ge.useRef)(),ur=(0,ge.useRef)();(0,ge.useEffect)(()=>{const or=window.scrollY||window.pageYOffset;$i(Yn),Xn==null||Xn.setValue(Yn),window.scrollTo(0,or)},[Yn]),(0,ge.useEffect)(()=>{Ft==null||Ft(Si)},[Si]),(0,ge.useEffect)(()=>{if(xr.current){let or=function($r,hi){var Ao;if(gn){hi.preventDefault();return}const Vo=hi.clipboardData;if(Vo){const sa=Vo.types.toString(),ko=Vo.items;if(sa==="Files"||Vo.types.indexOf("Files")>-1){if(hi.preventDefault(),cn=="stex")return;try{let Io=ko[1];((Ao=ko[0])==null?void 0:Ao.kind)==="file"&&(Io=ko[0]);const _o=Io.getAsFile(),la=_o.name.split(".").pop();(0,$t.I)(_o,pa=>{var Lt,wi,_t;pa.id?((Lt=_o==null?void 0:_o.type)==null?void 0:Lt.indexOf("image"))>-1?mr.replaceSelection(`![,](/api/attachments/${pa.id}?type=${pa.content_type})`):((wi=_o==null?void 0:_o.type)==null?void 0:wi.indexOf("video"))>-1?mr.replaceSelection(`<video width="100%" controls src="/api/attachments/${pa.id}"></video>`):((_t=_o==null?void 0:_o.type)==null?void 0:_t.indexOf("pdf"))>-1?mr.replaceSelection(`<a href="/api/attachments/${pa.id}?type=${_o.type}&disposition=inline" target="_blank">${_o.name}</a>`):Ei.includes(la)?mr.replaceSelection(`<a href="/api/attachments/${pa.id}?type=office&disposition=inline" target="_blank">${_o.name}</a>`):mr.replaceSelection(`[${_o.name}](/api/attachments/${pa.id}?type=${pa.content_type})`):(pa==null?void 0:pa.status)===401&&(document.location.href="/user/login")})}catch(Io){Nt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const mr=Ke().fromTextArea(xr.current,{mode:cn,lineNumbers:!an,lineWrapping:!0,value:Gt,autoCloseTags:!0,autoCloseBrackets:!0});return mr.on("keyup",function($r,hi){hi.keyCode===8&&($r.getValue()==""?mr.setOption("placeholder",$n):mr.setOption("placeholder",null))}),mr.on("keydown",function($r,hi){if(hi.keyCode===8){var Ao=qi($r);Ao&&hi.preventDefault()}}),vn&&mr.focus(),mr.on("paste",or),yn&&mr.on("beforeChange",function($r,hi){(hi.origin==="paste"||hi.origin==="+input")&&hi.cancel()}),di(mr),()=>{mr.off("paste",or)}}},[]);const ir=(0,ge.useCallback)(()=>{if(bo.current)try{}catch(or){console.log(or,"---- to set md editor body height")}},[fr,bo,Si]);(0,ge.useEffect)(()=>{function or(){let mr=new st.Z($r=>{for(let hi of $r)(hi.target.offsetHeight>0||hi.target.offsetWidth>0)&&(ir(),Xn.setSize("100%","100%"),Xn.refresh())});return mr.observe(xr.current.parentElement),mr}if(Xn){const mr=or();return()=>{var $r,hi;($r=xr.current)!=null&&$r.parentElement&&mr.unobserve((hi=xr.current)==null?void 0:hi.parentElement)}}},[Xn,ir]),(0,ge.useEffect)(()=>{if(Xn){let or=[];for(const[mr,$r]of Object.entries(vi)){let hi={[mr]:()=>{Dr($r)}};or.push(hi),Xn.addKeyMap(hi)}return()=>{for(let mr of or)Xn.removeKeyMap(mr)}}},[Xn]),(0,ge.useEffect)(()=>{gi!==Si&&Ki(gi)},[gi]),(0,ar.Z)(()=>{if(!un&&Qi>0){let or=new Date().getTime(),mr=window.sessionStorage.getItem(Sn);or>=Qi+vr&&(!mr||mr!==Hi)&&(window.sessionStorage.setItem(Sn,Hi),Dn(!0))}},vr),(0,ge.useEffect)(()=>{Xt(Bt)},[Xn,Bt]),(0,ge.useEffect)(()=>{Xn&&vn&&Xn.focus()},[Xn,vn]),(0,ge.useEffect)(()=>{if(Wi&&Xn){let or=function($r){let hi=$r.target;if(ur.current){let Ao=hi.scrollTop/hi.scrollHeight;ur.current.scrollTop=ur.current.scrollHeight*Ao}};const mr=Xn.getScrollerElement();return mr.addEventListener("scroll",or),()=>{mr.removeEventListener("scroll",or)}}},[Xn,Wi]),(0,ge.useEffect)(()=>{if(Xn&&Bn){let or=function(mr,$r){Bn(mr,$r)};return Xn.on("beforeChange",or),()=>{Xn.off("beforeChange",or)}}},[Xn,Bn]),(0,ge.useEffect)(()=>{if(Xn&&tn){let or=function(){tn(Xn.getValue())};return Xn.on("blur",or),()=>{Xn.off("blur",or)}}},[Xn,tn]);function qi(or,mr){var $r=or.getDoc(),hi=$r.getCursor(),Ao=$r.getLine(hi.line),Vo=Ao.charAt(hi.ch-1),sa=Ao.lastIndexOf("@\u2581@",hi.ch),ko=Ao.lastIndexOf("@\u2581\u2581@",hi.ch),Io=sa>ko?sa:ko,_o=sa>ko?3:4;if(Lr.indexOf(Vo)===-1)return null;if(console.log("change1:",mr,or,Ao,hi,Io,sa,ko,Vo),Io>=0&&hi.ch-Io<5){var la=Io+_o;return $r.replaceRange("",{line:hi.line,ch:Io},{line:hi.line,ch:la}),{line:hi.line,ch:la}}return null}(0,ge.useEffect)(()=>{if(Xn){let or=function(mr,$r){const hi=mr.getValue();$i(hi),yr(new Date().getTime()),mr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Kt&&(zn?Kt(hi,$o(hi)):Kt(hi))};return Xn.on("change",or),()=>{Xn.off("change",or)}}},[Xn,Kt]),(0,ge.useEffect)(()=>{if(Xn)if(Gt==null)Xn.setValue(""),$i("");else{const or=window.scrollY||window.pageYOffset;Gt!==Xn.getValue()&&(Xn.setValue(Gt),$i(Gt),Xn.setCursor(yn?1:Xn.lineCount(),0),window.scrollTo(0,or))}},[Xn,Gt]);const Dr=(0,ge.useCallback)(or=>{const mr=Xn.getCursor(),$r=Xn.getSelection();let hi=$r.split(`
`);switch(or){case"bold":return Xn.replaceSelection("**"+$r+"**"),$r===""&&Xn.setCursor(mr.line,mr.ch+2),Xn.focus();case"italic":return Xn.replaceSelection("*"+$r+"*"),$r===""&&Xn.setCursor(mr.line,mr.ch+1),Xn.focus();case"code":return Xn.replaceSelection("`"+$r+"`"),$r===""&&Xn.setCursor(mr.line,mr.ch+1),Xn.focus();case"inline-latex":return cr("inline-latex"),Xn.focus();case"latex":return Xn.replaceSelection("```latex\n"+$r+"\n```"),Xn.setCursor(mr.line+1,$r.length+1),Xn.focus();case"line-break":return Xn.replaceSelection(`<br/>
`),Xn.focus();case"list-ul":return $r===""?Xn.replaceSelection("- "+$r):Xn.replaceSelection(hi.map(Ao=>Ao===""?"":`- ${Ao}`).join(`
`)),Xn.focus();case"list-ol":return $r===""?Xn.replaceSelection("1. "+$r):Xn.replaceSelection(hi.map((Ao,Vo)=>Ao===""?"":`${Vo+1}. ${Ao}`).join(`
`)),Xn.focus();case"add-null-ch":return $r===""&&Xn.setCursor(mr.line,mr.ch),Xn.replaceSelection(ji),Xn.focus();case"add-signal":return $r===""&&Xn.setCursor(mr.line,mr.ch),Xn.replaceSelection(jn),Xn.focus();case"add-multiple":return $r===""&&Xn.setCursor(mr.line,mr.ch),Xn.replaceSelection(Lr),Xn.focus();case"inster-template-1":return $r===""&&Xn.setCursor(mr.line,mr.ch),Xn.replaceSelection(Ne),Xn.focus();case"eraser":return Xn.setValue(""),Xn.focus();case"trigger-watch":return Xt(!Wi),Xn.focus();case"trigger-full-screen":return Ki(!Si),Xn.focus();case sn:cr(sn);return;case pi:cr(pi);return;case Fn:cr(Fn);return;case Mn:cr(Mn);return;case"maths-latex":cr("maths-latex");return;case hn:cr(hn);return;case mi:cr(mi);return;default:throw new Error}},[Xn,Wi,Si]),Ai=(0,ge.useCallback)((or,mr)=>{var $r,hi,Ao,Vo,sa,ko;switch(cr(""),Ti){case sn:const{title:Lt,link:wi}=or;return Xn.replaceSelection(`[${Lt}](${wi})`),Xn.focus();case pi:const{language:_t,content:Yi}=or;return Xn.replaceSelection(["```"+_t,Yi,"```"].join(`
`)),Xn.focus();case"maths-latex":for(var Io=atob(or),_o=new Uint8Array(Io.length),la=0;la<Io.length;la++)_o[la]=Io.charCodeAt(la);var pa=new Blob([_o],{type:"image/png"});(0,$t.I)(pa,kr=>{kr.id?Xn.replaceSelection(`![,](/api/attachments/${kr.id}?type=${kr.content_type})`):(kr==null?void 0:kr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Xn.replaceSelection("`$$"+or+"$$`");break;case Fn:case Mn:case li:const{src:Ci,alt:Cr}=or,Ri=mr,Ii=(Ao=(hi=($r=Ri==null?void 0:Ri.name)==null?void 0:$r.split("."))==null?void 0:hi.pop)==null?void 0:Ao.call(hi);return((Vo=Ri==null?void 0:Ri.type)==null?void 0:Vo.indexOf("image"))>-1||!(Ri!=null&&Ri.type)?Cr?Xn.replaceSelection(`![ ${Cr} ]( ${Ci} "${Cr}" )`):Xn.replaceSelection(`![,](${Ci})`):((sa=Ri==null?void 0:Ri.type)==null?void 0:sa.indexOf("video"))>-1?Xn.replaceSelection(`<video width="100%" controls src="${Ci}"></video>`):((ko=Ri==null?void 0:Ri.type)==null?void 0:ko.indexOf("pdf"))>-1?Xn.replaceSelection(`<a href="${Ci}?type=${Ri.type}&disposition=inline" target="_blank">${Ri.name}</a>`):Ei.includes(Ii)?Xn.replaceSelection(`<a href="${Ci}?type=office&disposition=inline" target="_blank">${Ri.name}</a>`):Xn.replaceSelection(`[${Ri.name}](${Ci})`),Xn.focus();case mi:const{row:er,col:tr,align:hr}=or;let Sr=`
`;for(let kr=0;kr<er;kr++){let Er=[],Br=[];for(let Zr=0;Zr<tr;Zr++)kr===1&&Br.push(Gi[hr]),Er.push(" ");kr===1&&(Sr+=`| ${Br.join(" | ")} |
`),Sr+=`| ${Er.join(tr===1?"":" | ")} |
`}return Xn.replaceSelection(Sr+`
`),Xn.focus();default:throw new Error}},[Xn,Ti]),et=(0,ge.useMemo)(()=>{switch(Ti){case sn:return ge.createElement(Ln,{callback:Ai,onCancel:jr});case pi:return ge.createElement(Nn.Z,{callback:Ai,onCancel:jr});case Fn:return ge.createElement($t.Z,{callback:Ai,onCancel:jr});case hn:return ge.createElement(vt,{callback:Ai,onCancel:jr});case mi:return ge.createElement(rt,{callback:Ai,onCancel:jr});case"maths-latex":return ge.createElement(Gn,{showSaveButton:!0,callback:Ai});case"inline-latex":return ge.createElement(Kn.Z,{showSaveButton:!0,callback:Ai});default:return null}},[Ti]);function jr(){cr("")}(0,ge.useEffect)(()=>{if(Yr.current){let or=function(sa){Ao=!0,Vo=sa.pageY},mr=function(){Ao=!1},$r=function(sa){if(Ao){let ko=sa.pageY-Vo;ko<0&&(ko=0),ko>300&&(ko=300);let Io=ft+ko+"px";Vi(Io)}},hi=Yr.current,Ao=!1,Vo=0;return hi.addEventListener("mousedown",or),document.addEventListener("mousemove",$r),document.addEventListener("mouseup",mr),()=>{hi.removeEventListener("mousedown",or),document.removeEventListener("mousemove",$r),document.removeEventListener("mouseup",mr)}}},[Xn,Yr]),(0,ge.useEffect)(()=>{Vi(ft)},[ft]);const yo=Oi(jt),Or=Oi(fr),wo={width:yo,height:Or},co=(0,ge.useMemo)(()=>{if(Qi){let or=new Date(Qi),mr=or.getHours(),$r=or.getMinutes(),hi=or.getSeconds();return mr=mr<10?"0"+mr:mr,$r=$r<10?"0"+$r:$r,hi=hi<10?"0"+hi:hi,`${mr}:${$r}:${hi}`}return 0},[Qi]),$o=or=>{const mr=[];if(zn){let $r=-1;or=or.replace(/(@▁▁@|@▁@)/g,function(hi,Ao,Vo){mr.push({multiLine:hi!==jn})})}return mr};function Gr(){window.sessionStorage.removeItem(Sn),Dn(!1),yr(0)}function zr(){Dn(!1),yr(0),Xn.setValue(window.sessionStorage.getItem(Sn))}(0,ge.useEffect)(()=>{bi[Ti]&&Ti!==Mn&&Ti!==hn&&setTimeout(()=>{const or=document.getElementsByClassName("markdown-popup-form")[0],mr=window.innerWidth/2-or.offsetWidth/2,$r=window.innerHeight/2-or.offsetHeight/2;_n(mr),eo($r)},0)},[Ti]);const Nr=or=>{or.preventDefault();const mr=or.clientX-Wr,$r=or.clientY-Ir;document.body.onmousemove=hi=>{let Ao=hi.clientX-mr,Vo=hi.clientY-$r;const sa=document.getElementsByClassName("markdown-popup-form")[0],ko=window.innerWidth-sa.offsetWidth,Io=window.innerHeight-sa.offsetHeight;Ao=Math.max(0,Math.min(Ao,ko)),Vo=Math.max(0,Math.min(Vo,Io)),Eo(hi.clientX,hi.clientY,mr,$r)&&(_n(Ao),eo(Vo))},document.body.onmouseup=function(){document.body.onmousemove=null}},Eo=(or,mr,$r,hi)=>{const Ao=document.body.clientHeight,Vo=document.body.clientWidth;return or<20&&$r>or||or>Vo-20&&$r<or||mr<20&&hi>mr||mr>Ao-20&&hi<mr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ge.createElement(ge.Fragment,null,ge.createElement("div",{className:"markdown-editor-wrapper",ref:bo},ge.createElement("div",{className:`markdown-editor-container ${wn} ${Wi?"on-preview":""} ${an?"mini":""} ${Si?"full-screen":""}`,style:wo},ge.createElement(Ze,{insertTemp:at,watch:Wi,fullScreen:Si,showNullButton:Rt,showNullProgramButton:zn,onActionCallback:Dr,hidetoolBar:ni,extraUse:ii}),ge.createElement("div",{className:"markdown-editor-body"},ge.createElement("div",{className:"codemirror-container"},ge.createElement("textarea",{ref:xr,placeholder:$n})),Wi?ge.createElement("div",{ref:ur,className:"preview-container"},cn==="stex"&&ge.createElement(ct,{value:Hi}),cn!=="stex"&&ge.createElement(Et.Z,{disabledFill:On,showProgramFill:zn,value:Hi})):null))),Un?ge.createElement("a",{ref:Yr,className:"editor-resize"}):null,Ti===Mn&&ge.createElement(Qn,{callback:Ai,onCancel:jr}),Ti===hn&&ge.createElement(vt,{callback:Ai,onCancel:jr}),ge.createElement(ot.Z,null,bi[Ti]&&Ti!==Mn&&Ti!==hn?ge.createElement(rn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Wr,top:Ir},title:ge.createElement("div",{style:{cursor:"move"},onMouseDown:Nr},bi[Ti]),open:!0,onCancel:jr,footer:null,destroyOnClose:!0,width:Ti===hn?"1200px":null,height:Ti===hn?"80vh":null,className:"markdown-popup-form"},et):null))}},56030:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ve},I:function(){return ke}});var ge=pe(78241),Oe=pe(8591),Ke=pe(92832),st=pe(3113),Ge=pe(49291),_e=pe(59301),Le=pe(59301),Tt=Object.defineProperty,Pt=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,Be=(Ae,ze,Ze)=>ze in Ae?Tt(Ae,ze,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Ae[ze]=Ze,ne=(Ae,ze)=>{for(var Ze in ze||(ze={}))ct.call(ze,Ze)&&Be(Ae,Ze,ze[Ze]);if(Et)for(var Ze of Et(ze))It.call(ze,Ze)&&Be(Ae,Ze,ze[Ze]);return Ae},ee=(Ae,ze)=>Pt(Ae,Xe(ze));const{useForm:ce}=ge.default,se={width:280,marginRight:10},he={labelCol:{span:5},wrapperCol:{span:19}};var ve=({callback:Ae,onCancel:ze})=>{const[Ze]=ce();let ot=(0,_e.useRef)();function qe(wt){Ae(wt,ot.current)}function bt(wt,nt){if(wt.status===-1){Oe.ZP.error(wt.message);return}Ze.setFieldsValue({src:`/api/attachments/${wt.id}`,type:nt.type})}function He(wt){let nt=wt.target.files[0];ot.current=nt,ke(nt,bt)}return Le.createElement(ge.default,ee(ne({form:Ze},he),{className:"upload-image-panel",onFinish:qe,style:{width:470,overflow:"hidden"}}),Le.createElement(ge.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Le.createElement("div",{className:"flex-container"},Le.createElement(ge.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Le.createElement(Ke.default,{style:se})),Le.createElement(be,{onFileChange:He}))),Le.createElement(ge.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Le.createElement(Ke.default,{style:{width:264}})),Le.createElement(ge.default.Item,{style:{textAlign:"right"}},Le.createElement(st.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(st.ZP,{type:"default",onClick:ze},"\u53D6\u6D88")))};function be({onFileChange:Ae}){return Le.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Le.createElement("input",{type:"file",onChange:Ae}))}function ke(Ae,ze){if(!Ae)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ze=new FormData;Ze.append("editormd-image-file",Ae),Ze.append("file_param_name","editormd-image-file"),Ze.append("byxhr","true");var ot=new window.XMLHttpRequest;ot.withCredentials=!0,ot.addEventListener("load",function(qe){ze(JSON.parse(qe.target.responseText),Ae)},!1),ot.addEventListener("error",function(qe){console.error(qe)},!1),ot.open("POST",`${Ge.KI}/api/attachments.json`),ot.send(Ze)}},19647:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Ke}});var ge=pe(59301),Oe=pe(4676);class Ke extends ge.Component{constructor(Ge){super(Ge);const _e=window.document;this.node=_e.createElement("div"),_e.body.appendChild(this.node)}render(){const{children:Ge}=this.props;return(0,Oe.createPortal)(Ge,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},57800:function(Vn,Pn,pe){"use strict";pe.d(Pn,{SV:function(){return Qe},ZP:function(){return ye}});var ge=pe(59301),Oe=pe(76374);const Ke={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"]},st={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"]},Ge={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(`
`)}]},_e={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(`
`)}]},Le={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 Tt=pe(7947),Pt=pe.n(Tt),Xe=Object.defineProperty,Et=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,ee=(vt,Ye,Je)=>Ye in vt?Xe(vt,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Je}):vt[Ye]=Je,ce=(vt,Ye)=>{for(var Je in Ye||(Ye={}))Be.call(Ye,Je)&&ee(vt,Je,Ye[Je]);if(It)for(var Je of It(Ye))ne.call(Ye,Je)&&ee(vt,Je,Ye[Je]);return vt},se=(vt,Ye)=>Et(vt,ct(Ye)),he=(vt,Ye,Je)=>new Promise((yt,St)=>{var rt=mn=>{try{dn(Je.next(mn))}catch(qt){St(qt)}},Zt=mn=>{try{dn(Je.throw(mn))}catch(qt){St(qt)}},dn=mn=>mn.done?yt(mn.value):Promise.resolve(mn.value).then(rt,Zt);dn((Je=Je.apply(vt,Ye)).next())});const ve={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=(vt,Ye)=>Ye.map(Je=>({label:Je,kind:vt.languages.CompletionItemKind.Keyword,insertText:Je})),ke=vt=>Object.keys(ve.tables).map(Ye=>({label:Ye,kind:vt.languages.CompletionItemKind.Variable,insertText:Ye})),Ae=(vt,Ye)=>{const Je=ve.tables[vt];return Je?Je.map(yt=>({label:yt,kind:Ye.languages.CompletionItemKind.Field,insertText:yt})):[]};function ze(vt,Ye,Je,yt,St){let rt=Ye.getWordUntilPosition(Je),Zt={startLineNumber:Je.lineNumber,endLineNumber:Je.lineNumber,startColumn:rt.startColumn,endColumn:rt.endColumn},dn=yt.map(mn=>({label:mn,kind:vt.languages.CompletionItemKind.Keyword,insertText:mn,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Zt}));return St.map(mn=>{dn.push(se(ce({},mn),{range:Zt}))}),dn}var Ze=vt=>{ve.languages.map(St=>(vt.languages.registerDocumentFormattingEditProvider(St,{provideDocumentFormattingEdits(rt,Zt,dn){return he(this,null,function*(){const mn=Pt()(rt.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:rt.getFullModelRange(),text:mn}]})}}),St));const Ye=Ge.quickKey.map(St=>({label:St.label,kind:vt.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Je=_e.quickKey.map(St=>({label:St.label,kind:vt.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),yt=st.quickKey.map(St=>({label:St.label,kind:vt.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));vt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(St,rt){var Zt=St.getWordUntilPosition(rt),dn={startLineNumber:rt.lineNumber,endLineNumber:rt.lineNumber,startColumn:Zt.startColumn,endColumn:Zt.endColumn},mn=St.getLineContent(rt.lineNumber).substring(Zt.startColumn-2,Zt.endColumn);return{suggestions:[...Ge.keywords.map(qt=>({label:qt,kind:vt.languages.CompletionItemKind.Function,documentation:qt,insertText:qt,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dn})),...Ge.quickKey.map(qt=>({label:qt.label,kind:vt.languages.CompletionItemKind.Function,documentation:qt.content,insertText:mn.startsWith("#")?qt.content.replace(/#/,""):qt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dn}))]}}}),vt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(St,rt){var Zt=St.getWordUntilPosition(rt),dn={startLineNumber:rt.lineNumber,endLineNumber:rt.lineNumber,startColumn:Zt.startColumn,endColumn:Zt.endColumn};return{suggestions:[...Ke.keywords.map(mn=>({label:mn,kind:vt.languages.CompletionItemKind.Function,documentation:mn,insertText:mn,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dn}))]}}}),vt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(St,rt){var Zt=St.getWordUntilPosition(rt),dn={startLineNumber:rt.lineNumber,endLineNumber:rt.lineNumber,startColumn:Zt.startColumn,endColumn:Zt.endColumn},mn=St.getLineContent(rt.lineNumber).substring(Zt.startColumn-2,Zt.endColumn);return{suggestions:[...st.keywords.map(qt=>({label:qt,kind:vt.languages.CompletionItemKind.Function,documentation:qt,insertText:qt,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dn})),...st.quickKey.map(qt=>({label:qt.label,kind:vt.languages.CompletionItemKind.Function,documentation:qt.content,insertText:mn.startsWith("#")?qt.content.replace(/#/,""):qt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dn}))]}}}),vt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(St,rt){var Zt=St.getWordUntilPosition(rt),dn={startLineNumber:rt.lineNumber,endLineNumber:rt.lineNumber,startColumn:Zt.startColumn,endColumn:Zt.endColumn},mn=St.getLineContent(rt.lineNumber).substring(Zt.startColumn-2,Zt.endColumn);return{suggestions:[...Le.keywords.map(qt=>({label:qt,kind:vt.languages.CompletionItemKind.Function,documentation:qt,insertText:qt,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dn})),...Le.quickKey.map(qt=>({label:qt.label,kind:vt.languages.CompletionItemKind.Function,documentation:qt.content,insertText:mn.startsWith("#")?qt.content.replace(/#/,""):qt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dn}))]}}}),vt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(St,rt){var Zt=St.getWordUntilPosition(rt),dn={startLineNumber:rt.lineNumber,endLineNumber:rt.lineNumber,startColumn:Zt.startColumn,endColumn:Zt.endColumn},mn=St.getLineContent(rt.lineNumber).substring(Zt.startColumn-2,Zt.endColumn);return{suggestions:[..._e.keywords.map(qt=>({label:qt,kind:vt.languages.CompletionItemKind.Function,documentation:qt,insertText:qt,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dn})),..._e.quickKey.map(qt=>({label:qt.label,kind:vt.languages.CompletionItemKind.Function,documentation:qt.content,insertText:mn.startsWith("#")?qt.content.replace(/#/,""):qt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dn}))]}}})};const ot="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var qe=Object.defineProperty,bt=(vt,Ye,Je)=>Ye in vt?qe(vt,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Je}):vt[Ye]=Je,He=(vt,Ye,Je)=>bt(vt,typeof Ye!="symbol"?Ye+"":Ye,Je);const wt=class mx{constructor(Ye,Je,yt){this.placeholder=Ye,this.editor=Je,this.monaco=yt,Je.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return 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(wt,"ID","editor.widget.placeholderHint");var Dt=wt,ht=pe(96236),zt=pe(8591),Yt=pe(6848),Ut=pe(89392),it=pe(50484),Ve=pe(56102),Wt=Object.defineProperty,Ln=Object.defineProperties,Nn=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,ti=(vt,Ye,Je)=>Ye in vt?Wt(vt,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Je}):vt[Ye]=Je,xn=(vt,Ye)=>{for(var Je in Ye||(Ye={}))rn.call(Ye,Je)&&ti(vt,Je,Ye[Je]);if($t)for(var Je of $t(Ye))An.call(Ye,Je)&&ti(vt,Je,Ye[Je]);return vt},Qn=(vt,Ye)=>Ln(vt,Nn(Ye)),Ot=(vt,Ye)=>{var Je={};for(var yt in vt)rn.call(vt,yt)&&Ye.indexOf(yt)<0&&(Je[yt]=vt[yt]);if(vt!=null&&$t)for(var yt of $t(vt))Ye.indexOf(yt)<0&&An.call(vt,yt)&&(Je[yt]=vt[yt]);return Je},Cn=(vt,Ye,Je)=>new Promise((yt,St)=>{var rt=mn=>{try{dn(Je.next(mn))}catch(qt){St(qt)}},Zt=mn=>{try{dn(Je.throw(mn))}catch(qt){St(qt)}},dn=mn=>mn.done?yt(mn.value):Promise.resolve(mn.value).then(rt,Zt);dn((Je=Je.apply(vt,Ye)).next())});function Wn(vt){return/^\d+$/.test(vt)?`${vt}px`:vt}function We(){}let Ee=!1;const Pe={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function De(vt=[]){let Ye=vt;if(Array.isArray(vt)){for(let Je=0;Je<vt.length;Je++){let yt=Pe[vt[Je]];if(yt)return yt}return Ye[0]}return Pe[Ye]||Ye}let Fe=null;var ye=vt=>{var Ye=vt,{width:Je="100%",height:yt="100%",value:St,language:rt="javascript",style:Zt={},options:dn={},overrideServices:mn={},theme:qt="vs-dark",onEditBlur:Gn,isCopy:Kn=!1,onSave:Nt,autoHeight:sn=!1,forbidCopy:Fn=!1,onChange:hn=We,editorDidMount:Mn=We,onFocus:li=We,onBreakPoint:pi=We,breakPointValue:mi=[],filename:Li="educoder.txt",errorLine:Gi,errorContent:ar="",highlightLine:Xi,openBreakPoint:wr=!1,placeholder:vr=""}=Ye,ji=Ot(Ye,["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 Lr=(0,ge.useRef)(),jn=(0,ge.useRef)({}),Ne=(0,ge.useRef)(),Ei=(0,ge.useRef)(),Oi=(0,ge.useRef)([]),on=(0,ge.useRef)(!1),ui=(0,ge.useRef)(),vi=(0,ge.useRef)(),bi=(0,ge.useRef)(!1),[In,Gt]=(0,ge.useState)(!1);function Kt(){let tn;return Lr.current&&(tn=new Oe.Z(Bn=>{for(let Ft of Bn)(Ft.target.offsetHeight>0||Ft.target.offsetWidth>0)&&jn.current.instance.layout()}),tn.observe(Lr.current)),tn}function jt(){zt.ZP.warning({content:decodeURIComponent(ot),key:"monaco-editor-tip"})}const ft=()=>{let tn=jn.current.instance;if(St!=null&&tn&&In){const Bn=tn.getModel();Bn&&St!==Bn.getValue()&&(Ee=!0,Bn.setValue(St),tn.layout(),Ee=!1)}};(0,ge.useEffect)(()=>{const tn=it.Z.subscribe("formatDocument",Bn=>{var Ft;let wn=jn.current.instance;(Ft=wn==null?void 0:wn.getAction)==null||Ft.call(wn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Bn=>{hn(Bn)},tn},[]),(0,ge.useEffect)(()=>{var tn;let Bn=jn.current.instance;Ei.current&&clearTimeout(Ei.current),Ei.current=setTimeout(()=>{ft()},500),St&&(St!=null&&St.length)&&((tn=Bn==null?void 0:Bn.updateOptions)==null||tn.call(Bn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(St.split(/\r\n|\r|\n/g).length))+3,5)}))},[St,In,jn.current]),(0,ge.useEffect)(()=>{if(Gi&&jn.current&&jn.current.instance){let Bn=jn.current.instance;Bn.changeViewZones(function(Ft){var wn=document.createElement("div");wn.style.padding="10px 20px",wn.style.width="calc(100% - 20px)",wn.className="my-error-line-wrp",wn.innerHTML=ar,Ft.addZone({afterLineNumber:Gi||11,heightInLines:3,domNode:wn})});var tn={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(tn),Bn.revealPositionInCenter({lineNumber:20,column:1})}},[Gi,jn.current,In]);const an=(tn="",Bn)=>{if(!tn||tn.trim()==="")return!0;const wn=jn.current.instance.getModel().getLineTokens(Bn);let gn=!1;for(let yn=0;yn<2;yn++)wn.getStandardTokenType(yn)===1&&(gn=!0);return gn};(0,ge.useEffect)(()=>{var tn;const Bn=(tn=jn.current)==null?void 0:tn.instance;if(Bn&&In&&Fn){const Ft=Bn.onDidBlurEditorWidget(()=>{bi.current=!1}),wn=Bn.onDidFocusEditorText(()=>{bi.current=!0});return()=>{Ft.dispose(),wn.dispose()}}},[jn.current,In,Fn]),(0,ge.useEffect)(()=>{var tn;if((tn=jn.current)!=null&&tn.instance&&In&&wr){let Bn=jn.current.instance,Ft=Bn.getModel();if(!Ft)return;(()=>{var Wi;let Xt=[],Si=[];const Ki=Ft.getAllDecorations();for(let cr of Ki)cr.options.className==="highlighted-line"&&(Xt.push((Wi=cr==null?void 0:cr.range)==null?void 0:Wi.startLineNumber),Si.push(cr==null?void 0:cr.id));if(Xi===Xt[0])return;Ft.deltaDecorations(Si,[]);const Ti=Ft.getLineCount();Xi&&Xi<=Ti&&(Bn.deltaDecorations([],[{range:new Fe.Range(Xi,1,Xi,Ft.getLineMaxColumn(Xi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Bn.revealLineInCenter(Xi))})();const gn=(Wi=!1)=>{var Xt;let Si=[],Ki=[];const Ti=Ft.getAllDecorations();for(let cr of Ti)cr.options.linesDecorationsClassName==="breakpoints-select"&&(Si.push((Xt=cr==null?void 0:cr.range)==null?void 0:Xt.startLineNumber),Ki.push(cr==null?void 0:cr.id));if(Wi)return{lines:Si,ids:Ki};pi(Si)},yn=Wi=>Cn(void 0,null,function*(){let Xt={range:new Fe.Range(Wi,1,Wi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ft.deltaDecorations([],[Xt]),gn()}),On=Wi=>Cn(void 0,null,function*(){let Xt=[];const Si=Bn.getLineDecorations(Wi);for(let Ki of Si)Ki.options.linesDecorationsClassName==="breakpoints-select"&&Xt.push(Ki.id);yield Ft.deltaDecorations(Xt,[]),gn()}),$n=Wi=>{let Xt=Bn.getLineDecorations(Wi);for(let Si of Xt)if(Si.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ut.isEqual)(mi,gn(!0).lines)){Ft.deltaDecorations(gn(!0).ids,[]);const Wi=mi.map(Xt=>({range:new Fe.Range(Xt,1,Xt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ft.deltaDecorations([],Wi)}const Yn=Bn.onDidChangeModelContent(Wi=>{let Xt=Bn.getPosition();if(Xt){let Si=Xt.lineNumber;clearTimeout(vi.current),vi.current=setTimeout(()=>{an(Ft.getLineContent(Si),Si)?On(Si):$n(Si)?(On(Si),yn(Si)):gn()},100)}}),ii=Bn.onMouseDown(Wi=>{var Xt,Si,Ki;if(Wi.target.detail&&((Ki=(Si=(Xt=Wi.target)==null?void 0:Xt.element)==null?void 0:Si.className)!=null&&Ki.includes("line-numbers"))){let Ti=Wi.target.position.lineNumber;if(an(Ft.getLineContent(Ti),Ti))return;$n(Ti)?On(Ti):yn(Ti)}}),Xn=Wi=>{let Xt={range:new Fe.Range(Wi,1,Wi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Oi.current=Bn.deltaDecorations(Oi.current,[Xt])},di=()=>{Oi.current=Bn.deltaDecorations(Oi.current,[])},Hi=Bn.onMouseMove(Wi=>{var Xt,Si,Ki;if(di(),Wi.target.detail&&((Ki=(Si=(Xt=Wi.target)==null?void 0:Xt.element)==null?void 0:Si.className)!=null&&Ki.includes("line-numbers"))){let Ti=Wi.target.position.lineNumber;if(an(Ft.getLineContent(Ti),Ti))return;Xn(Ti)}}),$i=Bn.onMouseLeave(()=>{di()});return()=>{Yn.dispose(),ii.dispose(),Hi.dispose(),$i.dispose()}}},[jn.current,In,mi,Xi,wr,rt]),(0,ge.useEffect)(()=>{var tn;(tn=jn.current)!=null&&tn.instance&&wr&&jn.current.instance.setPosition({lineNumber:0,column:0})},[Xi]);function vn(){let tn=jn.current.instance;if(tn){const Bn=tn.getSelection(),Ft=jn.current.pastePos||{},wn=new Fe.Range(Ft.startLineNumber||Bn.endLineNumber,Ft.startColumn||Bn.endColumn,Ft.endLineNumber||Bn.endLineNumber,Ft.endColumn||Bn.endColumn);setTimeout(()=>{tn.executeEdits("",[{range:wn,text:""}])},300)}}function Bt(tn){(window.navigator.platform.match("Mac")?tn.metaKey:tn.ctrlKey)&&tn.keyCode==83&&(tn.preventDefault(),Nt())}const at=()=>{if(sn&&jn.current.instance){const tn=jn.current.instance.getContentHeight();ni(tn<yt?yt:tn)}else ni(yt)};function cn(tn){var Bn=document.createEvent("MouseEvents");Bn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),tn.dispatchEvent(Bn)}const Sn=tn=>{if(!bi.current)return;const{keyCode:Bn,ctrlKey:Ft,metaKey:wn,target:gn,type:yn}=tn;return(yn==="paste"||(Bn===67||Bn===86)&&(wn||Ft))&&gn.nodeName==="TEXTAREA"&&(jt(),tn.preventDefault()),!1};function Un(tn,Bn){var Ft=window.URL||window.webkitURL||window,wn=new Blob([Bn]),gn=document.createElementNS("http://www.w3.org/1999/xhtml","a");gn.href=Ft.createObjectURL(wn),gn.download=tn,cn(gn)}(0,ge.useEffect)(()=>{at()},[at]),(0,ge.useEffect)(()=>{Lr.current&&!In&&Promise.all([pe.e(8909),pe.e(6894)]).then(pe.bind(pe,71448)).then(tn=>{try{Fe=tn,jn.current.instance=Fe.editor.create(Lr.current,{value:St,language:De(rt),theme:qt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},mn);const Bn=jn.current.instance;let gn=[...ht.BH._menuItems].find(Yn=>Yn[0]._debugName=="EditorContext")[1],yn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],On=(Yn,ii)=>{var Xn,di;let Hi=Yn._first;do ii.includes((di=(Xn=Hi.element)==null?void 0:Xn.command)==null?void 0:di.id)&&Yn._remove(Hi);while(Hi=Hi.next)};if(Mn(Bn,Fe),setTimeout(()=>{at(),jn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Un(Li||"educoder.txt",Bn.getValue())}})},500),jn.current.subscription=Bn.onDidChangeModelContent(Yn=>{on.current?clearTimeout(ui.current):(at(),hn(Bn.getValue(),Yn)),ui.current=setTimeout(()=>{on.current=!1},500)}),window.Monaco||Ze(Fe,De(rt)),Fn&&(On(gn,yn),Lr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Sn),window.removeEventListener("paste",Sn),window.addEventListener("keydown",Sn),window.addEventListener("paste",Sn)),window.Monaco=Fe,Gn&&Bn.onDidBlurEditorWidget(()=>{Gn(Bn.getValue())}),li&&Bn.onDidFocusEditorText(()=>{li(Bn.getValue())}),Fn)try{Bn.onDidPaste(Yn=>{const ii=Bn.getSelection(),Xn=jn.current.pastePos||{},di=new Fe.Range(Xn.startLineNumber||ii.endLineNumber,Xn.startColumn||ii.endColumn,Xn.endLineNumber||ii.endLineNumber,Xn.endColumn||ii.endColumn);Bn.executeEdits("",[{range:Yn.range,text:""}])})}catch(Yn){}let $n=Kt();return vr&&typeof vr=="string"&&new Dt(vr,Bn,Fe),Gt(!0),()=>{const Yn=jn.current.instance;Yn.dispose();const ii=Yn.getModel();ii&&ii.dispose(),jn.current.subscription&&jn.current.subscription.dispose(),$n.unobserve(Lr.current)}}catch(Bn){}})},[]),(0,ge.useEffect)(()=>{if(jn.current.instance&&In)return document.addEventListener("keydown",Bt,!1),()=>{document.removeEventListener("keydown",Bt)}},[Nt,In]),(0,ge.useEffect)(()=>{let tn=jn.current.instance;if(tn&&In){let Bn=De(rt);Fe.editor.setModelLanguage(tn.getModel(),Bn)}},[rt,In]),(0,ge.useEffect)(()=>{jn.current.instance&&In&&Fe.editor.setTheme(qt)},[qt,In]),(0,ge.useEffect)(()=>{let tn=jn.current.instance;Ne.current=dn,tn&&In&&(tn.updateOptions(xn({},dn)),setTimeout(()=>{tn.getModel().updateOptions(xn({},dn))},200))},[JSON.stringify(dn),In]),(0,ge.useEffect)(()=>{let tn=jn.current.instance;tn&&In&&tn.layout()},[Je,yt,In]);const[un,Rt]=(0,ge.useState)(Wn(Je)),[zn,ni]=(0,ge.useState)(Wn(yt)),gi=Qn(xn({},Zt),{width:un,height:zn,position:"relative"});return ge.createElement("div",{className:"my-monaco-editor",ref:Lr,style:gi},Kn&&ge.createElement(Ve.CopyToClipboard,{text:St,onCopy:()=>zt.ZP.success("\u590D\u5236\u6210\u529F")},ge.createElement(Yt.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 Qe({width:vt="100%",height:Ye="100%",original:Je,modified:yt,language:St,options:rt={}}){const Zt=(0,ge.useRef)(),[dn,mn]=(0,ge.useState)(null);function qt(sn){let Fn;return Zt.current&&(Fn=new Oe.Z(hn=>{for(let Mn of hn)(Mn.target.offsetHeight>0||Mn.target.offsetWidth>0)&&sn.layout()}),Fn.observe(Zt.current)),Fn}(0,ge.useEffect)(()=>(Zt.current&&Promise.all([pe.e(8909),pe.e(9404)]).then(pe.bind(pe,2550)).then(sn=>{Fe=sn;const Fn=Fe.editor.createDiffEditor(Zt.current,Qn(xn({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},rt),{wordWrap:!0}));mn(Fn);let hn=qt(Fn);return()=>{Fn.dispose();const Mn=Fn.getModel();Mn&&Mn.dispose(),hn.unobserve(Zt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ge.useEffect)(()=>{dn&&dn.setModel({original:Fe.editor.createModel(Je,St),modified:Fe.editor.createModel(yt,St)})},[Je,yt,St,dn]);const Gn=Wn(vt),Kn=Wn(Ye),Nt={width:Gn,height:Kn};return ge.createElement("div",{className:"my-diff-editor",ref:Zt,style:Nt})}},15965:function(Vn,Pn,pe){"use strict";pe.d(Pn,{jL:function(){return Ge},w9:function(){return rn},QD:function(){return hn},cQ:function(){return Ve},op:function(){return qt},O5:function(){return bi},_b:function(){return Gi},t7:function(){return se},Gi:function(){return Cn},YG:function(){return Qn},qp:function(){return Et},vr:function(){return pi},qE:function(){return Nt},Je:function(){return be},wb:function(){return ht},cq:function(){return Fe},tp:function(){return Be}});var ge=pe(59301),Oe={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"},Ke="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==",Ge=({dataSource:In=[],img:Gt,imgWidth:Kt=346,title:jt,sunTitle:ft,bannerExtraContent:an})=>ge.createElement("div",{className:Oe.banner},ge.createElement("div",{className:Oe.content},ge.createElement("aside",null,ge.createElement("p",null,ge.createElement("b",null,jt),ge.createElement("span",null,ft)),In.length>0&&ge.createElement("div",{className:Oe.btns},In.map((vn,Bt)=>ge.createElement("div",{key:Bt,onClick:vn.click},vn.name,vn.sign?ge.createElement("img",{src:Ke,width:39}):null))),an),Gt&&ge.createElement("img",{style:{marginTop:33,marginRight:38},src:Gt,width:Kt}))),_e={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"},Le=pe(92310),Tt=pe.n(Le),Pt=pe(89392),Et=({dataSource:In=[],value:Gt,onChange:Kt,onTitleChange:jt,className:ft,title:an,titleWidth:vn=41,style:Bt={},fontColor:at="#6A7283",showCount:cn})=>{const[Sn,Un]=(0,ge.useState)(0),[un,Rt]=(0,ge.useState)(!1),zn=(0,ge.useRef)(null),ni=(0,ge.useRef)(null);return(0,ge.useEffect)(()=>{var gi;In.length!==0&&(((gi=zn==null?void 0:zn.current)==null?void 0:gi.clientHeight)>97?Un(1):Un(0)),In.length===0&&Un(0),Rt(!1)},[In]),ge.createElement("div",{className:Tt()(_e.row,ft),style:Bt},ge.createElement("div",{onClick:(0,Pt.throttle)(()=>jt==null?void 0:jt(),2e3),style:{width:vn,marginTop:un?12:4},className:`${_e.title} ${jt?"current":""}`},an),ge.createElement("div",{className:un?`${_e.tagsWrap} ${_e.tagsBorderWrap}`:_e.tagsWrap},ge.createElement("div",{className:_e.bar,ref:ni,style:Sn>0?{height:Sn===1?97:"auto",overflow:Sn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ge.createElement("div",{className:_e.tag,ref:zn},In==null?void 0:In.map(gi=>ge.createElement("span",{onClick:()=>Kt(gi.id),key:gi.id,style:{color:at},className:Gt===gi.id?_e.active:""},ge.createElement("span",{title:gi.name,className:_e.name},gi.name),!!cn&&ge.createElement("span",{className:_e.num},gi.count))))),!!Sn&&ge.createElement(ge.Fragment,null,Sn===1?ge.createElement("div",{onClick:()=>{var gi;Un(2),((gi=zn==null?void 0:zn.current)==null?void 0:gi.clientHeight)>245?Rt(!0):Rt(!1)},className:_e.action},"\u5C55\u5F00",ge.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ge.createElement("div",{onClick:()=>{ni.current.scrollTop=0,Un(1),Rt(!1)},className:_e.action},"\u6536\u8D77",ge.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},ct={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"},Be=({dataSource:In=[],value:Gt,onChange:Kt,className:jt,style:ft={}})=>ge.createElement("div",{style:ft,className:Tt()(ct.tabs,jt)},In.map(an=>ge.createElement("span",{onClick:()=>Kt(an.id),className:Gt===an.id?ct.active:"",key:an.id},an.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:In=[],value:Gt="",onChange:Kt,onInputChange:jt=()=>{},className:ft,style:an={},placeholder:vn,allowClear:Bt=!1})=>{var at;const[cn,Sn]=(0,ge.useState)(""),[Un,un]=(0,ge.useState)("");(0,ge.useEffect)(()=>{var ni;let gi=Gt;(ni=JSON.stringify(Gt))!=null&&ni.includes("{")&&(Sn(Gt.id),gi=Gt.value||"");try{un(decodeURIComponent(gi||""))}catch(tn){un(decodeURIComponent(gi||""))}},[Gt]);const Rt=()=>{Kt(encodeURIComponent(Un),cn||null)},zn=ni=>{ni!==cn&&(Sn(ni),Kt(encodeURIComponent(Un),ni))};return ge.createElement("div",{className:Tt()(ne.input,ft),style:an},!!In.length&&ge.createElement("div",{className:ne.dropdown},ge.createElement("div",{className:ne.text},(at=In.find(ni=>ni.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},In.map((ni,gi)=>ge.createElement("div",{key:gi,onClick:()=>zn(ni.id)},ni.name)))),ge.createElement(ee.default,{onPressEnter:Rt,value:Un,onChange:ni=>{un(ni.target.value),jt(encodeURIComponent(ni.target.value),cn||null)},bordered:!1,placeholder:vn}),ge.createElement("i",{onClick:Rt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},he={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:In,onChange:Gt,className:Kt,total:jt,pageSize:ft,style:an={}})=>{const vn=In<2,Bt=In>=Math.ceil(jt/ft);return jt<=ft?ge.createElement(ge.Fragment,null):ge.createElement("div",{className:Tt()(he.quickPager,Kt),style:an},ge.createElement("div",{onClick:()=>{vn||Gt(In-1,"prev")},className:vn?he.disabled:""},"\u4E0A\u4E00\u9875"),ge.createElement("div",{onClick:()=>{Bt||Gt(In+1,"next")},className:Bt?he.disabled:""},"\u4E0B\u4E00\u9875"))},ke={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"},Ae=pe(71418),ze=pe(6848),Ze=pe(13570),ot=pe(38446),qe=pe(88230),bt=pe(96908),He=pe(57177),wt=pe(81378),nt=pe(57816),ht=({className:In,dataSource:Gt=[],col:Kt=4,right:jt,bottom:ft=23,precision:an=0,wrapWidth:vn=1200,trackEventItems:Bt,loading:at})=>{const cn=Math.floor((vn-(Kt-1)*jt)/Kt);return ge.createElement(Ae.Z,{spinning:at},ge.createElement("div",{className:Tt()(ke.list,In)},!!Gt.length&&Gt.map((Sn,Un)=>{const{name:un,id:Rt,identifier:zn,power:ni,cover_image_id:gi,pic:tn}=Sn;return ge.createElement("div",{className:ke.wrap,key:Rt,style:{width:cn,marginRight:(1+Un)%Kt===0?0:jt+an,marginBottom:ft}},ge.createElement("a",{target:"_blank",href:`/shixuns/${zn}/challenges`,className:ke.li,onClick:Bn=>{Bn.preventDefault(),Bt&&(0,qe.L9)([Bt]),ni&&(0,qe.xg)(`/shixuns/${zn}/challenges`)}},ge.createElement("div",{className:ke.img},ge.createElement("img",{className:ke.cover,src:`${tn}`}),Sn.is_jupyter&&ge.createElement("img",{className:ke.sign,src:bt}),Sn.is_jupyter_lab&&ge.createElement("img",{className:ke.sign,src:He}),Sn.is_unity_3d&&ge.createElement("img",{className:ke.sign,src:wt})),ge.createElement("div",{className:ke.name},ge.createElement(ze.Z,{title:un||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ge.createElement("span",{className:ke.e},un||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ge.createElement("div",{className:ke.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,Sn.challenges_count))),!!Sn.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,Sn.myshixuns_count))),ge.createElement(ze.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ge.createElement("span",null,ge.createElement("span",null,Sn.level))),ge.createElement("div",{className:ke.rate},ge.createElement(Ze.Z,{allowHalf:!0,disabled:!0,defaultValue:Sn.score_info}),ge.createElement("span",null,"\xA0",Sn.score_info?`${Sn.score_info}\u5206`:"5\u5206")))),!ni&&ge.createElement("div",{className:ke.lockWrap},ge.createElement("img",{src:`${ot.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")))}),!Gt.length&&ge.createElement(nt.Z,null)))},zt={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"},Yt=pe(73898),Ut=pe(59301),Ve=({className:In,dataSource:Gt=[],col:Kt=4,right:jt,bottom:ft=23,precision:an=0,wrapWidth:vn=1200,trackEventItems:Bt,loading:at,onRemove:cn=()=>{},isCurrent:Sn=!0,showAlias:Un=!1})=>{const un=Math.floor((vn-(Kt-1)*jt)/Kt),Rt=[{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(Ae.Z,{spinning:at},Ut.createElement("div",{className:Tt()(zt.list,In)},!!(Gt!=null&&Gt.length)&&(Gt==null?void 0:Gt.map((zn,ni)=>{var gi;const{name:tn,id:Bn,identifier:Ft,featured:wn,school_name:gn,image_url:yn,excellent:On,is_plan:$n}=zn;return Ut.createElement("div",{key:Bn,className:zt.wrap,style:{width:un,marginRight:(1+ni)%Kt===0?0:jt+an,marginBottom:ft}},Ut.createElement("a",{className:zt.li,onClick:Yn=>{Yn.preventDefault(),Yn.stopPropagation(),Bt&&(0,qe.L9)([Bt]),(0,qe.xg)(`/paths/${Ft}`)}},Ut.createElement("div",{className:zt.img},Ut.createElement("img",{className:zt.cover,src:`${yn}`}),Sn&&(0,Yt.bg)()&&(zn==null?void 0:zn.studying)&&Ut.createElement("div",{className:`${zt.movebq} user-path-items`,onClick:Yn=>{Yn.stopPropagation(),cn(zn)}},Ut.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Ut.createElement("span",{className:"c-red"},"\u79FB\u9664")),(gi=zn==null?void 0:zn.subject_tags)==null?void 0:gi.map((Yn,ii)=>{var Xn,di;if(ii===0){const $i=(Xn=Rt.find(Wi=>Wi.name==Yn))==null?void 0:Xn.swimg;return Ut.createElement("img",{className:zt.sign,src:$i,style:{left:"-4px"}})}const Hi=(di=Rt.find($i=>$i.name==Yn))==null?void 0:di.ptimg;return Ut.createElement("img",{className:zt.sign,src:Hi,style:{left:`${48+52*(ii-1)+2*ii}px`}})}),Ut.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(zn==null?void 0:zn.excellent)&&Ut.createElement("div",{className:zt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Ut.createElement("div",{className:zt.name},Ut.createElement(ze.Z,{title:Un&&(zn!=null&&zn.excellent_alias_name)?Ut.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${tn}`,Ut.createElement("br",null),Ut.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${zn==null?void 0:zn.excellent_alias_name}`)):tn},Ut.createElement("span",{className:zt.e},Un&&(zn==null?void 0:zn.excellent_alias_name)||tn))),Ut.createElement(ze.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${gn}`},Ut.createElement("div",{className:zt.unit},Ut.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),gn)),Ut.createElement("div",{className:zt.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,zn.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,zn.members_count)))))))})),!Gt.length&&Ut.createElement(nt.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"},Ln="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",Nn=pe(59301),rn=({className:In,dataSource:Gt=[],col:Kt=4,right:jt,bottom:ft=23,precision:an=0,wrapWidth:vn=1200,trackEventItems:Bt,loading:at})=>{const cn=Math.floor((vn-(Kt-1)*jt)/Kt);return Nn.createElement(Ae.Z,{spinning:at},Nn.createElement("div",{className:Tt()(Wt.list,In)},!!Gt.length&&Gt.map((Sn,Un)=>{const{subject_identifier:un,id:Rt,identifier:zn,power:ni}=Sn,gi=Sn.is_public!=0&&Sn.is_public;return Nn.createElement("div",{className:Wt.wrap,key:Rt,style:{width:cn,marginRight:(1+Un)%Kt===0?0:jt+an,marginBottom:ft}},Nn.createElement("a",{className:Wt.li,onClick:tn=>{tn.preventDefault(),Bt&&(0,qe.L9)([Bt]),(0,qe.xg)(Sn.first_category_url)}},Nn.createElement("div",{className:Wt.top},Nn.createElement(ze.Z,{title:Sn.name},Nn.createElement("div",{className:Wt.name},Sn.name)),Nn.createElement("img",{className:Wt.img,src:ot.Z.IMG_SERVER+"/images/"+Sn.avatar_url}),Nn.createElement("div",{className:Wt.text,title:Sn.creator},Sn.creator),un&&Nn.createElement("div",{className:Wt.btns},Nn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Nn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),gi&&Nn.createElement("div",{className:Wt.sign},"\u516C\u5F00")),Nn.createElement("div",{className:Wt.bottom},Sn.visits>0&&Nn.createElement(ze.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Nn.createElement("span",null,Nn.createElement("i",{className:"iconfont icon-liulanyan"}),Nn.createElement("span",null,Sn.visits))),Sn.course_members_count>0&&Nn.createElement(ze.Z,{title:"\u6210\u5458",placement:"bottom"},Nn.createElement("span",null,Nn.createElement("i",{className:"iconfont icon-chengyuan"}),Sn.course_members_count)),Sn.tasks_count>0&&Nn.createElement(ze.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Nn.createElement("span",null,Nn.createElement("i",{className:"iconfont icon-zuoye"}),Sn.tasks_count)),Sn.is_end?Nn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Nn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Sn.is_accessible&&Nn.createElement("div",{className:Wt.lockWrap},Nn.createElement("img",{src:`${ot.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Nn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Gt.length&&Nn.createElement(nt.Z,null)))},An={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"},ti=pe(24459),Qn=({dataSource:In=[],value:Gt,onChange:Kt,className:jt,style:ft={},tabBarExtraContent:an})=>ge.createElement("div",{className:Tt()(An.tabs,jt),style:ft},ge.createElement("div",{className:An.tabsWrap},In.map((vn,Bt)=>ge.createElement("aside",{className:An.tab,onClick:()=>{Kt(vn.id),vn.link&&ti.history.push(vn.link)},key:Bt},ge.createElement("div",{className:Gt===vn.id?An.active:""},vn.name),(vn==null?void 0:vn.resetCount)==null&&(vn==null?void 0:vn.total)!==void 0&&ge.createElement("span",null,"\uFF08",vn==null?void 0:vn.total,"\uFF09"),(vn==null?void 0:vn.resetCount)!==void 0&&(vn==null?void 0:vn.total)!==void 0&&ge.createElement(ze.Z,{title:(vn==null?void 0:vn.tip)!=null?vn==null?void 0:vn.tip:""},ge.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ge.createElement("span",{style:{color:"#000"}},vn==null?void 0:vn.resetCount),"/",ge.createElement("span",null,vn==null?void 0:vn.total),"\uFF09"))))),ge.createElement("div",{className:An.tabBar},an)),Cn=({className:In,style:Gt={},children:Kt})=>ge.createElement("div",{className:Tt()(In),style:Gt},Kt),Wn={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"},We=pe(38854),Ee=pe(20834);const Pe=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Fe=({sortValue:In,dropValue:Gt,className:Kt,onSort:jt,onDrop:ft,dataSource:an=Pe})=>{var vn;return ge.createElement("div",{className:Tt()(Wn.orderWrap,Kt)},ge.createElement(We.Z,{dropdownRender:()=>ge.createElement(Ee.default,null,an.map((Bt,at)=>ge.createElement(Ee.default.Item,{key:at,onClick:()=>ft(Bt.id)},Bt.name)))},ge.createElement("span",{className:Wn.orderTextWrap},(vn=an.find(Bt=>Gt===Bt.id))==null?void 0:vn.name)),ge.createElement("span",{className:Wn.orderIconWrap},ge.createElement("span",{className:Wn.orderAsc},ge.createElement("i",{className:In==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Wn.cursorPointer} ${Wn.active}`:`iconfont icon-sanjiaoxing-up font12 ${Wn.cursorPointer}`,onClick:()=>jt(In==="asc"?"desc":"asc")})),ge.createElement("span",{className:Wn.orderDesc},ge.createElement("i",{className:In==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Wn.cursorPointer} ${Wn.active}`:`iconfont icon-sanjiaoxing-down font12 ${Wn.cursorPointer}`,onClick:()=>jt(In==="asc"?"desc":"asc")}))))},ye={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"},Qe=pe(3113),vt=Object.defineProperty,Ye=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,St=(In,Gt,Kt)=>Gt in In?vt(In,Gt,{enumerable:!0,configurable:!0,writable:!0,value:Kt}):In[Gt]=Kt,rt=(In,Gt)=>{for(var Kt in Gt||(Gt={}))Je.call(Gt,Kt)&&St(In,Kt,Gt[Kt]);if(Ye)for(var Kt of Ye(Gt))yt.call(Gt,Kt)&&St(In,Kt,Gt[Kt]);return In},Zt=(In,Gt)=>{var Kt={};for(var jt in In)Je.call(In,jt)&&Gt.indexOf(jt)<0&&(Kt[jt]=In[jt]);if(In!=null&&Ye)for(var jt of Ye(In))Gt.indexOf(jt)<0&&yt.call(In,jt)&&(Kt[jt]=In[jt]);return Kt},dn=(In,Gt,Kt)=>new Promise((jt,ft)=>{var an=at=>{try{Bt(Kt.next(at))}catch(cn){ft(cn)}},vn=at=>{try{Bt(Kt.throw(at))}catch(cn){ft(cn)}},Bt=at=>at.done?jt(at.value):Promise.resolve(at.value).then(an,vn);Bt((Kt=Kt.apply(In,Gt)).next())}),qt=In=>{var Gt=In,{className:Kt,style:jt,children:ft,loading:an=!1,openLoading:vn,onClick:Bt=()=>{},size:at="middle",shape:cn="round"}=Gt,Sn=Zt(Gt,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Un,un]=(0,ge.useState)(!1);return ge.createElement(Qe.ZP,rt({onClick:(0,Pt.throttle)(Rt=>dn(void 0,null,function*(){vn&&un(!0);try{yield Bt(Rt)}catch(zn){console.log("error",zn)}vn&&un(!1)}),2e3,{leading:!0,trailing:!1}),className:Tt()(ye.btn,ye[`${at}-${cn}`],Kt),style:jt,size:at,shape:cn,loading:Un||an},Sn),ft)},Gn={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"},Nt=({className:In,style:Gt,children:Kt=null,onClick:jt,title:ft})=>ge.createElement("div",{className:Tt()(Gn.head,In),style:Gt},ge.createElement("span",{className:"primary-hover",onClick:jt},ge.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ge.createElement("b",{title:ft},ft),ge.createElement("div",{className:Gn.node},Kt)),sn={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:In=!0,confirmTitle:Gt,confirmClick:Kt,cancelShow:jt=!0,cancelTitle:ft,cancelClick:an,className:vn,style:Bt,confirmLoading:at=!1})=>ge.createElement("div",{className:Tt()(sn.btns,vn),style:Bt},In&&ge.createElement(Qe.ZP,{loading:at,onClick:Kt,type:"primary",className:sn.confirm},Gt),jt&&ge.createElement(Qe.ZP,{onClick:an,className:sn.cancel},ft)),Mn={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"},pi=({className:In,style:Gt={},LeftContent:Kt,children:jt,RightContent:ft})=>ge.createElement("div",{className:Tt()(Mn.fixedBottom,In),style:Gt},ge.createElement("div",{className:Mn.wrap},ge.createElement("div",{className:Mn.left},Kt),ge.createElement("div",{className:Mn.center},jt),ge.createElement("div",{className:Mn.right},ft))),mi={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"},Gi=({className:In,style:Gt={},dataSource:Kt=[]})=>ge.createElement("div",{className:Tt()(mi.crumbs,In),style:Gt},Kt.map((jt,ft)=>ft<Kt.length-1?ge.createElement(ge.Fragment,{key:ft},jt.path||jt.onClick?ge.createElement("span",{className:mi.hover,onClick:jt!=null&&jt.onClick?jt.onClick:()=>ti.history.push(jt.path)},jt.name):ge.createElement("span",null,jt.name),ge.createElement("span",null,"\xA0",">","\xA0")):ge.createElement("span",{key:ft,style:{color:"#5F6368"}},jt.name))),ar=pe(31797),Xi=Object.defineProperty,wr=Object.defineProperties,vr=Object.getOwnPropertyDescriptors,ji=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Ne=(In,Gt,Kt)=>Gt in In?Xi(In,Gt,{enumerable:!0,configurable:!0,writable:!0,value:Kt}):In[Gt]=Kt,Ei=(In,Gt)=>{for(var Kt in Gt||(Gt={}))Lr.call(Gt,Kt)&&Ne(In,Kt,Gt[Kt]);if(ji)for(var Kt of ji(Gt))jn.call(Gt,Kt)&&Ne(In,Kt,Gt[Kt]);return In},Oi=(In,Gt)=>wr(In,vr(Gt)),on=(In,Gt)=>{var Kt={};for(var jt in In)Lr.call(In,jt)&&Gt.indexOf(jt)<0&&(Kt[jt]=In[jt]);if(In!=null&&ji)for(var jt of ji(In))Gt.indexOf(jt)<0&&jn.call(In,jt)&&(Kt[jt]=In[jt]);return Kt};const{Countdown:ui}=ar.default;var bi=In=>{var Gt=In,{onChange:Kt}=Gt,jt=on(Gt,["onChange"]);const[ft,an]=(0,ge.useState)(null);(0,ge.useEffect)(()=>{typeof ft=="number"&&ft>=0&&Kt(ft)},[ft]);const vn=Bt=>{const at=Math.floor(Bt/1e3);an(at)};return ge.createElement(ui,Oi(Ei({},jt),{onChange:vn}))}},50505:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Oe}});var ge=pe(59301);function Oe(Ke,st){const Ge=(0,ge.useRef)();(0,ge.useEffect)(()=>{Ge.current=Ke}),(0,ge.useEffect)(()=>{function _e(){Ge.current()}if(st!==null){let Le=setInterval(_e,st);return()=>clearInterval(Le)}},[st])}},348:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ne}});var ge=pe(59301),Oe=pe(8591),Ke=pe(43418),st=pe(19842),Ge=pe(54580),_e=pe(3113),Le=pe(38446),Tt=pe(88230),Pt=pe(7660),Xe=pe(24459),Et={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"},ct=pe(59301),It=(ee,ce,se)=>new Promise((he,ve)=>{var be=ze=>{try{Ae(se.next(ze))}catch(Ze){ve(Ze)}},ke=ze=>{try{Ae(se.throw(ze))}catch(Ze){ve(Ze)}},Ae=ze=>ze.done?he(ze.value):Promise.resolve(ze.value).then(be,ke);Ae((se=se.apply(ee,ce)).next())}),ne=({visible:ee,onOk:ce,onCancel:se,sub_discipline_id:he=[]})=>{const[ve,be]=(0,ge.useState)([]),[ke,Ae]=(0,ge.useState)(!1),ze=(0,Xe.useParams)(),[Ze,ot]=(0,ge.useState)([]),[qe,bt]=(0,ge.useState)([]);(0,ge.useEffect)(()=>{ee?He():(bt([]),be([]),Ae(!1))},[ee]);const He=()=>It(void 0,null,function*(){const Yt=yield(0,Pt.ZP)("/api/disciplines.json",{method:"get",params:{source:"subject"}});ot(Yt.disciplines||[]),bt((he==null?void 0:he.length)>0?he:[])}),wt=()=>{if((qe==null?void 0:qe.length)===0)return Oe.ZP.warning("\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B\uFF01");console.log("subDisciplineId",qe),Ae(!0),ce(ve,qe[1],()=>{Ae(!1)})},nt=()=>{se()},Dt=()=>{const Yt=`${Le.Z.API_SERVER}/api/courses/${ze.coursesId}/exercises/down_template`;(0,Tt.Nd)(null,Yt)},ht=Yt=>{const Ut={name:Yt.name,uid:Yt.uid,file:Yt};return be([Ut]),!1},zt=()=>{be([])};return ct.createElement(Ke.default,{title:"\u5BFC\u5165\u8BD5\u9898",open:ee,onOk:wt,centered:!0,wrapClassName:Et.customModal,onCancel:nt,width:663,okText:"\u786E\u8BA4",okButtonProps:{className:Et.okBtn},cancelText:"\u53D6\u6D88",confirmLoading:ke},ct.createElement("div",{className:Et.content},ct.createElement("aside",null,ct.createElement("div",{style:{fontWeight:600}},"\u6B65\u9AA41"),ct.createElement("ul",null,ct.createElement("li",null,ct.createElement("span",{style:{color:"#5F6367"}},"\u6839\u636E\u6A21\u677F\u8981\u6C42\u7F16\u8F91\u9700\u8981\u4E0A\u4F20\u7684\u8BD5\u9898"),ct.createElement("span",{style:{color:"#0152d9",cursor:"pointer",marginLeft:20},onClick:Dt},"\u4E0B\u8F7D\u8003\u8BD5\u8BD5\u9898\u6A21\u677F"),ct.createElement("i",{className:"iconfont icon-xiazai4 ml10",onClick:Dt,style:{fontSize:14,cursor:"pointer",color:"#0152d9"}})),ct.createElement("li",{style:{color:"#FA6400"},className:"mt10"},"\u63D0\u793A"),ct.createElement("li",{className:Et.infoText},"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Excel\u683C\u5F0F\u6A21\u677F\uFF1B "),ct.createElement("li",{className:Et.infoText},"2\u3001\u4E0D\u652F\u6301\u7EC4\u5408\u9898\u548C\u5B9E\u8BAD\u9898\u5BFC\u5165\uFF1B"),ct.createElement("li",{className:Et.infoText},"3\u3001\u6BCF\u6B21\u6700\u591A\u5BFC\u5165300\u9898\uFF1B"),ct.createElement("li",{className:Et.infoText},"4\u3001\u586B\u7A7A\u9898\u5BFC\u5165\u6700\u591A\u652F\u63018\u4E2A\u586B\u7A7A\u9879\u3002"))),ct.createElement("aside",{style:{marginTop:22}},ct.createElement("div",{style:{fontWeight:600}},"\u6B65\u9AA42"),ct.createElement("ul",{style:{flex:1}},ct.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&&ct.createElement(ct.Fragment,null,ct.createElement(st.Z,{value:qe,className:Et.selectitems,expandTrigger:"hover",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:Ze,fieldNames:{label:"name",value:"id",children:"sub_disciplines"},onChange:(Yt,Ut)=>{bt(Yt||[])}}),ct.createElement("br",null),ct.createElement(Ge.default,{action:`${Le.Z.API_SERVER}/api/attachments.json`,beforeUpload:ht,onRemove:zt,withCredentials:!0,fileList:ve,accept:".xls,.xlsx",showUploadList:!1},ct.createElement(_e.ZP,{className:Et.upload,type:"primary",icon:ct.createElement("i",{className:"iconfont icon-shangchuan3",style:{fontSize:14}})},"\u4E0A\u4F20\u6587\u4EF6"))),ve.map((Yt,Ut)=>ct.createElement("div",{key:Ut,className:Et.fileList},ct.createElement("span",{className:Et.fileName},Yt==null?void 0:Yt.name),ct.createElement("i",{className:"iconfont icon-shanchu12",style:{color:"#F65160",fontSize:16,cursor:"pointer"},onClick:zt})))))))}},76826:function(Vn,Pn,pe){"use strict";pe.d(Pn,{h:function(){return ge}});var ge=(Oe=>(Oe[Oe.NOMATCH=-1]="NOMATCH",Oe[Oe.OK=0]="OK",Oe[Oe.TIMEOUT=2]="TIMEOUT",Oe[Oe.PODFAILURE=3]="PODFAILURE",Oe[Oe.COMPILEFAILURE=4]="COMPILEFAILURE",Oe[Oe.EXECUTEFAILURE=5]="EXECUTEFAILURE",Oe[Oe.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Oe))(ge||{})},5247:function(Vn,Pn,pe){"use strict";pe.d(Pn,{H7:function(){return ne},MK:function(){return Be},MU:function(){return Xe},X6:function(){return ct},bM:function(){return Pt},fi:function(){return ee},fu:function(){return Tt},n4:function(){return ce},rX:function(){return It},vl:function(){return se},zO:function(){return Et}});var ge=pe(7660),Oe=Object.defineProperty,Ke=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,_e=(he,ve,be)=>ve in he?Oe(he,ve,{enumerable:!0,configurable:!0,writable:!0,value:be}):he[ve]=be,Le=(he,ve)=>{for(var be in ve||(ve={}))st.call(ve,be)&&_e(he,be,ve[be]);if(Ke)for(var be of Ke(ve))Ge.call(ve,be)&&_e(he,be,ve[be]);return he};function Tt(he,ve){return(0,ge.U2)(`myproblems/${he}.json`,Le({hidePopLogin:!0},ve||{}))}function Pt(he,ve){return(0,ge.v_)(`myproblems/${he}/code_submit.json`,ve)}function Xe(he,ve){return(0,ge.v_)(`myproblems/${he}/code_debug.json`,ve)}function Et(he,ve){return ve.language&&(ve.language=encodeURIComponent(ve.language)),(0,ge.U2)(`myproblems/${he}/submit_records.json`,ve)}function ct(he){return(0,ge.U2)("myproblems/record_detail.json",{id:he})}function It(he,ve){return(0,ge.U2)(`myproblems/${he}/result.json`,{mode:ve})}function Be(he,ve){return(0,ge.v_)(`myproblems/${he}/add_notes.json`,ve)}function ne(he,ve){return(0,ge.v_)(`myproblems/${he}/restore_initial_code.json`,ve)}function ee(he){return(0,ge.v_)(`myproblems/${he}/sync_code.json`)}function ce(he,ve){return(0,ge.v_)(`myproblems/${he}/update_code.json`,ve)}function se(he,ve){return(0,ge.v_)(`discusses/${he}/plus.json`,ve)}},23768:function(Vn,Pn,pe){"use strict";var ge=pe(59301),Oe=pe(6848),Ke=pe(92832),st=pe(8591),Ge=pe(83882),_e=pe(59301),Le=(Pt,Xe,Et)=>new Promise((ct,It)=>{var Be=ce=>{try{ee(Et.next(ce))}catch(se){It(se)}},ne=ce=>{try{ee(Et.throw(ce))}catch(se){It(se)}},ee=ce=>ce.done?ct(ce.value):Promise.resolve(ce.value).then(Be,ne);ee((Et=Et.apply(Pt,Xe)).next())});const Tt=({defaultValue:Pt,onFinish:Xe})=>{const[Et,ct]=(0,ge.useState)(!1),[It,Be]=(0,ge.useState)(Pt);return(0,ge.useEffect)(()=>{Be(Pt)},[Pt]),_e.createElement("div",null,Et?_e.createElement(Ke.default,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:It,onChange:ne=>{Be(ne.target.value)},onBlur:()=>Le(void 0,null,function*(){var ne;if(((ne=It==null?void 0:It.replaceAll(" ",""))==null?void 0:ne.length)<=0){st.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield Xe(It))&&ct(!1)}),onPressEnter:()=>Le(void 0,null,function*(){var ne;if(((ne=It==null?void 0:It.replaceAll(" ",""))==null?void 0:ne.length)<=0){st.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield Xe(It))&&ct(!1)})}):_e.createElement("div",{className:Ge.Z.title},It,_e.createElement(Oe.Z,{title:"\u7F16\u8F91\u8BD5\u5377\u540D\u79F0"},_e.createElement("i",{className:`${Ge.Z.editIcon} iconfont icon-bianji_Hover`,onClick:()=>ct(!0)}))))};Pn.Z=Tt},66231:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Xe}});var ge=pe(43418),Oe={ul:"ul___TdfYY"},Ke=pe(32637),st=pe(59301),Ge=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Tt=(Et,ct)=>{var It={};for(var Be in Et)_e.call(Et,Be)&&ct.indexOf(Be)<0&&(It[Be]=Et[Be]);if(Et!=null&&Ge)for(var Be of Ge(Et))ct.indexOf(Be)<0&&Le.call(Et,Be)&&(It[Be]=Et[Be]);return It},Xe=Et=>{var ct=Et,{open:It,onCancel:Be}=ct,ne=Tt(ct,["open","onCancel"]);return st.createElement(ge.default,{centered:!0,open:It,title:st.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:Be,footer:null},st.createElement("div",null,st.createElement("div",{className:"tc"},st.createElement("img",{className:"mt10",src:Ke,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),st.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),st.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),st.createElement("div",{style:{color:"#333"},className:"pt30 font14"},st.createElement("ul",{className:Oe.ul},st.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"),st.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"),st.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")))))}},62617:function(Vn,Pn,pe){"use strict";pe.d(Pn,{I:function(){return Oe}});var ge=pe(59301);const Oe=()=>{const[Ke,st]=(0,ge.useState)("hidden");return{overflow:Ke,handleMouseEnter:()=>st("auto"),handleMouseLeave:()=>st("hidden")}}},85187:function(Vn,Pn,pe){"use strict";pe.d(Pn,{AL:function(){return be},Iy:function(){return Et},Qv:function(){return Be},ez:function(){return ve},jb:function(){return ct}});var ge=pe(32834),Oe=pe.n(ge),Ke=pe(11690),st=pe.n(Ke);let Ge=1;function _e(ot,qe){const bt=ot.match(/^(\s+)(?:```)/);if(bt===null)return qe;const He=bt[1];return qe.split(`
`).map(wt=>{const nt=wt.match(/^\s+/);if(nt===null)return wt;const[Dt]=nt;return Dt.length>=He.length?wt.slice(He.length):wt}).join(`
`)}let Le=[],Tt=["<ul>"];const Pt=new(Oe()).Renderer,Xe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Et(){Le.length=0,Tt=["<ul>"]}const ct={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function It(ot,qe,bt,He){if(qe>=ot.length||ot[qe].level<=bt)return qe;var wt=ot[qe];He.push("<li><a href='#"+Ge+wt.anchor+"'>"+wt.text+"</a>"),qe++;var nt=[];return qe=It(ot,qe,wt.level,nt),nt.length>0&&(He.push("<ul>"),nt.forEach(function(Dt){He.push(Dt)}),He.push("</ul>")),He.push("</li>"),qe=It(ot,qe,bt,He),qe}function Be(){return It(Le,0,0,Tt),Tt.push("</ul>"),Tt.join("")}const ne={heading(ot){const qe=Xe.exec(ot);if(Ge+=1,qe)return{type:"heading",raw:qe[0],depth:qe[1].length,text:qe[2]}},fences(ot){const qe=this.rules.block.fences.exec(ot);if(qe){const bt=qe[0];let He=_e(bt,qe[3]||"");const wt=qe[2]?qe[2].trim():qe[2];if(["latex","katex","math"].indexOf(wt)>=0){const nt=se(),Dt=He;He=nt,he[nt]={type:"block",expression:Dt}}return{type:"code",raw:bt,lang:wt,text:He}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ce=0;const se=()=>`__special_katext_id_${ce++}__`;let he={};function ve(){return he}function be(){ce=0,he={}}function ke(ot){return ot=ot.replace(ee,(qe,bt)=>{const He=se();return he[He]={type:"inline",expression:bt},He}),ot}const Ae=Pt.listitem;Pt.listitem=function(ot){return Ae(ke(ot))};const ze=Pt.paragraph;Pt.paragraph=function(ot){return ze(ke(ot))};const Ze=Pt.tablecell;Pt.tablecell=function(ot,qe){return Ze(ke(ot),qe)},Pt.code=function(ot,qe,bt){const He=(qe||"").match(/\S*/)[0];return He?["latex","katex","math"].indexOf(He)>=0?`<p class='editormd-tex'>${ot}</p>`:`<pre class="prettyprint linenums"><code class="language-${qe}">${bt?ot:(0,Ke.escape)(ot,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(bt?ot:(0,Ke.escape)(ot,!0))+"</code></pre>"},Pt.heading=function(ot,qe,bt){let He=this.options.headerPrefix+bt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Le.push({anchor:He,level:qe,text:ot}),"<h"+qe+' id="'+Ge+He+'">'+ot+"</h"+qe+">"},Oe().setOptions({silent:!0,gfm:!0,pedantic:!1}),Oe().use({tokenizer:ne,renderer:Pt}),Pn.ZP=Oe()},50371:function(Vn,Pn){"use strict";function pe(){const ge=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let Oe=1;Oe<arguments.length;Oe++){const Ke=Oe<0||arguments.length<=Oe?void 0:arguments[Oe];Ke&&Object.keys(Ke).forEach(st=>{const Ge=Ke[st];Ge!==void 0&&(ge[st]=Ge)})}return ge}Pn.Z=pe},77578:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ge}});const ge=Oe=>Oe?typeof Oe=="function"?Oe():Oe:null},13845:function(Vn,Pn,pe){"use strict";pe.d(Pn,{F:function(){return ge},Z:function(){return Oe}});function ge(Ke){return Ke!=null&&Ke===Ke.window}function Oe(Ke,st){var Ge,_e;if(typeof window=="undefined")return 0;const Le=st?"scrollTop":"scrollLeft";let Tt=0;return ge(Ke)?Tt=Ke[st?"pageYOffset":"pageXOffset"]:Ke instanceof Document?Tt=Ke.documentElement[Le]:(Ke instanceof HTMLElement||Ke)&&(Tt=Ke[Le]),Ke&&!ge(Ke)&&typeof Tt!="number"&&(Tt=(_e=((Ge=Ke.ownerDocument)!==null&&Ge!==void 0?Ge:Ke).documentElement)===null||_e===void 0?void 0:_e[Le]),Tt}},56762:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Oe}});var ge=pe(59301);function Oe(){const[,Ke]=ge.useReducer(st=>st+1,0);return Ke}},68031:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return st}});var ge=pe(16089);function Oe(Ge,_e,Le,Tt){const Pt=Le-_e;return Ge/=Tt/2,Ge<1?Pt/2*Ge*Ge*Ge+_e:Pt/2*((Ge-=2)*Ge*Ge+2)+_e}var Ke=pe(13845);function st(Ge){let _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Le=()=>window,callback:Tt,duration:Pt=450}=_e,Xe=Le(),Et=(0,Ke.Z)(Xe,!0),ct=Date.now(),It=()=>{const ne=Date.now()-ct,ee=Oe(ne>Pt?Pt:ne,Et,Ge,Pt);(0,Ke.F)(Xe)?Xe.scrollTo(window.pageXOffset,ee):Xe instanceof Document||Xe.constructor.name==="HTMLDocument"?Xe.documentElement.scrollTop=ee:Xe.scrollTop=ee,ne<Pt?(0,ge.Z)(It):typeof Tt=="function"&&Tt()};(0,ge.Z)(It)}},66104:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Dt}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(11592),st=pe(26112),Ge=pe(59301),_e=pe(92343),Le=pe(36355),Tt=pe(84105),Pt=pe(91857);const Xe=ht=>{let{children:zt}=ht;const{getPrefixCls:Yt}=Ge.useContext(Le.E_),Ut=Yt("breadcrumb");return Ge.createElement("li",{className:`${Ut}-separator`,"aria-hidden":"true"},zt===""?zt:zt||"/")};Xe.__ANT_BREADCRUMB_SEPARATOR=!0;var Et=Xe,ct=function(ht,zt){var Yt={};for(var Ut in ht)Object.prototype.hasOwnProperty.call(ht,Ut)&&zt.indexOf(Ut)<0&&(Yt[Ut]=ht[Ut]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ut=Object.getOwnPropertySymbols(ht);it<Ut.length;it++)zt.indexOf(Ut[it])<0&&Object.prototype.propertyIsEnumerable.call(ht,Ut[it])&&(Yt[Ut[it]]=ht[Ut[it]]);return Yt};function It(ht,zt){if(ht.title===void 0||ht.title===null)return null;const Yt=Object.keys(zt).join("|");return typeof ht.title=="object"?ht.title:String(ht.title).replace(new RegExp(`:(${Yt})`,"g"),(Ut,it)=>zt[it]||Ut)}function Be(ht,zt,Yt,Ut){if(Yt==null)return null;const{className:it,onClick:Ve}=zt,Wt=ct(zt,["className","onClick"]),Ln=Object.assign(Object.assign({},(0,st.Z)(Wt,{data:!0,aria:!0})),{onClick:Ve});return Ut!==void 0?Ge.createElement("a",Object.assign({},Ln,{className:Oe()(`${ht}-link`,it),href:Ut}),Yt):Ge.createElement("span",Object.assign({},Ln,{className:Oe()(`${ht}-link`,it)}),Yt)}function ne(ht,zt){return(Ut,it,Ve,Wt,Ln)=>{if(zt)return zt(Ut,it,Ve,Wt);const Nn=It(Ut,it);return Be(ht,Ut,Nn,Ln)}}var ee=function(ht,zt){var Yt={};for(var Ut in ht)Object.prototype.hasOwnProperty.call(ht,Ut)&&zt.indexOf(Ut)<0&&(Yt[Ut]=ht[Ut]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ut=Object.getOwnPropertySymbols(ht);it<Ut.length;it++)zt.indexOf(Ut[it])<0&&Object.prototype.propertyIsEnumerable.call(ht,Ut[it])&&(Yt[Ut[it]]=ht[Ut[it]]);return Yt};const ce=ht=>{const{prefixCls:zt,separator:Yt="/",children:Ut,menu:it,overlay:Ve,dropdownProps:Wt,href:Ln}=ht,$t=(rn=>{if(it||Ve){const An=Object.assign({},Wt);if(it){const ti=it||{},{items:xn}=ti,Qn=ee(ti,["items"]);An.menu=Object.assign(Object.assign({},Qn),{items:xn==null?void 0:xn.map((Ot,Cn)=>{var{key:Wn,title:We,label:Ee,path:Pe}=Ot,De=ee(Ot,["key","title","label","path"]);let Fe=Ee!=null?Ee:We;return Pe&&(Fe=Ge.createElement("a",{href:`${Ln}${Pe}`},Fe)),Object.assign(Object.assign({},De),{key:Wn!=null?Wn:Cn,label:Fe})})})}else Ve&&(An.overlay=Ve);return Ge.createElement(Pt.Z,Object.assign({placement:"bottom"},An),Ge.createElement("span",{className:`${zt}-overlay-link`},rn,Ge.createElement(Tt.Z,null)))}return rn})(Ut);return $t!=null?Ge.createElement(Ge.Fragment,null,Ge.createElement("li",null,$t),Yt&&Ge.createElement(Et,null,Yt)):null},se=ht=>{const{prefixCls:zt,children:Yt,href:Ut}=ht,it=ee(ht,["prefixCls","children","href"]),{getPrefixCls:Ve}=Ge.useContext(Le.E_),Wt=Ve("breadcrumb",zt);return Ge.createElement(ce,Object.assign({},it,{prefixCls:Wt}),Be(Wt,it,Yt,Ut))};se.__ANT_BREADCRUMB_ITEM=!0;var he=se,ve=pe(17313),be=pe(83116),ke=pe(37613);const Ae=ht=>{const{componentCls:zt,iconCls:Yt}=ht;return{[zt]:Object.assign(Object.assign({},(0,ve.Wf)(ht)),{color:ht.itemColor,fontSize:ht.fontSize,[Yt]:{fontSize:ht.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:ht.linkColor,transition:`color ${ht.motionDurationMid}`,padding:`0 ${ht.paddingXXS}px`,borderRadius:ht.borderRadiusSM,height:ht.lineHeight*ht.fontSize,display:"inline-block",marginInline:-ht.marginXXS,"&:hover":{color:ht.linkHoverColor,backgroundColor:ht.colorBgTextHover}},(0,ve.Qy)(ht)),"li:last-child":{color:ht.lastItemColor},[`${zt}-separator`]:{marginInline:ht.separatorMargin,color:ht.separatorColor},[`${zt}-link`]:{[`
> ${Yt} + span,
> ${Yt} + a
`]:{marginInlineStart:ht.marginXXS}},[`${zt}-overlay-link`]:{borderRadius:ht.borderRadiusSM,height:ht.lineHeight*ht.fontSize,display:"inline-block",padding:`0 ${ht.paddingXXS}px`,marginInline:-ht.marginXXS,[`> ${Yt}`]:{marginInlineStart:ht.marginXXS,fontSize:ht.fontSizeIcon},"&:hover":{color:ht.linkHoverColor,backgroundColor:ht.colorBgTextHover,a:{color:ht.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${ht.componentCls}-rtl`]:{direction:"rtl"}})}};var ze=(0,be.Z)("Breadcrumb",ht=>{const zt=(0,ke.TS)(ht,{});return[Ae(zt)]},ht=>({itemColor:ht.colorTextDescription,lastItemColor:ht.colorText,iconFontSize:ht.fontSize,linkColor:ht.colorTextDescription,linkHoverColor:ht.colorText,separatorColor:ht.colorTextDescription,separatorMargin:ht.marginXS})),Ze=function(ht,zt){var Yt={};for(var Ut in ht)Object.prototype.hasOwnProperty.call(ht,Ut)&&zt.indexOf(Ut)<0&&(Yt[Ut]=ht[Ut]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ut=Object.getOwnPropertySymbols(ht);it<Ut.length;it++)zt.indexOf(Ut[it])<0&&Object.prototype.propertyIsEnumerable.call(ht,Ut[it])&&(Yt[Ut[it]]=ht[Ut[it]]);return Yt};function ot(ht){const{breadcrumbName:zt,children:Yt}=ht,Ut=Ze(ht,["breadcrumbName","children"]),it=Object.assign({title:zt},Ut);return Yt&&(it.menu={items:Yt.map(Ve=>{var{breadcrumbName:Wt}=Ve,Ln=Ze(Ve,["breadcrumbName"]);return Object.assign(Object.assign({},Ln),{title:Wt})})}),it}function qe(ht,zt){return(0,Ge.useMemo)(()=>ht||(zt?zt.map(ot):null),[ht,zt])}var bt=function(ht,zt){var Yt={};for(var Ut in ht)Object.prototype.hasOwnProperty.call(ht,Ut)&&zt.indexOf(Ut)<0&&(Yt[Ut]=ht[Ut]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ut=Object.getOwnPropertySymbols(ht);it<Ut.length;it++)zt.indexOf(Ut[it])<0&&Object.prototype.propertyIsEnumerable.call(ht,Ut[it])&&(Yt[Ut[it]]=ht[Ut[it]]);return Yt};const He=(ht,zt)=>{if(zt===void 0)return zt;let Yt=(zt||"").replace(/^\//,"");return Object.keys(ht).forEach(Ut=>{Yt=Yt.replace(`:${Ut}`,ht[Ut])}),Yt},wt=ht=>{const{prefixCls:zt,separator:Yt="/",style:Ut,className:it,rootClassName:Ve,routes:Wt,items:Ln,children:Nn,itemRender:$t,params:rn={}}=ht,An=bt(ht,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:ti,direction:xn,breadcrumb:Qn}=Ge.useContext(Le.E_);let Ot;const Cn=ti("breadcrumb",zt),[Wn,We]=ze(Cn),Ee=qe(Ln,Wt),Pe=ne(Cn,$t);if(Ee&&Ee.length>0){const ye=[],Qe=Ln||Wt;Ot=Ee.map((vt,Ye)=>{const{path:Je,key:yt,type:St,menu:rt,overlay:Zt,onClick:dn,className:mn,separator:qt,dropdownProps:Gn}=vt,Kn=He(rn,Je);Kn!==void 0&&ye.push(Kn);const Nt=yt!=null?yt:Ye;if(St==="separator")return Ge.createElement(Et,{key:Nt},qt);const sn={},Fn=Ye===Ee.length-1;rt?sn.menu=rt:Zt&&(sn.overlay=Zt);let{href:hn}=vt;return ye.length&&Kn!==void 0&&(hn=`#/${ye.join("/")}`),Ge.createElement(ce,Object.assign({key:Nt},sn,(0,st.Z)(vt,{data:!0,aria:!0}),{className:mn,dropdownProps:Gn,href:hn,separator:Fn?"":Yt,onClick:dn,prefixCls:Cn}),Pe(vt,rn,Qe,ye,hn))})}else if(Nn){const ye=(0,Ke.Z)(Nn).length;Ot=(0,Ke.Z)(Nn).map((Qe,vt)=>{if(!Qe)return Qe;const Ye=vt===ye-1;return(0,_e.Tm)(Qe,{separator:Ye?"":Yt,key:vt})})}const De=Oe()(Cn,Qn==null?void 0:Qn.className,{[`${Cn}-rtl`]:xn==="rtl"},it,Ve,We),Fe=Object.assign(Object.assign({},Qn==null?void 0:Qn.style),Ut);return Wn(Ge.createElement("nav",Object.assign({className:De,style:Fe},An),Ge.createElement("ol",null,Ot)))};wt.Item=he,wt.Separator=Et;var nt=wt,Dt=nt},19842:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Oi}});var ge=pe(26407),Oe=pe(59301),Ke=pe(33853),st=pe(58617),Ge=pe(38819),_e=pe(92310),Le=pe.n(_e),Tt=pe(92413),Pt=pe(33606),Xe=pe(37061),Et=pe(77861),ct=pe(17115),It=pe(90782),Be=pe(6089),ne=pe(18929),ee=Oe.createContext(null),ce=ee,se=pe(39559),he=pe(400),ve=pe(33708),be="__rc_cascader_search_mark__",ke=function(ui,vi,bi){var In=bi.label;return vi.some(function(Gt){return String(Gt[In]).toLowerCase().includes(ui.toLowerCase())})},Ae=function(ui,vi,bi,In){return vi.map(function(Gt){return Gt[In.label]}).join(" / ")},ze=function(on,ui,vi,bi,In,Gt){var Kt=In.filter,jt=Kt===void 0?ke:Kt,ft=In.render,an=ft===void 0?Ae:ft,vn=In.limit,Bt=vn===void 0?50:vn,at=In.sort;return Oe.useMemo(function(){var cn=[];if(!on)return[];function Sn(Un,un){var Rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Un.forEach(function(zn){if(!(!at&&Bt!==!1&&Bt>0&&cn.length>=Bt)){var ni=[].concat((0,ge.Z)(un),[zn]),gi=zn[vi.children],tn=Rt||zn.disabled;if((!gi||gi.length===0||Gt)&&jt(on,ni,{label:vi.label})){var Bn;cn.push((0,ve.Z)((0,ve.Z)({},zn),{},(Bn={disabled:tn},(0,he.Z)(Bn,vi.label,an(on,ni,bi,vi)),(0,he.Z)(Bn,be,ni),(0,he.Z)(Bn,vi.children,void 0),Bn)))}gi&&Sn(zn[vi.children],ni,tn)}})}return Sn(ui,[]),at&&cn.sort(function(Un,un){return at(Un[be],un[be],on,vi)}),Bt!==!1&&Bt>0?cn.slice(0,Bt):cn},[on,ui,vi,bi,an,Gt,jt,at,Bt])},Ze="__RC_CASCADER_SPLIT__",ot="SHOW_PARENT",qe="SHOW_CHILD";function bt(on){return on.join(Ze)}function He(on){return on.map(bt)}function wt(on){return on.split(Ze)}function nt(on){var ui=on||{},vi=ui.label,bi=ui.value,In=ui.children,Gt=bi||"value";return{label:vi||"label",value:Gt,key:Gt,children:In||"children"}}function Dt(on,ui){var vi,bi;return(vi=on.isLeaf)!==null&&vi!==void 0?vi:!((bi=on[ui.children])!==null&&bi!==void 0&&bi.length)}function ht(on){var ui=on.parentElement;if(ui){var vi=on.offsetTop-ui.offsetTop;vi-ui.scrollTop<0?ui.scrollTo({top:vi}):vi+on.offsetHeight-ui.scrollTop>ui.offsetHeight&&ui.scrollTo({top:vi+on.offsetHeight-ui.offsetHeight})}}function zt(on,ui){return on.map(function(vi){var bi;return(bi=vi[be])===null||bi===void 0?void 0:bi.map(function(In){return In[ui.value]})})}function Yt(on,ui,vi){var bi=new Set(on),In=ui();return on.filter(function(Gt){var Kt=In[Gt],jt=Kt?Kt.parent:null,ft=Kt?Kt.children:null;return Kt&&Kt.node.disabled?!0:vi===qe?!(ft&&ft.some(function(an){return an.key&&bi.has(an.key)})):!(jt&&!jt.node.disabled&&bi.has(jt.key))})}function Ut(on,ui,vi){for(var bi=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,In=ui,Gt=[],Kt=function(){var an,vn,Bt,at=on[jt],cn=(an=In)===null||an===void 0?void 0:an.findIndex(function(Un){var un=Un[vi.value];return bi?String(un)===String(at):un===at}),Sn=cn!==-1?(vn=In)===null||vn===void 0?void 0:vn[cn]:null;Gt.push({value:(Bt=Sn==null?void 0:Sn[vi.value])!==null&&Bt!==void 0?Bt:at,index:cn,option:Sn}),In=Sn==null?void 0:Sn[vi.children]},jt=0;jt<on.length;jt+=1)Kt();return Gt}var it=function(on,ui,vi,bi,In){return Oe.useMemo(function(){var Gt=In||function(Kt){var jt=bi?Kt.slice(-1):Kt,ft=" / ";return jt.every(function(an){return["string","number"].includes((0,se.Z)(an))})?jt.join(ft):jt.reduce(function(an,vn,Bt){var at=Oe.isValidElement(vn)?Oe.cloneElement(vn,{key:Bt}):vn;return Bt===0?[at]:[].concat((0,ge.Z)(an),[ft,at])},[])};return on.map(function(Kt){var jt,ft,an=Ut(Kt,ui,vi),vn=Gt(an.map(function(at){var cn,Sn=at.option,Un=at.value;return(cn=Sn==null?void 0:Sn[vi.label])!==null&&cn!==void 0?cn:Un}),an.map(function(at){var cn=at.option;return cn})),Bt=bt(Kt);return{label:vn,value:Bt,key:Bt,valueCells:Kt,disabled:(jt=an[an.length-1])===null||jt===void 0||(ft=jt.option)===null||ft===void 0?void 0:ft.disabled}})},[on,ui,vi,In,bi])},Ve=pe(71430),Wt=function(on,ui){var vi=Oe.useRef({options:null,info:null}),bi=Oe.useCallback(function(){return vi.current.options!==on&&(vi.current.options=on,vi.current.info=(0,Ve.I8)(on,{fieldNames:ui,initWrapper:function(Gt){return(0,ve.Z)((0,ve.Z)({},Gt),{},{pathKeyEntities:{}})},processEntity:function(Gt,Kt){var jt=Gt.nodes.map(function(ft){return ft[ui.value]}).join(Ze);Kt.pathKeyEntities[jt]=Gt,Gt.key=jt}})),vi.current.info.pathKeyEntities},[ui,on]);return bi},Ln=function(on,ui){return Oe.useCallback(function(vi){var bi=[],In=[];return vi.forEach(function(Gt){var Kt=Ut(Gt,on,ui);Kt.every(function(jt){return jt.option})?In.push(Gt):bi.push(Gt)}),[In,bi]},[on,ui])},Nn=pe(48736);function $t(on){return Oe.useMemo(function(){if(!on)return[!1,{}];var ui={matchInputWidth:!0,limit:50};return on&&(0,se.Z)(on)==="object"&&(ui=(0,ve.Z)((0,ve.Z)({},ui),on)),ui.limit<=0&&delete ui.limit,[!0,ui]},[on])}var rn=Oe.memo(function(on){var ui=on.children;return ui},function(on,ui){return!ui.open}),An=rn;function ti(on){var ui,vi=on.prefixCls,bi=on.checked,In=on.halfChecked,Gt=on.disabled,Kt=on.onClick,jt=on.disableCheckbox,ft=Oe.useContext(ce),an=ft.checkable,vn=typeof an!="boolean"?an:null;return Oe.createElement("span",{className:Le()("".concat(vi),(ui={},(0,he.Z)(ui,"".concat(vi,"-checked"),bi),(0,he.Z)(ui,"".concat(vi,"-indeterminate"),!bi&&In),(0,he.Z)(ui,"".concat(vi,"-disabled"),Gt||jt),ui)),onClick:Kt},vn)}var xn="__cascader_fix_label__";function Qn(on){var ui=on.prefixCls,vi=on.multiple,bi=on.options,In=on.activeValue,Gt=on.prevValuePath,Kt=on.onToggleOpen,jt=on.onSelect,ft=on.onActive,an=on.checkedSet,vn=on.halfCheckedSet,Bt=on.loadingKeys,at=on.isSelectable,cn=on.searchValue,Sn="".concat(ui,"-menu"),Un="".concat(ui,"-menu-item"),un=Oe.useContext(ce),Rt=un.fieldNames,zn=un.changeOnSelect,ni=un.expandTrigger,gi=un.expandIcon,tn=un.loadingIcon,Bn=un.dropdownMenuColumnStyle,Ft=ni==="hover",wn=Oe.useMemo(function(){return bi.map(function(gn){var yn,On=gn.disabled,$n=gn.disableCheckbox,Yn=gn[be],ii=(yn=gn[xn])!==null&&yn!==void 0?yn:gn[Rt.label],Xn=gn[Rt.value],di=Dt(gn,Rt),Hi=Yn?Yn.map(function(Ki){return Ki[Rt.value]}):[].concat((0,ge.Z)(Gt),[Xn]),$i=bt(Hi),Wi=Bt.includes($i),Xt=an.has($i),Si=vn.has($i);return{disabled:On,label:ii,value:Xn,isLeaf:di,isLoading:Wi,checked:Xt,halfChecked:Si,option:gn,disableCheckbox:$n,fullPath:Hi,fullPathKey:$i}})},[bi,an,Rt,vn,Bt,Gt]);return Oe.createElement("ul",{className:Sn,role:"menu"},wn.map(function(gn){var yn,On=gn.disabled,$n=gn.label,Yn=gn.value,ii=gn.isLeaf,Xn=gn.isLoading,di=gn.checked,Hi=gn.halfChecked,$i=gn.option,Wi=gn.fullPath,Xt=gn.fullPathKey,Si=gn.disableCheckbox,Ki=function(){if(!(On||cn)){var yr=(0,ge.Z)(Wi);Ft&&ii&&yr.pop(),ft(yr)}},Ti=function(){at($i)&&jt(Wi,ii)},cr;return typeof $i.title=="string"?cr=$i.title:typeof $n=="string"&&(cr=$n),Oe.createElement("li",{key:Xt,className:Le()(Un,(yn={},(0,he.Z)(yn,"".concat(Un,"-expand"),!ii),(0,he.Z)(yn,"".concat(Un,"-active"),In===Yn||In===Xt),(0,he.Z)(yn,"".concat(Un,"-disabled"),On),(0,he.Z)(yn,"".concat(Un,"-loading"),Xn),yn)),style:Bn,role:"menuitemcheckbox",title:cr,"aria-checked":di,"data-path-key":Xt,onClick:function(){Ki(),!Si&&(!vi||ii)&&Ti()},onDoubleClick:function(){zn&&Kt(!1)},onMouseEnter:function(){Ft&&Ki()},onMouseDown:function(yr){yr.preventDefault()}},vi&&Oe.createElement(ti,{prefixCls:"".concat(ui,"-checkbox"),checked:di,halfChecked:Hi,disabled:On||Si,disableCheckbox:Si,onClick:function(yr){Si||(yr.stopPropagation(),Ti())}}),Oe.createElement("div",{className:"".concat(Un,"-content")},$n),!Xn&&gi&&!ii&&Oe.createElement("div",{className:"".concat(Un,"-expand-icon")},gi),Xn&&tn&&Oe.createElement("div",{className:"".concat(Un,"-loading-icon")},tn))}))}var Ot=function(){var on=(0,Et.lk)(),ui=on.multiple,vi=on.open,bi=Oe.useContext(ce),In=bi.values,Gt=Oe.useState([]),Kt=(0,Pt.Z)(Gt,2),jt=Kt[0],ft=Kt[1];return Oe.useEffect(function(){if(vi&&!ui){var an=In[0];ft(an||[])}},[vi]),[jt,ft]},Cn=pe(10228),Wn=function(on,ui,vi,bi,In,Gt){var Kt=(0,Et.lk)(),jt=Kt.direction,ft=Kt.searchValue,an=Kt.toggleOpen,vn=Kt.open,Bt=jt==="rtl",at=Oe.useMemo(function(){for(var Bn=-1,Ft=ui,wn=[],gn=[],yn=bi.length,On=zt(ui,vi),$n=function($i){var Wi=Ft.findIndex(function(Xt,Si){return(On[Si]?bt(On[Si]):Xt[vi.value])===bi[$i]});if(Wi===-1)return"break";Bn=Wi,wn.push(Bn),gn.push(bi[$i]),Ft=Ft[Bn][vi.children]},Yn=0;Yn<yn&&Ft;Yn+=1){var ii=$n(Yn);if(ii==="break")break}for(var Xn=ui,di=0;di<wn.length-1;di+=1)Xn=Xn[wn[di]][vi.children];return[gn,Bn,Xn,On]},[bi,vi,ui]),cn=(0,Pt.Z)(at,4),Sn=cn[0],Un=cn[1],un=cn[2],Rt=cn[3],zn=function(Ft){In(Ft)},ni=function(Ft){var wn=un.length,gn=Un;gn===-1&&Ft<0&&(gn=wn);for(var yn=0;yn<wn;yn+=1){gn=(gn+Ft+wn)%wn;var On=un[gn];if(On&&!On.disabled){var $n=Sn.slice(0,-1).concat(Rt[gn]?bt(Rt[gn]):On[vi.value]);zn($n);return}}},gi=function(){if(Sn.length>1){var Ft=Sn.slice(0,-1);zn(Ft)}else an(!1)},tn=function(){var Ft,wn=((Ft=un[Un])===null||Ft===void 0?void 0:Ft[vi.children])||[],gn=wn.find(function(On){return!On.disabled});if(gn){var yn=[].concat((0,ge.Z)(Sn),[gn[vi.value]]);zn(yn)}};Oe.useImperativeHandle(on,function(){return{onKeyDown:function(Ft){var wn=Ft.which;switch(wn){case Cn.Z.UP:case Cn.Z.DOWN:{var gn=0;wn===Cn.Z.UP?gn=-1:wn===Cn.Z.DOWN&&(gn=1),gn!==0&&ni(gn);break}case Cn.Z.LEFT:{if(ft)break;Bt?tn():gi();break}case Cn.Z.RIGHT:{if(ft)break;Bt?gi():tn();break}case Cn.Z.BACKSPACE:{ft||gi();break}case Cn.Z.ENTER:{if(Sn.length){var yn=un[Un],On=(yn==null?void 0:yn[be])||[];On.length?Gt(On.map(function($n){return $n[vi.value]}),On[On.length-1]):Gt(Sn,un[Un])}break}case Cn.Z.ESC:an(!1),vn&&Ft.stopPropagation()}},onKeyUp:function(){}}})},We=Oe.forwardRef(function(on,ui){var vi,bi,In,Gt,Kt=(0,Et.lk)(),jt=Kt.prefixCls,ft=Kt.multiple,an=Kt.searchValue,vn=Kt.toggleOpen,Bt=Kt.notFoundContent,at=Kt.direction,cn=Kt.open,Sn=Oe.useRef(),Un=at==="rtl",un=Oe.useContext(ce),Rt=un.options,zn=un.values,ni=un.halfValues,gi=un.fieldNames,tn=un.changeOnSelect,Bn=un.onSelect,Ft=un.searchOptions,wn=un.dropdownPrefixCls,gn=un.loadData,yn=un.expandTrigger,On=wn||jt,$n=Oe.useState([]),Yn=(0,Pt.Z)($n,2),ii=Yn[0],Xn=Yn[1],di=function(xr){if(!(!gn||an)){var bo=Ut(xr,Rt,gi),Yr=bo.map(function(qi){var Dr=qi.option;return Dr}),ur=Yr[Yr.length-1];if(ur&&!Dt(ur,gi)){var ir=bt(xr);Xn(function(qi){return[].concat((0,ge.Z)(qi),[ir])}),gn(Yr)}}};Oe.useEffect(function(){ii.length&&ii.forEach(function(eo){var xr=wt(eo),bo=Ut(xr,Rt,gi,!0).map(function(ur){var ir=ur.option;return ir}),Yr=bo[bo.length-1];(!Yr||Yr[gi.children]||Dt(Yr,gi))&&Xn(function(ur){return ur.filter(function(ir){return ir!==eo})})})},[Rt,ii,gi]);var Hi=Oe.useMemo(function(){return new Set(He(zn))},[zn]),$i=Oe.useMemo(function(){return new Set(He(ni))},[ni]),Wi=Ot(),Xt=(0,Pt.Z)(Wi,2),Si=Xt[0],Ki=Xt[1],Ti=function(xr){Ki(xr),di(xr)},cr=function(xr){var bo=xr.disabled,Yr=Dt(xr,gi);return!bo&&(Yr||tn||ft)},Qi=function(xr,bo){var Yr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Bn(xr),!ft&&(bo||tn&&(yn==="hover"||Yr))&&vn(!1)},yr=Oe.useMemo(function(){return an?Ft:Rt},[an,Ft,Rt]),fr=Oe.useMemo(function(){for(var eo=[{options:yr}],xr=yr,bo=zt(xr,gi),Yr=function(){var Dr=Si[ur],Ai=xr.find(function(jr,yo){return(bo[yo]?bt(bo[yo]):jr[gi.value])===Dr}),et=Ai==null?void 0:Ai[gi.children];if(!(et!=null&&et.length))return"break";xr=et,eo.push({options:et})},ur=0;ur<Si.length;ur+=1){var ir=Yr();if(ir==="break")break}return eo},[yr,Si,gi]),Vi=function(xr,bo){cr(bo)&&Qi(xr,Dt(bo,gi),!0)};Wn(ui,yr,gi,Si,Ti,Vi),Oe.useEffect(function(){for(var eo=0;eo<Si.length;eo+=1){var xr,bo=Si.slice(0,eo+1),Yr=bt(bo),ur=(xr=Sn.current)===null||xr===void 0?void 0:xr.querySelector('li[data-path-key="'.concat(Yr.replace(/\\{0,2}"/g,'\\"'),'"]'));ur&&ht(ur)}},[Si]);var Mr=!((vi=fr[0])!==null&&vi!==void 0&&(bi=vi.options)!==null&&bi!==void 0&&bi.length),Dn=[(In={},(0,he.Z)(In,gi.value,"__EMPTY__"),(0,he.Z)(In,xn,Bt),(0,he.Z)(In,"disabled",!0),In)],Wr=(0,ve.Z)((0,ve.Z)({},on),{},{multiple:!Mr&&ft,onSelect:Qi,onActive:Ti,onToggleOpen:vn,checkedSet:Hi,halfCheckedSet:$i,loadingKeys:ii,isSelectable:cr}),_n=Mr?[{options:Dn}]:fr,Ir=_n.map(function(eo,xr){var bo=Si.slice(0,xr),Yr=Si[xr];return Oe.createElement(Qn,(0,Tt.Z)({key:xr},Wr,{searchValue:an,prefixCls:On,options:eo.options,prevValuePath:bo,activeValue:Yr}))});return Oe.createElement(An,{open:cn},Oe.createElement("div",{className:Le()("".concat(On,"-menus"),(Gt={},(0,he.Z)(Gt,"".concat(On,"-menu-empty"),Mr),(0,he.Z)(Gt,"".concat(On,"-rtl"),Un),Gt)),ref:Sn},Ir))}),Ee=We;function Pe(on){var ui=on.onPopupVisibleChange,vi=on.popupVisible,bi=on.popupClassName,In=on.popupPlacement;warning(!ui,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(vi===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(bi===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(In===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function De(on,ui){if(on){var vi=function bi(In){for(var Gt=0;Gt<In.length;Gt++){var Kt=In[Gt];if(Kt[ui==null?void 0:ui.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Kt[ui==null?void 0:ui.children])&&bi(Kt[ui==null?void 0:ui.children]))return!0}};vi(on)}}var Fe=null,ye=["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 Qe(on){return Array.isArray(on)&&Array.isArray(on[0])}function vt(on){return on?Qe(on)?on:(on.length===0?[]:[on]).map(function(ui){return Array.isArray(ui)?ui:[ui]}):[]}var Ye=Oe.forwardRef(function(on,ui){var vi=on.id,bi=on.prefixCls,In=bi===void 0?"rc-cascader":bi,Gt=on.fieldNames,Kt=on.defaultValue,jt=on.value,ft=on.changeOnSelect,an=on.onChange,vn=on.displayRender,Bt=on.checkable,at=on.autoClearSearchValue,cn=at===void 0?!0:at,Sn=on.searchValue,Un=on.onSearch,un=on.showSearch,Rt=on.expandTrigger,zn=on.options,ni=on.dropdownPrefixCls,gi=on.loadData,tn=on.popupVisible,Bn=on.open,Ft=on.popupClassName,wn=on.dropdownClassName,gn=on.dropdownMenuColumnStyle,yn=on.popupPlacement,On=on.placement,$n=on.onDropdownVisibleChange,Yn=on.onPopupVisibleChange,ii=on.expandIcon,Xn=ii===void 0?">":ii,di=on.loadingIcon,Hi=on.children,$i=on.dropdownMatchSelectWidth,Wi=$i===void 0?!1:$i,Xt=on.showCheckedStrategy,Si=Xt===void 0?ot:Xt,Ki=(0,Xe.Z)(on,ye),Ti=(0,ct.ZP)(vi),cr=!!Bt,Qi=(0,ne.Z)(Kt,{value:jt,postState:vt}),yr=(0,Pt.Z)(Qi,2),fr=yr[0],Vi=yr[1],Mr=Oe.useMemo(function(){return nt(Gt)},[JSON.stringify(Gt)]),Dn=Oe.useMemo(function(){return zn||[]},[zn]),Wr=Wt(Dn,Mr),_n=Oe.useCallback(function(ko){var Io=Wr();return ko.map(function(_o){var la=Io[_o].nodes;return la.map(function(pa){return pa[Mr.value]})})},[Wr,Mr]),Ir=(0,ne.Z)("",{value:Sn,postState:function(Io){return Io||""}}),eo=(0,Pt.Z)(Ir,2),xr=eo[0],bo=eo[1],Yr=function(Io,_o){bo(Io),_o.source!=="blur"&&Un&&Un(Io)},ur=$t(un),ir=(0,Pt.Z)(ur,2),qi=ir[0],Dr=ir[1],Ai=ze(xr,Dn,Mr,ni||In,Dr,ft),et=Ln(Dn,Mr),jr=Oe.useMemo(function(){var ko=et(fr),Io=(0,Pt.Z)(ko,2),_o=Io[0],la=Io[1];if(!cr||!fr.length)return[_o,[],la];var pa=He(_o),Lt=Wr(),wi=(0,It.S)(pa,!0,Lt),_t=wi.checkedKeys,Yi=wi.halfCheckedKeys;return[_n(_t),_n(Yi),la]},[cr,fr,Wr,_n,et]),yo=(0,Pt.Z)(jr,3),Or=yo[0],wo=yo[1],co=yo[2],$o=Oe.useMemo(function(){var ko=He(Or),Io=Yt(ko,Wr,Si);return[].concat((0,ge.Z)(co),(0,ge.Z)(_n(Io)))},[Or,Wr,_n,co,Si]),Gr=it($o,Dn,Mr,cr,vn),zr=(0,Be.Z)(function(ko){if(Vi(ko),an){var Io=vt(ko),_o=Io.map(function(Lt){return Ut(Lt,Dn,Mr).map(function(wi){return wi.option})}),la=cr?Io:Io[0],pa=cr?_o:_o[0];an(la,pa)}}),Nr=(0,Be.Z)(function(ko){if((!cr||cn)&&bo(""),!cr)zr(ko);else{var Io=bt(ko),_o=He(Or),la=He(wo),pa=_o.includes(Io),Lt=co.some(function(tr){return bt(tr)===Io}),wi=Or,_t=co;if(Lt&&!pa)_t=co.filter(function(tr){return bt(tr)!==Io});else{var Yi=pa?_o.filter(function(tr){return tr!==Io}):[].concat((0,ge.Z)(_o),[Io]),Ci=Wr(),Cr;if(pa){var Ri=(0,It.S)(Yi,{checked:!1,halfCheckedKeys:la},Ci);Cr=Ri.checkedKeys}else{var Ii=(0,It.S)(Yi,!0,Ci);Cr=Ii.checkedKeys}var er=Yt(Cr,Wr,Si);wi=_n(er)}zr([].concat((0,ge.Z)(_t),(0,ge.Z)(wi)))}}),Eo=function(Io,_o){if(_o.type==="clear"){zr([]);return}var la=_o.values[0],pa=la.valueCells;Nr(pa)},or=Bn!==void 0?Bn:tn,mr=wn||Ft,$r=On||yn,hi=function(Io){$n==null||$n(Io),Yn==null||Yn(Io)},Ao=Oe.useMemo(function(){return{options:Dn,fieldNames:Mr,values:Or,halfValues:wo,changeOnSelect:ft,onSelect:Nr,checkable:Bt,searchOptions:Ai,dropdownPrefixCls:ni,loadData:gi,expandTrigger:Rt,expandIcon:Xn,loadingIcon:di,dropdownMenuColumnStyle:gn}},[Dn,Mr,Or,wo,ft,Nr,Bt,Ai,ni,gi,Rt,Xn,di,gn]),Vo=!(xr?Ai:Dn).length,sa=xr&&Dr.matchInputWidth||Vo?{}:{minWidth:"auto"};return Oe.createElement(ce.Provider,{value:Ao},Oe.createElement(Et.Ac,(0,Tt.Z)({},Ki,{ref:ui,id:Ti,prefixCls:In,autoClearSearchValue:cn,dropdownMatchSelectWidth:Wi,dropdownStyle:sa,displayValues:Gr,onDisplayValuesChange:Eo,mode:cr?"multiple":void 0,searchValue:xr,onSearch:Yr,showSearch:qi,OptionList:Ee,emptyOptions:Vo,open:or,dropdownClassName:mr,placement:$r,onDropdownVisibleChange:hi,getRawInputElement:function(){return Hi}})))});Ye.SHOW_PARENT=ot,Ye.SHOW_CHILD=qe;var Je=Ye,yt=Je,St=pe(2738),rt=pe(62892),Zt=pe(53487),dn=pe(19080),mn=pe(36355),qt=pe(93891),Gn=pe(1684),Kn=pe(19716),Nt=pe(32441),sn=pe(14154),Fn=pe(58582),hn=pe(84443),Mn=pe(66339),li=pe(33234),pi=pe(98447),mi=pe(17313),Li=pe(74207),Gi=pe(83116);const ar=on=>{const{prefixCls:ui,componentCls:vi,antCls:bi}=on,In=`${vi}-menu-item`,Gt=`
&${In}-expand ${In}-expand-icon,
${In}-loading-icon
`;return[{[vi]:{width:on.controlWidth}},{[`${vi}-dropdown`]:[(0,pi.C2)(`${ui}-checkbox`,on),{[`&${bi}-select-dropdown`]:{padding:0}},{[vi]:{"&-checkbox":{top:0,marginInlineEnd:on.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${vi}-menu-empty`]:{[`${vi}-menu`]:{width:"100%",height:"auto",[In]:{color:on.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:on.controlItemWidth,height:on.dropdownHeight,margin:0,padding:on.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${on.lineWidth}px ${on.lineType} ${on.colorSplit}`},"&-item":Object.assign(Object.assign({},mi.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:on.optionPadding,lineHeight:on.lineHeight,cursor:"pointer",transition:`all ${on.motionDurationMid}`,borderRadius:on.borderRadiusSM,"&:hover":{background:on.controlItemBgHover},"&-disabled":{color:on.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[Gt]:{color:on.colorTextDisabled}},[`&-active:not(${In}-disabled)`]:{"&, &:hover":{fontWeight:on.optionSelectedFontWeight,backgroundColor:on.optionSelectedBg}},"&-content":{flex:"auto"},[Gt]:{marginInlineStart:on.paddingXXS,color:on.colorTextDescription,fontSize:on.fontSizeIcon},"&-keyword":{color:on.colorHighlight}})}}}]},{[`${vi}-dropdown-rtl`]:{direction:"rtl"}},(0,Li.c)(on)]};var Xi=(0,Gi.Z)("Cascader",on=>[ar(on)],on=>{const ui=Math.round((on.controlHeight-on.fontSize*on.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:on.controlItemBgActive,optionSelectedFontWeight:on.fontWeightStrong,optionPadding:`${ui}px ${on.paddingSM}px`,menuPadding:on.paddingXXS}}),wr=function(on,ui){var vi={};for(var bi in on)Object.prototype.hasOwnProperty.call(on,bi)&&ui.indexOf(bi)<0&&(vi[bi]=on[bi]);if(on!=null&&typeof Object.getOwnPropertySymbols=="function")for(var In=0,bi=Object.getOwnPropertySymbols(on);In<bi.length;In++)ui.indexOf(bi[In])<0&&Object.prototype.propertyIsEnumerable.call(on,bi[In])&&(vi[bi[In]]=on[bi[In]]);return vi};const{SHOW_CHILD:vr,SHOW_PARENT:ji}=yt;function Lr(on,ui,vi){const bi=on.toLowerCase().split(ui).reduce((Kt,jt,ft)=>ft===0?[jt]:[].concat((0,ge.Z)(Kt),[ui,jt]),[]),In=[];let Gt=0;return bi.forEach((Kt,jt)=>{const ft=Gt+Kt.length;let an=on.slice(Gt,ft);Gt=ft,jt%2===1&&(an=Oe.createElement("span",{className:`${vi}-menu-item-keyword`,key:`separator-${jt}`},an)),In.push(an)}),In}const jn=(on,ui,vi,bi)=>{const In=[],Gt=on.toLowerCase();return ui.forEach((Kt,jt)=>{jt!==0&&In.push(" / ");let ft=Kt[bi.label];const an=typeof ft;(an==="string"||an==="number")&&(ft=Lr(String(ft),Gt,vi)),In.push(ft)}),In},Ne=Oe.forwardRef((on,ui)=>{const{prefixCls:vi,size:bi,disabled:In,className:Gt,rootClassName:Kt,multiple:jt,bordered:ft=!0,transitionName:an,choiceTransitionName:vn="",popupClassName:Bt,dropdownClassName:at,expandIcon:cn,placement:Sn,showSearch:Un,allowClear:un=!0,notFoundContent:Rt,direction:zn,getPopupContainer:ni,status:gi,showArrow:tn,builtinPlacements:Bn,style:Ft}=on,wn=wr(on,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),gn=(0,St.Z)(wn,["suffixIcon"]),{getPopupContainer:yn,getPrefixCls:On,renderEmpty:$n,direction:Yn,popupOverflow:ii,cascader:Xn}=Oe.useContext(mn.E_),di=zn||Yn,Hi=di==="rtl",{status:$i,hasFeedback:Wi,isFormItemInput:Xt,feedbackIcon:Si}=Oe.useContext(Nt.aM),Ki=(0,dn.F)($i,gi),Ti=Rt||($n==null?void 0:$n("Cascader"))||Oe.createElement(qt.Z,{componentName:"Cascader"}),cr=On(),Qi=On("select",vi),yr=On("cascader",vi),[fr,Vi]=(0,sn.Z)(Qi),[Mr]=Xi(yr),{compactSize:Dn,compactItemClassnames:Wr}=(0,li.ri)(Qi,zn),_n=Le()(Bt||at,`${yr}-dropdown`,{[`${yr}-dropdown-rtl`]:di==="rtl"},Kt,Vi),Ir=Oe.useMemo(()=>{if(!Un)return Un;let co={render:jn};return typeof Un=="object"&&(co=Object.assign(Object.assign({},co),Un)),co},[Un]),eo=(0,Kn.Z)(co=>{var $o;return($o=bi!=null?bi:Dn)!==null&&$o!==void 0?$o:co}),xr=Oe.useContext(Gn.Z),bo=In!=null?In:xr;let Yr=cn;cn||(Yr=Hi?Oe.createElement(Ke.Z,null):Oe.createElement(Ge.Z,null));const ur=Oe.createElement("span",{className:`${Qi}-menu-item-loading-icon`},Oe.createElement(st.Z,{spin:!0})),ir=Oe.useMemo(()=>jt?Oe.createElement("span",{className:`${yr}-checkbox-inner`}):!1,[jt]),qi=(0,hn.Z)(on.suffixIcon,tn),{suffixIcon:Dr,removeIcon:Ai,clearIcon:et}=(0,Mn.Z)(Object.assign(Object.assign({},on),{hasFeedback:Wi,feedbackIcon:Si,showSuffixIcon:qi,multiple:jt,prefixCls:Qi,componentName:"Cascader"})),jr=Oe.useMemo(()=>Sn!==void 0?Sn:Hi?"bottomRight":"bottomLeft",[Sn,Hi]),yo=(0,Fn.Z)(Bn,ii),Or=un===!0?{clearIcon:et}:un,wo=Oe.createElement(yt,Object.assign({prefixCls:Qi,className:Le()(!vi&&yr,{[`${Qi}-lg`]:eo==="large",[`${Qi}-sm`]:eo==="small",[`${Qi}-rtl`]:Hi,[`${Qi}-borderless`]:!ft,[`${Qi}-in-form-item`]:Xt},(0,dn.Z)(Qi,Ki,Wi),Wr,Xn==null?void 0:Xn.className,Gt,Kt,Vi),disabled:bo,style:Object.assign(Object.assign({},Xn==null?void 0:Xn.style),Ft)},gn,{builtinPlacements:yo,direction:di,placement:jr,notFoundContent:Ti,allowClear:Or,showSearch:Ir,expandIcon:Yr,suffixIcon:Dr,removeIcon:Ai,loadingIcon:ur,checkable:ir,dropdownClassName:_n,dropdownPrefixCls:vi||yr,choiceTransitionName:(0,rt.m)(cr,"",vn),transitionName:(0,rt.m)(cr,"slide-up",an),getPopupContainer:ni||yn,ref:ui}));return Mr(fr(wo))}),Ei=(0,Zt.Z)(Ne);Ne.SHOW_PARENT=ji,Ne.SHOW_CHILD=vr,Ne._InternalPanelDoNotUseOrYouWillBeFired=Ei;var Oi=Ne},24905:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return ze}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(5630),st=pe(59301),Ge=pe(36355),_e=pe(1684),Le=pe(32441),Pt=st.createContext(null),Xe=pe(98447),Et=pe(14088),ct=pe(4572),It=function(Ze,ot){var qe={};for(var bt in Ze)Object.prototype.hasOwnProperty.call(Ze,bt)&&ot.indexOf(bt)<0&&(qe[bt]=Ze[bt]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,bt=Object.getOwnPropertySymbols(Ze);He<bt.length;He++)ot.indexOf(bt[He])<0&&Object.prototype.propertyIsEnumerable.call(Ze,bt[He])&&(qe[bt[He]]=Ze[bt[He]]);return qe};const Be=(Ze,ot)=>{var qe;const{prefixCls:bt,className:He,rootClassName:wt,children:nt,indeterminate:Dt=!1,style:ht,onMouseEnter:zt,onMouseLeave:Yt,skipGroup:Ut=!1,disabled:it}=Ze,Ve=It(Ze,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Wt,direction:Ln,checkbox:Nn}=st.useContext(Ge.E_),$t=st.useContext(Pt),{isFormItemInput:rn}=st.useContext(Le.aM),An=st.useContext(_e.Z),ti=(qe=($t==null?void 0:$t.disabled)||it)!==null&&qe!==void 0?qe:An,xn=st.useRef(Ve.value);st.useEffect(()=>{$t==null||$t.registerValue(Ve.value)},[]),st.useEffect(()=>{if(!Ut)return Ve.value!==xn.current&&($t==null||$t.cancelValue(xn.current),$t==null||$t.registerValue(Ve.value),xn.current=Ve.value),()=>$t==null?void 0:$t.cancelValue(Ve.value)},[Ve.value]);const Qn=Wt("checkbox",bt),[Ot,Cn]=(0,Xe.ZP)(Qn),Wn=Object.assign({},Ve);$t&&!Ut&&(Wn.onChange=function(){Ve.onChange&&Ve.onChange.apply(Ve,arguments),$t.toggleOption&&$t.toggleOption({label:nt,value:Ve.value})},Wn.name=$t.name,Wn.checked=$t.value.includes(Ve.value));const We=Oe()(`${Qn}-wrapper`,{[`${Qn}-rtl`]:Ln==="rtl",[`${Qn}-wrapper-checked`]:Wn.checked,[`${Qn}-wrapper-disabled`]:ti,[`${Qn}-wrapper-in-form-item`]:rn},Nn==null?void 0:Nn.className,He,wt,Cn),Ee=Oe()({[`${Qn}-indeterminate`]:Dt},ct.A,Cn),Pe=Dt?"mixed":void 0;return Ot(st.createElement(Et.Z,{component:"Checkbox",disabled:ti},st.createElement("label",{className:We,style:Object.assign(Object.assign({},Nn==null?void 0:Nn.style),ht),onMouseEnter:zt,onMouseLeave:Yt},st.createElement(Ke.Z,Object.assign({"aria-checked":Pe},Wn,{prefixCls:Qn,className:Ee,disabled:ti,ref:ot})),nt!==void 0&&st.createElement("span",null,nt))))};var ee=st.forwardRef(Be),ce=pe(26407),se=pe(2738),he=function(Ze,ot){var qe={};for(var bt in Ze)Object.prototype.hasOwnProperty.call(Ze,bt)&&ot.indexOf(bt)<0&&(qe[bt]=Ze[bt]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,bt=Object.getOwnPropertySymbols(Ze);He<bt.length;He++)ot.indexOf(bt[He])<0&&Object.prototype.propertyIsEnumerable.call(Ze,bt[He])&&(qe[bt[He]]=Ze[bt[He]]);return qe};const ve=(Ze,ot)=>{const{defaultValue:qe,children:bt,options:He=[],prefixCls:wt,className:nt,rootClassName:Dt,style:ht,onChange:zt}=Ze,Yt=he(Ze,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Ut,direction:it}=st.useContext(Ge.E_),[Ve,Wt]=st.useState(Yt.value||qe||[]),[Ln,Nn]=st.useState([]);st.useEffect(()=>{"value"in Yt&&Wt(Yt.value||[])},[Yt.value]);const $t=st.useMemo(()=>He.map(De=>typeof De=="string"||typeof De=="number"?{label:De,value:De}:De),[He]),rn=De=>{Nn(Fe=>Fe.filter(ye=>ye!==De))},An=De=>{Nn(Fe=>[].concat((0,ce.Z)(Fe),[De]))},ti=De=>{const Fe=Ve.indexOf(De.value),ye=(0,ce.Z)(Ve);Fe===-1?ye.push(De.value):ye.splice(Fe,1),"value"in Yt||Wt(ye),zt==null||zt(ye.filter(Qe=>Ln.includes(Qe)).sort((Qe,vt)=>{const Ye=$t.findIndex(yt=>yt.value===Qe),Je=$t.findIndex(yt=>yt.value===vt);return Ye-Je}))},xn=Ut("checkbox",wt),Qn=`${xn}-group`,[Ot,Cn]=(0,Xe.ZP)(xn),Wn=(0,se.Z)(Yt,["value","disabled"]),We=He.length?$t.map(De=>st.createElement(ee,{prefixCls:xn,key:De.value.toString(),disabled:"disabled"in De?De.disabled:Yt.disabled,value:De.value,checked:Ve.includes(De.value),onChange:De.onChange,className:`${Qn}-item`,style:De.style,title:De.title},De.label)):bt,Ee={toggleOption:ti,value:Ve,disabled:Yt.disabled,name:Yt.name,registerValue:An,cancelValue:rn},Pe=Oe()(Qn,{[`${Qn}-rtl`]:it==="rtl"},nt,Dt,Cn);return Ot(st.createElement("div",Object.assign({className:Pe,style:ht},Wn,{ref:ot}),st.createElement(Pt.Provider,{value:Ee},We)))},be=st.forwardRef(ve);var ke=st.memo(be);const Ae=ee;Ae.Group=ke,Ae.__ANT_CHECKBOX=!0;var ze=Ae},98447:function(Vn,Pn,pe){"use strict";pe.d(Pn,{C2:function(){return Ge}});var ge=pe(17313),Oe=pe(37613),Ke=pe(83116);const st=_e=>{const{checkboxCls:Le}=_e,Tt=`${Le}-wrapper`;return[{[`${Le}-group`]:Object.assign(Object.assign({},(0,ge.Wf)(_e)),{display:"inline-flex",flexWrap:"wrap",columnGap:_e.marginXS,[`> ${_e.antCls}-row`]:{flex:1}}),[Tt]:Object.assign(Object.assign({},(0,ge.Wf)(_e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Tt}`]:{marginInlineStart:0},[`&${Tt}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Le]:Object.assign(Object.assign({},(0,ge.Wf)(_e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:_e.borderRadiusSM,alignSelf:"center",[`${Le}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Le}-inner`]:Object.assign({},(0,ge.oN)(_e))},[`${Le}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:_e.checkboxSize,height:_e.checkboxSize,direction:"ltr",backgroundColor:_e.colorBgContainer,border:`${_e.lineWidth}px ${_e.lineType} ${_e.colorBorder}`,borderRadius:_e.borderRadiusSM,borderCollapse:"separate",transition:`all ${_e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:_e.checkboxSize/14*5,height:_e.checkboxSize/14*8,border:`${_e.lineWidthBold}px solid ${_e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${_e.motionDurationFast} ${_e.motionEaseInBack}, opacity ${_e.motionDurationFast}`}},"& + span":{paddingInlineStart:_e.paddingXS,paddingInlineEnd:_e.paddingXS}})},{[`
${Tt}:not(${Tt}-disabled),
${Le}:not(${Le}-disabled)
`]:{[`&:hover ${Le}-inner`]:{borderColor:_e.colorPrimary}},[`${Tt}:not(${Tt}-disabled)`]:{[`&:hover ${Le}-checked:not(${Le}-disabled) ${Le}-inner`]:{backgroundColor:_e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Le}-checked:not(${Le}-disabled):after`]:{borderColor:_e.colorPrimaryHover}}},{[`${Le}-checked`]:{[`${Le}-inner`]:{backgroundColor:_e.colorPrimary,borderColor:_e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${_e.motionDurationMid} ${_e.motionEaseOutBack} ${_e.motionDurationFast}`}}},[`
${Tt}-checked:not(${Tt}-disabled),
${Le}-checked:not(${Le}-disabled)
`]:{[`&:hover ${Le}-inner`]:{backgroundColor:_e.colorPrimaryHover,borderColor:"transparent"}}},{[Le]:{"&-indeterminate":{[`${Le}-inner`]:{backgroundColor:_e.colorBgContainer,borderColor:_e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:_e.fontSizeLG/2,height:_e.fontSizeLG/2,backgroundColor:_e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Tt}-disabled`]:{cursor:"not-allowed"},[`${Le}-disabled`]:{[`&, ${Le}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Le}-inner`]:{background:_e.colorBgContainerDisabled,borderColor:_e.colorBorder,"&:after":{borderColor:_e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:_e.colorTextDisabled},[`&${Le}-indeterminate ${Le}-inner::after`]:{background:_e.colorTextDisabled}}}]};function Ge(_e,Le){const Tt=(0,Oe.TS)(Le,{checkboxCls:`.${_e}`,checkboxSize:Le.controlInteractiveSize});return[st(Tt)]}Pn.ZP=(0,Ke.Z)("Checkbox",(_e,Le)=>{let{prefixCls:Tt}=Le;return[Ge(Tt,_e)]})},36381:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return Wn}});var ge=pe(38819),Oe=pe(92310),Ke=pe.n(Oe),st=pe(92413),Ge=pe(26407),_e=pe(33606),Le=pe(39559),Tt=pe(18929),Pt=pe(48736),Xe=pe(59301),Et=pe(37061),ct=pe(11592),It=pe(400),Be=pe(77900),ne=pe(10228),ee=Xe.forwardRef(function(We,Ee){var Pe=We.prefixCls,De=We.forceRender,Fe=We.className,ye=We.style,Qe=We.children,vt=We.isActive,Ye=We.role,Je=Xe.useState(vt||De),yt=(0,_e.Z)(Je,2),St=yt[0],rt=yt[1];return Xe.useEffect(function(){(De||vt)&&rt(!0)},[De,vt]),St?Xe.createElement("div",{ref:Ee,className:Ke()("".concat(Pe,"-content"),(0,It.Z)((0,It.Z)({},"".concat(Pe,"-content-active"),vt),"".concat(Pe,"-content-inactive"),!vt),Fe),style:ye,role:Ye},Xe.createElement("div",{className:"".concat(Pe,"-content-box")},Qe)):null});ee.displayName="PanelContent";var ce=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],he=Xe.forwardRef(function(We,Ee){var Pe=We.showArrow,De=Pe===void 0?!0:Pe,Fe=We.headerClass,ye=We.isActive,Qe=We.onItemClick,vt=We.forceRender,Ye=We.className,Je=We.prefixCls,yt=We.collapsible,St=We.accordion,rt=We.panelKey,Zt=We.extra,dn=We.header,mn=We.expandIcon,qt=We.openMotion,Gn=We.destroyInactivePanel,Kn=We.children,Nt=(0,Et.Z)(We,se),sn=yt==="disabled",Fn=yt==="header",hn=yt==="icon",Mn=Zt!=null&&typeof Zt!="boolean",li=function(){Qe==null||Qe(rt)},pi=function(wr){(wr.key==="Enter"||wr.keyCode===ne.Z.ENTER||wr.which===ne.Z.ENTER)&&li()},mi=typeof mn=="function"?mn(We):Xe.createElement("i",{className:"arrow"});mi&&(mi=Xe.createElement("div",{className:"".concat(Je,"-expand-icon"),onClick:["header","icon"].includes(yt)?li:void 0},mi));var Li=Ke()((0,It.Z)((0,It.Z)((0,It.Z)({},"".concat(Je,"-item"),!0),"".concat(Je,"-item-active"),ye),"".concat(Je,"-item-disabled"),sn),Ye),Gi=Ke()(Fe,(0,It.Z)((0,It.Z)((0,It.Z)({},"".concat(Je,"-header"),!0),"".concat(Je,"-header-collapsible-only"),Fn),"".concat(Je,"-icon-collapsible-only"),hn)),ar={className:Gi,"aria-expanded":ye,"aria-disabled":sn,onKeyDown:pi};return!Fn&&!hn&&(ar.onClick=li,ar.role=St?"tab":"button",ar.tabIndex=sn?-1:0),Xe.createElement("div",(0,st.Z)({},Nt,{ref:Ee,className:Li}),Xe.createElement("div",ar,De&&mi,Xe.createElement("span",{className:"".concat(Je,"-header-text"),onClick:yt==="header"?li:void 0},dn),Mn&&Xe.createElement("div",{className:"".concat(Je,"-extra")},Zt)),Xe.createElement(Be.default,(0,st.Z)({visible:ye,leavedClassName:"".concat(Je,"-content-hidden")},qt,{forceRender:vt,removeOnLeave:Gn}),function(Xi,wr){var vr=Xi.className,ji=Xi.style;return Xe.createElement(ce,{ref:wr,prefixCls:Je,className:vr,style:ji,isActive:ye,forceRender:vt,role:St?"tabpanel":void 0},Kn)}))}),ve=he,be=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],ke=function(Ee,Pe){var De=Pe.prefixCls,Fe=Pe.accordion,ye=Pe.collapsible,Qe=Pe.destroyInactivePanel,vt=Pe.onItemClick,Ye=Pe.activeKey,Je=Pe.openMotion,yt=Pe.expandIcon;return Ee.map(function(St,rt){var Zt=St.children,dn=St.label,mn=St.key,qt=St.collapsible,Gn=St.onItemClick,Kn=St.destroyInactivePanel,Nt=(0,Et.Z)(St,be),sn=String(mn!=null?mn:rt),Fn=qt!=null?qt:ye,hn=Kn!=null?Kn:Qe,Mn=function(mi){Fn!=="disabled"&&(vt(mi),Gn==null||Gn(mi))},li=!1;return Fe?li=Ye[0]===sn:li=Ye.indexOf(sn)>-1,Xe.createElement(ve,(0,st.Z)({},Nt,{prefixCls:De,key:sn,panelKey:sn,isActive:li,accordion:Fe,openMotion:Je,expandIcon:yt,header:dn,collapsible:Fn,onItemClick:Mn,destroyInactivePanel:hn}),Zt)})},Ae=function(Ee,Pe,De){if(!Ee)return null;var Fe=De.prefixCls,ye=De.accordion,Qe=De.collapsible,vt=De.destroyInactivePanel,Ye=De.onItemClick,Je=De.activeKey,yt=De.openMotion,St=De.expandIcon,rt=Ee.key||String(Pe),Zt=Ee.props,dn=Zt.header,mn=Zt.headerClass,qt=Zt.destroyInactivePanel,Gn=Zt.collapsible,Kn=Zt.onItemClick,Nt=!1;ye?Nt=Je[0]===rt:Nt=Je.indexOf(rt)>-1;var sn=Gn!=null?Gn:Qe,Fn=function(li){sn!=="disabled"&&(Ye(li),Kn==null||Kn(li))},hn={key:rt,panelKey:rt,header:dn,headerClass:mn,isActive:Nt,prefixCls:Fe,destroyInactivePanel:qt!=null?qt:vt,openMotion:yt,accordion:ye,children:Ee.props.children,onItemClick:Fn,expandIcon:St,collapsible:sn};return typeof Ee.type=="string"?Ee:(Object.keys(hn).forEach(function(Mn){typeof hn[Mn]=="undefined"&&delete hn[Mn]}),Xe.cloneElement(Ee,hn))};function ze(We,Ee,Pe){return Array.isArray(We)?ke(We,Pe):(0,ct.Z)(Ee).map(function(De,Fe){return Ae(De,Fe,Pe)})}var Ze=ze,ot=pe(26112);function qe(We){var Ee=We;if(!Array.isArray(Ee)){var Pe=(0,Le.Z)(Ee);Ee=Pe==="number"||Pe==="string"?[Ee]:[]}return Ee.map(function(De){return String(De)})}var bt=Xe.forwardRef(function(We,Ee){var Pe=We.prefixCls,De=Pe===void 0?"rc-collapse":Pe,Fe=We.destroyInactivePanel,ye=Fe===void 0?!1:Fe,Qe=We.style,vt=We.accordion,Ye=We.className,Je=We.children,yt=We.collapsible,St=We.openMotion,rt=We.expandIcon,Zt=We.activeKey,dn=We.defaultActiveKey,mn=We.onChange,qt=We.items,Gn=Ke()(De,Ye),Kn=(0,Tt.Z)([],{value:Zt,onChange:function(pi){return mn==null?void 0:mn(pi)},defaultValue:dn,postState:qe}),Nt=(0,_e.Z)(Kn,2),sn=Nt[0],Fn=Nt[1],hn=function(pi){return Fn(function(){if(vt)return sn[0]===pi?[]:[pi];var mi=sn.indexOf(pi),Li=mi>-1;return Li?sn.filter(function(Gi){return Gi!==pi}):[].concat((0,Ge.Z)(sn),[pi])})};(0,Pt.ZP)(!Je,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Mn=Ze(qt,Je,{prefixCls:De,accordion:vt,openMotion:St,expandIcon:rt,collapsible:yt,destroyInactivePanel:ye,onItemClick:hn,activeKey:sn});return Xe.createElement("div",(0,st.Z)({ref:Ee,className:Gn,style:Qe,role:vt?"tablist":void 0},(0,ot.Z)(We,{aria:!0,data:!0})),Mn)}),He=Object.assign(bt,{Panel:ve}),wt=He,nt=He.Panel,Dt=pe(2738),ht=pe(62892),zt=pe(92343),Yt=pe(36355),Ut=pe(19716),Ve=Xe.forwardRef((We,Ee)=>{const{getPrefixCls:Pe}=Xe.useContext(Yt.E_),{prefixCls:De,className:Fe,showArrow:ye=!0}=We,Qe=Pe("collapse",De),vt=Ke()({[`${Qe}-no-arrow`]:!ye},Fe);return Xe.createElement(wt.Panel,Object.assign({ref:Ee},We,{prefixCls:Qe,className:vt}))}),Wt=pe(17313),Ln=pe(8378),Nn=pe(83116),$t=pe(37613);const rn=We=>{const{componentCls:Ee,contentBg:Pe,padding:De,headerBg:Fe,headerPadding:ye,collapseHeaderPaddingSM:Qe,collapseHeaderPaddingLG:vt,collapsePanelBorderRadius:Ye,lineWidth:Je,lineType:yt,colorBorder:St,colorText:rt,colorTextHeading:Zt,colorTextDisabled:dn,fontSize:mn,fontSizeLG:qt,lineHeight:Gn,marginSM:Kn,paddingSM:Nt,paddingLG:sn,paddingXS:Fn,motionDurationSlow:hn,fontSizeIcon:Mn,contentPadding:li}=We,pi=`${Je}px ${yt} ${St}`;return{[Ee]:Object.assign(Object.assign({},(0,Wt.Wf)(We)),{backgroundColor:Fe,border:pi,borderBottom:0,borderRadius:`${Ye}px`,"&-rtl":{direction:"rtl"},[`& > ${Ee}-item`]:{borderBottom:pi,"&:last-child":{[`
&,
& > ${Ee}-header`]:{borderRadius:`0 0 ${Ye}px ${Ye}px`}},[`> ${Ee}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:ye,color:Zt,lineHeight:Gn,cursor:"pointer",transition:`all ${hn}, visibility 0s`,[`> ${Ee}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${Ee}-expand-icon`]:{height:mn*Gn,display:"flex",alignItems:"center",paddingInlineEnd:Kn},[`${Ee}-arrow`]:Object.assign(Object.assign({},(0,Wt.Ro)()),{fontSize:Mn,svg:{transition:`transform ${hn}`}}),[`${Ee}-header-text`]:{marginInlineEnd:"auto"}},[`${Ee}-header-collapsible-only`]:{cursor:"default",[`${Ee}-header-text`]:{flex:"none",cursor:"pointer"}},[`${Ee}-icon-collapsible-only`]:{cursor:"default",[`${Ee}-expand-icon`]:{cursor:"pointer"}}},[`${Ee}-content`]:{color:rt,backgroundColor:Pe,borderTop:pi,[`& > ${Ee}-content-box`]:{padding:li},"&-hidden":{display:"none"}},"&-small":{[`> ${Ee}-item`]:{[`> ${Ee}-header`]:{padding:Qe,paddingInlineStart:Fn,[`> ${Ee}-expand-icon`]:{marginInlineStart:Nt-Fn}},[`> ${Ee}-content > ${Ee}-content-box`]:{padding:Nt}}},"&-large":{[`> ${Ee}-item`]:{fontSize:qt,[`> ${Ee}-header`]:{padding:vt,paddingInlineStart:De,[`> ${Ee}-expand-icon`]:{height:qt*Gn,marginInlineStart:sn-De}},[`> ${Ee}-content > ${Ee}-content-box`]:{padding:sn}}},[`${Ee}-item:last-child`]:{[`> ${Ee}-content`]:{borderRadius:`0 0 ${Ye}px ${Ye}px`}},[`& ${Ee}-item-disabled > ${Ee}-header`]:{"\n &,\n & > .arrow\n ":{color:dn,cursor:"not-allowed"}},[`&${Ee}-icon-position-end`]:{[`& > ${Ee}-item`]:{[`> ${Ee}-header`]:{[`${Ee}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:Kn}}}}})}},An=We=>{const{componentCls:Ee}=We,Pe=`> ${Ee}-item > ${Ee}-header ${Ee}-arrow svg`;return{[`${Ee}-rtl`]:{[Pe]:{transform:"rotate(180deg)"}}}},ti=We=>{const{componentCls:Ee,headerBg:Pe,paddingXXS:De,colorBorder:Fe}=We;return{[`${Ee}-borderless`]:{backgroundColor:Pe,border:0,[`> ${Ee}-item`]:{borderBottom:`1px solid ${Fe}`},[`
> ${Ee}-item:last-child,
> ${Ee}-item:last-child ${Ee}-header
`]:{borderRadius:0},[`> ${Ee}-item:last-child`]:{borderBottom:0},[`> ${Ee}-item > ${Ee}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${Ee}-item > ${Ee}-content > ${Ee}-content-box`]:{paddingTop:De}}}},xn=We=>{const{componentCls:Ee,paddingSM:Pe}=We;return{[`${Ee}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${Ee}-item`]:{borderBottom:0,[`> ${Ee}-content`]:{backgroundColor:"transparent",border:0,[`> ${Ee}-content-box`]:{paddingBlock:Pe}}}}}};var Qn=(0,Nn.Z)("Collapse",We=>{const Ee=(0,$t.TS)(We,{collapseHeaderPaddingSM:`${We.paddingXS}px ${We.paddingSM}px`,collapseHeaderPaddingLG:`${We.padding}px ${We.paddingLG}px`,collapsePanelBorderRadius:We.borderRadiusLG});return[rn(Ee),ti(Ee),xn(Ee),An(Ee),(0,Ln.Z)(Ee)]},We=>({headerPadding:`${We.paddingSM}px ${We.padding}px`,headerBg:We.colorFillAlter,contentPadding:`${We.padding}px 16px`,contentBg:We.colorBgContainer})),Cn=Object.assign(Xe.forwardRef((We,Ee)=>{const{getPrefixCls:Pe,direction:De,collapse:Fe}=Xe.useContext(Yt.E_),{prefixCls:ye,className:Qe,rootClassName:vt,style:Ye,bordered:Je=!0,ghost:yt,size:St,expandIconPosition:rt="start",children:Zt,expandIcon:dn}=We,mn=(0,Ut.Z)(pi=>{var mi;return(mi=St!=null?St:pi)!==null&&mi!==void 0?mi:"middle"}),qt=Pe("collapse",ye),Gn=Pe(),[Kn,Nt]=Qn(qt),sn=Xe.useMemo(()=>rt==="left"?"start":rt==="right"?"end":rt,[rt]),Fn=function(){let pi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const mi=dn?dn(pi):Xe.createElement(ge.Z,{rotate:pi.isActive?90:void 0});return(0,zt.Tm)(mi,()=>({className:Ke()(mi.props.className,`${qt}-arrow`)}))},hn=Ke()(`${qt}-icon-position-${sn}`,{[`${qt}-borderless`]:!Je,[`${qt}-rtl`]:De==="rtl",[`${qt}-ghost`]:!!yt,[`${qt}-${mn}`]:mn!=="middle"},Fe==null?void 0:Fe.className,Qe,vt,Nt),Mn=Object.assign(Object.assign({},(0,ht.Z)(Gn)),{motionAppear:!1,leavedClassName:`${qt}-content-hidden`}),li=Xe.useMemo(()=>Zt?(0,ct.Z)(Zt).map((pi,mi)=>{var Li,Gi;if(!((Li=pi.props)===null||Li===void 0)&&Li.disabled){const ar=(Gi=pi.key)!==null&&Gi!==void 0?Gi:String(mi),{disabled:Xi,collapsible:wr}=pi.props,vr=Object.assign(Object.assign({},(0,Dt.Z)(pi.props,["disabled"])),{key:ar,collapsible:wr!=null?wr:Xi?"disabled":void 0});return(0,zt.Tm)(pi,vr)}return pi}):null,[Zt]);return Kn(Xe.createElement(wt,Object.assign({ref:Ee,openMotion:Mn},(0,Dt.Z)(We,["rootClassName"]),{expandIcon:Fn,prefixCls:qt,className:hn,style:Object.assign(Object.assign({},Fe==null?void 0:Fe.style),Ye)}),li))}),{Panel:Ve}),Wn=Cn},93891:function(Vn,Pn,pe){"use strict";var ge=pe(59301),Oe=pe(36355),Ke=pe(64165);const st=Ge=>{const{componentName:_e}=Ge,{getPrefixCls:Le}=(0,ge.useContext)(Oe.E_),Tt=Le("empty");switch(_e){case"Table":case"List":return ge.createElement(Ke.Z,{image:Ke.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ge.createElement(Ke.Z,{image:Ke.Z.PRESENTED_IMAGE_SIMPLE,className:`${Tt}-small`});default:return ge.createElement(Ke.Z,null)}};Pn.Z=st},43428:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Ot}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(33708),st=pe(33606),Ge=pe(43403),_e=pe(34280),Le=pe(59301),Tt=Le.createContext(null),Pt=Le.createContext({}),Xe=Tt,Et=pe(400),ct=pe(92413),It=pe(77900),Be=pe(10228),ne=pe(26112),ee=pe(70425),ce=function(Wn){var We=Wn.prefixCls,Ee=Wn.className,Pe=Wn.style,De=Wn.children,Fe=Wn.containerRef,ye=Wn.id,Qe=Wn.onMouseEnter,vt=Wn.onMouseOver,Ye=Wn.onMouseLeave,Je=Wn.onClick,yt=Wn.onKeyDown,St=Wn.onKeyUp,rt={onMouseEnter:Qe,onMouseOver:vt,onMouseLeave:Ye,onClick:Je,onKeyDown:yt,onKeyUp:St},Zt=Le.useContext(Pt),dn=Zt.panel,mn=(0,ee.useComposeRef)(dn,Fe);return Le.createElement(Le.Fragment,null,Le.createElement("div",(0,ct.Z)({id:ye,className:Oe()("".concat(We,"-content"),Ee),style:(0,Ke.Z)({},Pe),"aria-modal":"true",role:"dialog",ref:mn},rt),De))},se=ce,he=pe(48736);function ve(Cn){return typeof Cn=="string"&&String(Number(Cn))===Cn?((0,he.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Cn)):Cn}function be(Cn){warning(!("wrapperClassName"in Cn),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Cn.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ke={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ae(Cn,Wn){var We,Ee,Pe,De,Fe=Cn.prefixCls,ye=Cn.open,Qe=Cn.placement,vt=Cn.inline,Ye=Cn.push,Je=Cn.forceRender,yt=Cn.autoFocus,St=Cn.keyboard,rt=Cn.rootClassName,Zt=Cn.rootStyle,dn=Cn.zIndex,mn=Cn.className,qt=Cn.id,Gn=Cn.style,Kn=Cn.motion,Nt=Cn.width,sn=Cn.height,Fn=Cn.children,hn=Cn.contentWrapperStyle,Mn=Cn.mask,li=Cn.maskClosable,pi=Cn.maskMotion,mi=Cn.maskClassName,Li=Cn.maskStyle,Gi=Cn.afterOpenChange,ar=Cn.onClose,Xi=Cn.onMouseEnter,wr=Cn.onMouseOver,vr=Cn.onMouseLeave,ji=Cn.onClick,Lr=Cn.onKeyDown,jn=Cn.onKeyUp,Ne=Le.useRef(),Ei=Le.useRef(),Oi=Le.useRef();Le.useImperativeHandle(Wn,function(){return Ne.current});var on=function(un){var Rt=un.keyCode,zn=un.shiftKey;switch(Rt){case Be.Z.TAB:{if(Rt===Be.Z.TAB){if(!zn&&document.activeElement===Oi.current){var ni;(ni=Ei.current)===null||ni===void 0||ni.focus({preventScroll:!0})}else if(zn&&document.activeElement===Ei.current){var gi;(gi=Oi.current)===null||gi===void 0||gi.focus({preventScroll:!0})}}break}case Be.Z.ESC:{ar&&St&&(un.stopPropagation(),ar(un));break}}};Le.useEffect(function(){if(ye&&yt){var Un;(Un=Ne.current)===null||Un===void 0||Un.focus({preventScroll:!0})}},[ye]);var ui=Le.useState(!1),vi=(0,st.Z)(ui,2),bi=vi[0],In=vi[1],Gt=Le.useContext(Xe),Kt;Ye===!1?Kt={distance:0}:Ye===!0?Kt={}:Kt=Ye||{};var jt=(We=(Ee=(Pe=Kt)===null||Pe===void 0?void 0:Pe.distance)!==null&&Ee!==void 0?Ee:Gt==null?void 0:Gt.pushDistance)!==null&&We!==void 0?We:180,ft=Le.useMemo(function(){return{pushDistance:jt,push:function(){In(!0)},pull:function(){In(!1)}}},[jt]);Le.useEffect(function(){if(ye){var Un;Gt==null||(Un=Gt.push)===null||Un===void 0||Un.call(Gt)}else{var un;Gt==null||(un=Gt.pull)===null||un===void 0||un.call(Gt)}},[ye]),Le.useEffect(function(){return function(){var Un;Gt==null||(Un=Gt.pull)===null||Un===void 0||Un.call(Gt)}},[]);var an=Mn&&Le.createElement(It.default,(0,ct.Z)({key:"mask"},pi,{visible:ye}),function(Un,un){var Rt=Un.className,zn=Un.style;return Le.createElement("div",{className:Oe()("".concat(Fe,"-mask"),Rt,mi),style:(0,Ke.Z)((0,Ke.Z)({},zn),Li),onClick:li&&ye?ar:void 0,ref:un})}),vn=typeof Kn=="function"?Kn(Qe):Kn,Bt={};if(bi&&jt)switch(Qe){case"top":Bt.transform="translateY(".concat(jt,"px)");break;case"bottom":Bt.transform="translateY(".concat(-jt,"px)");break;case"left":Bt.transform="translateX(".concat(jt,"px)");break;default:Bt.transform="translateX(".concat(-jt,"px)");break}Qe==="left"||Qe==="right"?Bt.width=ve(Nt):Bt.height=ve(sn);var at={onMouseEnter:Xi,onMouseOver:wr,onMouseLeave:vr,onClick:ji,onKeyDown:Lr,onKeyUp:jn},cn=Le.createElement(It.default,(0,ct.Z)({key:"panel"},vn,{visible:ye,forceRender:Je,onVisibleChanged:function(un){Gi==null||Gi(un)},removeOnLeave:!1,leavedClassName:"".concat(Fe,"-content-wrapper-hidden")}),function(Un,un){var Rt=Un.className,zn=Un.style;return Le.createElement("div",(0,ct.Z)({className:Oe()("".concat(Fe,"-content-wrapper"),Rt),style:(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({},Bt),zn),hn)},(0,ne.Z)(Cn,{data:!0})),Le.createElement(se,(0,ct.Z)({id:qt,containerRef:un,prefixCls:Fe,className:mn,style:Gn},at),Fn))}),Sn=(0,Ke.Z)({},Zt);return dn&&(Sn.zIndex=dn),Le.createElement(Xe.Provider,{value:ft},Le.createElement("div",{className:Oe()(Fe,"".concat(Fe,"-").concat(Qe),rt,(De={},(0,Et.Z)(De,"".concat(Fe,"-open"),ye),(0,Et.Z)(De,"".concat(Fe,"-inline"),vt),De)),style:Sn,tabIndex:-1,ref:Ne,onKeyDown:on},an,Le.createElement("div",{tabIndex:0,ref:Ei,style:ke,"aria-hidden":"true","data-sentinel":"start"}),cn,Le.createElement("div",{tabIndex:0,ref:Oi,style:ke,"aria-hidden":"true","data-sentinel":"end"})))}var ze=Le.forwardRef(Ae),Ze=ze,ot=function(Wn){var We=Wn.open,Ee=We===void 0?!1:We,Pe=Wn.prefixCls,De=Pe===void 0?"rc-drawer":Pe,Fe=Wn.placement,ye=Fe===void 0?"right":Fe,Qe=Wn.autoFocus,vt=Qe===void 0?!0:Qe,Ye=Wn.keyboard,Je=Ye===void 0?!0:Ye,yt=Wn.width,St=yt===void 0?378:yt,rt=Wn.mask,Zt=rt===void 0?!0:rt,dn=Wn.maskClosable,mn=dn===void 0?!0:dn,qt=Wn.getContainer,Gn=Wn.forceRender,Kn=Wn.afterOpenChange,Nt=Wn.destroyOnClose,sn=Wn.onMouseEnter,Fn=Wn.onMouseOver,hn=Wn.onMouseLeave,Mn=Wn.onClick,li=Wn.onKeyDown,pi=Wn.onKeyUp,mi=Wn.panelRef,Li=Le.useState(!1),Gi=(0,st.Z)(Li,2),ar=Gi[0],Xi=Gi[1],wr=Le.useState(!1),vr=(0,st.Z)(wr,2),ji=vr[0],Lr=vr[1];(0,_e.Z)(function(){Lr(!0)},[]);var jn=ji?Ee:!1,Ne=Le.useRef(),Ei=Le.useRef();(0,_e.Z)(function(){jn&&(Ei.current=document.activeElement)},[jn]);var Oi=function(In){var Gt;if(Xi(In),Kn==null||Kn(In),!In&&Ei.current&&!((Gt=Ne.current)!==null&&Gt!==void 0&&Gt.contains(Ei.current))){var Kt;(Kt=Ei.current)===null||Kt===void 0||Kt.focus({preventScroll:!0})}},on=Le.useMemo(function(){return{panel:mi}},[mi]);if(!Gn&&!ar&&!jn&&Nt)return null;var ui={onMouseEnter:sn,onMouseOver:Fn,onMouseLeave:hn,onClick:Mn,onKeyDown:li,onKeyUp:pi},vi=(0,Ke.Z)((0,Ke.Z)({},Wn),{},{open:jn,prefixCls:De,placement:ye,autoFocus:vt,keyboard:Je,width:St,mask:Zt,maskClosable:mn,inline:qt===!1,afterOpenChange:Oi,ref:Ne},ui);return Le.createElement(Pt.Provider,{value:on},Le.createElement(Ge.Z,{open:jn||Gn||ar,autoDestroy:!1,getContainer:qt,autoLock:Zt&&(jn||ar)},Le.createElement(Ze,vi)))},qe=ot,bt=qe,He=pe(62892),wt=pe(36355),nt=pe(32441),Dt=pe(47729),zt=Cn=>{const{prefixCls:Wn,title:We,footer:Ee,extra:Pe,closeIcon:De,closable:Fe,onClose:ye,headerStyle:Qe,drawerStyle:vt,bodyStyle:Ye,footerStyle:Je,children:yt}=Cn,St=Le.useCallback(qt=>Le.createElement("button",{type:"button",onClick:ye,"aria-label":"Close",className:`${Wn}-close`},qt),[ye]),[rt,Zt]=(0,Dt.Z)(Fe,De,St,void 0,!0),dn=Le.useMemo(()=>!We&&!rt?null:Le.createElement("div",{style:Qe,className:Oe()(`${Wn}-header`,{[`${Wn}-header-close-only`]:rt&&!We&&!Pe})},Le.createElement("div",{className:`${Wn}-header-title`},Zt,We&&Le.createElement("div",{className:`${Wn}-title`},We)),Pe&&Le.createElement("div",{className:`${Wn}-extra`},Pe)),[rt,Zt,Pe,Qe,Wn,We]),mn=Le.useMemo(()=>{if(!Ee)return null;const qt=`${Wn}-footer`;return Le.createElement("div",{className:qt,style:Je},Ee)},[Ee,Je,Wn]);return Le.createElement("div",{className:`${Wn}-wrapper-body`,style:vt},dn,Le.createElement("div",{className:`${Wn}-body`,style:Ye},yt),mn)},Yt=pe(33234),Ut=pe(83116),it=pe(37613),Wt=Cn=>{const{componentCls:Wn,motionDurationSlow:We}=Cn,Ee={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${We}`}}};return{[Wn]:{[`${Wn}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${We}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Wn}-panel-motion`]:{"&-left":[Ee,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[Ee,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[Ee,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[Ee,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Ln=Cn=>{const{componentCls:Wn,zIndexPopup:We,colorBgMask:Ee,colorBgElevated:Pe,motionDurationSlow:De,motionDurationMid:Fe,padding:ye,paddingLG:Qe,fontSizeLG:vt,lineHeightLG:Ye,lineWidth:Je,lineType:yt,colorSplit:St,marginSM:rt,colorIcon:Zt,colorIconHover:dn,colorText:mn,fontWeightStrong:qt,footerPaddingBlock:Gn,footerPaddingInline:Kn}=Cn,Nt=`${Wn}-content-wrapper`;return{[Wn]:{position:"fixed",inset:0,zIndex:We,pointerEvents:"none","&-pure":{position:"relative",background:Pe,[`&${Wn}-left`]:{boxShadow:Cn.boxShadowDrawerLeft},[`&${Wn}-right`]:{boxShadow:Cn.boxShadowDrawerRight},[`&${Wn}-top`]:{boxShadow:Cn.boxShadowDrawerUp},[`&${Wn}-bottom`]:{boxShadow:Cn.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Wn}-mask`]:{position:"absolute",inset:0,zIndex:We,background:Ee,pointerEvents:"auto"},[Nt]:{position:"absolute",zIndex:We,maxWidth:"100vw",transition:`all ${De}`,"&-hidden":{display:"none"}},[`&-left > ${Nt}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Cn.boxShadowDrawerLeft},[`&-right > ${Nt}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Cn.boxShadowDrawerRight},[`&-top > ${Nt}`]:{top:0,insetInline:0,boxShadow:Cn.boxShadowDrawerUp},[`&-bottom > ${Nt}`]:{bottom:0,insetInline:0,boxShadow:Cn.boxShadowDrawerDown},[`${Wn}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Pe,pointerEvents:"auto"},[`${Wn}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Wn}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${ye}px ${Qe}px`,fontSize:vt,lineHeight:Ye,borderBottom:`${Je}px ${yt} ${St}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Wn}-extra`]:{flex:"none"},[`${Wn}-close`]:{display:"inline-block",marginInlineEnd:rt,color:Zt,fontWeight:qt,fontSize:vt,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${Fe}`,textRendering:"auto","&:focus, &:hover":{color:dn,textDecoration:"none"}},[`${Wn}-title`]:{flex:1,margin:0,color:mn,fontWeight:Cn.fontWeightStrong,fontSize:vt,lineHeight:Ye},[`${Wn}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Qe,overflow:"auto"},[`${Wn}-footer`]:{flexShrink:0,padding:`${Gn}px ${Kn}px`,borderTop:`${Je}px ${yt} ${St}`},"&-rtl":{direction:"rtl"}}}};var Nn=(0,Ut.Z)("Drawer",Cn=>{const Wn=(0,it.TS)(Cn,{});return[Ln(Wn),Wt(Wn)]},Cn=>({zIndexPopup:Cn.zIndexPopupBase,footerPaddingBlock:Cn.paddingXS,footerPaddingInline:Cn.padding})),$t=pe(11575),rn=function(Cn,Wn){var We={};for(var Ee in Cn)Object.prototype.hasOwnProperty.call(Cn,Ee)&&Wn.indexOf(Ee)<0&&(We[Ee]=Cn[Ee]);if(Cn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,Ee=Object.getOwnPropertySymbols(Cn);Pe<Ee.length;Pe++)Wn.indexOf(Ee[Pe])<0&&Object.prototype.propertyIsEnumerable.call(Cn,Ee[Pe])&&(We[Ee[Pe]]=Cn[Ee[Pe]]);return We};const An=null,ti={distance:180},xn=Cn=>{var Wn;const{rootClassName:We,width:Ee,height:Pe,size:De="default",mask:Fe=!0,push:ye=ti,open:Qe,afterOpenChange:vt,onClose:Ye,prefixCls:Je,getContainer:yt,style:St,className:rt,visible:Zt,afterVisibleChange:dn}=Cn,mn=rn(Cn,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:qt,getPrefixCls:Gn,direction:Kn,drawer:Nt}=Le.useContext(wt.E_),sn=Gn("drawer",Je),[Fn,hn]=Nn(sn),Mn=yt===void 0&&qt?()=>qt(document.body):yt,li=Oe()({"no-mask":!Fe,[`${sn}-rtl`]:Kn==="rtl"},We,hn),pi=Le.useMemo(()=>Ee!=null?Ee:De==="large"?736:378,[Ee,De]),mi=Le.useMemo(()=>Pe!=null?Pe:De==="large"?736:378,[Pe,De]),Li={motionName:(0,He.m)(sn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Gi=Xi=>({motionName:(0,He.m)(sn,`panel-motion-${Xi}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),ar=(0,$t.H)();return Fn(Le.createElement(Yt.BR,null,Le.createElement(nt.Ux,{status:!0,override:!0},Le.createElement(bt,Object.assign({prefixCls:sn,onClose:Ye,maskMotion:Li,motion:Gi},mn,{open:Qe!=null?Qe:Zt,mask:Fe,push:ye,width:pi,height:mi,style:Object.assign(Object.assign({},Nt==null?void 0:Nt.style),St),className:Oe()(Nt==null?void 0:Nt.className,rt),rootClassName:li,getContainer:Mn,afterOpenChange:vt!=null?vt:dn,panelRef:ar}),Le.createElement(zt,Object.assign({prefixCls:sn},mn,{onClose:Ye}))))))},Qn=Cn=>{const{prefixCls:Wn,style:We,className:Ee,placement:Pe="right"}=Cn,De=rn(Cn,["prefixCls","style","className","placement"]),{getPrefixCls:Fe}=Le.useContext(wt.E_),ye=Fe("drawer",Wn),[Qe,vt]=Nn(ye),Ye=Oe()(ye,`${ye}-pure`,`${ye}-${Pe}`,vt,Ee);return Qe(Le.createElement("div",{className:Ye,style:We},Le.createElement(zt,Object.assign({prefixCls:ye},De))))};xn._InternalPanelDoNotUseOrYouWillBeFired=Qn;var Ot=xn},91857:function(Vn,Pn,pe){"use strict";var ge=pe(59301),Oe=pe(38819),Ke=pe(92310),st=pe.n(Ke),Ge=pe(31561),_e=pe(70425),Le=pe(18929),Tt=pe(2738),Pt=pe(79676),Xe=pe(53487),Et=pe(92343),ct=pe(36355),It=pe(20834),Be=pe(40875),ne=pe(88088),ee=pe(47211);const ce=null,se=ke=>{const{menu:Ae,arrow:ze,prefixCls:Ze,children:ot,trigger:qe,disabled:bt,dropdownRender:He,getPopupContainer:wt,overlayClassName:nt,rootClassName:Dt,open:ht,onOpenChange:zt,visible:Yt,onVisibleChange:Ut,mouseEnterDelay:it=.15,mouseLeaveDelay:Ve=.1,autoAdjustOverflow:Wt=!0,placement:Ln="",overlay:Nn,transitionName:$t}=ke,{getPopupContainer:rn,getPrefixCls:An,direction:ti}=ge.useContext(ct.E_),xn=ge.useMemo(()=>{const rt=An();return $t!==void 0?$t:Ln.includes("top")?`${rt}-slide-down`:`${rt}-slide-up`},[An,Ln,$t]),Qn=ge.useMemo(()=>Ln?Ln.includes("Center")?Ln.slice(0,Ln.indexOf("Center")):Ln:ti==="rtl"?"bottomRight":"bottomLeft",[Ln,ti]),Ot=An("dropdown",Ze),[Cn,Wn]=(0,ee.Z)(Ot),[,We]=(0,ne.Z)(),Ee=ge.Children.only(ot),Pe=(0,Et.Tm)(Ee,{className:st()(`${Ot}-trigger`,{[`${Ot}-rtl`]:ti==="rtl"},Ee.props.className),disabled:bt}),De=bt?[]:qe;let Fe;De&&De.includes("contextMenu")&&(Fe=!0);const[ye,Qe]=(0,Le.Z)(!1,{value:ht!=null?ht:Yt}),vt=(0,_e.useEvent)(rt=>{zt==null||zt(rt),Ut==null||Ut(rt),Qe(rt)}),Ye=st()(nt,Dt,Wn,{[`${Ot}-rtl`]:ti==="rtl"}),Je=(0,Pt.Z)({arrowPointAtCenter:typeof ze=="object"&&ze.pointAtCenter,autoAdjustOverflow:Wt,offset:We.marginXXS,arrowWidth:ze?We.sizePopupArrow:0,borderRadius:We.borderRadius}),yt=ge.useCallback(()=>{Qe(!1)},[]),St=()=>{let rt;return Ae!=null&&Ae.items?rt=ge.createElement(It.default,Object.assign({},Ae)):typeof Nn=="function"?rt=Nn():rt=Nn,He&&(rt=He(rt)),rt=ge.Children.only(typeof rt=="string"?ge.createElement("span",null,rt):rt),ge.createElement(Be.J,{prefixCls:`${Ot}-menu`,expandIcon:ge.createElement("span",{className:`${Ot}-menu-submenu-arrow`},ge.createElement(Oe.Z,{className:`${Ot}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:yt,validator:Zt=>{let{mode:dn}=Zt}},rt)};return Cn(ge.createElement(Ge.Z,Object.assign({alignPoint:Fe},(0,Tt.Z)(ke,["rootClassName"]),{mouseEnterDelay:it,mouseLeaveDelay:Ve,visible:ye,builtinPlacements:Je,arrow:!!ze,overlayClassName:Ye,prefixCls:Ot,getPopupContainer:wt||rn,transitionName:xn,trigger:De,overlay:St,placement:Qn,onVisibleChange:vt}),Pe))};function he(ke){return Object.assign(Object.assign({},ke),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ve=(0,Xe.Z)(se,"dropdown",ke=>ke,he),be=ke=>ge.createElement(ve,Object.assign({},ke),ge.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=be,Pn.Z=se},38854:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ne}});var ge=pe(91857),Oe=pe(92310),Ke=pe.n(Oe),st=pe(59301),Ge=pe(18785),_e=pe(3113),Le=pe(36355),Tt=pe(81327),Pt=pe(33234),Xe=pe(47211),Et=function(ee,ce){var se={};for(var he in ee)Object.prototype.hasOwnProperty.call(ee,he)&&ce.indexOf(he)<0&&(se[he]=ee[he]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,he=Object.getOwnPropertySymbols(ee);ve<he.length;ve++)ce.indexOf(he[ve])<0&&Object.prototype.propertyIsEnumerable.call(ee,he[ve])&&(se[he[ve]]=ee[he[ve]]);return se};const ct=ee=>{const{getPopupContainer:ce,getPrefixCls:se,direction:he}=st.useContext(Le.E_),{prefixCls:ve,type:be="default",danger:ke,disabled:Ae,loading:ze,onClick:Ze,htmlType:ot,children:qe,className:bt,menu:He,arrow:wt,autoFocus:nt,overlay:Dt,trigger:ht,align:zt,open:Yt,onOpenChange:Ut,placement:it,getPopupContainer:Ve,href:Wt,icon:Ln=st.createElement(Ge.Z,null),title:Nn,buttonsRender:$t=St=>St,mouseEnterDelay:rn,mouseLeaveDelay:An,overlayClassName:ti,overlayStyle:xn,destroyPopupOnHide:Qn,dropdownRender:Ot}=ee,Cn=Et(ee,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),Wn=se("dropdown",ve),We=`${Wn}-button`,[Ee,Pe]=(0,Xe.Z)(Wn),De={menu:He,arrow:wt,autoFocus:nt,align:zt,disabled:Ae,trigger:Ae?[]:ht,onOpenChange:Ut,getPopupContainer:Ve||ce,mouseEnterDelay:rn,mouseLeaveDelay:An,overlayClassName:ti,overlayStyle:xn,destroyPopupOnHide:Qn,dropdownRender:Ot},{compactSize:Fe,compactItemClassnames:ye}=(0,Pt.ri)(Wn,he),Qe=Ke()(We,ye,bt,Pe);"overlay"in ee&&(De.overlay=Dt),"open"in ee&&(De.open=Yt),"placement"in ee?De.placement=it:De.placement=he==="rtl"?"bottomLeft":"bottomRight";const vt=st.createElement(_e.ZP,{type:be,danger:ke,disabled:Ae,loading:ze,onClick:Ze,htmlType:ot,href:Wt,title:Nn},qe),Ye=st.createElement(_e.ZP,{type:be,danger:ke,icon:Ln}),[Je,yt]=$t([vt,Ye]);return Ee(st.createElement(Tt.Z.Compact,Object.assign({className:Qe,size:Fe,block:!0},Cn),Je,st.createElement(ge.Z,Object.assign({},De),yt)))};ct.__ANT_BUTTON=!0;var It=ct;const Be=ge.Z;Be.Button=It;var ne=Be},47211:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Et}});var ge=pe(17313),Oe=pe(13826),Ke=pe(92899),st=pe(29878),Ge=pe(19447),_e=pe(83116),Le=pe(37613),Pt=ct=>{const{componentCls:It,menuCls:Be,colorError:ne,colorTextLightSolid:ee}=ct,ce=`${Be}-item`;return{[`${It}, ${It}-menu-submenu`]:{[`${Be} ${ce}`]:{[`&${ce}-danger:not(${ce}-disabled)`]:{color:ne,"&:hover":{color:ee,backgroundColor:ne}}}}}};const Xe=ct=>{const{componentCls:It,menuCls:Be,zIndexPopup:ne,dropdownArrowDistance:ee,sizePopupArrow:ce,antCls:se,iconCls:he,motionDurationMid:ve,dropdownPaddingVertical:be,fontSize:ke,dropdownEdgeChildPadding:Ae,colorTextDisabled:ze,fontSizeIcon:Ze,controlPaddingHorizontal:ot,colorBgElevated:qe}=ct;return[{[It]:Object.assign(Object.assign({},(0,ge.Wf)(ct)),{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`]:{[`& > ${he}-down, & > ${se}-btn-icon > ${he}-down`]:{fontSize:Ze}},[`${It}-wrap`]:{position:"relative",[`${se}-btn > ${he}-down`]:{fontSize:Ze},[`${he}-down::before`]:{transition:`transform ${ve}`}},[`${It}-wrap-open`]:{[`${he}-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${It}-placement-bottomLeft,
&${se}-slide-down-appear${se}-slide-down-appear-active${It}-placement-bottomLeft,
&${se}-slide-down-enter${se}-slide-down-enter-active${It}-placement-bottom,
&${se}-slide-down-appear${se}-slide-down-appear-active${It}-placement-bottom,
&${se}-slide-down-enter${se}-slide-down-enter-active${It}-placement-bottomRight,
&${se}-slide-down-appear${se}-slide-down-appear-active${It}-placement-bottomRight`]:{animationName:Oe.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${It}-placement-topLeft,
&${se}-slide-up-appear${se}-slide-up-appear-active${It}-placement-topLeft,
&${se}-slide-up-enter${se}-slide-up-enter-active${It}-placement-top,
&${se}-slide-up-appear${se}-slide-up-appear-active${It}-placement-top,
&${se}-slide-up-enter${se}-slide-up-enter-active${It}-placement-topRight,
&${se}-slide-up-appear${se}-slide-up-appear-active${It}-placement-topRight`]:{animationName:Oe.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${It}-placement-bottomLeft,
&${se}-slide-down-leave${se}-slide-down-leave-active${It}-placement-bottom,
&${se}-slide-down-leave${se}-slide-down-leave-active${It}-placement-bottomRight`]:{animationName:Oe.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${It}-placement-topLeft,
&${se}-slide-up-leave${se}-slide-up-leave-active${It}-placement-top,
&${se}-slide-up-leave${se}-slide-up-leave-active${It}-placement-topRight`]:{animationName:Oe.ly}})},(0,Ge.ZP)(ct,{colorBg:qe,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${It} ${Be}`]:{position:"relative",margin:0},[`${Be}-submenu-popup`]:{position:"absolute",zIndex:ne,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${It}, ${It}-menu-submenu`]:{[Be]:Object.assign(Object.assign({padding:Ae,listStyleType:"none",backgroundColor:qe,backgroundClip:"padding-box",borderRadius:ct.borderRadiusLG,outline:"none",boxShadow:ct.boxShadowSecondary},(0,ge.Qy)(ct)),{[`${Be}-item-group-title`]:{padding:`${be}px ${ot}px`,color:ct.colorTextDescription,transition:`all ${ve}`},[`${Be}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Be}-item-icon`]:{minWidth:ke,marginInlineEnd:ct.marginXS,fontSize:ct.fontSizeSM},[`${Be}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ve}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Be}-item, ${Be}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${be}px ${ot}px`,color:ct.colorText,fontWeight:"normal",fontSize:ke,lineHeight:ct.lineHeight,cursor:"pointer",transition:`all ${ve}`,borderRadius:ct.borderRadiusSM,"&:hover, &-active":{backgroundColor:ct.controlItemBgHover}},(0,ge.Qy)(ct)),{"&-selected":{color:ct.colorPrimary,backgroundColor:ct.controlItemBgActive,"&:hover, &-active":{backgroundColor:ct.controlItemBgActiveHover}},"&-disabled":{color:ze,cursor:"not-allowed","&:hover":{color:ze,backgroundColor:qe,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ct.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:ct.colorSplit},[`${It}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:ct.paddingXS,[`${It}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:ct.colorTextDescription,fontSize:Ze,fontStyle:"normal"}}}),[`${Be}-item-group-list`]:{margin:`0 ${ct.marginXS}px`,padding:0,listStyle:"none"},[`${Be}-submenu-title`]:{paddingInlineEnd:ot+ct.fontSizeSM},[`${Be}-submenu-vertical`]:{position:"relative"},[`${Be}-submenu${Be}-submenu-disabled ${It}-menu-submenu-title`]:{[`&, ${It}-menu-submenu-arrow-icon`]:{color:ze,backgroundColor:qe,cursor:"not-allowed"}},[`${Be}-submenu-selected ${It}-menu-submenu-title`]:{color:ct.colorPrimary}})}},[(0,Oe.oN)(ct,"slide-up"),(0,Oe.oN)(ct,"slide-down"),(0,Ke.Fm)(ct,"move-up"),(0,Ke.Fm)(ct,"move-down"),(0,st._y)(ct,"zoom-big")]]};var Et=(0,_e.Z)("Dropdown",(ct,It)=>{let{rootPrefixCls:Be}=It;const{marginXXS:ne,sizePopupArrow:ee,controlHeight:ce,fontSize:se,lineHeight:he,paddingXXS:ve,componentCls:be,borderRadiusLG:ke}=ct,Ae=(ce-se*he)/2,{dropdownArrowOffset:ze}=(0,Ge.fS)({contentRadius:ke}),Ze=(0,Le.TS)(ct,{menuCls:`${be}-menu`,rootPrefixCls:Be,dropdownArrowDistance:ee/2+ne,dropdownArrowOffset:ze,dropdownPaddingVertical:Ae,dropdownEdgeChildPadding:ve});return[Xe(Ze),Pt(Ze)]},ct=>({zIndexPopup:ct.zIndexPopupBase+50}))},64165:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ve}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(59301),st=pe(36355),Ge=pe(9763),_e=pe(64993),Le=pe(88088),Pt=()=>{const[,be]=(0,Le.Z)(),Ae=new _e.C(be.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Ke.createElement("svg",{style:Ae,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Ke.createElement("g",{fill:"none",fillRule:"evenodd"},Ke.createElement("g",{transform:"translate(24 31.67)"},Ke.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Ke.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"}),Ke.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)"}),Ke.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"}),Ke.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"})),Ke.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"}),Ke.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Ke.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Ke.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Et=()=>{const[,be]=(0,Le.Z)(),{colorFill:ke,colorFillTertiary:Ae,colorFillQuaternary:ze,colorBgContainer:Ze}=be,{borderColor:ot,shadowColor:qe,contentColor:bt}=(0,Ke.useMemo)(()=>({borderColor:new _e.C(ke).onBackground(Ze).toHexShortString(),shadowColor:new _e.C(Ae).onBackground(Ze).toHexShortString(),contentColor:new _e.C(ze).onBackground(Ze).toHexShortString()}),[ke,Ae,ze,Ze]);return Ke.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Ke.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Ke.createElement("ellipse",{fill:qe,cx:"32",cy:"33",rx:"32",ry:"7"}),Ke.createElement("g",{fillRule:"nonzero",stroke:ot},Ke.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"}),Ke.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:bt}))))},ct=pe(83116),It=pe(37613);const Be=be=>{const{componentCls:ke,margin:Ae,marginXS:ze,marginXL:Ze,fontSize:ot,lineHeight:qe}=be;return{[ke]:{marginInline:ze,fontSize:ot,lineHeight:qe,textAlign:"center",[`${ke}-image`]:{height:be.emptyImgHeight,marginBottom:ze,opacity:be.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${ke}-description`]:{color:be.colorText},[`${ke}-footer`]:{marginTop:Ae},"&-normal":{marginBlock:Ze,color:be.colorTextDisabled,[`${ke}-description`]:{color:be.colorTextDisabled},[`${ke}-image`]:{height:be.emptyImgHeightMD}},"&-small":{marginBlock:ze,color:be.colorTextDisabled,[`${ke}-image`]:{height:be.emptyImgHeightSM}}}}};var ne=(0,ct.Z)("Empty",be=>{const{componentCls:ke,controlHeightLG:Ae}=be,ze=(0,It.TS)(be,{emptyImgCls:`${ke}-img`,emptyImgHeight:Ae*2.5,emptyImgHeightMD:Ae,emptyImgHeightSM:Ae*.875});return[Be(ze)]}),ee=function(be,ke){var Ae={};for(var ze in be)Object.prototype.hasOwnProperty.call(be,ze)&&ke.indexOf(ze)<0&&(Ae[ze]=be[ze]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,ze=Object.getOwnPropertySymbols(be);Ze<ze.length;Ze++)ke.indexOf(ze[Ze])<0&&Object.prototype.propertyIsEnumerable.call(be,ze[Ze])&&(Ae[ze[Ze]]=be[ze[Ze]]);return Ae};const ce=Ke.createElement(Pt,null),se=Ke.createElement(Et,null),he=be=>{var{className:ke,rootClassName:Ae,prefixCls:ze,image:Ze=ce,description:ot,children:qe,imageStyle:bt,style:He}=be,wt=ee(be,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:nt,direction:Dt,empty:ht}=Ke.useContext(st.E_),zt=nt("empty",ze),[Yt,Ut]=ne(zt),[it]=(0,Ge.Z)("Empty"),Ve=typeof ot!="undefined"?ot:it==null?void 0:it.description,Wt=typeof Ve=="string"?Ve:"empty";let Ln=null;return typeof Ze=="string"?Ln=Ke.createElement("img",{alt:Wt,src:Ze}):Ln=Ze,Yt(Ke.createElement("div",Object.assign({className:Oe()(Ut,zt,ht==null?void 0:ht.className,{[`${zt}-normal`]:Ze===se,[`${zt}-rtl`]:Dt==="rtl"},ke,Ae),style:Object.assign(Object.assign({},ht==null?void 0:ht.style),He)},wt),Ke.createElement("div",{className:`${zt}-image`,style:bt},Ln),Ve&&Ke.createElement("div",{className:`${zt}-description`},Ve),qe&&Ke.createElement("div",{className:`${zt}-footer`},qe)))};he.PRESENTED_IMAGE_DEFAULT=ce,he.PRESENTED_IMAGE_SIMPLE=se;var ve=he},78241:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return jt}});var ge=pe(26407),Oe=pe(92310),Ke=pe.n(Oe),st=pe(77900),Ge=pe(59301),_e=pe(62892),Le=pe(32441);function Tt(ft){const[an,vn]=Ge.useState(ft);return Ge.useEffect(()=>{const Bt=setTimeout(()=>{vn(ft)},ft.length?0:10);return()=>{clearTimeout(Bt)}},[ft]),an}var Pt=pe(17313),Xe=pe(29878),Et=pe(8378),ct=pe(37613),It=pe(83116),ne=ft=>{const{componentCls:an}=ft,vn=`${an}-show-help`,Bt=`${an}-show-help-item`;return{[vn]:{transition:`opacity ${ft.motionDurationSlow} ${ft.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Bt]:{overflow:"hidden",transition:`height ${ft.motionDurationSlow} ${ft.motionEaseInOut},
opacity ${ft.motionDurationSlow} ${ft.motionEaseInOut},
transform ${ft.motionDurationSlow} ${ft.motionEaseInOut} !important`,[`&${Bt}-appear, &${Bt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Bt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=ft=>({legend:{display:"block",width:"100%",marginBottom:ft.marginLG,padding:0,color:ft.colorTextDescription,fontSize:ft.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${ft.lineWidth}px ${ft.lineType} ${ft.colorBorder}`},label:{fontSize:ft.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 ${ft.controlOutlineWidth}px ${ft.controlOutline}`},output:{display:"block",paddingTop:15,color:ft.colorText,fontSize:ft.fontSize,lineHeight:ft.lineHeight}}),ce=(ft,an)=>{const{formItemCls:vn}=ft;return{[vn]:{[`${vn}-label > label`]:{height:an},[`${vn}-control-input`]:{minHeight:an}}}},se=ft=>{const{componentCls:an}=ft;return{[ft.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Pt.Wf)(ft)),ee(ft)),{[`${an}-text`]:{display:"inline-block",paddingInlineEnd:ft.paddingSM},"&-small":Object.assign({},ce(ft,ft.controlHeightSM)),"&-large":Object.assign({},ce(ft,ft.controlHeightLG))})}},he=ft=>{const{formItemCls:an,iconCls:vn,componentCls:Bt,rootPrefixCls:at,labelRequiredMarkColor:cn,labelColor:Sn,labelFontSize:Un,labelHeight:un,labelColonMarginInlineStart:Rt,labelColonMarginInlineEnd:zn,itemMarginBottom:ni}=ft;return{[an]:Object.assign(Object.assign({},(0,Pt.Wf)(ft)),{marginBottom:ni,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${at}-row`]:{display:"none"},"&-has-warning":{[`${an}-split`]:{color:ft.colorError}},"&-has-error":{[`${an}-split`]:{color:ft.colorWarning}},[`${an}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${ft.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:un,color:Sn,fontSize:Un,[`> ${vn}`]:{fontSize:ft.fontSize,verticalAlign:"top"},[`&${an}-required:not(${an}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:ft.marginXXS,color:cn,fontSize:ft.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Bt}-hide-required-mark &`]:{display:"none"}},[`${an}-optional`]:{display:"inline-block",marginInlineStart:ft.marginXXS,color:ft.colorTextDescription,[`${Bt}-hide-required-mark &`]:{display:"none"}},[`${an}-tooltip`]:{color:ft.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:ft.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Rt,marginInlineEnd:zn},[`&${an}-no-colon::after`]:{content:'"\\a0"'}}},[`${an}-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:ft.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[an]:{"&-explain, &-extra":{clear:"both",color:ft.colorTextDescription,fontSize:ft.fontSize,lineHeight:ft.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:ft.controlHeightSM,transition:`color ${ft.motionDurationMid} ${ft.motionEaseOut}`},"&-explain":{"&-error":{color:ft.colorError},"&-warning":{color:ft.colorWarning}}},[`&-with-help ${an}-explain`]:{height:"auto",opacity:1},[`${an}-feedback-icon`]:{fontSize:ft.fontSize,textAlign:"center",visibility:"visible",animationName:Xe.kr,animationDuration:ft.motionDurationMid,animationTimingFunction:ft.motionEaseOutBack,pointerEvents:"none","&-success":{color:ft.colorSuccess},"&-error":{color:ft.colorError},"&-warning":{color:ft.colorWarning},"&-validating":{color:ft.colorPrimary}}})}},ve=ft=>{const{componentCls:an,formItemCls:vn}=ft;return{[`${an}-horizontal`]:{[`${vn}-label`]:{flexGrow:0},[`${vn}-control`]:{flex:"1 1 0",minWidth:0},[`${vn}-label[class$='-24'], ${vn}-label[class*='-24 ']`]:{[`& + ${vn}-control`]:{minWidth:"unset"}}}}},be=ft=>{const{componentCls:an,formItemCls:vn}=ft;return{[`${an}-inline`]:{display:"flex",flexWrap:"wrap",[vn]:{flex:"none",marginInlineEnd:ft.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${vn}-label,
> ${vn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${vn}-label`]:{flex:"none"},[`${an}-text`]:{display:"inline-block"},[`${vn}-has-feedback`]:{display:"inline-block"}}}}},ke=ft=>({padding:ft.verticalLabelPadding,margin:ft.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Ae=ft=>{const{componentCls:an,formItemCls:vn,rootPrefixCls:Bt}=ft;return{[`${vn} ${vn}-label`]:ke(ft),[an]:{[vn]:{flexWrap:"wrap",[`${vn}-label, ${vn}-control`]:{[`&:not([class*=" ${Bt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ze=ft=>{const{componentCls:an,formItemCls:vn,rootPrefixCls:Bt}=ft;return{[`${an}-vertical`]:{[vn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${an}-item-control`]:{width:"100%"}}},[`${an}-vertical ${vn}-label,
.${Bt}-col-24${vn}-label,
.${Bt}-col-xl-24${vn}-label`]:ke(ft),[`@media (max-width: ${ft.screenXSMax}px)`]:[Ae(ft),{[an]:{[`.${Bt}-col-xs-24${vn}-label`]:ke(ft)}}],[`@media (max-width: ${ft.screenSMMax}px)`]:{[an]:{[`.${Bt}-col-sm-24${vn}-label`]:ke(ft)}},[`@media (max-width: ${ft.screenMDMax}px)`]:{[an]:{[`.${Bt}-col-md-24${vn}-label`]:ke(ft)}},[`@media (max-width: ${ft.screenLGMax}px)`]:{[an]:{[`.${Bt}-col-lg-24${vn}-label`]:ke(ft)}}}},Ze=(ft,an)=>(0,ct.TS)(ft,{formItemCls:`${ft.componentCls}-item`,rootPrefixCls:an});var ot=(0,It.Z)("Form",(ft,an)=>{let{rootPrefixCls:vn}=an;const Bt=Ze(ft,vn);return[se(Bt),he(Bt),ne(Bt),ve(Bt),be(Bt),ze(Bt),(0,Et.Z)(Bt),Xe.kr]},ft=>({labelRequiredMarkColor:ft.colorError,labelColor:ft.colorTextHeading,labelFontSize:ft.fontSize,labelHeight:ft.controlHeight,labelColonMarginInlineStart:ft.marginXXS/2,labelColonMarginInlineEnd:ft.marginXS,itemMarginBottom:ft.marginLG,verticalLabelPadding:`0 0 ${ft.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const qe=[];function bt(ft,an,vn){let Bt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof ft=="string"?ft:`${an}-${Bt}`,error:ft,errorStatus:vn}}var wt=ft=>{let{help:an,helpStatus:vn,errors:Bt=qe,warnings:at=qe,className:cn,fieldId:Sn,onVisibleChanged:Un}=ft;const{prefixCls:un}=Ge.useContext(Le.Rk),Rt=`${un}-item-explain`,[,zn]=ot(un),ni=(0,Ge.useMemo)(()=>(0,_e.Z)(un),[un]),gi=Tt(Bt),tn=Tt(at),Bn=Ge.useMemo(()=>an!=null?[bt(an,"help",vn)]:[].concat((0,ge.Z)(gi.map((wn,gn)=>bt(wn,"error","error",gn))),(0,ge.Z)(tn.map((wn,gn)=>bt(wn,"warning","warning",gn)))),[an,vn,gi,tn]),Ft={};return Sn&&(Ft.id=`${Sn}_help`),Ge.createElement(st.default,{motionDeadline:ni.motionDeadline,motionName:`${un}-show-help`,visible:!!Bn.length,onVisibleChanged:Un},wn=>{const{className:gn,style:yn}=wn;return Ge.createElement("div",Object.assign({},Ft,{className:Ke()(Rt,gn,cn,zn),style:yn,role:"alert"}),Ge.createElement(st.CSSMotionList,Object.assign({keys:Bn},(0,_e.Z)(un),{motionName:`${un}-show-help-item`,component:!1}),On=>{const{key:$n,error:Yn,errorStatus:ii,className:Xn,style:di}=On;return Ge.createElement("div",{key:$n,className:Ke()(Xn,{[`${Rt}-${ii}`]:ii}),style:di},Yn)}))})},nt=pe(95013),Dt=pe(36355),ht=pe(1684),zt=pe(52946),Yt=pe(19716),Ut=pe(16722);const it=["parentNode"],Ve="form_item";function Wt(ft){return ft===void 0||ft===!1?[]:Array.isArray(ft)?ft:[ft]}function Ln(ft,an){if(!ft.length)return;const vn=ft.join("_");return an?`${an}_${vn}`:it.includes(vn)?`${Ve}_${vn}`:vn}function Nn(ft,an,vn,Bt,at,cn){let Sn=Bt;return cn!==void 0?Sn=cn:vn.validating?Sn="validating":ft.length?Sn="error":an.length?Sn="warning":(vn.touched||at&&vn.validated)&&(Sn="success"),Sn}function $t(ft){return Wt(ft).join("_")}function rn(ft){const[an]=(0,nt.useForm)(),vn=Ge.useRef({}),Bt=Ge.useMemo(()=>ft!=null?ft:Object.assign(Object.assign({},an),{__INTERNAL__:{itemRef:at=>cn=>{const Sn=$t(at);cn?vn.current[Sn]=cn:delete vn.current[Sn]}},scrollToField:function(at){let cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Sn=Wt(at),Un=Ln(Sn,Bt.__INTERNAL__.name),un=Un?document.getElementById(Un):null;un&&(0,Ut.Z)(un,Object.assign({scrollMode:"if-needed",block:"nearest"},cn))},getFieldInstance:at=>{const cn=$t(at);return vn.current[cn]}}),[ft,an]);return[Bt]}var An=pe(28726),ti=function(ft,an){var vn={};for(var Bt in ft)Object.prototype.hasOwnProperty.call(ft,Bt)&&an.indexOf(Bt)<0&&(vn[Bt]=ft[Bt]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Bt=Object.getOwnPropertySymbols(ft);at<Bt.length;at++)an.indexOf(Bt[at])<0&&Object.prototype.propertyIsEnumerable.call(ft,Bt[at])&&(vn[Bt[at]]=ft[Bt[at]]);return vn};const xn=(ft,an)=>{const vn=Ge.useContext(ht.Z),{getPrefixCls:Bt,direction:at,form:cn}=Ge.useContext(Dt.E_),{prefixCls:Sn,className:Un,rootClassName:un,size:Rt,disabled:zn=vn,form:ni,colon:gi,labelAlign:tn,labelWrap:Bn,labelCol:Ft,wrapperCol:wn,hideRequiredMark:gn,layout:yn="horizontal",scrollToFirstError:On,requiredMark:$n,onFinishFailed:Yn,name:ii,style:Xn,feedbackIcons:di}=ft,Hi=ti(ft,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),$i=(0,Yt.Z)(Rt),Wi=Ge.useContext(An.Z),Xt=(0,Ge.useMemo)(()=>$n!==void 0?$n:cn&&cn.requiredMark!==void 0?cn.requiredMark:!gn,[gn,$n,cn]),Si=gi!=null?gi:cn==null?void 0:cn.colon,Ki=Bt("form",Sn),[Ti,cr]=ot(Ki),Qi=Ke()(Ki,`${Ki}-${yn}`,{[`${Ki}-hide-required-mark`]:Xt===!1,[`${Ki}-rtl`]:at==="rtl",[`${Ki}-${$i}`]:$i},cr,cn==null?void 0:cn.className,Un,un),[yr]=rn(ni),{__INTERNAL__:fr}=yr;fr.name=ii;const Vi=(0,Ge.useMemo)(()=>({name:ii,labelAlign:tn,labelCol:Ft,labelWrap:Bn,wrapperCol:wn,vertical:yn==="vertical",colon:Si,requiredMark:Xt,itemRef:fr.itemRef,form:yr,feedbackIcons:di}),[ii,tn,Ft,wn,yn,Si,Xt,yr,di]);Ge.useImperativeHandle(an,()=>yr);const Mr=(Wr,_n)=>{if(Wr){let Ir={block:"nearest"};typeof Wr=="object"&&(Ir=Wr),yr.scrollToField(_n,Ir)}},Dn=Wr=>{if(Yn==null||Yn(Wr),Wr.errorFields.length){const _n=Wr.errorFields[0].name;if(On!==void 0){Mr(On,_n);return}cn&&cn.scrollToFirstError!==void 0&&Mr(cn.scrollToFirstError,_n)}};return Ti(Ge.createElement(ht.n,{disabled:zn},Ge.createElement(zt.q,{size:$i},Ge.createElement(Le.RV,Object.assign({},{validateMessages:Wi}),Ge.createElement(Le.q3.Provider,{value:Vi},Ge.createElement(nt.default,Object.assign({id:ii},Hi,{name:ii,onFinishFailed:Dn,form:yr,style:Object.assign(Object.assign({},cn==null?void 0:cn.style),Xn),className:Qi})))))))};var Ot=Ge.forwardRef(xn),Cn=pe(41799),Wn=pe(8654),We=pe(92343),Ee=pe(11592);function Pe(ft){if(typeof ft=="function")return ft;const an=(0,Ee.Z)(ft);return an.length<=1?an[0]:an}const De=()=>{const{status:ft,errors:an=[],warnings:vn=[]}=(0,Ge.useContext)(Le.aM);return{status:ft,errors:an,warnings:vn}};De.Context=Le.aM;var Fe=De,ye=pe(16089);function Qe(ft){const[an,vn]=Ge.useState(ft),Bt=(0,Ge.useRef)(null),at=(0,Ge.useRef)([]),cn=(0,Ge.useRef)(!1);Ge.useEffect(()=>(cn.current=!1,()=>{cn.current=!0,ye.Z.cancel(Bt.current),Bt.current=null}),[]);function Sn(Un){cn.current||(Bt.current===null&&(at.current=[],Bt.current=(0,ye.Z)(()=>{Bt.current=null,vn(un=>{let Rt=un;return at.current.forEach(zn=>{Rt=zn(Rt)}),Rt})})),at.current.push(Un))}return[an,Sn]}function vt(){const{itemRef:ft}=Ge.useContext(Le.q3),an=Ge.useRef({});function vn(Bt,at){const cn=at&&typeof at=="object"&&at.ref,Sn=Bt.join("_");return(an.current.name!==Sn||an.current.originRef!==cn)&&(an.current.name=Sn,an.current.originRef=cn,an.current.ref=(0,Wn.sQ)(ft(Bt),cn)),an.current.ref}return vn}var Ye=pe(29194),Je=pe(34280),yt=pe(2738),St=pe(27382),rt=pe(37028);const Zt=ft=>{const{formItemCls:an}=ft;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${an}-control`]:{display:"flex"}}}};var dn=(0,It.b)(["Form","item-item"],(ft,an)=>{let{rootPrefixCls:vn}=an;const Bt=Ze(ft,vn);return[Zt(Bt)]}),qt=ft=>{const{prefixCls:an,status:vn,wrapperCol:Bt,children:at,errors:cn,warnings:Sn,_internalItemRender:Un,extra:un,help:Rt,fieldId:zn,marginBottom:ni,onErrorVisibleChanged:gi}=ft,tn=`${an}-item`,Bn=Ge.useContext(Le.q3),Ft=Bt||Bn.wrapperCol||{},wn=Ke()(`${tn}-control`,Ft.className),gn=Ge.useMemo(()=>Object.assign({},Bn),[Bn]);delete gn.labelCol,delete gn.wrapperCol;const yn=Ge.createElement("div",{className:`${tn}-control-input`},Ge.createElement("div",{className:`${tn}-control-input-content`},at)),On=Ge.useMemo(()=>({prefixCls:an,status:vn}),[an,vn]),$n=ni!==null||cn.length||Sn.length?Ge.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ge.createElement(Le.Rk.Provider,{value:On},Ge.createElement(wt,{fieldId:zn,errors:cn,warnings:Sn,help:Rt,helpStatus:vn,className:`${tn}-explain-connected`,onVisibleChanged:gi})),!!ni&&Ge.createElement("div",{style:{width:0,height:ni}})):null,Yn={};zn&&(Yn.id=`${zn}_extra`);const ii=un?Ge.createElement("div",Object.assign({},Yn,{className:`${tn}-extra`}),un):null,Xn=Un&&Un.mark==="pro_table_render"&&Un.render?Un.render(ft,{input:yn,errorList:$n,extra:ii}):Ge.createElement(Ge.Fragment,null,yn,$n,ii);return Ge.createElement(Le.q3.Provider,{value:gn},Ge.createElement(rt.Z,Object.assign({},Ft,{className:wn}),Xn),Ge.createElement(dn,{prefixCls:an}))},Gn=pe(61485),Kn=pe(31724),Nt=pe(9763),sn=pe(6848),Fn=function(ft,an){var vn={};for(var Bt in ft)Object.prototype.hasOwnProperty.call(ft,Bt)&&an.indexOf(Bt)<0&&(vn[Bt]=ft[Bt]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Bt=Object.getOwnPropertySymbols(ft);at<Bt.length;at++)an.indexOf(Bt[at])<0&&Object.prototype.propertyIsEnumerable.call(ft,Bt[at])&&(vn[Bt[at]]=ft[Bt[at]]);return vn};function hn(ft){return ft?typeof ft=="object"&&!Ge.isValidElement(ft)?ft:{title:ft}:null}var li=ft=>{let{prefixCls:an,label:vn,htmlFor:Bt,labelCol:at,labelAlign:cn,colon:Sn,required:Un,requiredMark:un,tooltip:Rt}=ft;var zn;const[ni]=(0,Nt.Z)("Form"),{vertical:gi,labelAlign:tn,labelCol:Bn,labelWrap:Ft,colon:wn}=Ge.useContext(Le.q3);if(!vn)return null;const gn=at||Bn||{},yn=cn||tn,On=`${an}-item-label`,$n=Ke()(On,yn==="left"&&`${On}-left`,gn.className,{[`${On}-wrap`]:!!Ft});let Yn=vn;const ii=Sn===!0||wn!==!1&&Sn!==!1;ii&&!gi&&typeof vn=="string"&&vn.trim()!==""&&(Yn=vn.replace(/[:|]\s*$/,""));const di=hn(Rt);if(di){const{icon:Xt=Ge.createElement(Gn.Z,null)}=di,Si=Fn(di,["icon"]),Ki=Ge.createElement(sn.Z,Object.assign({},Si),Ge.cloneElement(Xt,{className:`${an}-item-tooltip`,title:""}));Yn=Ge.createElement(Ge.Fragment,null,Yn,Ki)}const Hi=un==="optional",$i=typeof un=="function";$i?Yn=un(Yn,{required:!!Un}):Hi&&!Un&&(Yn=Ge.createElement(Ge.Fragment,null,Yn,Ge.createElement("span",{className:`${an}-item-optional`,title:""},(ni==null?void 0:ni.optional)||((zn=Kn.Z.Form)===null||zn===void 0?void 0:zn.optional))));const Wi=Ke()({[`${an}-item-required`]:Un,[`${an}-item-required-mark-optional`]:Hi||$i,[`${an}-item-no-colon`]:!ii});return Ge.createElement(rt.Z,Object.assign({},gn,{className:$n}),Ge.createElement("label",{htmlFor:Bt,className:Wi,title:typeof vn=="string"?vn:""},Yn))},pi=pe(29679),mi=pe(19248),Li=pe(96512),Gi=pe(58617);const ar={success:pi.Z,warning:Li.Z,error:mi.Z,validating:Gi.Z};function Xi(ft){let{children:an,errors:vn,warnings:Bt,hasFeedback:at,validateStatus:cn,prefixCls:Sn,meta:Un,noStyle:un}=ft;const Rt=`${Sn}-item`,{feedbackIcons:zn}=Ge.useContext(Le.q3),ni=Nn(vn,Bt,Un,null,!!at,cn),{isFormItemInput:gi,status:tn}=Ge.useContext(Le.aM),Bn=Ge.useMemo(()=>{var Ft;let wn;if(at){const On=at!==!0&&at.icons||zn,$n=ni&&((Ft=On==null?void 0:On({status:ni,errors:vn,warnings:Bt}))===null||Ft===void 0?void 0:Ft[ni]),Yn=ni&&ar[ni];wn=$n!==!1&&Yn?Ge.createElement("span",{className:Ke()(`${Rt}-feedback-icon`,`${Rt}-feedback-icon-${ni}`)},$n||Ge.createElement(Yn,null)):null}let gn=!0,yn=ni||"";return un&&(gn=gi,yn=(ni!=null?ni:tn)||""),{status:yn,errors:vn,warnings:Bt,hasFeedback:!!at,feedbackIcon:wn,isFormItemInput:gn}},[ni,at,un,gi,tn]);return Ge.createElement(Le.aM.Provider,{value:Bn},an)}var wr=function(ft,an){var vn={};for(var Bt in ft)Object.prototype.hasOwnProperty.call(ft,Bt)&&an.indexOf(Bt)<0&&(vn[Bt]=ft[Bt]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Bt=Object.getOwnPropertySymbols(ft);at<Bt.length;at++)an.indexOf(Bt[at])<0&&Object.prototype.propertyIsEnumerable.call(ft,Bt[at])&&(vn[Bt[at]]=ft[Bt[at]]);return vn};function vr(ft){const{prefixCls:an,className:vn,rootClassName:Bt,style:at,help:cn,errors:Sn,warnings:Un,validateStatus:un,meta:Rt,hasFeedback:zn,hidden:ni,children:gi,fieldId:tn,required:Bn,isRequired:Ft,onSubItemMetaChange:wn}=ft,gn=wr(ft,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),yn=`${an}-item`,{requiredMark:On}=Ge.useContext(Le.q3),$n=Ge.useRef(null),Yn=Tt(Sn),ii=Tt(Un),Xn=cn!=null,di=!!(Xn||Sn.length||Un.length),Hi=!!$n.current&&(0,Ye.Z)($n.current),[$i,Wi]=Ge.useState(null);(0,Je.Z)(()=>{if(di&&$n.current){const cr=getComputedStyle($n.current);Wi(parseInt(cr.marginBottom,10))}},[di,Hi]);const Xt=cr=>{cr||Wi(null)},Ki=function(){let cr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Qi=cr?Yn:Rt.errors,yr=cr?ii:Rt.warnings;return Nn(Qi,yr,Rt,"",!!zn,un)}(),Ti=Ke()(yn,vn,Bt,{[`${yn}-with-help`]:Xn||Yn.length||ii.length,[`${yn}-has-feedback`]:Ki&&zn,[`${yn}-has-success`]:Ki==="success",[`${yn}-has-warning`]:Ki==="warning",[`${yn}-has-error`]:Ki==="error",[`${yn}-is-validating`]:Ki==="validating",[`${yn}-hidden`]:ni});return Ge.createElement("div",{className:Ti,style:at,ref:$n},Ge.createElement(St.Z,Object.assign({className:`${yn}-row`},(0,yt.Z)(gn,["_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"])),Ge.createElement(li,Object.assign({htmlFor:tn},ft,{requiredMark:On,required:Bn!=null?Bn:Ft,prefixCls:an})),Ge.createElement(qt,Object.assign({},ft,Rt,{errors:Yn,warnings:ii,prefixCls:an,status:Ki,help:cn,marginBottom:$i,onErrorVisibleChanged:Xt}),Ge.createElement(Le.qI.Provider,{value:wn},Ge.createElement(Xi,{prefixCls:an,meta:Rt,errors:Rt.errors,warnings:Rt.warnings,hasFeedback:zn,validateStatus:Ki},gi)))),!!$i&&Ge.createElement("div",{className:`${yn}-margin-offset`,style:{marginBottom:-$i}}))}const ji="__SPLIT__",Lr=null,jn=Ge.memo(ft=>{let{children:an}=ft;return an},(ft,an)=>ft.value===an.value&&ft.update===an.update&&ft.childProps.length===an.childProps.length&&ft.childProps.every((vn,Bt)=>vn===an.childProps[Bt]));function Ne(ft){return ft!=null}function Ei(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Oi(ft){const{name:an,noStyle:vn,className:Bt,dependencies:at,prefixCls:cn,shouldUpdate:Sn,rules:Un,children:un,required:Rt,label:zn,messageVariables:ni,trigger:gi="onChange",validateTrigger:tn,hidden:Bn,help:Ft}=ft,{getPrefixCls:wn}=Ge.useContext(Dt.E_),{name:gn}=Ge.useContext(Le.q3),yn=Pe(un),On=typeof yn=="function",$n=Ge.useContext(Le.qI),{validateTrigger:Yn}=Ge.useContext(nt.FieldContext),ii=tn!==void 0?tn:Yn,Xn=Ne(an),di=wn("form",cn),[Hi,$i]=ot(di),Wi=Ge.useContext(nt.ListContext),Xt=Ge.useRef(),[Si,Ki]=Qe({}),[Ti,cr]=(0,Cn.Z)(()=>Ei()),Qi=_n=>{const Ir=Wi==null?void 0:Wi.getKey(_n.name);if(cr(_n.destroy?Ei():_n,!0),vn&&Ft!==!1&&$n){let eo=_n.name;if(_n.destroy)eo=Xt.current||eo;else if(Ir!==void 0){const[xr,bo]=Ir;eo=[xr].concat((0,ge.Z)(bo)),Xt.current=eo}$n(_n,eo)}},yr=(_n,Ir)=>{Ki(eo=>{const xr=Object.assign({},eo),Yr=[].concat((0,ge.Z)(_n.name.slice(0,-1)),(0,ge.Z)(Ir)).join(ji);return _n.destroy?delete xr[Yr]:xr[Yr]=_n,xr})},[fr,Vi]=Ge.useMemo(()=>{const _n=(0,ge.Z)(Ti.errors),Ir=(0,ge.Z)(Ti.warnings);return Object.values(Si).forEach(eo=>{_n.push.apply(_n,(0,ge.Z)(eo.errors||[])),Ir.push.apply(Ir,(0,ge.Z)(eo.warnings||[]))}),[_n,Ir]},[Si,Ti.errors,Ti.warnings]),Mr=vt();function Dn(_n,Ir,eo){return vn&&!Bn?Ge.createElement(Xi,{prefixCls:di,hasFeedback:ft.hasFeedback,validateStatus:ft.validateStatus,meta:Ti,errors:fr,warnings:Vi,noStyle:!0},_n):Ge.createElement(vr,Object.assign({key:"row"},ft,{className:Ke()(Bt,$i),prefixCls:di,fieldId:Ir,isRequired:eo,errors:fr,warnings:Vi,meta:Ti,onSubItemMetaChange:yr}),_n)}if(!Xn&&!On&&!at)return Hi(Dn(yn));let Wr={};return typeof zn=="string"?Wr.label=zn:an&&(Wr.label=String(an)),ni&&(Wr=Object.assign(Object.assign({},Wr),ni)),Hi(Ge.createElement(nt.Field,Object.assign({},ft,{messageVariables:Wr,trigger:gi,validateTrigger:ii,onMetaChange:Qi}),(_n,Ir,eo)=>{const xr=Wt(an).length&&Ir?Ir.name:[],bo=Ln(xr,gn),Yr=Rt!==void 0?Rt:!!(Un&&Un.some(qi=>{if(qi&&typeof qi=="object"&&qi.required&&!qi.warningOnly)return!0;if(typeof qi=="function"){const Dr=qi(eo);return Dr&&Dr.required&&!Dr.warningOnly}return!1})),ur=Object.assign({},_n);let ir=null;if(Array.isArray(yn)&&Xn)ir=yn;else if(!(On&&(!(Sn||at)||Xn))){if(!(at&&!On&&!Xn))if((0,We.l$)(yn)){const qi=Object.assign(Object.assign({},yn.props),ur);if(qi.id||(qi.id=bo),Ft||fr.length>0||Vi.length>0||ft.extra){const et=[];(Ft||fr.length>0)&&et.push(`${bo}_help`),ft.extra&&et.push(`${bo}_extra`),qi["aria-describedby"]=et.join(" ")}fr.length>0&&(qi["aria-invalid"]="true"),Yr&&(qi["aria-required"]="true"),(0,Wn.Yr)(yn)&&(qi.ref=Mr(xr,yn)),new Set([].concat((0,ge.Z)(Wt(gi)),(0,ge.Z)(Wt(ii)))).forEach(et=>{qi[et]=function(){for(var jr,yo,Or,wo,co,$o=arguments.length,Gr=new Array($o),zr=0;zr<$o;zr++)Gr[zr]=arguments[zr];(Or=ur[et])===null||Or===void 0||(jr=Or).call.apply(jr,[ur].concat(Gr)),(co=(wo=yn.props)[et])===null||co===void 0||(yo=co).call.apply(yo,[wo].concat(Gr))}});const Ai=[qi["aria-required"],qi["aria-invalid"],qi["aria-describedby"]];ir=Ge.createElement(jn,{value:ur[ft.valuePropName||"value"],update:yn,childProps:Ai},(0,We.Tm)(yn,qi))}else On&&(Sn||at)&&!Xn?ir=yn(eo):ir=yn}return Dn(ir,bo,Yr)}))}const on=Oi;on.useStatus=Fe;var ui=on,vi=function(ft,an){var vn={};for(var Bt in ft)Object.prototype.hasOwnProperty.call(ft,Bt)&&an.indexOf(Bt)<0&&(vn[Bt]=ft[Bt]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Bt=Object.getOwnPropertySymbols(ft);at<Bt.length;at++)an.indexOf(Bt[at])<0&&Object.prototype.propertyIsEnumerable.call(ft,Bt[at])&&(vn[Bt[at]]=ft[Bt[at]]);return vn},In=ft=>{var{prefixCls:an,children:vn}=ft,Bt=vi(ft,["prefixCls","children"]);const{getPrefixCls:at}=Ge.useContext(Dt.E_),cn=at("form",an),Sn=Ge.useMemo(()=>({prefixCls:cn,status:"error"}),[cn]);return Ge.createElement(nt.List,Object.assign({},Bt),(Un,un,Rt)=>Ge.createElement(Le.Rk.Provider,{value:Sn},vn(Un.map(zn=>Object.assign(Object.assign({},zn),{fieldKey:zn.key})),un,{errors:Rt.errors,warnings:Rt.warnings})))};function Gt(){const{form:ft}=(0,Ge.useContext)(Le.q3);return ft}const Kt=Ot;Kt.Item=ui,Kt.List=In,Kt.ErrorList=wt,Kt.useForm=rn,Kt.useFormInstance=Gt,Kt.useWatch=nt.useWatch,Kt.Provider=Le.RV,Kt.create=()=>{};var jt=Kt},8628:function(Vn,Pn,pe){"use strict";var ge=pe(59301),Oe=pe(34280),Ke=pe(56762),st=pe(69507);function Ge(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Le=(0,ge.useRef)({}),Tt=(0,Ke.Z)(),Pt=(0,st.ZP)();return(0,Oe.Z)(()=>{const Xe=Pt.subscribe(Et=>{Le.current=Et,_e&&Tt()});return()=>Pt.unsubscribe(Xe)},[]),Le.current}Pn.Z=Ge},9432:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return he},n:function(){return ce}});var ge=pe(19248),Oe=pe(92310),Ke=pe.n(Oe),st=pe(93681),Ge=pe(8654),_e=pe(59301),Le=pe(19080),Tt=pe(36355),Pt=pe(1684),Xe=pe(19716),Et=pe(32441),ct=pe(33234),It=pe(59412),Be=pe(9937);function ne(ve){return!!(ve.prefix||ve.suffix||ve.allowClear)}var ee=function(ve,be){var ke={};for(var Ae in ve)Object.prototype.hasOwnProperty.call(ve,Ae)&&be.indexOf(Ae)<0&&(ke[Ae]=ve[Ae]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Ae=Object.getOwnPropertySymbols(ve);ze<Ae.length;ze++)be.indexOf(Ae[ze])<0&&Object.prototype.propertyIsEnumerable.call(ve,Ae[ze])&&(ke[Ae[ze]]=ve[Ae[ze]]);return ke};function ce(ve,be){if(!ve)return;ve.focus(be);const{cursor:ke}=be||{};if(ke){const Ae=ve.value.length;switch(ke){case"start":ve.setSelectionRange(0,0);break;case"end":ve.setSelectionRange(Ae,Ae);break;default:ve.setSelectionRange(0,Ae);break}}}var he=(0,_e.forwardRef)((ve,be)=>{var ke;const{prefixCls:Ae,bordered:ze=!0,status:Ze,size:ot,disabled:qe,onBlur:bt,onFocus:He,suffix:wt,allowClear:nt,addonAfter:Dt,addonBefore:ht,className:zt,style:Yt,styles:Ut,rootClassName:it,onChange:Ve,classNames:Wt}=ve,Ln=ee(ve,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Nn,direction:$t,input:rn}=_e.useContext(Tt.E_),An=Nn("input",Ae),ti=(0,_e.useRef)(null),[xn,Qn]=(0,Be.ZP)(An),{compactSize:Ot,compactItemClassnames:Cn}=(0,ct.ri)(An,$t),Wn=(0,Xe.Z)(dn=>{var mn;return(mn=ot!=null?ot:Ot)!==null&&mn!==void 0?mn:dn}),We=_e.useContext(Pt.Z),Ee=qe!=null?qe:We,{status:Pe,hasFeedback:De,feedbackIcon:Fe}=(0,_e.useContext)(Et.aM),ye=(0,Le.F)(Pe,Ze),Qe=ne(ve)||!!De,vt=(0,_e.useRef)(Qe);(0,_e.useEffect)(()=>{var dn;Qe&&vt.current,vt.current=Qe},[Qe]);const Ye=(0,It.Z)(ti,!0),Je=dn=>{Ye(),bt==null||bt(dn)},yt=dn=>{Ye(),He==null||He(dn)},St=dn=>{Ye(),Ve==null||Ve(dn)},rt=(De||wt)&&_e.createElement(_e.Fragment,null,wt,De&&Fe);let Zt;return typeof nt=="object"&&(nt!=null&&nt.clearIcon)?Zt=nt:nt&&(Zt={clearIcon:_e.createElement(ge.Z,null)}),xn(_e.createElement(st.default,Object.assign({ref:(0,Ge.sQ)(be,ti),prefixCls:An,autoComplete:rn==null?void 0:rn.autoComplete},Ln,{disabled:Ee,onBlur:Je,onFocus:yt,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Yt),styles:Object.assign(Object.assign({},rn==null?void 0:rn.styles),Ut),suffix:rt,allowClear:Zt,className:Ke()(zt,it,Cn,rn==null?void 0:rn.className),onChange:St,addonAfter:Dt&&_e.createElement(ct.BR,null,_e.createElement(Et.Ux,{override:!0,status:!0},Dt)),addonBefore:ht&&_e.createElement(ct.BR,null,_e.createElement(Et.Ux,{override:!0,status:!0},ht)),classNames:Object.assign(Object.assign(Object.assign({},Wt),rn==null?void 0:rn.classNames),{input:Ke()({[`${An}-sm`]:Wn==="small",[`${An}-lg`]:Wn==="large",[`${An}-rtl`]:$t==="rtl",[`${An}-borderless`]:!ze},!Qe&&(0,Le.Z)(An,ye),Wt==null?void 0:Wt.input,(ke=rn==null?void 0:rn.classNames)===null||ke===void 0?void 0:ke.input,Qn)}),classes:{affixWrapper:Ke()({[`${An}-affix-wrapper-sm`]:Wn==="small",[`${An}-affix-wrapper-lg`]:Wn==="large",[`${An}-affix-wrapper-rtl`]:$t==="rtl",[`${An}-affix-wrapper-borderless`]:!ze},(0,Le.Z)(`${An}-affix-wrapper`,ye,De),Qn),wrapper:Ke()({[`${An}-group-rtl`]:$t==="rtl"},Qn),group:Ke()({[`${An}-group-wrapper-sm`]:Wn==="small",[`${An}-group-wrapper-lg`]:Wn==="large",[`${An}-group-wrapper-rtl`]:$t==="rtl",[`${An}-group-wrapper-disabled`]:Ee},(0,Le.Z)(`${An}-group-wrapper`,ye,De),Qn)}})))})},1643:function(Vn,Pn,pe){"use strict";var ge=pe(19248),Oe=pe(92310),Ke=pe.n(Oe),st=pe(9296),Ge=pe(59301),_e=pe(19080),Le=pe(36355),Tt=pe(1684),Pt=pe(19716),Xe=pe(32441),Et=pe(9432),ct=pe(9937),It=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 he=0,se=Object.getOwnPropertySymbols(ne);he<se.length;he++)ee.indexOf(se[he])<0&&Object.prototype.propertyIsEnumerable.call(ne,se[he])&&(ce[se[he]]=ne[se[he]]);return ce};const Be=(0,Ge.forwardRef)((ne,ee)=>{const{prefixCls:ce,bordered:se=!0,size:he,disabled:ve,status:be,allowClear:ke,showCount:Ae,classNames:ze,rootClassName:Ze,className:ot}=ne,qe=It(ne,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:bt,direction:He}=Ge.useContext(Le.E_),wt=(0,Pt.Z)(he),nt=Ge.useContext(Tt.Z),Dt=ve!=null?ve:nt,{status:ht,hasFeedback:zt,feedbackIcon:Yt}=Ge.useContext(Xe.aM),Ut=(0,_e.F)(ht,be),it=Ge.useRef(null);Ge.useImperativeHandle(ee,()=>{var $t;return{resizableTextArea:($t=it.current)===null||$t===void 0?void 0:$t.resizableTextArea,focus:rn=>{var An,ti;(0,Et.n)((ti=(An=it.current)===null||An===void 0?void 0:An.resizableTextArea)===null||ti===void 0?void 0:ti.textArea,rn)},blur:()=>{var rn;return(rn=it.current)===null||rn===void 0?void 0:rn.blur()}}});const Ve=bt("input",ce);let Wt;typeof ke=="object"&&(ke!=null&&ke.clearIcon)?Wt=ke:ke&&(Wt={clearIcon:Ge.createElement(ge.Z,null)});const[Ln,Nn]=(0,ct.ZP)(Ve);return Ln(Ge.createElement(st.default,Object.assign({},qe,{disabled:Dt,allowClear:Wt,className:Ke()(ot,Ze),classes:{affixWrapper:Ke()(`${Ve}-textarea-affix-wrapper`,{[`${Ve}-affix-wrapper-rtl`]:He==="rtl",[`${Ve}-affix-wrapper-borderless`]:!se,[`${Ve}-affix-wrapper-sm`]:wt==="small",[`${Ve}-affix-wrapper-lg`]:wt==="large",[`${Ve}-textarea-show-count`]:Ae},(0,_e.Z)(`${Ve}-affix-wrapper`,Ut),Nn)},classNames:Object.assign(Object.assign({},ze),{textarea:Ke()({[`${Ve}-borderless`]:!se,[`${Ve}-sm`]:wt==="small",[`${Ve}-lg`]:wt==="large"},(0,_e.Z)(Ve,Ut),Nn,ze==null?void 0:ze.textarea)}),prefixCls:Ve,suffix:zt&&Ge.createElement("span",{className:`${Ve}-textarea-suffix`},Yt),showCount:Ae,ref:it})))});Pn.Z=Be},59412:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Oe}});var ge=pe(59301);function Oe(Ke,st){const Ge=(0,ge.useRef)([]),_e=()=>{Ge.current.push(setTimeout(()=>{var Le,Tt,Pt,Xe;!((Le=Ke.current)===null||Le===void 0)&&Le.input&&((Tt=Ke.current)===null||Tt===void 0?void 0:Tt.input.getAttribute("type"))==="password"&&(!((Pt=Ke.current)===null||Pt===void 0)&&Pt.input.hasAttribute("value"))&&((Xe=Ke.current)===null||Xe===void 0||Xe.input.removeAttribute("value"))}))};return(0,ge.useEffect)(()=>(st&&_e(),()=>Ge.current.forEach(Le=>{Le&&clearTimeout(Le)})),[]),_e}},92832:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return wt}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(59301),st=pe(36355),Ge=pe(32441),_e=pe(9937),Tt=nt=>{const{getPrefixCls:Dt,direction:ht}=(0,Ke.useContext)(st.E_),{prefixCls:zt,className:Yt}=nt,Ut=Dt("input-group",zt),it=Dt("input"),[Ve,Wt]=(0,_e.ZP)(it),Ln=Oe()(Ut,{[`${Ut}-lg`]:nt.size==="large",[`${Ut}-sm`]:nt.size==="small",[`${Ut}-compact`]:nt.compact,[`${Ut}-rtl`]:ht==="rtl"},Wt,Yt),Nn=(0,Ke.useContext)(Ge.aM),$t=(0,Ke.useMemo)(()=>Object.assign(Object.assign({},Nn),{isFormItemInput:!1}),[Nn]);return Ve(Ke.createElement("span",{className:Ln,style:nt.style,onMouseEnter:nt.onMouseEnter,onMouseLeave:nt.onMouseLeave,onFocus:nt.onFocus,onBlur:nt.onBlur},Ke.createElement(Ge.aM.Provider,{value:$t},nt.children)))},Pt=pe(9432),Xe=pe(73331),Et=pe(15277),ct=pe(2738),It=pe(8654),Be=pe(59412),ne=function(nt,Dt){var ht={};for(var zt in nt)Object.prototype.hasOwnProperty.call(nt,zt)&&Dt.indexOf(zt)<0&&(ht[zt]=nt[zt]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Yt=0,zt=Object.getOwnPropertySymbols(nt);Yt<zt.length;Yt++)Dt.indexOf(zt[Yt])<0&&Object.prototype.propertyIsEnumerable.call(nt,zt[Yt])&&(ht[zt[Yt]]=nt[zt[Yt]]);return ht};const ee=nt=>nt?Ke.createElement(Et.Z,null):Ke.createElement(Xe.Z,null),ce={click:"onClick",hover:"onMouseOver"};var he=Ke.forwardRef((nt,Dt)=>{const{visibilityToggle:ht=!0}=nt,zt=typeof ht=="object"&&ht.visible!==void 0,[Yt,Ut]=(0,Ke.useState)(()=>zt?ht.visible:!1),it=(0,Ke.useRef)(null);Ke.useEffect(()=>{zt&&Ut(ht.visible)},[zt,ht]);const Ve=(0,Be.Z)(it),Wt=()=>{const{disabled:Ee}=nt;Ee||(Yt&&Ve(),Ut(Pe=>{var De;const Fe=!Pe;return typeof ht=="object"&&((De=ht.onVisibleChange)===null||De===void 0||De.call(ht,Fe)),Fe}))},Ln=Ee=>{const{action:Pe="click",iconRender:De=ee}=nt,Fe=ce[Pe]||"",ye=De(Yt),Qe={[Fe]:Wt,className:`${Ee}-icon`,key:"passwordIcon",onMouseDown:vt=>{vt.preventDefault()},onMouseUp:vt=>{vt.preventDefault()}};return Ke.cloneElement(Ke.isValidElement(ye)?ye:Ke.createElement("span",null,ye),Qe)},{className:Nn,prefixCls:$t,inputPrefixCls:rn,size:An}=nt,ti=ne(nt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:xn}=Ke.useContext(st.E_),Qn=xn("input",rn),Ot=xn("input-password",$t),Cn=ht&&Ln(Ot),Wn=Oe()(Ot,Nn,{[`${Ot}-${An}`]:!!An}),We=Object.assign(Object.assign({},(0,ct.Z)(ti,["suffix","iconRender","visibilityToggle"])),{type:Yt?"text":"password",className:Wn,prefixCls:Qn,suffix:Cn});return An&&(We.size=An),Ke.createElement(Pt.Z,Object.assign({ref:(0,It.sQ)(Dt,it)},We))}),ve=pe(47472),be=pe(92343),ke=pe(3113),Ae=pe(19716),ze=pe(33234),Ze=function(nt,Dt){var ht={};for(var zt in nt)Object.prototype.hasOwnProperty.call(nt,zt)&&Dt.indexOf(zt)<0&&(ht[zt]=nt[zt]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Yt=0,zt=Object.getOwnPropertySymbols(nt);Yt<zt.length;Yt++)Dt.indexOf(zt[Yt])<0&&Object.prototype.propertyIsEnumerable.call(nt,zt[Yt])&&(ht[zt[Yt]]=nt[zt[Yt]]);return ht},qe=Ke.forwardRef((nt,Dt)=>{const{prefixCls:ht,inputPrefixCls:zt,className:Yt,size:Ut,suffix:it,enterButton:Ve=!1,addonAfter:Wt,loading:Ln,disabled:Nn,onSearch:$t,onChange:rn,onCompositionStart:An,onCompositionEnd:ti}=nt,xn=Ze(nt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Qn,direction:Ot}=Ke.useContext(st.E_),Cn=Ke.useRef(!1),Wn=Qn("input-search",ht),We=Qn("input",zt),{compactSize:Ee}=(0,ze.ri)(Wn,Ot),Pe=(0,Ae.Z)(qt=>{var Gn;return(Gn=Ut!=null?Ut:Ee)!==null&&Gn!==void 0?Gn:qt}),De=Ke.useRef(null),Fe=qt=>{qt&&qt.target&&qt.type==="click"&&$t&&$t(qt.target.value,qt,{source:"clear"}),rn&&rn(qt)},ye=qt=>{var Gn;document.activeElement===((Gn=De.current)===null||Gn===void 0?void 0:Gn.input)&&qt.preventDefault()},Qe=qt=>{var Gn,Kn;$t&&$t((Kn=(Gn=De.current)===null||Gn===void 0?void 0:Gn.input)===null||Kn===void 0?void 0:Kn.value,qt,{source:"input"})},vt=qt=>{Cn.current||Ln||Qe(qt)},Ye=typeof Ve=="boolean"?Ke.createElement(ve.Z,null):null,Je=`${Wn}-button`;let yt;const St=Ve||{},rt=St.type&&St.type.__ANT_BUTTON===!0;rt||St.type==="button"?yt=(0,be.Tm)(St,Object.assign({onMouseDown:ye,onClick:qt=>{var Gn,Kn;(Kn=(Gn=St==null?void 0:St.props)===null||Gn===void 0?void 0:Gn.onClick)===null||Kn===void 0||Kn.call(Gn,qt),Qe(qt)},key:"enterButton"},rt?{className:Je,size:Pe}:{})):yt=Ke.createElement(ke.ZP,{className:Je,type:Ve?"primary":void 0,size:Pe,disabled:Nn,key:"enterButton",onMouseDown:ye,onClick:Qe,loading:Ln,icon:Ye},Ve),Wt&&(yt=[yt,(0,be.Tm)(Wt,{key:"addonAfter"})]);const Zt=Oe()(Wn,{[`${Wn}-rtl`]:Ot==="rtl",[`${Wn}-${Pe}`]:!!Pe,[`${Wn}-with-button`]:!!Ve},Yt),dn=qt=>{Cn.current=!0,An==null||An(qt)},mn=qt=>{Cn.current=!1,ti==null||ti(qt)};return Ke.createElement(Pt.Z,Object.assign({ref:(0,It.sQ)(De,Dt),onPressEnter:vt},xn,{size:Pe,onCompositionStart:dn,onCompositionEnd:mn,prefixCls:We,addonAfter:yt,suffix:it,onChange:Fe,className:Zt,disabled:Nn}))}),bt=pe(1643);const He=Pt.Z;He.Group=Tt,He.Search=qe,He.TextArea=bt.Z,He.Password=he;var wt=He},45818:function(Vn,Pn,pe){"use strict";pe.d(Pn,{D:function(){return ve},Z:function(){return Ae}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Ze,ot){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ze,{ref:ot,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le,Pt=pe(33853),Xe=pe(38819),Et=pe(92310),ct=pe.n(Et),It=pe(2738),ne=ze=>!isNaN(parseFloat(ze))&&isFinite(ze),ee=pe(36355),ce=pe(84966),se=function(ze,Ze){var ot={};for(var qe in ze)Object.prototype.hasOwnProperty.call(ze,qe)&&Ze.indexOf(qe)<0&&(ot[qe]=ze[qe]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,qe=Object.getOwnPropertySymbols(ze);bt<qe.length;bt++)Ze.indexOf(qe[bt])<0&&Object.prototype.propertyIsEnumerable.call(ze,qe[bt])&&(ot[qe[bt]]=ze[qe[bt]]);return ot};const he={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ve=Oe.createContext({}),be=(()=>{let ze=0;return function(){let Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return ze+=1,`${Ze}${ze}`}})();var Ae=Oe.forwardRef((ze,Ze)=>{const{prefixCls:ot,className:qe,trigger:bt,children:He,defaultCollapsed:wt=!1,theme:nt="dark",style:Dt={},collapsible:ht=!1,reverseArrow:zt=!1,width:Yt=200,collapsedWidth:Ut=80,zeroWidthTriggerStyle:it,breakpoint:Ve,onCollapse:Wt,onBreakpoint:Ln}=ze,Nn=se(ze,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:$t}=(0,Oe.useContext)(ce.Gs),[rn,An]=(0,Oe.useState)("collapsed"in ze?ze.collapsed:wt),[ti,xn]=(0,Oe.useState)(!1);(0,Oe.useEffect)(()=>{"collapsed"in ze&&An(ze.collapsed)},[ze.collapsed]);const Qn=(Pe,De)=>{"collapsed"in ze||An(Pe),Wt==null||Wt(Pe,De)},Ot=(0,Oe.useRef)();Ot.current=Pe=>{xn(Pe.matches),Ln==null||Ln(Pe.matches),rn!==Pe.matches&&Qn(Pe.matches,"responsive")},(0,Oe.useEffect)(()=>{function Pe(Fe){return Ot.current(Fe)}let De;if(typeof window!="undefined"){const{matchMedia:Fe}=window;if(Fe&&Ve&&Ve in he){De=Fe(`(max-width: ${he[Ve]})`);try{De.addEventListener("change",Pe)}catch(ye){De.addListener(Pe)}Pe(De)}}return()=>{try{De==null||De.removeEventListener("change",Pe)}catch(Fe){De==null||De.removeListener(Pe)}}},[Ve]),(0,Oe.useEffect)(()=>{const Pe=be("ant-sider-");return $t.addSider(Pe),()=>$t.removeSider(Pe)},[]);const Cn=()=>{Qn(!rn,"clickTrigger")},{getPrefixCls:Wn}=(0,Oe.useContext)(ee.E_),We=()=>{const Pe=Wn("layout-sider",ot),De=(0,It.Z)(Nn,["collapsed"]),Fe=rn?Ut:Yt,ye=ne(Fe)?`${Fe}px`:String(Fe),Qe=parseFloat(String(Ut||0))===0?Oe.createElement("span",{onClick:Cn,className:ct()(`${Pe}-zero-width-trigger`,`${Pe}-zero-width-trigger-${zt?"right":"left"}`),style:it},bt||Oe.createElement(Tt,null)):null,Je={expanded:zt?Oe.createElement(Xe.Z,null):Oe.createElement(Pt.Z,null),collapsed:zt?Oe.createElement(Pt.Z,null):Oe.createElement(Xe.Z,null)}[rn?"collapsed":"expanded"],yt=bt!==null?Qe||Oe.createElement("div",{className:`${Pe}-trigger`,onClick:Cn,style:{width:ye}},bt||Je):null,St=Object.assign(Object.assign({},Dt),{flex:`0 0 ${ye}`,maxWidth:ye,minWidth:ye,width:ye}),rt=ct()(Pe,`${Pe}-${nt}`,{[`${Pe}-collapsed`]:!!rn,[`${Pe}-has-trigger`]:ht&&bt!==null&&!Qe,[`${Pe}-below`]:!!ti,[`${Pe}-zero-width`]:parseFloat(ye)===0},qe);return Oe.createElement("aside",Object.assign({className:rt},De,{style:St,ref:Ze}),Oe.createElement("div",{className:`${Pe}-children`},He),ht||ti&&Qe?yt:null)},Ee=Oe.useMemo(()=>({siderCollapsed:rn}),[rn]);return Oe.createElement(ve.Provider,{value:Ee},We())})},84966:function(Vn,Pn,pe){"use strict";pe.d(Pn,{VY:function(){return ve},$_:function(){return he},h4:function(){return se},Gs:function(){return It},ZP:function(){return be}});var ge=pe(26407),Oe=pe(92310),Ke=pe.n(Oe),st=pe(2738),Ge=pe(59301),_e=pe(36355),Le=pe(83116),Pt=ke=>{const{componentCls:Ae,bodyBg:ze,lightSiderBg:Ze,lightTriggerBg:ot,lightTriggerColor:qe}=ke;return{[`${Ae}-sider-light`]:{background:Ze,[`${Ae}-sider-trigger`]:{color:qe,background:ot},[`${Ae}-sider-zero-width-trigger`]:{color:qe,background:ot,border:`1px solid ${ze}`,borderInlineStart:0}}}};const Xe=ke=>{const{antCls:Ae,componentCls:ze,colorText:Ze,triggerColor:ot,footerBg:qe,triggerBg:bt,headerHeight:He,headerPadding:wt,headerColor:nt,footerPadding:Dt,triggerHeight:ht,zeroTriggerHeight:zt,zeroTriggerWidth:Yt,motionDurationMid:Ut,motionDurationSlow:it,fontSize:Ve,borderRadius:Wt,bodyBg:Ln,headerBg:Nn,siderBg:$t}=ke;return{[ze]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Ln,"&, *":{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,[`${Ae}-menu${Ae}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:ht},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:ht,color:ot,lineHeight:`${ht}px`,textAlign:"center",background:bt,cursor:"pointer",transition:`all ${Ut}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:He,insetInlineEnd:-Yt,zIndex:1,width:Yt,height:zt,color:ot,fontSize:ke.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:-Yt,borderStartStartRadius:Wt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Wt}}}}},Pt(ke)),{"&-rtl":{direction:"rtl"}}),[`${ze}-header`]:{height:He,padding:wt,color:nt,lineHeight:`${He}px`,background:Nn,[`${Ae}-menu`]:{lineHeight:"inherit"}},[`${ze}-footer`]:{padding:Dt,color:Ze,fontSize:Ve,background:qe},[`${ze}-content`]:{flex:"auto",minHeight:0}}};var Et=(0,Le.Z)("Layout",ke=>[Xe(ke)],ke=>{const{colorBgLayout:Ae,controlHeight:ze,controlHeightLG:Ze,colorText:ot,controlHeightSM:qe,marginXXS:bt,colorTextLightSolid:He,colorBgContainer:wt}=ke,nt=Ze*1.25;return{colorBgHeader:"#001529",colorBgBody:Ae,colorBgTrigger:"#002140",bodyBg:Ae,headerBg:"#001529",headerHeight:ze*2,headerPadding:`0 ${nt}px`,headerColor:ot,footerPadding:`${qe}px ${nt}px`,footerBg:Ae,siderBg:"#001529",triggerHeight:Ze+bt*2,triggerBg:"#002140",triggerColor:He,zeroTriggerWidth:Ze,zeroTriggerHeight:Ze,lightSiderBg:wt,lightTriggerBg:wt,lightTriggerColor:ot}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),ct=function(ke,Ae){var ze={};for(var Ze in ke)Object.prototype.hasOwnProperty.call(ke,Ze)&&Ae.indexOf(Ze)<0&&(ze[Ze]=ke[Ze]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,Ze=Object.getOwnPropertySymbols(ke);ot<Ze.length;ot++)Ae.indexOf(Ze[ot])<0&&Object.prototype.propertyIsEnumerable.call(ke,Ze[ot])&&(ze[Ze[ot]]=ke[Ze[ot]]);return ze};const It=Ge.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Be(ke){let{suffixCls:Ae,tagName:ze,displayName:Ze}=ke;return ot=>Ge.forwardRef((bt,He)=>Ge.createElement(ot,Object.assign({ref:He,suffixCls:Ae,tagName:ze},bt)))}const ne=Ge.forwardRef((ke,Ae)=>{const{prefixCls:ze,suffixCls:Ze,className:ot,tagName:qe}=ke,bt=ct(ke,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:He}=Ge.useContext(_e.E_),wt=He("layout",ze),[nt,Dt]=Et(wt),ht=Ze?`${wt}-${Ze}`:wt;return nt(Ge.createElement(qe,Object.assign({className:Ke()(ze||ht,ot,Dt),ref:Ae},bt)))}),ee=Ge.forwardRef((ke,Ae)=>{const{direction:ze}=Ge.useContext(_e.E_),[Ze,ot]=Ge.useState([]),{prefixCls:qe,className:bt,rootClassName:He,children:wt,hasSider:nt,tagName:Dt,style:ht}=ke,zt=ct(ke,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Yt=(0,st.Z)(zt,["suffixCls"]),{getPrefixCls:Ut,layout:it}=Ge.useContext(_e.E_),Ve=Ut("layout",qe),[Wt,Ln]=Et(Ve),Nn=Ke()(Ve,{[`${Ve}-has-sider`]:typeof nt=="boolean"?nt:Ze.length>0,[`${Ve}-rtl`]:ze==="rtl"},it==null?void 0:it.className,bt,He,Ln),$t=Ge.useMemo(()=>({siderHook:{addSider:rn=>{ot(An=>[].concat((0,ge.Z)(An),[rn]))},removeSider:rn=>{ot(An=>An.filter(ti=>ti!==rn))}}}),[]);return Wt(Ge.createElement(It.Provider,{value:$t},Ge.createElement(Dt,Object.assign({ref:Ae,className:Nn,style:Object.assign(Object.assign({},it==null?void 0:it.style),ht)},Yt),wt)))}),ce=Be({tagName:"div",displayName:"Layout"})(ee),se=Be({suffixCls:"header",tagName:"header",displayName:"Header"})(ne),he=Be({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(ne),ve=Be({suffixCls:"content",tagName:"main",displayName:"Content"})(ne);var be=ce},40875:function(Vn,Pn,pe){"use strict";pe.d(Pn,{J:function(){return _e}});var ge=pe(59301),Oe=pe(33234),Ke=pe(70425),st=function(Le,Tt){var Pt={};for(var Xe in Le)Object.prototype.hasOwnProperty.call(Le,Xe)&&Tt.indexOf(Xe)<0&&(Pt[Xe]=Le[Xe]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,Xe=Object.getOwnPropertySymbols(Le);Et<Xe.length;Et++)Tt.indexOf(Xe[Et])<0&&Object.prototype.propertyIsEnumerable.call(Le,Xe[Et])&&(Pt[Xe[Et]]=Le[Xe[Et]]);return Pt};const Ge=ge.createContext(null),_e=ge.forwardRef((Le,Tt)=>{const{children:Pt}=Le,Xe=st(Le,["children"]),Et=ge.useContext(Ge),ct=ge.useMemo(()=>Object.assign(Object.assign({},Et),Xe),[Et,Xe.prefixCls,Xe.mode,Xe.selectable]);return ge.createElement(Ge.Provider,{value:ct},ge.createElement(Oe.BR,null,(0,Ke.supportNodeRef)(Pt)?ge.cloneElement(Pt,{ref:Tt}):Pt))});Pn.Z=Ge},20834:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return Ee}});var ge=pe(15285),Oe=pe(59301),Ke=pe(45818),st=pe(92310),Ge=pe.n(st),_e=pe(36355),Le=function(Pe,De){var Fe={};for(var ye in Pe)Object.prototype.hasOwnProperty.call(Pe,ye)&&De.indexOf(ye)<0&&(Fe[ye]=Pe[ye]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,ye=Object.getOwnPropertySymbols(Pe);Qe<ye.length;Qe++)De.indexOf(ye[Qe])<0&&Object.prototype.propertyIsEnumerable.call(Pe,ye[Qe])&&(Fe[ye[Qe]]=Pe[ye[Qe]]);return Fe},Pt=Pe=>{const{prefixCls:De,className:Fe,dashed:ye}=Pe,Qe=Le(Pe,["prefixCls","className","dashed"]),{getPrefixCls:vt}=Oe.useContext(_e.E_),Ye=vt("menu",De),Je=Ge()({[`${Ye}-item-divider-dashed`]:!!ye},Fe);return Oe.createElement(ge.iz,Object.assign({className:Je},Qe))},Xe=pe(11592),Et=pe(2738),ct=pe(6848),It=pe(92343),ne=(0,Oe.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ce=Pe=>{var De;const{className:Fe,children:ye,icon:Qe,title:vt,danger:Ye}=Pe,{prefixCls:Je,firstLevel:yt,direction:St,disableMenuItemTitleTooltip:rt,inlineCollapsed:Zt}=Oe.useContext(ne),dn=sn=>{const Fn=Oe.createElement("span",{className:`${Je}-title-content`},ye);return(!Qe||(0,It.l$)(ye)&&ye.type==="span")&&ye&&sn&&yt&&typeof ye=="string"?Oe.createElement("div",{className:`${Je}-inline-collapsed-noicon`},ye.charAt(0)):Fn},{siderCollapsed:mn}=Oe.useContext(Ke.D);let qt=vt;typeof vt=="undefined"?qt=yt?ye:"":vt===!1&&(qt="");const Gn={title:qt};!mn&&!Zt&&(Gn.title=null,Gn.open=!1);const Kn=(0,Xe.Z)(ye).length;let Nt=Oe.createElement(ge.ck,Object.assign({},(0,Et.Z)(Pe,["title","icon","danger"]),{className:Ge()({[`${Je}-item-danger`]:Ye,[`${Je}-item-only-child`]:(Qe?Kn+1:Kn)===1},Fe),title:typeof vt=="string"?vt:void 0}),(0,It.Tm)(Qe,{className:Ge()((0,It.l$)(Qe)?(De=Qe.props)===null||De===void 0?void 0:De.className:"",`${Je}-item-icon`)}),dn(Zt));return rt||(Nt=Oe.createElement(ct.Z,Object.assign({},Gn,{placement:St==="rtl"?"left":"right",overlayClassName:`${Je}-inline-collapsed-tooltip`}),Nt)),Nt},he=Pe=>{var De;const{popupClassName:Fe,icon:ye,title:Qe,theme:vt}=Pe,Ye=Oe.useContext(ne),{prefixCls:Je,inlineCollapsed:yt,theme:St}=Ye,rt=(0,ge.Xl)();let Zt;if(!ye)Zt=yt&&!rt.length&&Qe&&typeof Qe=="string"?Oe.createElement("div",{className:`${Je}-inline-collapsed-noicon`},Qe.charAt(0)):Oe.createElement("span",{className:`${Je}-title-content`},Qe);else{const mn=(0,It.l$)(Qe)&&Qe.type==="span";Zt=Oe.createElement(Oe.Fragment,null,(0,It.Tm)(ye,{className:Ge()((0,It.l$)(ye)?(De=ye.props)===null||De===void 0?void 0:De.className:"",`${Je}-item-icon`)}),mn?Qe:Oe.createElement("span",{className:`${Je}-title-content`},Qe))}const dn=Oe.useMemo(()=>Object.assign(Object.assign({},Ye),{firstLevel:!1}),[Ye]);return Oe.createElement(ne.Provider,{value:dn},Oe.createElement(ge.Wd,Object.assign({},(0,Et.Z)(Pe,["icon"]),{title:Zt,popupClassName:Ge()(Je,Fe,`${Je}-${vt||St}`)})))},ve=pe(18785),be=pe(70425),ke=pe(62892),Ae=pe(40875),ze=function(Pe,De){var Fe={};for(var ye in Pe)Object.prototype.hasOwnProperty.call(Pe,ye)&&De.indexOf(ye)<0&&(Fe[ye]=Pe[ye]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,ye=Object.getOwnPropertySymbols(Pe);Qe<ye.length;Qe++)De.indexOf(ye[Qe])<0&&Object.prototype.propertyIsEnumerable.call(Pe,ye[Qe])&&(Fe[ye[Qe]]=Pe[ye[Qe]]);return Fe};function Ze(Pe){return(Pe||[]).map((De,Fe)=>{if(De&&typeof De=="object"){const ye=De,{label:Qe,children:vt,key:Ye,type:Je}=ye,yt=ze(ye,["label","children","key","type"]),St=Ye!=null?Ye:`tmp-${Fe}`;return vt||Je==="group"?Je==="group"?Oe.createElement(ge.BW,Object.assign({key:St},yt,{title:Qe}),Ze(vt)):Oe.createElement(he,Object.assign({key:St},yt,{title:Qe}),Ze(vt)):Je==="divider"?Oe.createElement(Pt,Object.assign({key:St},yt)):Oe.createElement(ce,Object.assign({key:St},yt),Qe)}return null}).filter(De=>De)}function ot(Pe){return Oe.useMemo(()=>Pe&&Ze(Pe),[Pe])}var qe=pe(64993),bt=pe(17313),He=pe(8378),wt=pe(13826),nt=pe(29878),Dt=pe(83116),ht=pe(37613),Yt=Pe=>{const{componentCls:De,motionDurationSlow:Fe,horizontalLineHeight:ye,colorSplit:Qe,lineWidth:vt,lineType:Ye,itemPaddingInline:Je}=Pe;return{[`${De}-horizontal`]:{lineHeight:ye,border:0,borderBottom:`${vt}px ${Ye} ${Qe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${De}-item, ${De}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Je},[`> ${De}-item:hover,
> ${De}-item-active,
> ${De}-submenu ${De}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${De}-item, ${De}-submenu-title`]:{transition:[`border-color ${Fe}`,`background ${Fe}`].join(",")},[`${De}-submenu-arrow`]:{display:"none"}}}},it=Pe=>{let{componentCls:De,menuArrowOffset:Fe}=Pe;return{[`${De}-rtl`]:{direction:"rtl"},[`${De}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${De}-rtl${De}-vertical,
${De}-submenu-rtl ${De}-vertical`]:{[`${De}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${Fe})`},"&::after":{transform:`rotate(45deg) translateY(${Fe})`}}}}};const Ve=Pe=>Object.assign({},(0,bt.oN)(Pe));var Ln=(Pe,De)=>{const{componentCls:Fe,itemColor:ye,itemSelectedColor:Qe,groupTitleColor:vt,itemBg:Ye,subMenuItemBg:Je,itemSelectedBg:yt,activeBarHeight:St,activeBarWidth:rt,activeBarBorderWidth:Zt,motionDurationSlow:dn,motionEaseInOut:mn,motionEaseOut:qt,itemPaddingInline:Gn,motionDurationMid:Kn,itemHoverColor:Nt,lineType:sn,colorSplit:Fn,itemDisabledColor:hn,dangerItemColor:Mn,dangerItemHoverColor:li,dangerItemSelectedColor:pi,dangerItemActiveBg:mi,dangerItemSelectedBg:Li,itemHoverBg:Gi,itemActiveBg:ar,menuSubMenuBg:Xi,horizontalItemSelectedColor:wr,horizontalItemSelectedBg:vr,horizontalItemBorderRadius:ji,horizontalItemHoverBg:Lr,popupBg:jn}=Pe;return{[`${Fe}-${De}, ${Fe}-${De} > ${Fe}`]:{color:ye,background:Ye,[`&${Fe}-root:focus-visible`]:Object.assign({},Ve(Pe)),[`${Fe}-item-group-title`]:{color:vt},[`${Fe}-submenu-selected`]:{[`> ${Fe}-submenu-title`]:{color:Qe}},[`${Fe}-item-disabled, ${Fe}-submenu-disabled`]:{color:`${hn} !important`},[`${Fe}-item:not(${Fe}-item-selected):not(${Fe}-submenu-selected)`]:{[`&:hover, > ${Fe}-submenu-title:hover`]:{color:Nt}},[`&:not(${Fe}-horizontal)`]:{[`${Fe}-item:not(${Fe}-item-selected)`]:{"&:hover":{backgroundColor:Gi},"&:active":{backgroundColor:ar}},[`${Fe}-submenu-title`]:{"&:hover":{backgroundColor:Gi},"&:active":{backgroundColor:ar}}},[`${Fe}-item-danger`]:{color:Mn,[`&${Fe}-item:hover`]:{[`&:not(${Fe}-item-selected):not(${Fe}-submenu-selected)`]:{color:li}},[`&${Fe}-item:active`]:{background:mi}},[`${Fe}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Fe}-item-selected`]:{color:Qe,[`&${Fe}-item-danger`]:{color:pi},"a, a:hover":{color:"inherit"}},[`& ${Fe}-item-selected`]:{backgroundColor:yt,[`&${Fe}-item-danger`]:{backgroundColor:Li}},[`${Fe}-item, ${Fe}-submenu-title`]:{[`&:not(${Fe}-item-disabled):focus-visible`]:Object.assign({},Ve(Pe))},[`&${Fe}-submenu > ${Fe}`]:{backgroundColor:Xi},[`&${Fe}-popup > ${Fe}`]:{backgroundColor:jn},[`&${Fe}-horizontal`]:Object.assign(Object.assign({},De==="dark"?{borderBottom:0}:{}),{[`> ${Fe}-item, > ${Fe}-submenu`]:{top:Zt,marginTop:-Zt,marginBottom:0,borderRadius:ji,"&::after":{position:"absolute",insetInline:Gn,bottom:0,borderBottom:`${St}px solid transparent`,transition:`border-color ${dn} ${mn}`,content:'""'},"&:hover, &-active, &-open":{background:Lr,"&::after":{borderBottomWidth:St,borderBottomColor:wr}},"&-selected":{color:wr,backgroundColor:vr,"&:hover":{backgroundColor:vr},"&::after":{borderBottomWidth:St,borderBottomColor:wr}}}}),[`&${Fe}-root`]:{[`&${Fe}-inline, &${Fe}-vertical`]:{borderInlineEnd:`${Zt}px ${sn} ${Fn}`}},[`&${Fe}-inline`]:{[`${Fe}-sub${Fe}-inline`]:{background:Je},[`${Fe}-item, ${Fe}-submenu-title`]:Zt&&rt?{width:`calc(100% + ${Zt}px)`}:{},[`${Fe}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${rt}px solid ${Qe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Kn} ${qt}`,`opacity ${Kn} ${qt}`].join(","),content:'""'},[`&${Fe}-item-danger`]:{"&::after":{borderInlineEndColor:pi}}},[`${Fe}-selected, ${Fe}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Kn} ${mn}`,`opacity ${Kn} ${mn}`].join(",")}}}}}};const Nn=Pe=>{const{componentCls:De,itemHeight:Fe,itemMarginInline:ye,padding:Qe,menuArrowSize:vt,marginXS:Ye,itemMarginBlock:Je}=Pe,yt=Qe+vt+Ye;return{[`${De}-item`]:{position:"relative",overflow:"hidden"},[`${De}-item, ${De}-submenu-title`]:{height:Fe,lineHeight:`${Fe}px`,paddingInline:Qe,overflow:"hidden",textOverflow:"ellipsis",marginInline:ye,marginBlock:Je,width:`calc(100% - ${ye*2}px)`},[`> ${De}-item,
> ${De}-submenu > ${De}-submenu-title`]:{height:Fe,lineHeight:`${Fe}px`},[`${De}-item-group-list ${De}-submenu-title,
${De}-submenu-title`]:{paddingInlineEnd:yt}}};var rn=Pe=>{const{componentCls:De,iconCls:Fe,itemHeight:ye,colorTextLightSolid:Qe,dropdownWidth:vt,controlHeightLG:Ye,motionDurationMid:Je,motionEaseOut:yt,paddingXL:St,itemMarginInline:rt,fontSizeLG:Zt,motionDurationSlow:dn,paddingXS:mn,boxShadowSecondary:qt,collapsedWidth:Gn,collapsedIconSize:Kn}=Pe,Nt={height:ye,lineHeight:`${ye}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[De]:{"&-inline, &-vertical":Object.assign({[`&${De}-root`]:{boxShadow:"none"}},Nn(Pe))},[`${De}-submenu-popup`]:{[`${De}-vertical`]:Object.assign(Object.assign({},Nn(Pe)),{boxShadow:qt})}},{[`${De}-submenu-popup ${De}-vertical${De}-sub`]:{minWidth:vt,maxHeight:`calc(100vh - ${Ye*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${De}-inline`]:{width:"100%",[`&${De}-root`]:{[`${De}-item, ${De}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${dn}`,`background ${dn}`,`padding ${Je} ${yt}`].join(","),[`> ${De}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${De}-sub${De}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${De}-submenu > ${De}-submenu-title`]:Nt,[`& ${De}-item-group-title`]:{paddingInlineStart:St}},[`${De}-item`]:Nt}},{[`${De}-inline-collapsed`]:{width:Gn,[`&${De}-root`]:{[`${De}-item, ${De}-submenu ${De}-submenu-title`]:{[`> ${De}-inline-collapsed-noicon`]:{fontSize:Zt,textAlign:"center"}}},[`> ${De}-item,
> ${De}-item-group > ${De}-item-group-list > ${De}-item,
> ${De}-item-group > ${De}-item-group-list > ${De}-submenu > ${De}-submenu-title,
> ${De}-submenu > ${De}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Zt/2}px - ${rt}px)`,textOverflow:"clip",[`
${De}-submenu-arrow,
${De}-submenu-expand-icon
`]:{opacity:0},[`${De}-item-icon, ${Fe}`]:{margin:0,fontSize:Kn,lineHeight:`${ye}px`,"+ span":{display:"inline-block",opacity:0}}},[`${De}-item-icon, ${Fe}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${De}-item-icon, ${Fe}`]:{display:"none"},"a, a:hover":{color:Qe}},[`${De}-item-group-title`]:Object.assign(Object.assign({},bt.vS),{paddingInline:mn})}}]};const An=Pe=>{const{componentCls:De,motionDurationSlow:Fe,motionDurationMid:ye,motionEaseInOut:Qe,motionEaseOut:vt,iconCls:Ye,iconSize:Je,iconMarginInlineEnd:yt}=Pe;return{[`${De}-item, ${De}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Fe}`,`background ${Fe}`,`padding ${Fe} ${Qe}`].join(","),[`${De}-item-icon, ${Ye}`]:{minWidth:Je,fontSize:Je,transition:[`font-size ${ye} ${vt}`,`margin ${Fe} ${Qe}`,`color ${Fe}`].join(","),"+ span":{marginInlineStart:yt,opacity:1,transition:[`opacity ${Fe} ${Qe}`,`margin ${Fe}`,`color ${Fe}`].join(",")}},[`${De}-item-icon`]:Object.assign({},(0,bt.Ro)()),[`&${De}-item-only-child`]:{[`> ${Ye}, > ${De}-item-icon`]:{marginInlineEnd:0}}},[`${De}-item-disabled, ${De}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${De}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ti=Pe=>{const{componentCls:De,motionDurationSlow:Fe,motionEaseInOut:ye,borderRadius:Qe,menuArrowSize:vt,menuArrowOffset:Ye}=Pe;return{[`${De}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Pe.margin,width:vt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Fe} ${ye}, opacity ${Fe}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:vt*.6,height:vt*.15,backgroundColor:"currentcolor",borderRadius:Qe,transition:[`background ${Fe} ${ye}`,`transform ${Fe} ${ye}`,`top ${Fe} ${ye}`,`color ${Fe} ${ye}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Ye})`},"&::after":{transform:`rotate(-45deg) translateY(${Ye})`}}}}},xn=Pe=>{const{antCls:De,componentCls:Fe,fontSize:ye,motionDurationSlow:Qe,motionDurationMid:vt,motionEaseInOut:Ye,paddingXS:Je,padding:yt,colorSplit:St,lineWidth:rt,zIndexPopup:Zt,borderRadiusLG:dn,subMenuItemBorderRadius:mn,menuArrowSize:qt,menuArrowOffset:Gn,lineType:Kn,menuPanelMaskInset:Nt,groupTitleLineHeight:sn,groupTitleFontSize:Fn}=Pe;return[{"":{[`${Fe}`]:Object.assign(Object.assign({},(0,bt.dF)()),{"&-hidden":{display:"none"}})},[`${Fe}-submenu-hidden`]:{display:"none"}},{[Fe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,bt.Wf)(Pe)),(0,bt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:ye,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Qe} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${Fe}-item`]:{flex:"none"}},[`${Fe}-item, ${Fe}-submenu, ${Fe}-submenu-title`]:{borderRadius:Pe.itemBorderRadius},[`${Fe}-item-group-title`]:{padding:`${Je}px ${yt}px`,fontSize:Fn,lineHeight:sn,transition:`all ${Qe}`},[`&-horizontal ${Fe}-submenu`]:{transition:[`border-color ${Qe} ${Ye}`,`background ${Qe} ${Ye}`].join(",")},[`${Fe}-submenu, ${Fe}-submenu-inline`]:{transition:[`border-color ${Qe} ${Ye}`,`background ${Qe} ${Ye}`,`padding ${vt} ${Ye}`].join(",")},[`${Fe}-submenu ${Fe}-sub`]:{cursor:"initial",transition:[`background ${Qe} ${Ye}`,`padding ${Qe} ${Ye}`].join(",")},[`${Fe}-title-content`]:{transition:`color ${Qe}`},[`${Fe}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Fe}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:St,borderStyle:Kn,borderWidth:0,borderTopWidth:rt,marginBlock:rt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),An(Pe)),{[`${Fe}-item-group`]:{[`${Fe}-item-group-list`]:{margin:0,padding:0,[`${Fe}-item, ${Fe}-submenu-title`]:{paddingInline:`${ye*2}px ${yt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Zt,borderRadius:dn,boxShadow:"none",transformOrigin:"0 0",[`&${Fe}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${Nt}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:Nt},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:Pe.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Pe.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Pe.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Pe.paddingXS},[`> ${Fe}`]:Object.assign(Object.assign(Object.assign({borderRadius:dn},An(Pe)),ti(Pe)),{[`${Fe}-item, ${Fe}-submenu > ${Fe}-submenu-title`]:{borderRadius:mn},[`${Fe}-submenu-title::after`]:{transition:`transform ${Qe} ${Ye}`}})}}),ti(Pe)),{[`&-inline-collapsed ${Fe}-submenu-arrow,
&-inline ${Fe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Gn})`},"&::after":{transform:`rotate(45deg) translateX(-${Gn})`}},[`${Fe}-submenu-open${Fe}-submenu-inline > ${Fe}-submenu-title > ${Fe}-submenu-arrow`]:{transform:`translateY(-${qt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${Gn})`},"&::before":{transform:`rotate(45deg) translateX(${Gn})`}}})},{[`${De}-layout-header`]:{[Fe]:{lineHeight:"inherit"}}}]};var Qn=(Pe,De)=>(0,Dt.Z)("Menu",ye=>{if(De===!1)return[];const{colorBgElevated:Qe,colorPrimary:vt,colorTextLightSolid:Ye,controlHeightLG:Je,fontSize:yt,darkItemColor:St,darkDangerItemColor:rt,darkItemBg:Zt,darkSubMenuItemBg:dn,darkItemSelectedColor:mn,darkItemSelectedBg:qt,darkDangerItemSelectedBg:Gn,darkItemHoverBg:Kn,darkGroupTitleColor:Nt,darkItemHoverColor:sn,darkItemDisabledColor:Fn,darkDangerItemHoverColor:hn,darkDangerItemSelectedColor:Mn,darkDangerItemActiveBg:li}=ye,pi=yt/7*5,mi=(0,ht.TS)(ye,{menuArrowSize:pi,menuHorizontalHeight:Je*1.15,menuArrowOffset:`${pi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Qe}),Li=(0,ht.TS)(mi,{itemColor:St,itemHoverColor:sn,groupTitleColor:Nt,itemSelectedColor:mn,itemBg:Zt,popupBg:Zt,subMenuItemBg:dn,itemActiveBg:"transparent",itemSelectedBg:qt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Kn,itemDisabledColor:Fn,dangerItemColor:rt,dangerItemHoverColor:hn,dangerItemSelectedColor:Mn,dangerItemActiveBg:li,dangerItemSelectedBg:Gn,menuSubMenuBg:dn,horizontalItemSelectedColor:Ye,horizontalItemSelectedBg:vt});return[xn(mi),Yt(mi),rn(mi),Ln(mi,"light"),Ln(Li,"dark"),it(mi),(0,He.Z)(mi),(0,wt.oN)(mi,"slide-up"),(0,wt.oN)(mi,"slide-down"),(0,nt._y)(mi,"zoom-big")]},ye=>{const{colorPrimary:Qe,colorError:vt,colorTextDisabled:Ye,colorErrorBg:Je,colorText:yt,colorTextDescription:St,colorBgContainer:rt,colorFillAlter:Zt,colorFillContent:dn,lineWidth:mn,lineWidthBold:qt,controlItemBgActive:Gn,colorBgTextHover:Kn,controlHeightLG:Nt,lineHeight:sn,colorBgElevated:Fn,marginXXS:hn,padding:Mn,fontSize:li,controlHeightSM:pi,fontSizeLG:mi,colorTextLightSolid:Li,colorErrorHover:Gi}=ye,ar=new qe.C(Li).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:ye.zIndexPopupBase+50,radiusItem:ye.borderRadiusLG,itemBorderRadius:ye.borderRadiusLG,radiusSubMenuItem:ye.borderRadiusSM,subMenuItemBorderRadius:ye.borderRadiusSM,colorItemText:yt,itemColor:yt,colorItemTextHover:yt,itemHoverColor:yt,colorItemTextHoverHorizontal:Qe,horizontalItemHoverColor:Qe,colorGroupTitle:St,groupTitleColor:St,colorItemTextSelected:Qe,itemSelectedColor:Qe,colorItemTextSelectedHorizontal:Qe,horizontalItemSelectedColor:Qe,colorItemBg:rt,itemBg:rt,colorItemBgHover:Kn,itemHoverBg:Kn,colorItemBgActive:dn,itemActiveBg:Gn,colorSubItemBg:Zt,subMenuItemBg:Zt,colorItemBgSelected:Gn,itemSelectedBg:Gn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:qt,activeBarHeight:qt,colorActiveBarBorderSize:mn,activeBarBorderWidth:mn,colorItemTextDisabled:Ye,itemDisabledColor:Ye,colorDangerItemText:vt,dangerItemColor:vt,colorDangerItemTextHover:vt,dangerItemHoverColor:vt,colorDangerItemTextSelected:vt,dangerItemSelectedColor:vt,colorDangerItemBgActive:Je,dangerItemActiveBg:Je,colorDangerItemBgSelected:Je,dangerItemSelectedBg:Je,itemMarginInline:ye.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Nt,groupTitleLineHeight:sn,collapsedWidth:Nt*2,popupBg:Fn,itemMarginBlock:hn,itemPaddingInline:Mn,horizontalLineHeight:`${Nt*1.15}px`,iconSize:li,iconMarginInlineEnd:pi-li,collapsedIconSize:mi,groupTitleFontSize:li,darkItemDisabledColor:new qe.C(Li).setAlpha(.25).toRgbString(),darkItemColor:ar,darkDangerItemColor:vt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Li,darkItemSelectedBg:Qe,darkDangerItemSelectedBg:vt,darkItemHoverBg:"transparent",darkGroupTitleColor:ar,darkItemHoverColor:Li,darkDangerItemHoverColor:Gi,darkDangerItemSelectedColor:Li,darkDangerItemActiveBg:vt}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(Pe),Ot=function(Pe,De){var Fe={};for(var ye in Pe)Object.prototype.hasOwnProperty.call(Pe,ye)&&De.indexOf(ye)<0&&(Fe[ye]=Pe[ye]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,ye=Object.getOwnPropertySymbols(Pe);Qe<ye.length;Qe++)De.indexOf(ye[Qe])<0&&Object.prototype.propertyIsEnumerable.call(Pe,ye[Qe])&&(Fe[ye[Qe]]=Pe[ye[Qe]]);return Fe},Wn=(0,Oe.forwardRef)((Pe,De)=>{var Fe,ye;const Qe=Oe.useContext(Ae.Z),vt=Qe||{},{getPrefixCls:Ye,getPopupContainer:Je,direction:yt,menu:St}=Oe.useContext(_e.E_),rt=Ye(),{prefixCls:Zt,className:dn,style:mn,theme:qt="light",expandIcon:Gn,_internalDisableMenuItemTitleTooltip:Kn,inlineCollapsed:Nt,siderCollapsed:sn,items:Fn,children:hn,rootClassName:Mn,mode:li,selectable:pi,onClick:mi,overflowedIndicatorPopupClassName:Li}=Pe,Gi=Ot(Pe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),ar=(0,Et.Z)(Gi,["collapsedWidth"]),Xi=ot(Fn)||hn;(Fe=vt.validator)===null||Fe===void 0||Fe.call(vt,{mode:li});const wr=(0,be.useEvent)(function(){var bi;mi==null||mi.apply(void 0,arguments),(bi=vt.onClick)===null||bi===void 0||bi.call(vt)}),vr=vt.mode||li,ji=pi!=null?pi:vt.selectable,Lr=Oe.useMemo(()=>sn!==void 0?sn:Nt,[Nt,sn]),jn={horizontal:{motionName:`${rt}-slide-up`},inline:(0,ke.Z)(rt),other:{motionName:`${rt}-zoom-big`}},Ne=Ye("menu",Zt||vt.prefixCls),[Ei,Oi]=Qn(Ne,!Qe),on=Ge()(`${Ne}-${qt}`,St==null?void 0:St.className,dn);let ui;if(typeof Gn=="function")ui=Gn;else if(Gn===null||Gn===!1)ui=null;else if(vt.expandIcon===null||vt.expandIcon===!1)ui=null;else{const bi=Gn!=null?Gn:vt.expandIcon;ui=(0,It.Tm)(bi,{className:Ge()(`${Ne}-submenu-expand-icon`,(0,It.l$)(bi)?(ye=bi.props)===null||ye===void 0?void 0:ye.className:"")})}const vi=Oe.useMemo(()=>({prefixCls:Ne,inlineCollapsed:Lr||!1,direction:yt,firstLevel:!0,theme:qt,mode:vr,disableMenuItemTitleTooltip:Kn}),[Ne,Lr,yt,Kn,qt]);return Ei(Oe.createElement(Ae.Z.Provider,{value:null},Oe.createElement(ne.Provider,{value:vi},Oe.createElement(ge.ZP,Object.assign({getPopupContainer:Je,overflowedIndicator:Oe.createElement(ve.Z,null),overflowedIndicatorPopupClassName:Ge()(Ne,`${Ne}-${qt}`,Li),mode:vr,selectable:ji,onClick:wr},ar,{inlineCollapsed:Lr,style:Object.assign(Object.assign({},St==null?void 0:St.style),mn),className:on,prefixCls:Ne,direction:yt,defaultMotions:jn,expandIcon:ui,ref:De,rootClassName:Ge()(Mn,Oi)}),Xi))))});const We=(0,Oe.forwardRef)((Pe,De)=>{const Fe=(0,Oe.useRef)(null),ye=Oe.useContext(Ke.D);return(0,Oe.useImperativeHandle)(De,()=>({menu:Fe.current,focus:Qe=>{var vt;(vt=Fe.current)===null||vt===void 0||vt.focus(Qe)}})),Oe.createElement(Wn,Object.assign({ref:Fe},Pe,ye))});We.Item=ce,We.SubMenu=he,We.Divider=Pt,We.ItemGroup=ge.BW;var Ee=We},58421:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return vt}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Je,yt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Je,{ref:yt,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le,Pt=pe(49198),Xe=pe(33853),Et=pe(38819),ct=pe(92310),It=pe.n(ct),Be=pe(400),ne=pe(33708),ee=pe(6909),ce=pe(4771),se=pe(9427),he=pe(25440),ve=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},ke=be,Ae=pe(91735),ze=function(Ye){(0,se.Z)(yt,Ye);var Je=(0,he.Z)(yt);function yt(){var St;(0,ee.Z)(this,yt);for(var rt=arguments.length,Zt=new Array(rt),dn=0;dn<rt;dn++)Zt[dn]=arguments[dn];return St=Je.call.apply(Je,[this].concat(Zt)),St.state={goInputText:""},St.getValidValue=function(){var mn=St.state.goInputText;return!mn||Number.isNaN(mn)?void 0:Number(mn)},St.buildOptionText=function(mn){return"".concat(mn," ").concat(St.props.locale.items_per_page)},St.changeSize=function(mn){St.props.changeSize(Number(mn))},St.handleChange=function(mn){St.setState({goInputText:mn.target.value})},St.handleBlur=function(mn){var qt=St.props,Gn=qt.goButton,Kn=qt.quickGo,Nt=qt.rootPrefixCls,sn=St.state.goInputText;Gn||sn===""||(St.setState({goInputText:""}),!(mn.relatedTarget&&(mn.relatedTarget.className.indexOf("".concat(Nt,"-item-link"))>=0||mn.relatedTarget.className.indexOf("".concat(Nt,"-item"))>=0))&&Kn(St.getValidValue()))},St.go=function(mn){var qt=St.state.goInputText;qt!==""&&(mn.keyCode===ke.ENTER||mn.type==="click")&&(St.setState({goInputText:""}),St.props.quickGo(St.getValidValue()))},St}return(0,ce.Z)(yt,[{key:"getPageSizeOptions",value:function(){var rt=this.props,Zt=rt.pageSize,dn=rt.pageSizeOptions;return dn.some(function(mn){return mn.toString()===Zt.toString()})?dn:dn.concat([Zt.toString()]).sort(function(mn,qt){var Gn=Number.isNaN(Number(mn))?0:Number(mn),Kn=Number.isNaN(Number(qt))?0:Number(qt);return Gn-Kn})}},{key:"render",value:function(){var rt=this,Zt=this.props,dn=Zt.pageSize,mn=Zt.locale,qt=Zt.rootPrefixCls,Gn=Zt.changeSize,Kn=Zt.quickGo,Nt=Zt.goButton,sn=Zt.selectComponentClass,Fn=Zt.buildOptionText,hn=Zt.selectPrefixCls,Mn=Zt.disabled,li=this.state.goInputText,pi="".concat(qt,"-options"),mi=sn,Li=null,Gi=null,ar=null;if(!Gn&&!Kn)return null;var Xi=this.getPageSizeOptions();if(Gn&&mi){var wr=Xi.map(function(vr,ji){return Oe.createElement(mi.Option,{key:ji,value:vr.toString()},(Fn||rt.buildOptionText)(vr))});Li=Oe.createElement(mi,{disabled:Mn,prefixCls:hn,showSearch:!1,className:"".concat(pi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(dn||Xi[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ji){return ji.parentNode},"aria-label":mn.page_size,defaultOpen:!1},wr)}return Kn&&(Nt&&(ar=typeof Nt=="boolean"?Oe.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Mn,className:"".concat(pi,"-quick-jumper-button")},mn.jump_to_confirm):Oe.createElement("span",{onClick:this.go,onKeyUp:this.go},Nt)),Gi=Oe.createElement("div",{className:"".concat(pi,"-quick-jumper")},mn.jump_to,Oe.createElement("input",{disabled:Mn,type:"text",value:li,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":mn.page}),mn.page,ar)),Oe.createElement("li",{className:"".concat(pi)},Li,Gi)}}]),yt}(Oe.Component);ze.defaultProps={pageSizeOptions:["10","20","50","100"]};var Ze=ze,ot=function(Je){var yt,St=Je.rootPrefixCls,rt=Je.page,Zt=Je.active,dn=Je.className,mn=Je.showTitle,qt=Je.onClick,Gn=Je.onKeyPress,Kn=Je.itemRender,Nt="".concat(St,"-item"),sn=It()(Nt,"".concat(Nt,"-").concat(rt),(yt={},(0,Be.Z)(yt,"".concat(Nt,"-active"),Zt),(0,Be.Z)(yt,"".concat(Nt,"-disabled"),!rt),(0,Be.Z)(yt,Je.className,dn),yt)),Fn=function(){qt(rt)},hn=function(pi){Gn(pi,qt,rt)},Mn=Kn(rt,"page",Oe.createElement("a",{rel:"nofollow"},rt));return Mn?Oe.createElement("li",{title:mn?rt.toString():null,className:sn,onClick:Fn,onKeyPress:hn,tabIndex:0},Mn):null},qe=ot;function bt(){}function He(Ye){var Je=Number(Ye);return typeof Je=="number"&&!Number.isNaN(Je)&&isFinite(Je)&&Math.floor(Je)===Je}var wt=function(Je,yt,St){return St};function nt(Ye,Je,yt){var St=typeof Ye=="undefined"?Je.pageSize:Ye;return Math.floor((yt.total-1)/St)+1}var Dt=function(Ye){(0,se.Z)(yt,Ye);var Je=(0,he.Z)(yt);function yt(St){var rt;(0,ee.Z)(this,yt),rt=Je.call(this,St),rt.paginationNode=Oe.createRef(),rt.getJumpPrevPage=function(){return Math.max(1,rt.state.current-(rt.props.showLessItems?3:5))},rt.getJumpNextPage=function(){return Math.min(nt(void 0,rt.state,rt.props),rt.state.current+(rt.props.showLessItems?3:5))},rt.getItemIcon=function(Gn,Kn){var Nt=rt.props.prefixCls,sn=Gn||Oe.createElement("button",{type:"button","aria-label":Kn,className:"".concat(Nt,"-item-link")});return typeof Gn=="function"&&(sn=Oe.createElement(Gn,(0,ne.Z)({},rt.props))),sn},rt.isValid=function(Gn){var Kn=rt.props.total;return He(Gn)&&Gn!==rt.state.current&&He(Kn)&&Kn>0},rt.shouldDisplayQuickJumper=function(){var Gn=rt.props,Kn=Gn.showQuickJumper,Nt=Gn.total,sn=rt.state.pageSize;return Nt<=sn?!1:Kn},rt.handleKeyDown=function(Gn){(Gn.keyCode===ke.ARROW_UP||Gn.keyCode===ke.ARROW_DOWN)&&Gn.preventDefault()},rt.handleKeyUp=function(Gn){var Kn=rt.getValidValue(Gn),Nt=rt.state.currentInputValue;Kn!==Nt&&rt.setState({currentInputValue:Kn}),Gn.keyCode===ke.ENTER?rt.handleChange(Kn):Gn.keyCode===ke.ARROW_UP?rt.handleChange(Kn-1):Gn.keyCode===ke.ARROW_DOWN&&rt.handleChange(Kn+1)},rt.handleBlur=function(Gn){var Kn=rt.getValidValue(Gn);rt.handleChange(Kn)},rt.changePageSize=function(Gn){var Kn=rt.state.current,Nt=nt(Gn,rt.state,rt.props);Kn=Kn>Nt?Nt:Kn,Nt===0&&(Kn=rt.state.current),typeof Gn=="number"&&("pageSize"in rt.props||rt.setState({pageSize:Gn}),"current"in rt.props||rt.setState({current:Kn,currentInputValue:Kn})),rt.props.onShowSizeChange(Kn,Gn),"onChange"in rt.props&&rt.props.onChange&&rt.props.onChange(Kn,Gn)},rt.handleChange=function(Gn){var Kn=rt.props,Nt=Kn.disabled,sn=Kn.onChange,Fn=rt.state,hn=Fn.pageSize,Mn=Fn.current,li=Fn.currentInputValue;if(rt.isValid(Gn)&&!Nt){var pi=nt(void 0,rt.state,rt.props),mi=Gn;return Gn>pi?mi=pi:Gn<1&&(mi=1),"current"in rt.props||rt.setState({current:mi}),mi!==li&&rt.setState({currentInputValue:mi}),sn(mi,hn),mi}return Mn},rt.prev=function(){rt.hasPrev()&&rt.handleChange(rt.state.current-1)},rt.next=function(){rt.hasNext()&&rt.handleChange(rt.state.current+1)},rt.jumpPrev=function(){rt.handleChange(rt.getJumpPrevPage())},rt.jumpNext=function(){rt.handleChange(rt.getJumpNextPage())},rt.hasPrev=function(){return rt.state.current>1},rt.hasNext=function(){return rt.state.current<nt(void 0,rt.state,rt.props)},rt.runIfEnter=function(Gn,Kn){if(Gn.key==="Enter"||Gn.charCode===13){for(var Nt=arguments.length,sn=new Array(Nt>2?Nt-2:0),Fn=2;Fn<Nt;Fn++)sn[Fn-2]=arguments[Fn];Kn.apply(void 0,sn)}},rt.runIfEnterPrev=function(Gn){rt.runIfEnter(Gn,rt.prev)},rt.runIfEnterNext=function(Gn){rt.runIfEnter(Gn,rt.next)},rt.runIfEnterJumpPrev=function(Gn){rt.runIfEnter(Gn,rt.jumpPrev)},rt.runIfEnterJumpNext=function(Gn){rt.runIfEnter(Gn,rt.jumpNext)},rt.handleGoTO=function(Gn){(Gn.keyCode===ke.ENTER||Gn.type==="click")&&rt.handleChange(rt.state.currentInputValue)},rt.renderPrev=function(Gn){var Kn=rt.props,Nt=Kn.prevIcon,sn=Kn.itemRender,Fn=sn(Gn,"prev",rt.getItemIcon(Nt,"prev page")),hn=!rt.hasPrev();return(0,Oe.isValidElement)(Fn)?(0,Oe.cloneElement)(Fn,{disabled:hn}):Fn},rt.renderNext=function(Gn){var Kn=rt.props,Nt=Kn.nextIcon,sn=Kn.itemRender,Fn=sn(Gn,"next",rt.getItemIcon(Nt,"next page")),hn=!rt.hasNext();return(0,Oe.isValidElement)(Fn)?(0,Oe.cloneElement)(Fn,{disabled:hn}):Fn};var Zt=St.onChange!==bt,dn="current"in St;dn&&!Zt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var mn=St.defaultCurrent;"current"in St&&(mn=St.current);var qt=St.defaultPageSize;return"pageSize"in St&&(qt=St.pageSize),mn=Math.min(mn,nt(qt,void 0,St)),rt.state={current:mn,currentInputValue:mn,pageSize:qt},rt}return(0,ce.Z)(yt,[{key:"componentDidUpdate",value:function(rt,Zt){var dn=this.props.prefixCls;if(Zt.current!==this.state.current&&this.paginationNode.current){var mn=this.paginationNode.current.querySelector(".".concat(dn,"-item-").concat(Zt.current));if(mn&&document.activeElement===mn){var qt;mn==null||(qt=mn.blur)===null||qt===void 0||qt.call(mn)}}}},{key:"getValidValue",value:function(rt){var Zt=rt.target.value,dn=nt(void 0,this.state,this.props),mn=this.state.currentInputValue,qt;return Zt===""?qt=Zt:Number.isNaN(Number(Zt))?qt=mn:Zt>=dn?qt=dn:qt=Number(Zt),qt}},{key:"getShowSizeChanger",value:function(){var rt=this.props,Zt=rt.showSizeChanger,dn=rt.total,mn=rt.totalBoundaryShowSizeChanger;return typeof Zt!="undefined"?Zt:dn>mn}},{key:"render",value:function(){var rt=this.props,Zt=rt.prefixCls,dn=rt.className,mn=rt.style,qt=rt.disabled,Gn=rt.hideOnSinglePage,Kn=rt.total,Nt=rt.locale,sn=rt.showQuickJumper,Fn=rt.showLessItems,hn=rt.showTitle,Mn=rt.showTotal,li=rt.simple,pi=rt.itemRender,mi=rt.showPrevNextJumpers,Li=rt.jumpPrevIcon,Gi=rt.jumpNextIcon,ar=rt.selectComponentClass,Xi=rt.selectPrefixCls,wr=rt.pageSizeOptions,vr=this.state,ji=vr.current,Lr=vr.pageSize,jn=vr.currentInputValue;if(Gn===!0&&Kn<=Lr)return null;var Ne=nt(void 0,this.state,this.props),Ei=[],Oi=null,on=null,ui=null,vi=null,bi=null,In=sn&&sn.goButton,Gt=Fn?1:2,Kt=ji-1>0?ji-1:0,jt=ji+1<Ne?ji+1:Ne,ft=(0,ve.Z)(this.props,{aria:!0,data:!0}),an=Mn&&Oe.createElement("li",{className:"".concat(Zt,"-total-text")},Mn(Kn,[Kn===0?0:(ji-1)*Lr+1,ji*Lr>Kn?Kn:ji*Lr]));if(li){In&&(typeof In=="boolean"?bi=Oe.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Nt.jump_to_confirm):bi=Oe.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},In),bi=Oe.createElement("li",{title:hn?"".concat(Nt.jump_to).concat(ji,"/").concat(Ne):null,className:"".concat(Zt,"-simple-pager")},bi));var vn=this.renderPrev(Kt);return Oe.createElement("ul",(0,ge.Z)({className:It()(Zt,"".concat(Zt,"-simple"),(0,Be.Z)({},"".concat(Zt,"-disabled"),qt),dn),style:mn,ref:this.paginationNode},ft),an,vn?Oe.createElement("li",{title:hn?Nt.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:It()("".concat(Zt,"-prev"),(0,Be.Z)({},"".concat(Zt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},vn):null,Oe.createElement("li",{title:hn?"".concat(ji,"/").concat(Ne):null,className:"".concat(Zt,"-simple-pager")},Oe.createElement("input",{type:"text",value:jn,disabled:qt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),Oe.createElement("span",{className:"".concat(Zt,"-slash")},"/"),Ne),Oe.createElement("li",{title:hn?Nt.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:It()("".concat(Zt,"-next"),(0,Be.Z)({},"".concat(Zt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(jt)),bi)}if(Ne<=3+Gt*2){var Bt={locale:Nt,rootPrefixCls:Zt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:hn,itemRender:pi};Ne||Ei.push(Oe.createElement(qe,(0,ge.Z)({},Bt,{key:"noPager",page:1,className:"".concat(Zt,"-item-disabled")})));for(var at=1;at<=Ne;at+=1){var cn=ji===at;Ei.push(Oe.createElement(qe,(0,ge.Z)({},Bt,{key:at,page:at,active:cn})))}}else{var Sn=Fn?Nt.prev_3:Nt.prev_5,Un=Fn?Nt.next_3:Nt.next_5,un=pi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Li,"prev page")),Rt=pi(this.getJumpNextPage(),"jump-next",this.getItemIcon(Gi,"next page"));mi&&(Oi=un?Oe.createElement("li",{title:hn?Sn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:It()("".concat(Zt,"-jump-prev"),(0,Be.Z)({},"".concat(Zt,"-jump-prev-custom-icon"),!!Li))},un):null,on=Rt?Oe.createElement("li",{title:hn?Un:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:It()("".concat(Zt,"-jump-next"),(0,Be.Z)({},"".concat(Zt,"-jump-next-custom-icon"),!!Gi))},Rt):null),vi=Oe.createElement(qe,{locale:Nt,last:!0,rootPrefixCls:Zt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ne,page:Ne,active:!1,showTitle:hn,itemRender:pi}),ui=Oe.createElement(qe,{locale:Nt,rootPrefixCls:Zt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:hn,itemRender:pi});var zn=Math.max(1,ji-Gt),ni=Math.min(ji+Gt,Ne);ji-1<=Gt&&(ni=1+Gt*2),Ne-ji<=Gt&&(zn=Ne-Gt*2);for(var gi=zn;gi<=ni;gi+=1){var tn=ji===gi;Ei.push(Oe.createElement(qe,{locale:Nt,rootPrefixCls:Zt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:gi,page:gi,active:tn,showTitle:hn,itemRender:pi}))}ji-1>=Gt*2&&ji!==3&&(Ei[0]=(0,Oe.cloneElement)(Ei[0],{className:"".concat(Zt,"-item-after-jump-prev")}),Ei.unshift(Oi)),Ne-ji>=Gt*2&&ji!==Ne-2&&(Ei[Ei.length-1]=(0,Oe.cloneElement)(Ei[Ei.length-1],{className:"".concat(Zt,"-item-before-jump-next")}),Ei.push(on)),zn!==1&&Ei.unshift(ui),ni!==Ne&&Ei.push(vi)}var Bn=!this.hasPrev()||!Ne,Ft=!this.hasNext()||!Ne,wn=this.renderPrev(Kt),gn=this.renderNext(jt);return Oe.createElement("ul",(0,ge.Z)({className:It()(Zt,dn,(0,Be.Z)({},"".concat(Zt,"-disabled"),qt)),style:mn,ref:this.paginationNode},ft),an,wn?Oe.createElement("li",{title:hn?Nt.prev_page:null,onClick:this.prev,tabIndex:Bn?null:0,onKeyPress:this.runIfEnterPrev,className:It()("".concat(Zt,"-prev"),(0,Be.Z)({},"".concat(Zt,"-disabled"),Bn)),"aria-disabled":Bn},wn):null,Ei,gn?Oe.createElement("li",{title:hn?Nt.next_page:null,onClick:this.next,tabIndex:Ft?null:0,onKeyPress:this.runIfEnterNext,className:It()("".concat(Zt,"-next"),(0,Be.Z)({},"".concat(Zt,"-disabled"),Ft)),"aria-disabled":Ft},gn):null,Oe.createElement(Ze,{disabled:qt,locale:Nt,rootPrefixCls:Zt,selectComponentClass:ar,selectPrefixCls:Xi,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ji,pageSize:Lr,pageSizeOptions:wr,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:In}))}}],[{key:"getDerivedStateFromProps",value:function(rt,Zt){var dn={};if("current"in rt&&(dn.current=rt.current,rt.current!==Zt.current&&(dn.currentInputValue=dn.current)),"pageSize"in rt&&rt.pageSize!==Zt.pageSize){var mn=Zt.current,qt=nt(rt.pageSize,Zt,rt);mn=mn>qt?qt:mn,"current"in rt||(dn.current=mn,dn.currentInputValue=mn),dn.pageSize=rt.pageSize}return dn}}]),yt}(Oe.Component);Dt.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:bt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:bt,locale:Ae.Z,style:{},itemRender:wt,totalBoundaryShowSizeChanger:50};var ht=Dt,zt=pe(22075),Yt=pe(36355),Ut=pe(19716),it=pe(8628),Ve=pe(9763),Wt=pe(57809);const Ln=Ye=>Oe.createElement(Wt.default,Object.assign({},Ye,{showSearch:!0,size:"small"})),Nn=Ye=>Oe.createElement(Wt.default,Object.assign({},Ye,{showSearch:!0,size:"middle"}));Ln.Option=Wt.default.Option,Nn.Option=Wt.default.Option;var $t=pe(9937),rn=pe(17313),An=pe(83116),ti=pe(37613);const xn=Ye=>{const{componentCls:Je}=Ye;return{[`${Je}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Je}-item-link`]:{color:Ye.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Je}-item-link`]:{color:Ye.colorTextDisabled,cursor:"not-allowed"}}},[`&${Je}-disabled`]:{cursor:"not-allowed",[`${Je}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:Ye.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:Ye.colorBorder,backgroundColor:Ye.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:Ye.itemActiveBgDisabled},a:{color:Ye.itemActiveColorDisabled}}},[`${Je}-item-link`]:{color:Ye.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Je}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Je}-simple-pager`]:{color:Ye.colorTextDisabled},[`${Je}-jump-prev, ${Je}-jump-next`]:{[`${Je}-item-link-icon`]:{opacity:0},[`${Je}-item-ellipsis`]:{opacity:1}}},[`&${Je}-simple`]:{[`${Je}-prev, ${Je}-next`]:{[`&${Je}-disabled ${Je}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Qn=Ye=>{const{componentCls:Je}=Ye;return{[`&${Je}-mini ${Je}-total-text, &${Je}-mini ${Je}-simple-pager`]:{height:Ye.itemSizeSM,lineHeight:`${Ye.itemSizeSM}px`},[`&${Je}-mini ${Je}-item`]:{minWidth:Ye.itemSizeSM,height:Ye.itemSizeSM,margin:0,lineHeight:`${Ye.itemSizeSM-2}px`},[`&${Je}-mini:not(${Je}-disabled) ${Je}-item:not(${Je}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Ye.colorBgTextHover},"&:active":{backgroundColor:Ye.colorBgTextActive}},[`&${Je}-mini ${Je}-prev, &${Je}-mini ${Je}-next`]:{minWidth:Ye.itemSizeSM,height:Ye.itemSizeSM,margin:0,lineHeight:`${Ye.itemSizeSM}px`},[`&${Je}-mini:not(${Je}-disabled)`]:{[`${Je}-prev, ${Je}-next`]:{[`&:hover ${Je}-item-link`]:{backgroundColor:Ye.colorBgTextHover},[`&:active ${Je}-item-link`]:{backgroundColor:Ye.colorBgTextActive},[`&${Je}-disabled:hover ${Je}-item-link`]:{backgroundColor:"transparent"}}},[`
&${Je}-mini ${Je}-prev ${Je}-item-link,
&${Je}-mini ${Je}-next ${Je}-item-link
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Ye.itemSizeSM,lineHeight:`${Ye.itemSizeSM}px`}},[`&${Je}-mini ${Je}-jump-prev, &${Je}-mini ${Je}-jump-next`]:{height:Ye.itemSizeSM,marginInlineEnd:0,lineHeight:`${Ye.itemSizeSM}px`},[`&${Je}-mini ${Je}-options`]:{marginInlineStart:Ye.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Ye.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Ye.itemSizeSM,lineHeight:`${Ye.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,$t.x0)(Ye)),{width:Ye.paginationMiniQuickJumperInputWidth,height:Ye.controlHeightSM})}}}},Ot=Ye=>{const{componentCls:Je}=Ye;return{[`
&${Je}-simple ${Je}-prev,
&${Je}-simple ${Je}-next
`]:{height:Ye.itemSizeSM,lineHeight:`${Ye.itemSizeSM}px`,verticalAlign:"top",[`${Je}-item-link`]:{height:Ye.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:Ye.colorBgTextHover},"&:active":{backgroundColor:Ye.colorBgTextActive},"&::after":{height:Ye.itemSizeSM,lineHeight:`${Ye.itemSizeSM}px`}}},[`&${Je}-simple ${Je}-simple-pager`]:{display:"inline-block",height:Ye.itemSizeSM,marginInlineEnd:Ye.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:Ye.marginXS,padding:`0 ${Ye.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:Ye.itemInputBg,border:`${Ye.lineWidth}px ${Ye.lineType} ${Ye.colorBorder}`,borderRadius:Ye.borderRadius,outline:"none",transition:`border-color ${Ye.motionDurationMid}`,color:"inherit","&:hover":{borderColor:Ye.colorPrimary},"&:focus":{borderColor:Ye.colorPrimaryHover,boxShadow:`${Ye.inputOutlineOffset}px 0 ${Ye.controlOutlineWidth}px ${Ye.controlOutline}`},"&[disabled]":{color:Ye.colorTextDisabled,backgroundColor:Ye.colorBgContainerDisabled,borderColor:Ye.colorBorder,cursor:"not-allowed"}}}}},Cn=Ye=>{const{componentCls:Je}=Ye;return{[`${Je}-jump-prev, ${Je}-jump-next`]:{outline:0,[`${Je}-item-container`]:{position:"relative",[`${Je}-item-link-icon`]:{color:Ye.colorPrimary,fontSize:Ye.fontSizeSM,opacity:0,transition:`all ${Ye.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Je}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:Ye.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:Ye.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:Ye.paginationEllipsisTextIndent,opacity:1,transition:`all ${Ye.motionDurationMid}`}},"&:hover":{[`${Je}-item-link-icon`]:{opacity:1},[`${Je}-item-ellipsis`]:{opacity:0}}},[`
${Je}-prev,
${Je}-jump-prev,
${Je}-jump-next
`]:{marginInlineEnd:Ye.marginXS},[`
${Je}-prev,
${Je}-next,
${Je}-jump-prev,
${Je}-jump-next
`]:{display:"inline-block",minWidth:Ye.itemSize,height:Ye.itemSize,color:Ye.colorText,fontFamily:Ye.fontFamily,lineHeight:`${Ye.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:Ye.borderRadius,cursor:"pointer",transition:`all ${Ye.motionDurationMid}`},[`${Je}-prev, ${Je}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Ye.colorText,cursor:"pointer",userSelect:"none"},[`${Je}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:Ye.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${Ye.lineWidth}px ${Ye.lineType} transparent`,borderRadius:Ye.borderRadius,outline:"none",transition:`all ${Ye.motionDurationMid}`},[`&:hover ${Je}-item-link`]:{backgroundColor:Ye.colorBgTextHover},[`&:active ${Je}-item-link`]:{backgroundColor:Ye.colorBgTextActive},[`&${Je}-disabled:hover`]:{[`${Je}-item-link`]:{backgroundColor:"transparent"}}},[`${Je}-slash`]:{marginInlineEnd:Ye.paginationSlashMarginInlineEnd,marginInlineStart:Ye.paginationSlashMarginInlineStart},[`${Je}-options`]:{display:"inline-block",marginInlineStart:Ye.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:Ye.controlHeight,marginInlineStart:Ye.marginXS,lineHeight:`${Ye.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,$t.ik)(Ye)),{width:Ye.controlHeightLG*1.25,height:Ye.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Ye.marginXS,marginInlineEnd:Ye.marginXS})}}}},Wn=Ye=>{const{componentCls:Je}=Ye;return{[`${Je}-item`]:{display:"inline-block",minWidth:Ye.itemSize,height:Ye.itemSize,marginInlineEnd:Ye.marginXS,fontFamily:Ye.fontFamily,lineHeight:`${Ye.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${Ye.lineWidth}px ${Ye.lineType} transparent`,borderRadius:Ye.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${Ye.paginationItemPaddingInline}px`,color:Ye.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Je}-item-active)`]:{"&:hover":{transition:`all ${Ye.motionDurationMid}`,backgroundColor:Ye.colorBgTextHover},"&:active":{backgroundColor:Ye.colorBgTextActive}},"&-active":{fontWeight:Ye.fontWeightStrong,backgroundColor:Ye.itemActiveBg,borderColor:Ye.colorPrimary,a:{color:Ye.colorPrimary},"&:hover":{borderColor:Ye.colorPrimaryHover},"&:hover a":{color:Ye.colorPrimaryHover}}}}},We=Ye=>{const{componentCls:Je}=Ye;return{[Je]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,rn.Wf)(Ye)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Je}-total-text`]:{display:"inline-block",height:Ye.itemSize,marginInlineEnd:Ye.marginXS,lineHeight:`${Ye.itemSize-2}px`,verticalAlign:"middle"}}),Wn(Ye)),Cn(Ye)),Ot(Ye)),Qn(Ye)),xn(Ye)),{[`@media only screen and (max-width: ${Ye.screenLG}px)`]:{[`${Je}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Ye.screenSM}px)`]:{[`${Je}-options`]:{display:"none"}}}),[`&${Ye.componentCls}-rtl`]:{direction:"rtl"}}},Ee=Ye=>{const{componentCls:Je}=Ye;return{[`${Je}${Je}-disabled:not(${Je}-mini)`]:{"&, &:hover":{[`${Je}-item-link`]:{borderColor:Ye.colorBorder}},"&:focus-visible":{[`${Je}-item-link`]:{borderColor:Ye.colorBorder}},[`${Je}-item, ${Je}-item-link`]:{backgroundColor:Ye.colorBgContainerDisabled,borderColor:Ye.colorBorder,[`&:hover:not(${Je}-item-active)`]:{backgroundColor:Ye.colorBgContainerDisabled,borderColor:Ye.colorBorder,a:{color:Ye.colorTextDisabled}},[`&${Je}-item-active`]:{backgroundColor:Ye.itemActiveBgDisabled}},[`${Je}-prev, ${Je}-next`]:{"&:hover button":{backgroundColor:Ye.colorBgContainerDisabled,borderColor:Ye.colorBorder,color:Ye.colorTextDisabled},[`${Je}-item-link`]:{backgroundColor:Ye.colorBgContainerDisabled,borderColor:Ye.colorBorder}}},[`${Je}:not(${Je}-mini)`]:{[`${Je}-prev, ${Je}-next`]:{"&:hover button":{borderColor:Ye.colorPrimaryHover,backgroundColor:Ye.itemBg},[`${Je}-item-link`]:{backgroundColor:Ye.itemLinkBg,borderColor:Ye.colorBorder},[`&:hover ${Je}-item-link`]:{borderColor:Ye.colorPrimary,backgroundColor:Ye.itemBg,color:Ye.colorPrimary},[`&${Je}-disabled`]:{[`${Je}-item-link`]:{borderColor:Ye.colorBorder,color:Ye.colorTextDisabled}}},[`${Je}-item`]:{backgroundColor:Ye.itemBg,border:`${Ye.lineWidth}px ${Ye.lineType} ${Ye.colorBorder}`,[`&:hover:not(${Je}-item-active)`]:{borderColor:Ye.colorPrimary,backgroundColor:Ye.itemBg,a:{color:Ye.colorPrimary}},"&-active":{borderColor:Ye.colorPrimary}}}}},Pe=Ye=>{const{componentCls:Je}=Ye;return{[`${Je}:not(${Je}-disabled)`]:{[`${Je}-item`]:Object.assign({},(0,rn.Qy)(Ye)),[`${Je}-jump-prev, ${Je}-jump-next`]:{"&:focus-visible":Object.assign({[`${Je}-item-link-icon`]:{opacity:1},[`${Je}-item-ellipsis`]:{opacity:0}},(0,rn.oN)(Ye))},[`${Je}-prev, ${Je}-next`]:{[`&:focus-visible ${Je}-item-link`]:Object.assign({},(0,rn.oN)(Ye))}}}};var De=(0,An.Z)("Pagination",Ye=>{const Je=(0,ti.TS)(Ye,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:Ye.marginXXS/2,paginationMiniQuickJumperInputWidth:Ye.controlHeightLG*1.1,paginationItemPaddingInline:Ye.marginXXS*1.5,paginationEllipsisLetterSpacing:Ye.marginXXS/2,paginationSlashMarginInlineStart:Ye.marginXXS,paginationSlashMarginInlineEnd:Ye.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,$t.e5)(Ye),(0,$t.TM)(Ye));return[We(Je),Pe(Je),Ye.wireframe&&Ee(Je)]},Ye=>({itemBg:Ye.colorBgContainer,itemSize:Ye.controlHeight,itemSizeSM:Ye.controlHeightSM,itemActiveBg:Ye.colorBgContainer,itemLinkBg:Ye.colorBgContainer,itemActiveColorDisabled:Ye.colorTextDisabled,itemActiveBgDisabled:Ye.controlItemBgActiveDisabled,itemInputBg:Ye.colorBgContainer,miniOptionsSizeChangerTop:0})),Fe=function(Ye,Je){var yt={};for(var St in Ye)Object.prototype.hasOwnProperty.call(Ye,St)&&Je.indexOf(St)<0&&(yt[St]=Ye[St]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,St=Object.getOwnPropertySymbols(Ye);rt<St.length;rt++)Je.indexOf(St[rt])<0&&Object.prototype.propertyIsEnumerable.call(Ye,St[rt])&&(yt[St[rt]]=Ye[St[rt]]);return yt},Qe=Ye=>{const{prefixCls:Je,selectPrefixCls:yt,className:St,rootClassName:rt,style:Zt,size:dn,locale:mn,selectComponentClass:qt,responsive:Gn,showSizeChanger:Kn}=Ye,Nt=Fe(Ye,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:sn}=(0,it.Z)(Gn),{getPrefixCls:Fn,direction:hn,pagination:Mn={}}=Oe.useContext(Yt.E_),li=Fn("pagination",Je),[pi,mi]=De(li),Li=Kn!=null?Kn:Mn.showSizeChanger,Gi=Oe.useMemo(()=>{const Ne=Oe.createElement("span",{className:`${li}-item-ellipsis`},"\u2022\u2022\u2022"),Ei=Oe.createElement("button",{className:`${li}-item-link`,type:"button",tabIndex:-1},hn==="rtl"?Oe.createElement(Et.Z,null):Oe.createElement(Xe.Z,null)),Oi=Oe.createElement("button",{className:`${li}-item-link`,type:"button",tabIndex:-1},hn==="rtl"?Oe.createElement(Xe.Z,null):Oe.createElement(Et.Z,null)),on=Oe.createElement("a",{className:`${li}-item-link`},Oe.createElement("div",{className:`${li}-item-container`},hn==="rtl"?Oe.createElement(Pt.Z,{className:`${li}-item-link-icon`}):Oe.createElement(Tt,{className:`${li}-item-link-icon`}),Ne)),ui=Oe.createElement("a",{className:`${li}-item-link`},Oe.createElement("div",{className:`${li}-item-container`},hn==="rtl"?Oe.createElement(Tt,{className:`${li}-item-link-icon`}):Oe.createElement(Pt.Z,{className:`${li}-item-link-icon`}),Ne));return{prevIcon:Ei,nextIcon:Oi,jumpPrevIcon:on,jumpNextIcon:ui}},[hn,li]),[ar]=(0,Ve.Z)("Pagination",zt.Z),Xi=Object.assign(Object.assign({},ar),mn),wr=(0,Ut.Z)(dn),vr=wr==="small"||!!(sn&&!wr&&Gn),ji=Fn("select",yt),Lr=It()({[`${li}-mini`]:vr,[`${li}-rtl`]:hn==="rtl"},Mn==null?void 0:Mn.className,St,rt,mi),jn=Object.assign(Object.assign({},Mn==null?void 0:Mn.style),Zt);return pi(Oe.createElement(ht,Object.assign({},Gi,Nt,{style:jn,prefixCls:li,selectPrefixCls:ji,className:Lr,selectComponentClass:qt||(vr?Ln:Nn),locale:Xi,showSizeChanger:Li})))},vt=Qe},39722:function(Vn,Pn,pe){"use strict";pe.d(Pn,{t5:function(){return Xe}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(55477),st=pe(59301),Ge=pe(36355),_e=pe(77578),Le=pe(17356),Tt=function(ct,It){var Be={};for(var ne in ct)Object.prototype.hasOwnProperty.call(ct,ne)&&It.indexOf(ne)<0&&(Be[ne]=ct[ne]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,ne=Object.getOwnPropertySymbols(ct);ee<ne.length;ee++)It.indexOf(ne[ee])<0&&Object.prototype.propertyIsEnumerable.call(ct,ne[ee])&&(Be[ne[ee]]=ct[ne[ee]]);return Be};const Pt=(ct,It,Be)=>{if(!(!It&&!Be))return st.createElement(st.Fragment,null,It&&st.createElement("div",{className:`${ct}-title`},(0,_e.Z)(It)),st.createElement("div",{className:`${ct}-inner-content`},(0,_e.Z)(Be)))},Xe=ct=>{const{hashId:It,prefixCls:Be,className:ne,style:ee,placement:ce="top",title:se,content:he,children:ve}=ct;return st.createElement("div",{className:Oe()(It,Be,`${Be}-pure`,`${Be}-placement-${ce}`,ne),style:ee},st.createElement("div",{className:`${Be}-arrow`}),st.createElement(Ke.G,Object.assign({},ct,{className:It,prefixCls:Be}),ve||Pt(Be,se,he)))},Et=ct=>{const{prefixCls:It}=ct,Be=Tt(ct,["prefixCls"]),{getPrefixCls:ne}=st.useContext(Ge.E_),ee=ne("popover",It),[ce,se]=(0,Le.Z)(ee);return ce(st.createElement(Xe,Object.assign({},Be,{prefixCls:ee,hashId:se})))};Pn.ZP=Et},60324:function(Vn,Pn,pe){"use strict";var ge=pe(92310),Oe=pe.n(ge),Ke=pe(59301),st=pe(77578),Ge=pe(62892),_e=pe(36355),Le=pe(6848),Tt=pe(39722),Pt=pe(17356),Xe=function(It,Be){var ne={};for(var ee in It)Object.prototype.hasOwnProperty.call(It,ee)&&Be.indexOf(ee)<0&&(ne[ee]=It[ee]);if(It!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,ee=Object.getOwnPropertySymbols(It);ce<ee.length;ce++)Be.indexOf(ee[ce])<0&&Object.prototype.propertyIsEnumerable.call(It,ee[ce])&&(ne[ee[ce]]=It[ee[ce]]);return ne};const Et=It=>{let{title:Be,content:ne,prefixCls:ee}=It;return Ke.createElement(Ke.Fragment,null,Be&&Ke.createElement("div",{className:`${ee}-title`},(0,st.Z)(Be)),Ke.createElement("div",{className:`${ee}-inner-content`},(0,st.Z)(ne)))},ct=Ke.forwardRef((It,Be)=>{const{prefixCls:ne,title:ee,content:ce,overlayClassName:se,placement:he="top",trigger:ve="hover",mouseEnterDelay:be=.1,mouseLeaveDelay:ke=.1,overlayStyle:Ae={}}=It,ze=Xe(It,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:Ze}=Ke.useContext(_e.E_),ot=Ze("popover",ne),[qe,bt]=(0,Pt.Z)(ot),He=Ze(),wt=Oe()(se,bt);return qe(Ke.createElement(Le.Z,Object.assign({placement:he,trigger:ve,mouseEnterDelay:be,mouseLeaveDelay:ke,overlayStyle:Ae},ze,{prefixCls:ot,overlayClassName:wt,ref:Be,overlay:ee||ce?Ke.createElement(Et,{prefixCls:ot,title:ee,content:ce}):null,transitionName:(0,Ge.m)(He,"zoom-big",ze.transitionName),"data-popover-inject":!0})))});ct._InternalPanelDoNotUseOrYouWillBeFired=Tt.ZP,Pn.Z=ct},17356:function(Vn,Pn,pe){"use strict";var ge=pe(17313),Oe=pe(29878),Ke=pe(19447),st=pe(33166),Ge=pe(83116),_e=pe(37613);const Le=Xe=>{const{componentCls:Et,popoverColor:ct,minWidth:It,fontWeightStrong:Be,popoverPadding:ne,boxShadowSecondary:ee,colorTextHeading:ce,borderRadiusLG:se,zIndexPopup:he,marginXS:ve,colorBgElevated:be,popoverBg:ke}=Xe;return[{[Et]:Object.assign(Object.assign({},(0,ge.Wf)(Xe)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:he,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"},[`${Et}-content`]:{position:"relative"},[`${Et}-inner`]:{backgroundColor:ke,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:ne},[`${Et}-title`]:{minWidth:It,marginBottom:ve,color:ce,fontWeight:Be},[`${Et}-inner-content`]:{color:ct}})},(0,Ke.ZP)(Xe,{colorBg:"var(--antd-arrow-background-color)"}),{[`${Et}-pure`]:{position:"relative",maxWidth:"none",margin:Xe.sizePopupArrow,display:"inline-block",[`${Et}-content`]:{display:"inline-block"}}}]},Tt=Xe=>{const{componentCls:Et}=Xe;return{[Et]:st.i.map(ct=>{const It=Xe[`${ct}6`];return{[`&${Et}-${ct}`]:{"--antd-arrow-background-color":It,[`${Et}-inner`]:{backgroundColor:It},[`${Et}-arrow`]:{background:"transparent"}}}})}},Pt=Xe=>{const{componentCls:Et,lineWidth:ct,lineType:It,colorSplit:Be,paddingSM:ne,controlHeight:ee,fontSize:ce,lineHeight:se,padding:he}=Xe,ve=ee-Math.round(ce*se),be=ve/2,ke=ve/2-ct,Ae=he;return{[Et]:{[`${Et}-inner`]:{padding:0},[`${Et}-title`]:{margin:0,padding:`${be}px ${Ae}px ${ke}px`,borderBottom:`${ct}px ${It} ${Be}`},[`${Et}-inner-content`]:{padding:`${ne}px ${Ae}px`}}}};Pn.Z=(0,Ge.Z)("Popover",Xe=>{const{colorBgElevated:Et,colorText:ct,wireframe:It}=Xe,Be=(0,_e.TS)(Xe,{popoverPadding:12,popoverBg:Et,popoverColor:ct});return[Le(Be),Tt(Be),It&&Pt(Be),(0,Oe._y)(Be,"zoom-big")]},Xe=>({width:177,minWidth:177,zIndexPopup:Xe.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},93948:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Kn}});var ge=pe(59301),Oe=pe(29679),Ke=pe(40001),st=pe(19248),Ge=pe(99267),_e=pe(92310),Le=pe.n(_e),Tt=pe(2738),Pt=pe(36355),Xe=pe(92413),Et=pe(33708),ct=pe(37061),It={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Be=function(){var sn=(0,ge.useRef)([]),Fn=(0,ge.useRef)(null);return(0,ge.useEffect)(function(){var hn=Date.now(),Mn=!1;sn.current.forEach(function(li){if(li){Mn=!0;var pi=li.style;pi.transitionDuration=".3s, .3s, .3s, .06s",Fn.current&&hn-Fn.current<100&&(pi.transitionDuration="0s, 0s")}}),Mn&&(Fn.current=Date.now())}),sn.current},ne=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],ee=function(sn){var Fn=(0,Et.Z)((0,Et.Z)({},It),sn),hn=Fn.className,Mn=Fn.percent,li=Fn.prefixCls,pi=Fn.strokeColor,mi=Fn.strokeLinecap,Li=Fn.strokeWidth,Gi=Fn.style,ar=Fn.trailColor,Xi=Fn.trailWidth,wr=Fn.transition,vr=(0,ct.Z)(Fn,ne);delete vr.gapPosition;var ji=Array.isArray(Mn)?Mn:[Mn],Lr=Array.isArray(pi)?pi:[pi],jn=Be(),Ne=Li/2,Ei=100-Li/2,Oi="M ".concat(mi==="round"?Ne:0,",").concat(Ne,`
L `).concat(mi==="round"?Ei:100,",").concat(Ne),on="0 0 100 ".concat(Li),ui=0;return ge.createElement("svg",(0,Xe.Z)({className:Le()("".concat(li,"-line"),hn),viewBox:on,preserveAspectRatio:"none",style:Gi},vr),ge.createElement("path",{className:"".concat(li,"-line-trail"),d:Oi,strokeLinecap:mi,stroke:ar,strokeWidth:Xi||Li,fillOpacity:"0"}),ji.map(function(vi,bi){var In=1;switch(mi){case"round":In=1-Li/100;break;case"square":In=1-Li/2/100;break;default:In=1;break}var Gt={strokeDasharray:"".concat(vi*In,"px, 100px"),strokeDashoffset:"-".concat(ui,"px"),transition:wr||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Kt=Lr[bi]||Lr[Lr.length-1];return ui+=vi,ge.createElement("path",{key:bi,className:"".concat(li,"-line-path"),d:Oi,strokeLinecap:mi,stroke:Kt,strokeWidth:Li,fillOpacity:"0",ref:function(ft){jn[bi]=ft},style:Gt})}))},ce=ee,se=pe(39559),he=pe(33606),ve=pe(47273),be=0,ke=(0,ve.Z)();function Ae(){var Nt;return ke?(Nt=be,be+=1):Nt="TEST_OR_SSR",Nt}var ze=function(Nt){var sn=ge.useState(),Fn=(0,he.Z)(sn,2),hn=Fn[0],Mn=Fn[1];return ge.useEffect(function(){Mn("rc_progress_".concat(Ae()))},[]),Nt||hn},Ze=function(sn){var Fn=sn.bg,hn=sn.children;return ge.createElement("div",{style:{width:"100%",height:"100%",background:Fn}},hn)};function ot(Nt,sn){return Object.keys(Nt).map(function(Fn){var hn=parseFloat(Fn),Mn="".concat(Math.floor(hn*sn),"%");return"".concat(Nt[Fn]," ").concat(Mn)})}var qe=ge.forwardRef(function(Nt,sn){var Fn=Nt.prefixCls,hn=Nt.color,Mn=Nt.gradientId,li=Nt.radius,pi=Nt.style,mi=Nt.ptg,Li=Nt.strokeLinecap,Gi=Nt.strokeWidth,ar=Nt.size,Xi=Nt.gapDegree,wr=hn&&(0,se.Z)(hn)==="object",vr=wr?"#FFF":void 0,ji=ar/2,Lr=ge.createElement("circle",{className:"".concat(Fn,"-circle-path"),r:li,cx:ji,cy:ji,stroke:vr,strokeLinecap:Li,strokeWidth:Gi,opacity:mi===0?0:1,style:pi,ref:sn});if(!wr)return Lr;var jn="".concat(Mn,"-conic"),Ne=Xi?"".concat(180+Xi/2,"deg"):"0deg",Ei=ot(hn,(360-Xi)/360),Oi=ot(hn,1),on="conic-gradient(from ".concat(Ne,", ").concat(Ei.join(", "),")"),ui="linear-gradient(to ".concat(Xi?"bottom":"top",", ").concat(Oi.join(", "),")");return ge.createElement(ge.Fragment,null,ge.createElement("mask",{id:jn},Lr),ge.createElement("foreignObject",{x:0,y:0,width:ar,height:ar,mask:"url(#".concat(jn,")")},ge.createElement(Ze,{bg:ui},ge.createElement(Ze,{bg:on}))))}),bt=qe,He=100,wt=function(sn,Fn,hn,Mn,li,pi,mi,Li,Gi,ar){var Xi=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,wr=hn/100*360*((360-pi)/360),vr=pi===0?0:{bottom:0,top:180,left:90,right:-90}[mi],ji=(100-Mn)/100*Fn;Gi==="round"&&Mn!==100&&(ji+=ar/2,ji>=Fn&&(ji=Fn-.01));var Lr=He/2;return{stroke:typeof Li=="string"?Li:void 0,strokeDasharray:"".concat(Fn,"px ").concat(sn),strokeDashoffset:ji+Xi,transform:"rotate(".concat(li+wr+vr,"deg)"),transformOrigin:"".concat(Lr,"px ").concat(Lr,"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}},nt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Dt(Nt){var sn=Nt!=null?Nt:[];return Array.isArray(sn)?sn:[sn]}var ht=function(sn){var Fn=(0,Et.Z)((0,Et.Z)({},It),sn),hn=Fn.id,Mn=Fn.prefixCls,li=Fn.steps,pi=Fn.strokeWidth,mi=Fn.trailWidth,Li=Fn.gapDegree,Gi=Li===void 0?0:Li,ar=Fn.gapPosition,Xi=Fn.trailColor,wr=Fn.strokeLinecap,vr=Fn.style,ji=Fn.className,Lr=Fn.strokeColor,jn=Fn.percent,Ne=(0,ct.Z)(Fn,nt),Ei=He/2,Oi=ze(hn),on="".concat(Oi,"-gradient"),ui=Ei-pi/2,vi=Math.PI*2*ui,bi=Gi>0?90+Gi/2:-90,In=vi*((360-Gi)/360),Gt=(0,se.Z)(li)==="object"?li:{count:li,space:2},Kt=Gt.count,jt=Gt.space,ft=Dt(jn),an=Dt(Lr),vn=an.find(function(Rt){return Rt&&(0,se.Z)(Rt)==="object"}),Bt=vn&&(0,se.Z)(vn)==="object",at=Bt?"butt":wr,cn=wt(vi,In,0,100,bi,Gi,ar,Xi,at,pi),Sn=Be(),Un=function(){var zn=0;return ft.map(function(ni,gi){var tn=an[gi]||an[an.length-1],Bn=wt(vi,In,zn,ni,bi,Gi,ar,tn,at,pi);return zn+=ni,ge.createElement(bt,{key:gi,color:tn,ptg:ni,radius:ui,prefixCls:Mn,gradientId:on,style:Bn,strokeLinecap:at,strokeWidth:pi,gapDegree:Gi,ref:function(wn){Sn[gi]=wn},size:He})}).reverse()},un=function(){var zn=Math.round(Kt*(ft[0]/100)),ni=100/Kt,gi=0;return new Array(Kt).fill(null).map(function(tn,Bn){var Ft=Bn<=zn-1?an[0]:Xi,wn=Ft&&(0,se.Z)(Ft)==="object"?"url(#".concat(on,")"):void 0,gn=wt(vi,In,gi,ni,bi,Gi,ar,Ft,"butt",pi,jt);return gi+=(In-gn.strokeDashoffset+jt)*100/In,ge.createElement("circle",{key:Bn,className:"".concat(Mn,"-circle-path"),r:ui,cx:Ei,cy:Ei,stroke:wn,strokeWidth:pi,opacity:1,style:gn,ref:function(On){Sn[Bn]=On}})})};return ge.createElement("svg",(0,Xe.Z)({className:Le()("".concat(Mn,"-circle"),ji),viewBox:"0 0 ".concat(He," ").concat(He),style:vr,id:hn,role:"presentation"},Ne),!Kt&&ge.createElement("circle",{className:"".concat(Mn,"-circle-trail"),r:ui,cx:Ei,cy:Ei,stroke:Xi,strokeLinecap:at,strokeWidth:mi||pi,style:cn}),Kt?un():Un())},zt=ht,Yt={Line:ce,Circle:zt},Ut=pe(6848),it=pe(93398);function Ve(Nt){return!Nt||Nt<0?0:Nt>100?100:Nt}function Wt(Nt){let{success:sn,successPercent:Fn}=Nt,hn=Fn;return sn&&"progress"in sn&&(hn=sn.progress),sn&&"percent"in sn&&(hn=sn.percent),hn}const Ln=Nt=>{let{percent:sn,success:Fn,successPercent:hn}=Nt;const Mn=Ve(Wt({success:Fn,successPercent:hn}));return[Mn,Ve(Ve(sn)-Mn)]},Nn=Nt=>{let{success:sn={},strokeColor:Fn}=Nt;const{strokeColor:hn}=sn;return[hn||it.presetPrimaryColors.green,Fn||null]},$t=(Nt,sn,Fn)=>{var hn,Mn,li,pi;let mi=-1,Li=-1;if(sn==="step"){const Gi=Fn.steps,ar=Fn.strokeWidth;typeof Nt=="string"||typeof Nt=="undefined"?(mi=Nt==="small"?2:14,Li=ar!=null?ar:8):typeof Nt=="number"?[mi,Li]=[Nt,Nt]:[mi=14,Li=8]=Nt,mi*=Gi}else if(sn==="line"){const Gi=Fn==null?void 0:Fn.strokeWidth;typeof Nt=="string"||typeof Nt=="undefined"?Li=Gi||(Nt==="small"?6:8):typeof Nt=="number"?[mi,Li]=[Nt,Nt]:[mi=-1,Li=8]=Nt}else(sn==="circle"||sn==="dashboard")&&(typeof Nt=="string"||typeof Nt=="undefined"?[mi,Li]=Nt==="small"?[60,60]:[120,120]:typeof Nt=="number"?[mi,Li]=[Nt,Nt]:(mi=(Mn=(hn=Nt[0])!==null&&hn!==void 0?hn:Nt[1])!==null&&Mn!==void 0?Mn:120,Li=(pi=(li=Nt[0])!==null&&li!==void 0?li:Nt[1])!==null&&pi!==void 0?pi:120));return[mi,Li]},rn=3,An=Nt=>rn/Nt*100;var xn=Nt=>{const{prefixCls:sn,trailColor:Fn=null,strokeLinecap:hn="round",gapPosition:Mn,gapDegree:li,width:pi=120,type:mi,children:Li,success:Gi,size:ar=pi}=Nt,[Xi,wr]=$t(ar,"circle");let{strokeWidth:vr}=Nt;vr===void 0&&(vr=Math.max(An(Xi),6));const ji={width:Xi,height:wr,fontSize:Xi*.15+6},Lr=ge.useMemo(()=>{if(li||li===0)return li;if(mi==="dashboard")return 75},[li,mi]),jn=Mn||mi==="dashboard"&&"bottom"||void 0,Ne=Object.prototype.toString.call(Nt.strokeColor)==="[object Object]",Ei=Nn({success:Gi,strokeColor:Nt.strokeColor}),Oi=Le()(`${sn}-inner`,{[`${sn}-circle-gradient`]:Ne}),on=ge.createElement(zt,{percent:Ln(Nt),strokeWidth:vr,trailWidth:vr,strokeColor:Ei,strokeLinecap:hn,trailColor:Fn,prefixCls:sn,gapDegree:Lr,gapPosition:jn});return ge.createElement("div",{className:Oi,style:ji},Xi<=20?ge.createElement(Ut.Z,{title:Li},ge.createElement("span",null,on)):ge.createElement(ge.Fragment,null,on,Li))},Qn=function(Nt,sn){var Fn={};for(var hn in Nt)Object.prototype.hasOwnProperty.call(Nt,hn)&&sn.indexOf(hn)<0&&(Fn[hn]=Nt[hn]);if(Nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mn=0,hn=Object.getOwnPropertySymbols(Nt);Mn<hn.length;Mn++)sn.indexOf(hn[Mn])<0&&Object.prototype.propertyIsEnumerable.call(Nt,hn[Mn])&&(Fn[hn[Mn]]=Nt[hn[Mn]]);return Fn};const Ot=Nt=>{let sn=[];return Object.keys(Nt).forEach(Fn=>{const hn=parseFloat(Fn.replace(/%/g,""));isNaN(hn)||sn.push({key:hn,value:Nt[Fn]})}),sn=sn.sort((Fn,hn)=>Fn.key-hn.key),sn.map(Fn=>{let{key:hn,value:Mn}=Fn;return`${Mn} ${hn}%`}).join(", ")},Cn=(Nt,sn)=>{const{from:Fn=it.presetPrimaryColors.blue,to:hn=it.presetPrimaryColors.blue,direction:Mn=sn==="rtl"?"to left":"to right"}=Nt,li=Qn(Nt,["from","to","direction"]);if(Object.keys(li).length!==0){const pi=Ot(li);return{backgroundImage:`linear-gradient(${Mn}, ${pi})`}}return{backgroundImage:`linear-gradient(${Mn}, ${Fn}, ${hn})`}};var We=Nt=>{const{prefixCls:sn,direction:Fn,percent:hn,size:Mn,strokeWidth:li,strokeColor:pi,strokeLinecap:mi="round",children:Li,trailColor:Gi=null,success:ar}=Nt,Xi=pi&&typeof pi!="string"?Cn(pi,Fn):{backgroundColor:pi},wr=mi==="square"||mi==="butt"?0:void 0,vr={backgroundColor:Gi||void 0,borderRadius:wr},ji=Mn!=null?Mn:[-1,li||(Mn==="small"?6:8)],[Lr,jn]=$t(ji,"line",{strokeWidth:li}),Ne=Object.assign({width:`${Ve(hn)}%`,height:jn,borderRadius:wr},Xi),Ei=Wt(Nt),Oi={width:`${Ve(Ei)}%`,height:jn,borderRadius:wr,backgroundColor:ar==null?void 0:ar.strokeColor},on={width:Lr<0?"100%":Lr,height:jn};return ge.createElement(ge.Fragment,null,ge.createElement("div",{className:`${sn}-outer`,style:on},ge.createElement("div",{className:`${sn}-inner`,style:vr},ge.createElement("div",{className:`${sn}-bg`,style:Ne}),Ei!==void 0?ge.createElement("div",{className:`${sn}-success-bg`,style:Oi}):null)),Li)},Pe=Nt=>{const{size:sn,steps:Fn,percent:hn=0,strokeWidth:Mn=8,strokeColor:li,trailColor:pi=null,prefixCls:mi,children:Li}=Nt,Gi=Math.round(Fn*(hn/100)),ar=sn==="small"?2:14,Xi=sn!=null?sn:[ar,Mn],[wr,vr]=$t(Xi,"step",{steps:Fn,strokeWidth:Mn}),ji=wr/Fn,Lr=new Array(Fn);for(let jn=0;jn<Fn;jn++){const Ne=Array.isArray(li)?li[jn]:li;Lr[jn]=ge.createElement("div",{key:jn,className:Le()(`${mi}-steps-item`,{[`${mi}-steps-item-active`]:jn<=Gi-1}),style:{backgroundColor:jn<=Gi-1?Ne:pi,width:ji,height:vr}})}return ge.createElement("div",{className:`${mi}-steps-outer`},Lr,Li)},De=pe(93083),Fe=pe(17313),ye=pe(83116),Qe=pe(37613);const vt=Nt=>{const sn=Nt?"100%":"-100%";return new De.Keyframes(`antProgress${Nt?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${sn}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${sn}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Ye=Nt=>{const{componentCls:sn,iconCls:Fn}=Nt;return{[sn]:Object.assign(Object.assign({},(0,Fe.Wf)(Nt)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:Nt.fontSize,marginInlineEnd:Nt.marginXS,marginBottom:Nt.marginXS},[`${sn}-outer`]:{display:"inline-block",width:"100%"},[`&${sn}-show-info`]:{[`${sn}-outer`]:{marginInlineEnd:`calc(-2em - ${Nt.marginXS}px)`,paddingInlineEnd:`calc(2em + ${Nt.paddingXS}px)`}},[`${sn}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:Nt.remainingColor,borderRadius:Nt.lineBorderRadius},[`${sn}-inner:not(${sn}-circle-gradient)`]:{[`${sn}-circle-path`]:{stroke:Nt.defaultColor}},[`${sn}-success-bg, ${sn}-bg`]:{position:"relative",backgroundColor:Nt.defaultColor,borderRadius:Nt.lineBorderRadius,transition:`all ${Nt.motionDurationSlow} ${Nt.motionEaseInOutCirc}`},[`${sn}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:Nt.colorSuccess},[`${sn}-text`]:{display:"inline-block",width:"2em",marginInlineStart:Nt.marginXS,color:Nt.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[Fn]:{fontSize:Nt.fontSize}},[`&${sn}-status-active`]:{[`${sn}-bg::before`]:{position:"absolute",inset:0,backgroundColor:Nt.colorBgContainer,borderRadius:Nt.lineBorderRadius,opacity:0,animationName:vt(),animationDuration:Nt.progressActiveMotionDuration,animationTimingFunction:Nt.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${sn}-rtl${sn}-status-active`]:{[`${sn}-bg::before`]:{animationName:vt(!0)}},[`&${sn}-status-exception`]:{[`${sn}-bg`]:{backgroundColor:Nt.colorError},[`${sn}-text`]:{color:Nt.colorError}},[`&${sn}-status-exception ${sn}-inner:not(${sn}-circle-gradient)`]:{[`${sn}-circle-path`]:{stroke:Nt.colorError}},[`&${sn}-status-success`]:{[`${sn}-bg`]:{backgroundColor:Nt.colorSuccess},[`${sn}-text`]:{color:Nt.colorSuccess}},[`&${sn}-status-success ${sn}-inner:not(${sn}-circle-gradient)`]:{[`${sn}-circle-path`]:{stroke:Nt.colorSuccess}}})}},Je=Nt=>{const{componentCls:sn,iconCls:Fn}=Nt;return{[sn]:{[`${sn}-circle-trail`]:{stroke:Nt.remainingColor},[`&${sn}-circle ${sn}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${sn}-circle ${sn}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:Nt.circleTextColor,fontSize:Nt.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[Fn]:{fontSize:`${Nt.fontSize/Nt.fontSizeSM}em`}},[`${sn}-circle&-status-exception`]:{[`${sn}-text`]:{color:Nt.colorError}},[`${sn}-circle&-status-success`]:{[`${sn}-text`]:{color:Nt.colorSuccess}}},[`${sn}-inline-circle`]:{lineHeight:1,[`${sn}-inner`]:{verticalAlign:"bottom"}}}},yt=Nt=>{const{componentCls:sn}=Nt;return{[sn]:{[`${sn}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:Nt.progressStepMinWidth,marginInlineEnd:Nt.progressStepMarginInlineEnd,backgroundColor:Nt.remainingColor,transition:`all ${Nt.motionDurationSlow}`,"&-active":{backgroundColor:Nt.defaultColor}}}}}},St=Nt=>{const{componentCls:sn,iconCls:Fn}=Nt;return{[sn]:{[`${sn}-small&-line, ${sn}-small&-line ${sn}-text ${Fn}`]:{fontSize:Nt.fontSizeSM}}}};var rt=(0,ye.Z)("Progress",Nt=>{const sn=Nt.marginXXS/2,Fn=(0,Qe.TS)(Nt,{progressStepMarginInlineEnd:sn,progressStepMinWidth:sn,progressActiveMotionDuration:"2.4s"});return[Ye(Fn),Je(Fn),yt(Fn),St(Fn)]},Nt=>({circleTextColor:Nt.colorText,defaultColor:Nt.colorInfo,remainingColor:Nt.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),Zt=function(Nt,sn){var Fn={};for(var hn in Nt)Object.prototype.hasOwnProperty.call(Nt,hn)&&sn.indexOf(hn)<0&&(Fn[hn]=Nt[hn]);if(Nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mn=0,hn=Object.getOwnPropertySymbols(Nt);Mn<hn.length;Mn++)sn.indexOf(hn[Mn])<0&&Object.prototype.propertyIsEnumerable.call(Nt,hn[Mn])&&(Fn[hn[Mn]]=Nt[hn[Mn]]);return Fn};const dn=null,mn=["normal","exception","active","success"];var Gn=ge.forwardRef((Nt,sn)=>{const{prefixCls:Fn,className:hn,rootClassName:Mn,steps:li,strokeColor:pi,percent:mi=0,size:Li="default",showInfo:Gi=!0,type:ar="line",status:Xi,format:wr,style:vr}=Nt,ji=Zt(Nt,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),Lr=ge.useMemo(()=>{var ft,an;const vn=Wt(Nt);return parseInt(vn!==void 0?(ft=vn!=null?vn:0)===null||ft===void 0?void 0:ft.toString():(an=mi!=null?mi:0)===null||an===void 0?void 0:an.toString(),10)},[mi,Nt.success,Nt.successPercent]),jn=ge.useMemo(()=>!mn.includes(Xi)&&Lr>=100?"success":Xi||"normal",[Xi,Lr]),{getPrefixCls:Ne,direction:Ei,progress:Oi}=ge.useContext(Pt.E_),on=Ne("progress",Fn),[ui,vi]=rt(on),bi=ge.useMemo(()=>{if(!Gi)return null;const ft=Wt(Nt);let an;const vn=wr||(at=>`${at}%`),Bt=ar==="line";return wr||jn!=="exception"&&jn!=="success"?an=vn(Ve(mi),Ve(ft)):jn==="exception"?an=Bt?ge.createElement(st.Z,null):ge.createElement(Ge.Z,null):jn==="success"&&(an=Bt?ge.createElement(Oe.Z,null):ge.createElement(Ke.Z,null)),ge.createElement("span",{className:`${on}-text`,title:typeof an=="string"?an:void 0},an)},[Gi,mi,Lr,jn,ar,on,wr]),In=Array.isArray(pi)?pi[0]:pi,Gt=typeof pi=="string"||Array.isArray(pi)?pi:void 0;let Kt;ar==="line"?Kt=li?ge.createElement(Pe,Object.assign({},Nt,{strokeColor:Gt,prefixCls:on,steps:li}),bi):ge.createElement(We,Object.assign({},Nt,{strokeColor:In,prefixCls:on,direction:Ei}),bi):(ar==="circle"||ar==="dashboard")&&(Kt=ge.createElement(xn,Object.assign({},Nt,{strokeColor:In,prefixCls:on,progressStatus:jn}),bi));const jt=Le()(on,`${on}-status-${jn}`,`${on}-${ar==="dashboard"&&"circle"||li&&"steps"||ar}`,{[`${on}-inline-circle`]:ar==="circle"&&$t(Li,"circle")[0]<=20,[`${on}-show-info`]:Gi,[`${on}-${Li}`]:typeof Li=="string",[`${on}-rtl`]:Ei==="rtl"},Oi==null?void 0:Oi.className,hn,Mn,vi);return ui(ge.createElement("div",Object.assign({ref:sn,style:Object.assign(Object.assign({},Oi==null?void 0:Oi.style),vr),className:jt,role:"progressbar","aria-valuenow":Lr},(0,Tt.Z)(ji,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Kt))}),Kn=Gn},13570:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Ve}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(Ln,Nn){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ln,{ref:Nn,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le,Pt=pe(92310),Xe=pe.n(Pt),Et=pe(400),ct=pe(33606),It=pe(37061),Be=pe(18929),ne=pe(10228),ee=pe(26112);function ce(Wt,Ln){var Nn=Wt.disabled,$t=Wt.prefixCls,rn=Wt.character,An=Wt.characterRender,ti=Wt.index,xn=Wt.count,Qn=Wt.value,Ot=Wt.allowHalf,Cn=Wt.focused,Wn=Wt.onHover,We=Wt.onClick,Ee=function(Je){Wn(Je,ti)},Pe=function(Je){We(Je,ti)},De=function(Je){Je.keyCode===ne.Z.ENTER&&We(Je,ti)},Fe=ti+1,ye=new Set([$t]);Qn===0&&ti===0&&Cn?ye.add("".concat($t,"-focused")):Ot&&Qn+.5>=Fe&&Qn<Fe?(ye.add("".concat($t,"-half")),ye.add("".concat($t,"-active")),Cn&&ye.add("".concat($t,"-focused"))):(Fe<=Qn?ye.add("".concat($t,"-full")):ye.add("".concat($t,"-zero")),Fe===Qn&&Cn&&ye.add("".concat($t,"-focused")));var Qe=typeof rn=="function"?rn(Wt):rn,vt=Oe.createElement("li",{className:Xe()(Array.from(ye)),ref:Ln},Oe.createElement("div",{onClick:Nn?null:Pe,onKeyDown:Nn?null:De,onMouseMove:Nn?null:Ee,role:"radio","aria-checked":Qn>ti?"true":"false","aria-posinset":ti+1,"aria-setsize":xn,tabIndex:Nn?-1:0},Oe.createElement("div",{className:"".concat($t,"-first")},Qe),Oe.createElement("div",{className:"".concat($t,"-second")},Qe)));return An&&(vt=An(vt,Wt)),vt}var se=Oe.forwardRef(ce);function he(){var Wt=Oe.useRef({});function Ln($t){return Wt.current[$t]}function Nn($t){return function(rn){Wt.current[$t]=rn}}return[Ln,Nn]}function ve(Wt){var Ln=Wt.pageXOffset,Nn="scrollLeft";if(typeof Ln!="number"){var $t=Wt.document;Ln=$t.documentElement[Nn],typeof Ln!="number"&&(Ln=$t.body[Nn])}return Ln}function be(Wt){var Ln,Nn,$t=Wt.ownerDocument,rn=$t.body,An=$t&&$t.documentElement,ti=Wt.getBoundingClientRect();return Ln=ti.left,Nn=ti.top,Ln-=An.clientLeft||rn.clientLeft||0,Nn-=An.clientTop||rn.clientTop||0,{left:Ln,top:Nn}}function ke(Wt){var Ln=be(Wt),Nn=Wt.ownerDocument,$t=Nn.defaultView||Nn.parentWindow;return Ln.left+=ve($t),Ln.left}var Ae=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function ze(Wt,Ln){var Nn,$t=Wt.prefixCls,rn=$t===void 0?"rc-rate":$t,An=Wt.className,ti=Wt.defaultValue,xn=Wt.value,Qn=Wt.count,Ot=Qn===void 0?5:Qn,Cn=Wt.allowHalf,Wn=Cn===void 0?!1:Cn,We=Wt.allowClear,Ee=We===void 0?!0:We,Pe=Wt.character,De=Pe===void 0?"\u2605":Pe,Fe=Wt.characterRender,ye=Wt.disabled,Qe=Wt.direction,vt=Qe===void 0?"ltr":Qe,Ye=Wt.tabIndex,Je=Ye===void 0?0:Ye,yt=Wt.autoFocus,St=Wt.onHoverChange,rt=Wt.onChange,Zt=Wt.onFocus,dn=Wt.onBlur,mn=Wt.onKeyDown,qt=Wt.onMouseLeave,Gn=(0,It.Z)(Wt,Ae),Kn=he(),Nt=(0,ct.Z)(Kn,2),sn=Nt[0],Fn=Nt[1],hn=Oe.useRef(null),Mn=function(){if(!ye){var at;(at=hn.current)===null||at===void 0||at.focus()}};Oe.useImperativeHandle(Ln,function(){return{focus:Mn,blur:function(){if(!ye){var at;(at=hn.current)===null||at===void 0||at.blur()}}}});var li=(0,Be.Z)(ti||0,{value:xn}),pi=(0,ct.Z)(li,2),mi=pi[0],Li=pi[1],Gi=(0,Be.Z)(null),ar=(0,ct.Z)(Gi,2),Xi=ar[0],wr=ar[1],vr=function(at,cn){var Sn=vt==="rtl",Un=at+1;if(Wn){var un=sn(at),Rt=ke(un),zn=un.clientWidth;(Sn&&cn-Rt>zn/2||!Sn&&cn-Rt<zn/2)&&(Un-=.5)}return Un},ji=function(at){Li(at),rt==null||rt(at)},Lr=Oe.useState(!1),jn=(0,ct.Z)(Lr,2),Ne=jn[0],Ei=jn[1],Oi=function(){Ei(!0),Zt==null||Zt()},on=function(){Ei(!1),dn==null||dn()},ui=Oe.useState(null),vi=(0,ct.Z)(ui,2),bi=vi[0],In=vi[1],Gt=function(at,cn){var Sn=vr(cn,at.pageX);Sn!==Xi&&(In(Sn),wr(null)),St==null||St(Sn)},Kt=function(at){ye||(In(null),wr(null),St==null||St(void 0)),at&&(qt==null||qt(at))},jt=function(at,cn){var Sn=vr(cn,at.pageX),Un=!1;Ee&&(Un=Sn===mi),Kt(),ji(Un?0:Sn),wr(Un?Sn:null)},ft=function(at){var cn=at.keyCode,Sn=vt==="rtl",Un=mi;cn===ne.Z.RIGHT&&Un<Ot&&!Sn?(Wn?Un+=.5:Un+=1,ji(Un),at.preventDefault()):cn===ne.Z.LEFT&&Un>0&&!Sn||cn===ne.Z.RIGHT&&Un>0&&Sn?(Wn?Un-=.5:Un-=1,ji(Un),at.preventDefault()):cn===ne.Z.LEFT&&Un<Ot&&Sn&&(Wn?Un+=.5:Un+=1,ji(Un),at.preventDefault()),mn==null||mn(at)};Oe.useEffect(function(){yt&&!ye&&Mn()},[]);var an=new Array(Ot).fill(0).map(function(Bt,at){return Oe.createElement(se,{ref:Fn(at),index:at,count:Ot,disabled:ye,prefixCls:"".concat(rn,"-star"),allowHalf:Wn,value:bi===null?mi:bi,onClick:jt,onHover:Gt,key:Bt||at,character:De,characterRender:Fe,focused:Ne})}),vn=Xe()(rn,An,(Nn={},(0,Et.Z)(Nn,"".concat(rn,"-disabled"),ye),(0,Et.Z)(Nn,"".concat(rn,"-rtl"),vt==="rtl"),Nn));return Oe.createElement("ul",(0,ge.Z)({className:vn,onMouseLeave:Kt,tabIndex:ye?-1:Je,onFocus:ye?null:Oi,onBlur:ye?null:on,onKeyDown:ye?null:ft,ref:hn,role:"radiogroup"},(0,ee.Z)(Gn,{aria:!0,data:!0,attr:!0})),an)}var Ze=Oe.forwardRef(ze),ot=Ze,qe=pe(36355),bt=pe(6848),He=pe(17313),wt=pe(83116),nt=pe(37613);const Dt=Wt=>{const{componentCls:Ln}=Wt;return{[`${Ln}-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 ${Ln}-star-first, &-half ${Ln}-star-second`]:{opacity:1},[`&-half ${Ln}-star-first, &-full ${Ln}-star-second`]:{color:"inherit"}}}},ht=Wt=>({[`&-rtl${Wt.componentCls}`]:{direction:"rtl"}}),zt=Wt=>{const{componentCls:Ln}=Wt;return{[Ln]: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${Ln} ${Ln}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Dt(Wt)),{[`+ ${Ln}-text`]:{display:"inline-block",marginInlineStart:Wt.marginXS,fontSize:Wt.fontSize}}),ht(Wt))}};var Yt=(0,wt.Z)("Rate",Wt=>{const Ln=(0,nt.TS)(Wt,{});return[zt(Ln)]},Wt=>({starColor:Wt.yellow6,starSize:Wt.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:Wt.colorFillContent})),Ut=function(Wt,Ln){var Nn={};for(var $t in Wt)Object.prototype.hasOwnProperty.call(Wt,$t)&&Ln.indexOf($t)<0&&(Nn[$t]=Wt[$t]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rn=0,$t=Object.getOwnPropertySymbols(Wt);rn<$t.length;rn++)Ln.indexOf($t[rn])<0&&Object.prototype.propertyIsEnumerable.call(Wt,$t[rn])&&(Nn[$t[rn]]=Wt[$t[rn]]);return Nn},Ve=Oe.forwardRef((Wt,Ln)=>{const{prefixCls:Nn,className:$t,rootClassName:rn,style:An,tooltips:ti,character:xn=Oe.createElement(Tt,null)}=Wt,Qn=Ut(Wt,["prefixCls","className","rootClassName","style","tooltips","character"]),Ot=(ye,Qe)=>{let{index:vt}=Qe;return ti?Oe.createElement(bt.Z,{title:ti[vt]},ye):ye},{getPrefixCls:Cn,direction:Wn,rate:We}=Oe.useContext(qe.E_),Ee=Cn("rate",Nn),[Pe,De]=Yt(Ee),Fe=Object.assign(Object.assign({},We==null?void 0:We.style),An);return Pe(Oe.createElement(ot,Object.assign({ref:Ln,character:xn,characterRender:Ot},Qn,{className:Xe()($t,rn,De,We==null?void 0:We.className),style:Fe,prefixCls:Ee,direction:Wn})))})},57809:function(Vn,Pn,pe){"use strict";var ge=pe(92310),Oe=pe.n(ge),Ke=pe(77861),st=pe(2738),Ge=pe(59301),_e=pe(53487),Le=pe(62892),Tt=pe(19080),Pt=pe(36355),Xe=pe(1684),Et=pe(93891),ct=pe(19716),It=pe(32441),Be=pe(33234),ne=pe(14154),ee=pe(58582),ce=pe(84443),se=pe(66339),he=function(ze,Ze){var ot={};for(var qe in ze)Object.prototype.hasOwnProperty.call(ze,qe)&&Ze.indexOf(qe)<0&&(ot[qe]=ze[qe]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,qe=Object.getOwnPropertySymbols(ze);bt<qe.length;bt++)Ze.indexOf(qe[bt])<0&&Object.prototype.propertyIsEnumerable.call(ze,qe[bt])&&(ot[qe[bt]]=ze[qe[bt]]);return ot};const ve="SECRET_COMBOBOX_MODE_DO_NOT_USE",be=(ze,Ze)=>{var ot,{prefixCls:qe,bordered:bt=!0,className:He,rootClassName:wt,getPopupContainer:nt,popupClassName:Dt,dropdownClassName:ht,listHeight:zt=256,placement:Yt,listItemHeight:Ut=24,size:it,disabled:Ve,notFoundContent:Wt,status:Ln,builtinPlacements:Nn,dropdownMatchSelectWidth:$t,popupMatchSelectWidth:rn,direction:An,style:ti,allowClear:xn}=ze,Qn=he(ze,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ot,getPrefixCls:Cn,renderEmpty:Wn,direction:We,virtual:Ee,popupMatchSelectWidth:Pe,popupOverflow:De,select:Fe}=Ge.useContext(Pt.E_),ye=Cn("select",qe),Qe=Cn(),vt=An!=null?An:We,{compactSize:Ye,compactItemClassnames:Je}=(0,Be.ri)(ye,vt),[yt,St]=(0,ne.Z)(ye),rt=Ge.useMemo(()=>{const{mode:jn}=Qn;if(jn!=="combobox")return jn===ve?"combobox":jn},[Qn.mode]),Zt=rt==="multiple"||rt==="tags",dn=(0,ce.Z)(Qn.suffixIcon,Qn.showArrow),mn=(ot=rn!=null?rn:$t)!==null&&ot!==void 0?ot:Pe,{status:qt,hasFeedback:Gn,isFormItemInput:Kn,feedbackIcon:Nt}=Ge.useContext(It.aM),sn=(0,Tt.F)(qt,Ln);let Fn;Wt!==void 0?Fn=Wt:rt==="combobox"?Fn=null:Fn=(Wn==null?void 0:Wn("Select"))||Ge.createElement(Et.Z,{componentName:"Select"});const{suffixIcon:hn,itemIcon:Mn,removeIcon:li,clearIcon:pi}=(0,se.Z)(Object.assign(Object.assign({},Qn),{multiple:Zt,hasFeedback:Gn,feedbackIcon:Nt,showSuffixIcon:dn,prefixCls:ye,showArrow:Qn.showArrow,componentName:"Select"})),mi=xn===!0?{clearIcon:pi}:xn,Li=(0,st.Z)(Qn,["suffixIcon","itemIcon"]),Gi=Oe()(Dt||ht,{[`${ye}-dropdown-${vt}`]:vt==="rtl"},wt,St),ar=(0,ct.Z)(jn=>{var Ne;return(Ne=it!=null?it:Ye)!==null&&Ne!==void 0?Ne:jn}),Xi=Ge.useContext(Xe.Z),wr=Ve!=null?Ve:Xi,vr=Oe()({[`${ye}-lg`]:ar==="large",[`${ye}-sm`]:ar==="small",[`${ye}-rtl`]:vt==="rtl",[`${ye}-borderless`]:!bt,[`${ye}-in-form-item`]:Kn},(0,Tt.Z)(ye,sn,Gn),Je,Fe==null?void 0:Fe.className,He,wt,St),ji=Ge.useMemo(()=>Yt!==void 0?Yt:vt==="rtl"?"bottomRight":"bottomLeft",[Yt,vt]),Lr=(0,ee.Z)(Nn,De);return yt(Ge.createElement(Ke.ZP,Object.assign({ref:Ze,virtual:Ee,showSearch:Fe==null?void 0:Fe.showSearch},Li,{style:Object.assign(Object.assign({},Fe==null?void 0:Fe.style),ti),dropdownMatchSelectWidth:mn,builtinPlacements:Lr,transitionName:(0,Le.m)(Qe,"slide-up",Qn.transitionName),listHeight:zt,listItemHeight:Ut,mode:rt,prefixCls:ye,placement:ji,direction:vt,suffixIcon:hn,menuItemSelectedIcon:Mn,removeIcon:li,allowClear:mi,notFoundContent:Fn,className:vr,getPopupContainer:nt||Ot,dropdownClassName:Gi,disabled:wr})))},ke=Ge.forwardRef(be),Ae=(0,_e.Z)(ke);ke.SECRET_COMBOBOX_MODE_DO_NOT_USE=ve,ke.Option=Ke.Wx,ke.OptGroup=Ke.Xo,ke._InternalPanelDoNotUseOrYouWillBeFired=Ae,Pn.default=ke},14154:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ke}});var ge=pe(17313),Oe=pe(74207),Ke=pe(37613),st=pe(83116),Ge=pe(13826),_e=pe(92899);const Le=Ae=>{const{optionHeight:ze,optionFontSize:Ze,optionLineHeight:ot,optionPadding:qe}=Ae;return{position:"relative",display:"block",minHeight:ze,padding:qe,color:Ae.colorText,fontWeight:"normal",fontSize:Ze,lineHeight:ot,boxSizing:"border-box"}};var Pt=Ae=>{const{antCls:ze,componentCls:Ze}=Ae,ot=`${Ze}-item`,qe=`&${ze}-slide-up-enter${ze}-slide-up-enter-active`,bt=`&${ze}-slide-up-appear${ze}-slide-up-appear-active`,He=`&${ze}-slide-up-leave${ze}-slide-up-leave-active`,wt=`${Ze}-dropdown-placement-`;return[{[`${Ze}-dropdown`]:Object.assign(Object.assign({},(0,ge.Wf)(Ae)),{position:"absolute",top:-9999,zIndex:Ae.zIndexPopup,boxSizing:"border-box",padding:Ae.paddingXXS,overflow:"hidden",fontSize:Ae.fontSize,fontVariant:"initial",backgroundColor:Ae.colorBgElevated,borderRadius:Ae.borderRadiusLG,outline:"none",boxShadow:Ae.boxShadowSecondary,[`
${qe}${wt}bottomLeft,
${bt}${wt}bottomLeft
`]:{animationName:Ge.fJ},[`
${qe}${wt}topLeft,
${bt}${wt}topLeft,
${qe}${wt}topRight,
${bt}${wt}topRight
`]:{animationName:Ge.Qt},[`${He}${wt}bottomLeft`]:{animationName:Ge.Uw},[`
${He}${wt}topLeft,
${He}${wt}topRight
`]:{animationName:Ge.ly},"&-hidden":{display:"none"},[`${ot}`]:Object.assign(Object.assign({},Le(Ae)),{cursor:"pointer",transition:`background ${Ae.motionDurationSlow} ease`,borderRadius:Ae.borderRadiusSM,"&-group":{color:Ae.colorTextDescription,fontSize:Ae.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ge.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${ot}-option-disabled)`]:{backgroundColor:Ae.optionActiveBg},[`&-selected:not(${ot}-option-disabled)`]:{color:Ae.optionSelectedColor,fontWeight:Ae.optionSelectedFontWeight,backgroundColor:Ae.optionSelectedBg,[`${ot}-option-state`]:{color:Ae.colorPrimary}},"&-disabled":{[`&${ot}-option-selected`]:{backgroundColor:Ae.colorBgContainerDisabled},color:Ae.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Ae.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ge.oN)(Ae,"slide-up"),(0,Ge.oN)(Ae,"slide-down"),(0,_e.Fm)(Ae,"move-up"),(0,_e.Fm)(Ae,"move-down")]};const Xe=2,Et=Ae=>{let{controlHeightSM:ze,controlHeight:Ze,lineWidth:ot}=Ae;const qe=(Ze-ze)/2-ot,bt=Math.ceil(qe/2);return[qe,bt]};function ct(Ae,ze){const{componentCls:Ze,iconCls:ot}=Ae,qe=`${Ze}-selection-overflow`,bt=Ae.multipleSelectItemHeight,[He]=Et(Ae),wt=ze?`${Ze}-${ze}`:"";return{[`${Ze}-multiple${wt}`]:{fontSize:Ae.fontSize,[qe]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ze}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${He-Xe}px ${Xe*2}px`,borderRadius:Ae.borderRadius,[`${Ze}-show-search&`]:{cursor:"text"},[`${Ze}-disabled&`]:{background:Ae.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Xe}px 0`,lineHeight:`${bt}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${Ze}-show-arrow ${Ze}-selector,
&${Ze}-allow-clear ${Ze}-selector
`]:{paddingInlineEnd:Ae.fontSizeIcon+Ae.controlPaddingHorizontal},[`${Ze}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:bt,marginTop:Xe,marginBottom:Xe,lineHeight:`${bt-Ae.lineWidth*2}px`,background:Ae.multipleItemBg,border:`${Ae.lineWidth}px ${Ae.lineType} ${Ae.multipleItemBorderColor}`,borderRadius:Ae.borderRadiusSM,cursor:"default",transition:`font-size ${Ae.motionDurationSlow}, line-height ${Ae.motionDurationSlow}, height ${Ae.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Xe*2,paddingInlineStart:Ae.paddingXS,paddingInlineEnd:Ae.paddingXS/2,[`${Ze}-disabled&`]:{color:Ae.multipleItemColorDisabled,borderColor:Ae.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Ae.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ge.Ro)()),{display:"inline-flex",alignItems:"center",color:Ae.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${ot}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Ae.colorIconHover}})},[`${qe}-item + ${qe}-item`]:{[`${Ze}-selection-search`]:{marginInlineStart:0}},[`${Ze}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Ae.inputPaddingHorizontalBase-He,"\n &-input,\n &-mirror\n ":{height:bt,fontFamily:Ae.fontFamily,lineHeight:`${bt}px`,transition:`all ${Ae.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ze}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Ae.inputPaddingHorizontalBase,insetInlineEnd:Ae.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Ae.motionDurationSlow}`}}}}var Be=Ae=>{const{componentCls:ze}=Ae,Ze=(0,Ke.TS)(Ae,{controlHeight:Ae.controlHeightSM,multipleSelectItemHeight:Ae.controlHeightXS,borderRadius:Ae.borderRadiusSM,borderRadiusSM:Ae.borderRadiusXS}),ot=(0,Ke.TS)(Ae,{fontSize:Ae.fontSizeLG,controlHeight:Ae.controlHeightLG,multipleSelectItemHeight:Ae.multipleItemHeightLG,borderRadius:Ae.borderRadiusLG,borderRadiusSM:Ae.borderRadius}),[,qe]=Et(Ae);return[ct(Ae),ct(Ze,"sm"),{[`${ze}-multiple${ze}-sm`]:{[`${ze}-selection-placeholder`]:{insetInline:Ae.controlPaddingHorizontalSM-Ae.lineWidth},[`${ze}-selection-search`]:{marginInlineStart:qe}}},ct(ot,"lg")]};function ne(Ae,ze){const{componentCls:Ze,inputPaddingHorizontalBase:ot,borderRadius:qe}=Ae,bt=Ae.controlHeight-Ae.lineWidth*2,He=Math.ceil(Ae.fontSize*1.25),wt=ze?`${Ze}-${ze}`:"";return{[`${Ze}-single${wt}`]:{fontSize:Ae.fontSize,[`${Ze}-selector`]:Object.assign(Object.assign({},(0,ge.Wf)(Ae)),{display:"flex",borderRadius:qe,[`${Ze}-selection-search`]:{position:"absolute",top:0,insetInlineStart:ot,insetInlineEnd:ot,bottom:0,"&-input":{width:"100%"}},[`
${Ze}-selection-item,
${Ze}-selection-placeholder
`]:{padding:0,lineHeight:`${bt}px`,transition:`all ${Ae.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${bt}px`}},[`${Ze}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ze}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ze}-selection-item:after`,`${Ze}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${Ze}-show-arrow ${Ze}-selection-item,
&${Ze}-show-arrow ${Ze}-selection-placeholder
`]:{paddingInlineEnd:He},[`&${Ze}-open ${Ze}-selection-item`]:{color:Ae.colorTextPlaceholder},[`&:not(${Ze}-customize-input)`]:{[`${Ze}-selector`]:{width:"100%",height:Ae.controlHeight,padding:`0 ${ot}px`,[`${Ze}-selection-search-input`]:{height:bt},"&:after":{lineHeight:`${bt}px`}}},[`&${Ze}-customize-input`]:{[`${Ze}-selector`]:{"&:after":{display:"none"},[`${Ze}-selection-search`]:{position:"static",width:"100%"},[`${Ze}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${ot}px`,"&:after":{display:"none"}}}}}}}function ee(Ae){const{componentCls:ze}=Ae,Ze=Ae.controlPaddingHorizontalSM-Ae.lineWidth;return[ne(Ae),ne((0,Ke.TS)(Ae,{controlHeight:Ae.controlHeightSM,borderRadius:Ae.borderRadiusSM}),"sm"),{[`${ze}-single${ze}-sm`]:{[`&:not(${ze}-customize-input)`]:{[`${ze}-selection-search`]:{insetInlineStart:Ze,insetInlineEnd:Ze},[`${ze}-selector`]:{padding:`0 ${Ze}px`},[`&${ze}-show-arrow ${ze}-selection-search`]:{insetInlineEnd:Ze+Ae.fontSize*1.5},[`
&${ze}-show-arrow ${ze}-selection-item,
&${ze}-show-arrow ${ze}-selection-placeholder
`]:{paddingInlineEnd:Ae.fontSize*1.5}}}},ne((0,Ke.TS)(Ae,{controlHeight:Ae.singleItemHeightLG,fontSize:Ae.fontSizeLG,borderRadius:Ae.borderRadiusLG}),"lg")]}const ce=Ae=>{const{componentCls:ze,selectorBg:Ze}=Ae;return{position:"relative",backgroundColor:Ze,border:`${Ae.lineWidth}px ${Ae.lineType} ${Ae.colorBorder}`,transition:`all ${Ae.motionDurationMid} ${Ae.motionEaseInOut}`,input:{cursor:"pointer"},[`${ze}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${ze}-disabled&`]:{color:Ae.colorTextDisabled,background:Ae.colorBgContainerDisabled,cursor:"not-allowed",[`${ze}-multiple&`]:{background:Ae.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(Ae,ze){let Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:ot,borderHoverColor:qe,outlineColor:bt,antCls:He}=ze,wt=Ze?{[`${ot}-selector`]:{borderColor:qe}}:{};return{[Ae]:{[`&:not(${ot}-disabled):not(${ot}-customize-input):not(${He}-pagination-size-changer)`]:Object.assign(Object.assign({},wt),{[`${ot}-focused& ${ot}-selector`]:{borderColor:qe,boxShadow:`0 0 0 ${ze.controlOutlineWidth}px ${bt}`,outline:0},[`&:hover ${ot}-selector`]:{borderColor:qe}})}}},he=Ae=>{const{componentCls:ze}=Ae;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"}}}},ve=Ae=>{const{componentCls:ze,inputPaddingHorizontalBase:Ze,iconCls:ot}=Ae;return{[ze]:Object.assign(Object.assign({},(0,ge.Wf)(Ae)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${ze}-customize-input) ${ze}-selector`]:Object.assign(Object.assign({},ce(Ae)),he(Ae)),[`${ze}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},ge.vS),[`${ze}-selection-placeholder`]:Object.assign(Object.assign({},ge.vS),{flex:1,color:Ae.colorTextPlaceholder,pointerEvents:"none"}),[`${ze}-arrow`]:Object.assign(Object.assign({},(0,ge.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ze,height:Ae.fontSizeIcon,marginTop:-Ae.fontSizeIcon/2,color:Ae.colorTextQuaternary,fontSize:Ae.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[ot]:{verticalAlign:"top",transition:`transform ${Ae.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:Ze,zIndex:1,display:"inline-block",width:Ae.fontSizeIcon,height:Ae.fontSizeIcon,marginTop:-Ae.fontSizeIcon/2,color:Ae.colorTextQuaternary,fontSize:Ae.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Ae.clearBg,cursor:"pointer",opacity:0,transition:`color ${Ae.motionDurationMid} ease, opacity ${Ae.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Ae.colorTextTertiary}},"&:hover":{[`${ze}-clear`]:{opacity:1}}}),[`${ze}-has-feedback`]:{[`${ze}-clear`]:{insetInlineEnd:Ze+Ae.fontSize+Ae.paddingXS}}}},be=Ae=>{const{componentCls:ze}=Ae;return[{[ze]:{[`&-borderless ${ze}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${ze}-in-form-item`]:{width:"100%"}}},ve(Ae),ee(Ae),Be(Ae),Pt(Ae),{[`${ze}-rtl`]:{direction:"rtl"}},se(ze,(0,Ke.TS)(Ae,{borderHoverColor:Ae.colorPrimaryHover,outlineColor:Ae.controlOutline})),se(`${ze}-status-error`,(0,Ke.TS)(Ae,{borderHoverColor:Ae.colorErrorHover,outlineColor:Ae.colorErrorOutline}),!0),se(`${ze}-status-warning`,(0,Ke.TS)(Ae,{borderHoverColor:Ae.colorWarningHover,outlineColor:Ae.colorWarningOutline}),!0),(0,Oe.c)(Ae,{borderElCls:`${ze}-selector`,focusElCls:`${ze}-focused`})]};var ke=(0,st.Z)("Select",(Ae,ze)=>{let{rootPrefixCls:Ze}=ze;const ot=(0,Ke.TS)(Ae,{rootPrefixCls:Ze,inputPaddingHorizontalBase:Ae.paddingSM-1,multipleSelectItemHeight:Ae.multipleItemHeight});return[be(ot)]},Ae=>{const{fontSize:ze,lineHeight:Ze,controlHeight:ot,controlPaddingHorizontal:qe,zIndexPopupBase:bt,colorText:He,fontWeightStrong:wt,controlItemBgActive:nt,controlItemBgHover:Dt,colorBgContainer:ht,colorFillSecondary:zt,controlHeightLG:Yt,controlHeightSM:Ut,colorBgContainerDisabled:it,colorTextDisabled:Ve}=Ae;return{zIndexPopup:bt+50,optionSelectedColor:He,optionSelectedFontWeight:wt,optionSelectedBg:nt,optionActiveBg:Dt,optionPadding:`${(ot-ze*Ze)/2}px ${qe}px`,optionFontSize:ze,optionLineHeight:Ze,optionHeight:ot,selectorBg:ht,clearBg:ht,singleItemHeightLG:Yt,multipleItemBg:zt,multipleItemBorderColor:"transparent",multipleItemHeight:Ut,multipleItemHeightLG:ot,multipleSelectorBgDisabled:it,multipleItemColorDisabled:Ve,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Oe}});const ge=Ke=>{const Ge={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Ke==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},Ge),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Ge),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Ge),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Ge),{points:["br","tr"],offset:[0,-4]})}};function Oe(Ke,st){return Ke||ge(st)}},84443:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ge}});function ge(Oe,Ke){return Ke!==void 0?Ke:Oe!==null}},66339:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});var ge=pe(40001),Oe=pe(19248),Ke=pe(99267),st=pe(84105),Ge=pe(58617),_e=pe(47472),Le=pe(59301);function Tt(Pt){let{suffixIcon:Xe,clearIcon:Et,menuItemSelectedIcon:ct,removeIcon:It,loading:Be,multiple:ne,hasFeedback:ee,prefixCls:ce,showSuffixIcon:se,feedbackIcon:he,showArrow:ve,componentName:be}=Pt;const ke=Et!=null?Et:Le.createElement(Oe.Z,null),Ae=qe=>Xe===null&&!ee&&!ve?null:Le.createElement(Le.Fragment,null,se!==!1&&qe,ee&&he);let ze=null;if(Xe!==void 0)ze=Ae(Xe);else if(Be)ze=Ae(Le.createElement(Ge.Z,{spin:!0}));else{const qe=`${ce}-suffix`;ze=bt=>{let{open:He,showSearch:wt}=bt;return Ae(He&&wt?Le.createElement(_e.Z,{className:qe}):Le.createElement(st.Z,{className:qe}))}}let Ze=null;ct!==void 0?Ze=ct:ne?Ze=Le.createElement(ge.Z,null):Ze=null;let ot=null;return It!==void 0?ot=It:ot=Le.createElement(Ke.Z,null),{clearIcon:ke,suffixIcon:ze,itemIcon:Ze,removeIcon:ot}}},61621:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return De}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(59301),st=pe(36355),Ge=pe(2738),Le=Fe=>{const{prefixCls:ye,className:Qe,style:vt,size:Ye,shape:Je}=Fe,yt=Oe()({[`${ye}-lg`]:Ye==="large",[`${ye}-sm`]:Ye==="small"}),St=Oe()({[`${ye}-circle`]:Je==="circle",[`${ye}-square`]:Je==="square",[`${ye}-round`]:Je==="round"}),rt=Ke.useMemo(()=>typeof Ye=="number"?{width:Ye,height:Ye,lineHeight:`${Ye}px`}:{},[Ye]);return Ke.createElement("span",{className:Oe()(ye,yt,St,Qe),style:Object.assign(Object.assign({},rt),vt)})},Tt=pe(93083),Pt=pe(83116),Xe=pe(37613);const Et=new Tt.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),ct=Fe=>({height:Fe,lineHeight:`${Fe}px`}),It=Fe=>Object.assign({width:Fe},ct(Fe)),Be=Fe=>({background:Fe.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Et,animationDuration:Fe.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),ne=Fe=>Object.assign({width:Fe*5,minWidth:Fe*5},ct(Fe)),ee=Fe=>{const{skeletonAvatarCls:ye,gradientFromColor:Qe,controlHeight:vt,controlHeightLG:Ye,controlHeightSM:Je}=Fe;return{[`${ye}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Qe},It(vt)),[`${ye}${ye}-circle`]:{borderRadius:"50%"},[`${ye}${ye}-lg`]:Object.assign({},It(Ye)),[`${ye}${ye}-sm`]:Object.assign({},It(Je))}},ce=Fe=>{const{controlHeight:ye,borderRadiusSM:Qe,skeletonInputCls:vt,controlHeightLG:Ye,controlHeightSM:Je,gradientFromColor:yt}=Fe;return{[`${vt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:yt,borderRadius:Qe},ne(ye)),[`${vt}-lg`]:Object.assign({},ne(Ye)),[`${vt}-sm`]:Object.assign({},ne(Je))}},se=Fe=>Object.assign({width:Fe},ct(Fe)),he=Fe=>{const{skeletonImageCls:ye,imageSizeBase:Qe,gradientFromColor:vt,borderRadiusSM:Ye}=Fe;return{[`${ye}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:vt,borderRadius:Ye},se(Qe*2)),{[`${ye}-path`]:{fill:"#bfbfbf"},[`${ye}-svg`]:Object.assign(Object.assign({},se(Qe)),{maxWidth:Qe*4,maxHeight:Qe*4}),[`${ye}-svg${ye}-svg-circle`]:{borderRadius:"50%"}}),[`${ye}${ye}-circle`]:{borderRadius:"50%"}}},ve=(Fe,ye,Qe)=>{const{skeletonButtonCls:vt}=Fe;return{[`${Qe}${vt}-circle`]:{width:ye,minWidth:ye,borderRadius:"50%"},[`${Qe}${vt}-round`]:{borderRadius:ye}}},be=Fe=>Object.assign({width:Fe*2,minWidth:Fe*2},ct(Fe)),ke=Fe=>{const{borderRadiusSM:ye,skeletonButtonCls:Qe,controlHeight:vt,controlHeightLG:Ye,controlHeightSM:Je,gradientFromColor:yt}=Fe;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${Qe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:yt,borderRadius:ye,width:vt*2,minWidth:vt*2},be(vt))},ve(Fe,vt,Qe)),{[`${Qe}-lg`]:Object.assign({},be(Ye))}),ve(Fe,Ye,`${Qe}-lg`)),{[`${Qe}-sm`]:Object.assign({},be(Je))}),ve(Fe,Je,`${Qe}-sm`))},Ae=Fe=>{const{componentCls:ye,skeletonAvatarCls:Qe,skeletonTitleCls:vt,skeletonParagraphCls:Ye,skeletonButtonCls:Je,skeletonInputCls:yt,skeletonImageCls:St,controlHeight:rt,controlHeightLG:Zt,controlHeightSM:dn,gradientFromColor:mn,padding:qt,marginSM:Gn,borderRadius:Kn,titleHeight:Nt,blockRadius:sn,paragraphLiHeight:Fn,controlHeightXS:hn,paragraphMarginTop:Mn}=Fe;return{[`${ye}`]:{display:"table",width:"100%",[`${ye}-header`]:{display:"table-cell",paddingInlineEnd:qt,verticalAlign:"top",[`${Qe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:mn},It(rt)),[`${Qe}-circle`]:{borderRadius:"50%"},[`${Qe}-lg`]:Object.assign({},It(Zt)),[`${Qe}-sm`]:Object.assign({},It(dn))},[`${ye}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${vt}`]:{width:"100%",height:Nt,background:mn,borderRadius:sn,[`+ ${Ye}`]:{marginBlockStart:dn}},[`${Ye}`]:{padding:0,"> li":{width:"100%",height:Fn,listStyle:"none",background:mn,borderRadius:sn,"+ li":{marginBlockStart:hn}}},[`${Ye}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${ye}-content`]:{[`${vt}, ${Ye} > li`]:{borderRadius:Kn}}},[`${ye}-with-avatar ${ye}-content`]:{[`${vt}`]:{marginBlockStart:Gn,[`+ ${Ye}`]:{marginBlockStart:Mn}}},[`${ye}${ye}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},ke(Fe)),ee(Fe)),ce(Fe)),he(Fe)),[`${ye}${ye}-block`]:{width:"100%",[`${Je}`]:{width:"100%"},[`${yt}`]:{width:"100%"}},[`${ye}${ye}-active`]:{[`
${vt},
${Ye} > li,
${Qe},
${Je},
${yt},
${St}
`]:Object.assign({},Be(Fe))}}};var ze=(0,Pt.Z)("Skeleton",Fe=>{const{componentCls:ye}=Fe,Qe=(0,Xe.TS)(Fe,{skeletonAvatarCls:`${ye}-avatar`,skeletonTitleCls:`${ye}-title`,skeletonParagraphCls:`${ye}-paragraph`,skeletonButtonCls:`${ye}-button`,skeletonInputCls:`${ye}-input`,skeletonImageCls:`${ye}-image`,imageSizeBase:Fe.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Fe.gradientFromColor} 25%, ${Fe.gradientToColor} 37%, ${Fe.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Ae(Qe)]},Fe=>{const{colorFillContent:ye,colorFill:Qe}=Fe,vt=ye,Ye=Qe;return{color:vt,colorGradientEnd:Ye,gradientFromColor:vt,gradientToColor:Ye,titleHeight:Fe.controlHeight/2,blockRadius:Fe.borderRadiusSM,paragraphMarginTop:Fe.marginLG+Fe.marginXXS,paragraphLiHeight:Fe.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),ot=Fe=>{const{prefixCls:ye,className:Qe,rootClassName:vt,active:Ye,shape:Je="circle",size:yt="default"}=Fe,{getPrefixCls:St}=Ke.useContext(st.E_),rt=St("skeleton",ye),[Zt,dn]=ze(rt),mn=(0,Ge.Z)(Fe,["prefixCls","className"]),qt=Oe()(rt,`${rt}-element`,{[`${rt}-active`]:Ye},Qe,vt,dn);return Zt(Ke.createElement("div",{className:qt},Ke.createElement(Le,Object.assign({prefixCls:`${rt}-avatar`,shape:Je,size:yt},mn))))},bt=Fe=>{const{prefixCls:ye,className:Qe,rootClassName:vt,active:Ye,block:Je=!1,size:yt="default"}=Fe,{getPrefixCls:St}=Ke.useContext(st.E_),rt=St("skeleton",ye),[Zt,dn]=ze(rt),mn=(0,Ge.Z)(Fe,["prefixCls"]),qt=Oe()(rt,`${rt}-element`,{[`${rt}-active`]:Ye,[`${rt}-block`]:Je},Qe,vt,dn);return Zt(Ke.createElement("div",{className:qt},Ke.createElement(Le,Object.assign({prefixCls:`${rt}-button`,size:yt},mn))))};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 nt=Fe=>{const{prefixCls:ye,className:Qe,rootClassName:vt,style:Ye,active:Je}=Fe,{getPrefixCls:yt}=Ke.useContext(st.E_),St=yt("skeleton",ye),[rt,Zt]=ze(St),dn=Oe()(St,`${St}-element`,{[`${St}-active`]:Je},Qe,vt,Zt);return rt(Ke.createElement("div",{className:dn},Ke.createElement("div",{className:Oe()(`${St}-image`,Qe),style:Ye},Ke.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${St}-image-svg`},Ke.createElement("path",{d:He,className:`${St}-image-path`})))))},ht=Fe=>{const{prefixCls:ye,className:Qe,rootClassName:vt,active:Ye,block:Je,size:yt="default"}=Fe,{getPrefixCls:St}=Ke.useContext(st.E_),rt=St("skeleton",ye),[Zt,dn]=ze(rt),mn=(0,Ge.Z)(Fe,["prefixCls"]),qt=Oe()(rt,`${rt}-element`,{[`${rt}-active`]:Ye,[`${rt}-block`]:Je},Qe,vt,dn);return Zt(Ke.createElement("div",{className:qt},Ke.createElement(Le,Object.assign({prefixCls:`${rt}-input`,size:yt},mn))))},zt=pe(92413),Yt={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=Yt,it=pe(7657),Ve=function(ye,Qe){return Ke.createElement(it.Z,(0,zt.Z)({},ye,{ref:Qe,icon:Ut}))},Wt=Ke.forwardRef(Ve),Ln=Wt,$t=Fe=>{const{prefixCls:ye,className:Qe,rootClassName:vt,style:Ye,active:Je,children:yt}=Fe,{getPrefixCls:St}=Ke.useContext(st.E_),rt=St("skeleton",ye),[Zt,dn]=ze(rt),mn=Oe()(rt,`${rt}-element`,{[`${rt}-active`]:Je},dn,Qe,vt),qt=yt!=null?yt:Ke.createElement(Ln,null);return Zt(Ke.createElement("div",{className:mn},Ke.createElement("div",{className:Oe()(`${rt}-image`,Qe),style:Ye},qt)))},rn=pe(26407),ti=Fe=>{const ye=St=>{const{width:rt,rows:Zt=2}=Fe;if(Array.isArray(rt))return rt[St];if(Zt-1===St)return rt},{prefixCls:Qe,className:vt,style:Ye,rows:Je}=Fe,yt=(0,rn.Z)(Array(Je)).map((St,rt)=>Ke.createElement("li",{key:rt,style:{width:ye(rt)}}));return Ke.createElement("ul",{className:Oe()(Qe,vt),style:Ye},yt)},Qn=Fe=>{let{prefixCls:ye,className:Qe,width:vt,style:Ye}=Fe;return Ke.createElement("h3",{className:Oe()(ye,Qe),style:Object.assign({width:vt},Ye)})};function Ot(Fe){return Fe&&typeof Fe=="object"?Fe:{}}function Cn(Fe,ye){return Fe&&!ye?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Wn(Fe,ye){return!Fe&&ye?{width:"38%"}:Fe&&ye?{width:"50%"}:{}}function We(Fe,ye){const Qe={};return(!Fe||!ye)&&(Qe.width="61%"),!Fe&&ye?Qe.rows=3:Qe.rows=2,Qe}const Ee=Fe=>{const{prefixCls:ye,loading:Qe,className:vt,rootClassName:Ye,style:Je,children:yt,avatar:St=!1,title:rt=!0,paragraph:Zt=!0,active:dn,round:mn}=Fe,{getPrefixCls:qt,direction:Gn,skeleton:Kn}=Ke.useContext(st.E_),Nt=qt("skeleton",ye),[sn,Fn]=ze(Nt);if(Qe||!("loading"in Fe)){const hn=!!St,Mn=!!rt,li=!!Zt;let pi;if(hn){const Gi=Object.assign(Object.assign({prefixCls:`${Nt}-avatar`},Cn(Mn,li)),Ot(St));pi=Ke.createElement("div",{className:`${Nt}-header`},Ke.createElement(Le,Object.assign({},Gi)))}let mi;if(Mn||li){let Gi;if(Mn){const Xi=Object.assign(Object.assign({prefixCls:`${Nt}-title`},Wn(hn,li)),Ot(rt));Gi=Ke.createElement(Qn,Object.assign({},Xi))}let ar;if(li){const Xi=Object.assign(Object.assign({prefixCls:`${Nt}-paragraph`},We(hn,Mn)),Ot(Zt));ar=Ke.createElement(ti,Object.assign({},Xi))}mi=Ke.createElement("div",{className:`${Nt}-content`},Gi,ar)}const Li=Oe()(Nt,{[`${Nt}-with-avatar`]:hn,[`${Nt}-active`]:dn,[`${Nt}-rtl`]:Gn==="rtl",[`${Nt}-round`]:mn},Kn==null?void 0:Kn.className,vt,Ye,Fn);return sn(Ke.createElement("div",{className:Li,style:Object.assign(Object.assign({},Kn==null?void 0:Kn.style),Je)},pi,mi))}return typeof yt!="undefined"?yt:null};Ee.Button=bt,Ee.Avatar=ot,Ee.Input=ht,Ee.Image=nt,Ee.Node=$t;var Pe=Ee,De=Pe},81327:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ce}});var ge=pe(59301),Oe=pe(92310),Ke=pe.n(Oe),st=pe(11592),Ge=pe(36355),_e=pe(33234);const Le=ge.createContext({latestIndex:0}),Tt=Le.Provider;var Xe=se=>{let{className:he,index:ve,children:be,split:ke,style:Ae}=se;const{latestIndex:ze}=ge.useContext(Le);return be==null?null:ge.createElement(ge.Fragment,null,ge.createElement("div",{className:he,style:Ae},be),ve<ze&&ke&&ge.createElement("span",{className:`${he}-split`},ke))},Et=pe(2856);function ct(se){return["small","middle","large"].includes(se)}function It(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var Be=function(se,he){var ve={};for(var be in se)Object.prototype.hasOwnProperty.call(se,be)&&he.indexOf(be)<0&&(ve[be]=se[be]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ke=0,be=Object.getOwnPropertySymbols(se);ke<be.length;ke++)he.indexOf(be[ke])<0&&Object.prototype.propertyIsEnumerable.call(se,be[ke])&&(ve[be[ke]]=se[be[ke]]);return ve};const ee=ge.forwardRef((se,he)=>{var ve,be;const{getPrefixCls:ke,space:Ae,direction:ze}=ge.useContext(Ge.E_),{size:Ze=(Ae==null?void 0:Ae.size)||"small",align:ot,className:qe,rootClassName:bt,children:He,direction:wt="horizontal",prefixCls:nt,split:Dt,style:ht,wrap:zt=!1,classNames:Yt,styles:Ut}=se,it=Be(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ve,Wt]=Array.isArray(Ze)?Ze:[Ze,Ze],Ln=ct(Wt),Nn=ct(Ve),$t=It(Wt),rn=It(Ve),An=(0,st.Z)(He,{keepEmpty:!0}),ti=ot===void 0&&wt==="horizontal"?"center":ot,xn=ke("space",nt),[Qn,Ot]=(0,Et.Z)(xn),Cn=Ke()(xn,Ae==null?void 0:Ae.className,Ot,`${xn}-${wt}`,{[`${xn}-rtl`]:ze==="rtl",[`${xn}-align-${ti}`]:ti,[`${xn}-gap-row-${Wt}`]:Ln,[`${xn}-gap-col-${Ve}`]:Nn},qe,bt),Wn=Ke()(`${xn}-item`,(ve=Yt==null?void 0:Yt.item)!==null&&ve!==void 0?ve:(be=Ae==null?void 0:Ae.classNames)===null||be===void 0?void 0:be.item);let We=0;const Ee=An.map((Fe,ye)=>{var Qe,vt;Fe!=null&&(We=ye);const Ye=Fe&&Fe.key||`${Wn}-${ye}`;return ge.createElement(Xe,{className:Wn,key:Ye,index:ye,split:Dt,style:(Qe=Ut==null?void 0:Ut.item)!==null&&Qe!==void 0?Qe:(vt=Ae==null?void 0:Ae.styles)===null||vt===void 0?void 0:vt.item},Fe)}),Pe=ge.useMemo(()=>({latestIndex:We}),[We]);if(An.length===0)return null;const De={};return zt&&(De.flexWrap="wrap"),!Nn&&rn&&(De.columnGap=Ve),!Ln&&$t&&(De.rowGap=Wt),Qn(ge.createElement("div",Object.assign({ref:he,className:Cn,style:Object.assign(Object.assign(Object.assign({},De),Ae==null?void 0:Ae.style),ht)},it),ge.createElement(Tt,{value:Pe},Ee)))});ee.Compact=_e.ZP;var ce=ee},31797:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return ze}});var ge=pe(59301),Oe=pe(56762),Ke=pe(92343),st=pe(92310),Ge=pe.n(st),_e=pe(36355),Le=pe(61621),Pt=Ze=>{const{value:ot,formatter:qe,precision:bt,decimalSeparator:He,groupSeparator:wt="",prefixCls:nt}=Ze;let Dt;if(typeof qe=="function")Dt=qe(ot);else{const ht=String(ot),zt=ht.match(/^(-?)(\d*)(\.(\d+))?$/);if(!zt||ht==="-")Dt=ht;else{const Yt=zt[1];let Ut=zt[2]||"0",it=zt[4]||"";Ut=Ut.replace(/\B(?=(\d{3})+(?!\d))/g,wt),typeof bt=="number"&&(it=it.padEnd(bt,"0").slice(0,bt>0?bt:0)),it&&(it=`${He}${it}`),Dt=[ge.createElement("span",{key:"int",className:`${nt}-content-value-int`},Yt,Ut),it&&ge.createElement("span",{key:"decimal",className:`${nt}-content-value-decimal`},it)]}}return ge.createElement("span",{className:`${nt}-content-value`},Dt)},Xe=pe(17313),Et=pe(83116),ct=pe(37613);const It=Ze=>{const{componentCls:ot,marginXXS:qe,padding:bt,colorTextDescription:He,titleFontSize:wt,colorTextHeading:nt,contentFontSize:Dt,fontFamily:ht}=Ze;return{[`${ot}`]:Object.assign(Object.assign({},(0,Xe.Wf)(Ze)),{[`${ot}-title`]:{marginBottom:qe,color:He,fontSize:wt},[`${ot}-skeleton`]:{paddingTop:bt},[`${ot}-content`]:{color:nt,fontSize:Dt,fontFamily:ht,[`${ot}-content-value`]:{display:"inline-block",direction:"ltr"},[`${ot}-content-prefix, ${ot}-content-suffix`]:{display:"inline-block"},[`${ot}-content-prefix`]:{marginInlineEnd:qe},[`${ot}-content-suffix`]:{marginInlineStart:qe}}})}};var Be=(0,Et.Z)("Statistic",Ze=>{const ot=(0,ct.TS)(Ze,{});return[It(ot)]},Ze=>{const{fontSizeHeading3:ot,fontSize:qe}=Ze;return{titleFontSize:qe,contentFontSize:ot}}),ee=Ze=>{const{prefixCls:ot,className:qe,rootClassName:bt,style:He,valueStyle:wt,value:nt=0,title:Dt,valueRender:ht,prefix:zt,suffix:Yt,loading:Ut=!1,onMouseEnter:it,onMouseLeave:Ve,decimalSeparator:Wt=".",groupSeparator:Ln=","}=Ze,{getPrefixCls:Nn,direction:$t,statistic:rn}=ge.useContext(_e.E_),An=Nn("statistic",ot),[ti,xn]=Be(An),Qn=ge.createElement(Pt,Object.assign({decimalSeparator:Wt,groupSeparator:Ln,prefixCls:An},Ze,{value:nt})),Ot=Ge()(An,{[`${An}-rtl`]:$t==="rtl"},rn==null?void 0:rn.className,qe,bt,xn);return ti(ge.createElement("div",{className:Ot,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),He),onMouseEnter:it,onMouseLeave:Ve},Dt&&ge.createElement("div",{className:`${An}-title`},Dt),ge.createElement(Le.Z,{paragraph:!1,loading:Ut,className:`${An}-skeleton`},ge.createElement("div",{style:wt,className:`${An}-content`},zt&&ge.createElement("span",{className:`${An}-content-prefix`},zt),ht?ht(Qn):Qn,Yt&&ge.createElement("span",{className:`${An}-content-suffix`},Yt)))))};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(Ze,ot){let qe=Ze;const bt=/\[[^\]]*]/g,He=(ot.match(bt)||[]).map(ht=>ht.slice(1,-1)),wt=ot.replace(bt,"[]"),nt=ce.reduce((ht,zt)=>{let[Yt,Ut]=zt;if(ht.includes(Yt)){const it=Math.floor(qe/Ut);return qe-=it*Ut,ht.replace(new RegExp(`${Yt}+`,"g"),Ve=>{const Wt=Ve.length;return it.toString().padStart(Wt,"0")})}return ht},wt);let Dt=0;return nt.replace(bt,()=>{const ht=He[Dt];return Dt+=1,ht})}function he(Ze,ot){const{format:qe=""}=ot,bt=new Date(Ze).getTime(),He=Date.now(),wt=Math.max(bt-He,0);return se(wt,qe)}const ve=1e3/30;function be(Ze){return new Date(Ze).getTime()}const ke=Ze=>{const{value:ot,format:qe="HH:mm:ss",onChange:bt,onFinish:He}=Ze,wt=(0,Oe.Z)(),nt=ge.useRef(null),Dt=()=>{He==null||He(),nt.current&&(clearInterval(nt.current),nt.current=null)},ht=()=>{const Ut=be(ot);Ut>=Date.now()&&(nt.current=setInterval(()=>{wt(),bt==null||bt(Ut-Date.now()),Ut<Date.now()&&Dt()},ve))};ge.useEffect(()=>(ht(),()=>{nt.current&&(clearInterval(nt.current),nt.current=null)}),[ot]);const zt=(Ut,it)=>he(Ut,Object.assign(Object.assign({},it),{format:qe})),Yt=Ut=>(0,Ke.Tm)(Ut,{title:void 0});return ge.createElement(ee,Object.assign({},Ze,{valueRender:Yt,formatter:zt}))};var Ae=ge.memo(ke);ee.Countdown=Ae;var ze=ee},15969:function(Vn,Pn,pe){"use strict";pe.d(Pn,{N:function(){return ge}});const ge=Oe=>({color:Oe.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${Oe.motionDurationSlow}`,"&:focus, &:hover":{color:Oe.colorLinkHover},"&:active":{color:Oe.colorLinkActive}})},78673:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return wt}});var ge=pe(58617),Oe=pe(92310),Ke=pe.n(Oe),st=pe(92413),Ge=pe(400),_e=pe(33606),Le=pe(37061),Tt=pe(59301),Pt=pe(18929),Xe=pe(10228),Et=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ct=Tt.forwardRef(function(nt,Dt){var ht,zt=nt.prefixCls,Yt=zt===void 0?"rc-switch":zt,Ut=nt.className,it=nt.checked,Ve=nt.defaultChecked,Wt=nt.disabled,Ln=nt.loadingIcon,Nn=nt.checkedChildren,$t=nt.unCheckedChildren,rn=nt.onClick,An=nt.onChange,ti=nt.onKeyDown,xn=(0,Le.Z)(nt,Et),Qn=(0,Pt.Z)(!1,{value:it,defaultValue:Ve}),Ot=(0,_e.Z)(Qn,2),Cn=Ot[0],Wn=Ot[1];function We(Fe,ye){var Qe=Cn;return Wt||(Qe=Fe,Wn(Qe),An==null||An(Qe,ye)),Qe}function Ee(Fe){Fe.which===Xe.Z.LEFT?We(!1,Fe):Fe.which===Xe.Z.RIGHT&&We(!0,Fe),ti==null||ti(Fe)}function Pe(Fe){var ye=We(!Cn,Fe);rn==null||rn(ye,Fe)}var De=Ke()(Yt,Ut,(ht={},(0,Ge.Z)(ht,"".concat(Yt,"-checked"),Cn),(0,Ge.Z)(ht,"".concat(Yt,"-disabled"),Wt),ht));return Tt.createElement("button",(0,st.Z)({},xn,{type:"button",role:"switch","aria-checked":Cn,disabled:Wt,className:De,ref:Dt,onKeyDown:Ee,onClick:Pe}),Ln,Tt.createElement("span",{className:"".concat(Yt,"-inner")},Tt.createElement("span",{className:"".concat(Yt,"-inner-checked")},Nn),Tt.createElement("span",{className:"".concat(Yt,"-inner-unchecked")},$t)))});ct.displayName="Switch";var It=ct,Be=pe(14088),ne=pe(36355),ee=pe(1684),ce=pe(19716),se=pe(64993),he=pe(17313),ve=pe(83116),be=pe(37613);const ke=nt=>{const{componentCls:Dt,trackHeightSM:ht,trackPadding:zt,trackMinWidthSM:Yt,innerMinMarginSM:Ut,innerMaxMarginSM:it,handleSizeSM:Ve}=nt,Wt=`${Dt}-inner`;return{[Dt]:{[`&${Dt}-small`]:{minWidth:Yt,height:ht,lineHeight:`${ht}px`,[`${Dt}-inner`]:{paddingInlineStart:it,paddingInlineEnd:Ut,[`${Wt}-checked`]:{marginInlineStart:`calc(-100% + ${Ve+zt*2}px - ${it*2}px)`,marginInlineEnd:`calc(100% - ${Ve+zt*2}px + ${it*2}px)`},[`${Wt}-unchecked`]:{marginTop:-ht,marginInlineStart:0,marginInlineEnd:0}},[`${Dt}-handle`]:{width:Ve,height:Ve},[`${Dt}-loading-icon`]:{top:(Ve-nt.switchLoadingIconSize)/2,fontSize:nt.switchLoadingIconSize},[`&${Dt}-checked`]:{[`${Dt}-inner`]:{paddingInlineStart:Ut,paddingInlineEnd:it,[`${Wt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Wt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ve+zt*2}px + ${it*2}px)`,marginInlineEnd:`calc(-100% + ${Ve+zt*2}px - ${it*2}px)`}},[`${Dt}-handle`]:{insetInlineStart:`calc(100% - ${Ve+zt}px)`}},[`&:not(${Dt}-disabled):active`]:{[`&:not(${Dt}-checked) ${Wt}`]:{[`${Wt}-unchecked`]:{marginInlineStart:nt.marginXXS/2,marginInlineEnd:-nt.marginXXS/2}},[`&${Dt}-checked ${Wt}`]:{[`${Wt}-checked`]:{marginInlineStart:-nt.marginXXS/2,marginInlineEnd:nt.marginXXS/2}}}}}}},Ae=nt=>{const{componentCls:Dt,handleSize:ht}=nt;return{[Dt]:{[`${Dt}-loading-icon${nt.iconCls}`]:{position:"relative",top:(ht-nt.fontSize)/2,color:nt.switchLoadingIconColor,verticalAlign:"top"},[`&${Dt}-checked ${Dt}-loading-icon`]:{color:nt.switchColor}}}},ze=nt=>{const{componentCls:Dt,motion:ht,trackPadding:zt,handleBg:Yt,handleShadow:Ut,handleSize:it}=nt,Ve=`${Dt}-handle`;return{[Dt]:{[Ve]:{position:"absolute",top:zt,insetInlineStart:zt,width:it,height:it,transition:`all ${nt.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Yt,borderRadius:it/2,boxShadow:Ut,transition:`all ${nt.switchDuration} ease-in-out`,content:'""'}},[`&${Dt}-checked ${Ve}`]:{insetInlineStart:`calc(100% - ${it+zt}px)`},[`&:not(${Dt}-disabled):active`]:ht?{[`${Ve}::before`]:{insetInlineEnd:nt.switchHandleActiveInset,insetInlineStart:0},[`&${Dt}-checked ${Ve}::before`]:{insetInlineEnd:0,insetInlineStart:nt.switchHandleActiveInset}}:{}}}},Ze=nt=>{const{componentCls:Dt,trackHeight:ht,trackPadding:zt,innerMinMargin:Yt,innerMaxMargin:Ut,handleSize:it}=nt,Ve=`${Dt}-inner`;return{[Dt]:{[Ve]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Ut,paddingInlineEnd:Yt,transition:`padding-inline-start ${nt.switchDuration} ease-in-out, padding-inline-end ${nt.switchDuration} ease-in-out`,[`${Ve}-checked, ${Ve}-unchecked`]:{display:"block",color:nt.colorTextLightSolid,fontSize:nt.fontSizeSM,transition:`margin-inline-start ${nt.switchDuration} ease-in-out, margin-inline-end ${nt.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ve}-checked`]:{marginInlineStart:`calc(-100% + ${it+zt*2}px - ${Ut*2}px)`,marginInlineEnd:`calc(100% - ${it+zt*2}px + ${Ut*2}px)`},[`${Ve}-unchecked`]:{marginTop:-ht,marginInlineStart:0,marginInlineEnd:0}},[`&${Dt}-checked ${Ve}`]:{paddingInlineStart:Yt,paddingInlineEnd:Ut,[`${Ve}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ve}-unchecked`]:{marginInlineStart:`calc(100% - ${it+zt*2}px + ${Ut*2}px)`,marginInlineEnd:`calc(-100% + ${it+zt*2}px - ${Ut*2}px)`}},[`&:not(${Dt}-disabled):active`]:{[`&:not(${Dt}-checked) ${Ve}`]:{[`${Ve}-unchecked`]:{marginInlineStart:zt*2,marginInlineEnd:-zt*2}},[`&${Dt}-checked ${Ve}`]:{[`${Ve}-checked`]:{marginInlineStart:-zt*2,marginInlineEnd:zt*2}}}}}},ot=nt=>{const{componentCls:Dt,trackHeight:ht,trackMinWidth:zt}=nt;return{[Dt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,he.Wf)(nt)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:zt,height:ht,lineHeight:`${ht}px`,verticalAlign:"middle",background:nt.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${nt.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Dt}-disabled)`]:{background:nt.colorTextTertiary}}),(0,he.Qy)(nt)),{[`&${Dt}-checked`]:{background:nt.switchColor,[`&:hover:not(${Dt}-disabled)`]:{background:nt.colorPrimaryHover}},[`&${Dt}-loading, &${Dt}-disabled`]:{cursor:"not-allowed",opacity:nt.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Dt}-rtl`]:{direction:"rtl"}})}};var qe=(0,ve.Z)("Switch",nt=>{const Dt=(0,be.TS)(nt,{switchDuration:nt.motionDurationMid,switchColor:nt.colorPrimary,switchDisabledOpacity:nt.opacityLoading,switchLoadingIconSize:nt.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${nt.opacityLoading})`,switchHandleActiveInset:"-30%"});return[ot(Dt),Ze(Dt),ze(Dt),Ae(Dt),ke(Dt)]},nt=>{const{fontSize:Dt,lineHeight:ht,controlHeight:zt,colorWhite:Yt}=nt,Ut=Dt*ht,it=zt/2,Ve=2,Wt=Ut-Ve*2,Ln=it-Ve*2;return{trackHeight:Ut,trackHeightSM:it,trackMinWidth:Wt*2+Ve*4,trackMinWidthSM:Ln*2+Ve*2,trackPadding:Ve,handleBg:Yt,handleSize:Wt,handleSizeSM:Ln,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Wt/2,innerMaxMargin:Wt+Ve+Ve*2,innerMinMarginSM:Ln/2,innerMaxMarginSM:Ln+Ve+Ve*2}}),bt=function(nt,Dt){var ht={};for(var zt in nt)Object.prototype.hasOwnProperty.call(nt,zt)&&Dt.indexOf(zt)<0&&(ht[zt]=nt[zt]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Yt=0,zt=Object.getOwnPropertySymbols(nt);Yt<zt.length;Yt++)Dt.indexOf(zt[Yt])<0&&Object.prototype.propertyIsEnumerable.call(nt,zt[Yt])&&(ht[zt[Yt]]=nt[zt[Yt]]);return ht};const He=Tt.forwardRef((nt,Dt)=>{const{prefixCls:ht,size:zt,disabled:Yt,loading:Ut,className:it,rootClassName:Ve,style:Wt}=nt,Ln=bt(nt,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Nn,direction:$t,switch:rn}=Tt.useContext(ne.E_),An=Tt.useContext(ee.Z),ti=(Yt!=null?Yt:An)||Ut,xn=Nn("switch",ht),Qn=Tt.createElement("div",{className:`${xn}-handle`},Ut&&Tt.createElement(ge.Z,{className:`${xn}-loading-icon`})),[Ot,Cn]=qe(xn),Wn=(0,ce.Z)(zt),We=Ke()(rn==null?void 0:rn.className,{[`${xn}-small`]:Wn==="small",[`${xn}-loading`]:Ut,[`${xn}-rtl`]:$t==="rtl"},it,Ve,Cn),Ee=Object.assign(Object.assign({},rn==null?void 0:rn.style),Wt);return Ot(Tt.createElement(Be.Z,{component:"Switch"},Tt.createElement(It,Object.assign({},Ln,{prefixCls:xn,className:We,style:Ee,disabled:ti,ref:Dt,loadingIcon:Qn}))))});He.__ANT_SWITCH=!0;var wt=He},1710:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return dg}});var ge={},Oe="rc-table-internal-hook",Ke=pe(33606),st=pe(6089),Ge=pe(34280),_e=pe(13697),Le=pe(59301),Tt=pe(4676);function Pt(pt){var xt=Le.createContext(void 0),nn=function(Hn){var bn=Hn.value,ai=Hn.children,si=Le.useRef(bn);si.current=bn;var qn=Le.useState(function(){return{getValue:function(){return si.current},listeners:new Set}}),Mi=(0,Ke.Z)(qn,1),Di=Mi[0];return(0,Ge.Z)(function(){(0,Tt.unstable_batchedUpdates)(function(){Di.listeners.forEach(function(Ni){Ni(bn)})})},[bn]),Le.createElement(xt.Provider,{value:Di},ai)};return{Context:xt,Provider:nn,defaultValue:pt}}function Xe(pt,xt){var nn=(0,st.Z)(typeof xt=="function"?xt:function(Ni){if(xt===void 0)return Ni;if(!Array.isArray(xt))return Ni[xt];var gr={};return xt.forEach(function(dr){gr[dr]=Ni[dr]}),gr}),ln=Le.useContext(pt==null?void 0:pt.Context),Hn=ln||{},bn=Hn.listeners,ai=Hn.getValue,si=Le.useRef();si.current=nn(ln?ai():pt==null?void 0:pt.defaultValue);var qn=Le.useState({}),Mi=(0,Ke.Z)(qn,2),Di=Mi[1];return(0,Ge.Z)(function(){if(!ln)return;function Ni(gr){var dr=nn(gr);(0,_e.Z)(si.current,dr,!0)||Di({})}return bn.add(Ni),function(){bn.delete(Ni)}},[ln]),si.current}var Et=pe(92413),ct=pe(8654);function It(){var pt=Le.createContext(null);function xt(){return Le.useContext(pt)}function nn(Hn,bn){var ai=(0,ct.Yr)(Hn),si=function(Mi,Di){var Ni=ai?{ref:Di}:{},gr=Le.useRef(0),dr=Le.useRef(Mi),nr=xt();return nr!==null?Le.createElement(Hn,(0,Et.Z)({},Mi,Ni)):((!bn||bn(dr.current,Mi))&&(gr.current+=1),dr.current=Mi,Le.createElement(pt.Provider,{value:gr.current},Le.createElement(Hn,(0,Et.Z)({},Mi,Ni))))};return ai?Le.forwardRef(si):si}function ln(Hn,bn){var ai=(0,ct.Yr)(Hn),si=function(Mi,Di){var Ni=ai?{ref:Di}:{};return xt(),Le.createElement(Hn,(0,Et.Z)({},Mi,Ni))};return ai?Le.memo(Le.forwardRef(si),bn):Le.memo(si,bn)}return{makeImmutable:nn,responseImmutable:ln,useImmutableMark:xt}}var Be=It(),ne=Be.makeImmutable,ee=Be.responseImmutable,ce=Be.useImmutableMark,se=It(),he=se.makeImmutable,ve=se.responseImmutable,be=se.useImmutableMark,ke=Pt(),Ae=ke;function ze(pt,xt){var nn=Le.useRef(0);nn.current+=1;var ln=Le.useRef(pt),Hn=[];Object.keys(pt||{}).map(function(ai){var si;(pt==null?void 0:pt[ai])!==((si=ln.current)===null||si===void 0?void 0:si[ai])&&Hn.push(ai)}),ln.current=pt;var bn=Le.useRef([]);return Hn.length&&(bn.current=Hn),Le.useDebugValue(nn.current),Le.useDebugValue(bn.current.join(", ")),xt&&console.log("".concat(xt,":"),nn.current,bn.current),nn.current}var Ze=null,ot=Le.memo(function(){var pt=ze();return Le.createElement("h1",null,"Render Times: ",pt)});ot.displayName="RenderBlock";var qe=pe(39559),bt=pe(33708),He=pe(400),wt=pe(92310),nt=pe.n(wt),Dt=pe(80547),ht=pe(97938),zt=pe(48736),Yt=Le.createContext({renderWithProps:!1}),Ut=Yt,it="RC_TABLE_KEY";function Ve(pt){return pt==null?[]:Array.isArray(pt)?pt:[pt]}function Wt(pt){var xt=[],nn={};return pt.forEach(function(ln){for(var Hn=ln||{},bn=Hn.key,ai=Hn.dataIndex,si=bn||Ve(ai).join("-")||it;nn[si];)si="".concat(si,"_next");nn[si]=!0,xt.push(si)}),xt}function Ln(pt){return pt!=null}function Nn(pt){return pt&&(0,qe.Z)(pt)==="object"&&!Array.isArray(pt)&&!Le.isValidElement(pt)}function $t(pt,xt,nn,ln,Hn,bn){var ai=Le.useContext(Ut),si=be(),qn=(0,Dt.Z)(function(){if(Ln(ln))return[ln];var Mi=xt==null||xt===""?[]:Array.isArray(xt)?xt:[xt],Di=(0,ht.Z)(pt,Mi),Ni=Di,gr=void 0;if(Hn){var dr=Hn(Di,pt,nn);Nn(dr)?(Ni=dr.children,gr=dr.props,ai.renderWithProps=!0):Ni=dr}return[Ni,gr]},[si,pt,ln,xt,Hn,nn],function(Mi,Di){if(bn){var Ni=(0,Ke.Z)(Mi,2),gr=Ni[1],dr=(0,Ke.Z)(Di,2),nr=dr[1];return bn(nr,gr)}return ai.renderWithProps?!0:!(0,_e.Z)(Mi,Di,!0)});return qn}function rn(pt,xt,nn,ln){var Hn=pt+xt-1;return pt<=ln&&Hn>=nn}function An(pt,xt){return Xe(Ae,function(nn){var ln=rn(pt,xt||1,nn.hoverStartRow,nn.hoverEndRow);return[ln,nn.onHover]})}var ti=function(xt){var nn=xt.ellipsis,ln=xt.rowType,Hn=xt.children,bn,ai=nn===!0?{showTitle:!0}:nn;return ai&&(ai.showTitle||ln==="header")&&(typeof Hn=="string"||typeof Hn=="number"?bn=Hn.toString():Le.isValidElement(Hn)&&typeof Hn.props.children=="string"&&(bn=Hn.props.children)),bn};function xn(pt){var xt,nn,ln,Hn,bn,ai,si,qn,Mi=pt.component,Di=pt.children,Ni=pt.ellipsis,gr=pt.scope,dr=pt.prefixCls,nr=pt.className,Kr=pt.align,sr=pt.record,Rr=pt.render,Tr=pt.dataIndex,to=pt.renderIndex,mo=pt.shouldCellUpdate,To=pt.index,Vr=pt.rowType,po=pt.colSpan,Xo=pt.rowSpan,Jr=pt.fixLeft,lo=pt.fixRight,Qr=pt.firstFixLeft,br=pt.lastFixLeft,oo=pt.firstFixRight,Mo=pt.lastFixRight,zo=pt.appendNode,Ho=pt.additionalProps,Ur=Ho===void 0?{}:Ho,Yo=pt.isSticky,na="".concat(dr,"-cell"),Ta=Xe(Ae,["supportSticky","allColumnsFixedLeft"]),ma=Ta.supportSticky,ds=Ta.allColumnsFixedLeft,ja=$t(sr,Tr,to,Di,Rr,mo),ta=(0,Ke.Z)(ja,2),Fo=ta[0],xa=ta[1],hs={},Qa=typeof Jr=="number"&&ma,Ns=typeof lo=="number"&&ma;Qa&&(hs.position="sticky",hs.left=Jr),Ns&&(hs.position="sticky",hs.right=lo);var Wo=(xt=(nn=(ln=xa==null?void 0:xa.colSpan)!==null&&ln!==void 0?ln:Ur.colSpan)!==null&&nn!==void 0?nn:po)!==null&&xt!==void 0?xt:1,Oo=(Hn=(bn=(ai=xa==null?void 0:xa.rowSpan)!==null&&ai!==void 0?ai:Ur.rowSpan)!==null&&bn!==void 0?bn:Xo)!==null&&Hn!==void 0?Hn:1,Zo=An(To,Oo),xo=(0,Ke.Z)(Zo,2),Aa=xo[0],vo=xo[1],Jo=function(Fs){var Ws;sr&&vo(To,To+Oo-1),Ur==null||(Ws=Ur.onMouseEnter)===null||Ws===void 0||Ws.call(Ur,Fs)},ga=function(Fs){var Ws;sr&&vo(-1,-1),Ur==null||(Ws=Ur.onMouseLeave)===null||Ws===void 0||Ws.call(Ur,Fs)};if(Wo===0||Oo===0)return null;var va=(si=Ur.title)!==null&&si!==void 0?si:ti({rowType:Vr,ellipsis:Ni,children:Fo}),Us=nt()(na,nr,(qn={},(0,He.Z)(qn,"".concat(na,"-fix-left"),Qa&&ma),(0,He.Z)(qn,"".concat(na,"-fix-left-first"),Qr&&ma),(0,He.Z)(qn,"".concat(na,"-fix-left-last"),br&&ma),(0,He.Z)(qn,"".concat(na,"-fix-left-all"),br&&ds&&ma),(0,He.Z)(qn,"".concat(na,"-fix-right"),Ns&&ma),(0,He.Z)(qn,"".concat(na,"-fix-right-first"),oo&&ma),(0,He.Z)(qn,"".concat(na,"-fix-right-last"),Mo&&ma),(0,He.Z)(qn,"".concat(na,"-ellipsis"),Ni),(0,He.Z)(qn,"".concat(na,"-with-append"),zo),(0,He.Z)(qn,"".concat(na,"-fix-sticky"),(Qa||Ns)&&Yo&&ma),(0,He.Z)(qn,"".concat(na,"-row-hover"),!xa&&Aa),qn),Ur.className,xa==null?void 0:xa.className),Zs={};Kr&&(Zs.textAlign=Kr);var cl=(0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)({},hs),Ur.style),Zs),xa==null?void 0:xa.style),ka=Fo;return(0,qe.Z)(ka)==="object"&&!Array.isArray(ka)&&!Le.isValidElement(ka)&&(ka=null),Ni&&(br||oo)&&(ka=Le.createElement("span",{className:"".concat(na,"-content")},ka)),Le.createElement(Mi,(0,Et.Z)({},xa,Ur,{className:Us,style:cl,title:va,scope:gr,onMouseEnter:Jo,onMouseLeave:ga,colSpan:Wo!==1?Wo:null,rowSpan:Oo!==1?Oo:null}),zo,ka)}var Qn=Le.memo(xn);function Ot(pt,xt,nn,ln,Hn,bn){var ai=nn[pt]||{},si=nn[xt]||{},qn,Mi;ai.fixed==="left"?qn=ln.left[Hn==="rtl"?xt:pt]:si.fixed==="right"&&(Mi=ln.right[Hn==="rtl"?pt:xt]);var Di=!1,Ni=!1,gr=!1,dr=!1,nr=nn[xt+1],Kr=nn[pt-1],sr=!(bn!=null&&bn.children);if(Hn==="rtl"){if(qn!==void 0){var Rr=Kr&&Kr.fixed==="left";dr=!Rr&&sr}else if(Mi!==void 0){var Tr=nr&&nr.fixed==="right";gr=!Tr&&sr}}else if(qn!==void 0){var to=nr&&nr.fixed==="left";Di=!to&&sr}else if(Mi!==void 0){var mo=Kr&&Kr.fixed==="right";Ni=!mo&&sr}return{fixLeft:qn,fixRight:Mi,lastFixLeft:Di,firstFixRight:Ni,lastFixRight:gr,firstFixLeft:dr,isSticky:ln.isSticky}}var Cn=Le.createContext({}),Wn=Cn;function We(pt){var xt=pt.className,nn=pt.index,ln=pt.children,Hn=pt.colSpan,bn=Hn===void 0?1:Hn,ai=pt.rowSpan,si=pt.align,qn=Xe(Ae,["prefixCls","direction"]),Mi=qn.prefixCls,Di=qn.direction,Ni=Le.useContext(Wn),gr=Ni.scrollColumnIndex,dr=Ni.stickyOffsets,nr=Ni.flattenColumns,Kr=Ni.columns,sr=nn+bn-1,Rr=sr+1===gr?bn+1:bn,Tr=Ot(nn,nn+Rr-1,nr,dr,Di,Kr==null?void 0:Kr[nn]);return Le.createElement(Qn,(0,Et.Z)({className:xt,index:nn,component:"td",prefixCls:Mi,record:null,dataIndex:null,align:si,colSpan:Rr,rowSpan:ai,render:function(){return ln}},Tr))}var Ee=pe(37061),Pe=["children"];function De(pt){var xt=pt.children,nn=(0,Ee.Z)(pt,Pe);return Le.createElement("tr",nn,xt)}function Fe(pt){var xt=pt.children;return xt}Fe.Row=De,Fe.Cell=We;var ye=Fe;function Qe(pt){var xt=pt.children,nn=pt.stickyOffsets,ln=pt.flattenColumns,Hn=pt.columns,bn=Xe(Ae,"prefixCls"),ai=ln.length-1,si=ln[ai],qn=Le.useMemo(function(){return{stickyOffsets:nn,flattenColumns:ln,scrollColumnIndex:si!=null&&si.scrollbar?ai:null,columns:Hn}},[si,ln,ai,nn,Hn]);return Le.createElement(Wn.Provider,{value:qn},Le.createElement("tfoot",{className:"".concat(bn,"-summary")},xt))}var vt=ve(Qe),Ye=ye,Je=pe(70425),yt=pe(29301),St=pe(29194),rt=pe(24514),Zt=pe(75152),dn=pe(26112);function mn(pt,xt,nn,ln,Hn,bn,ai){pt.push({record:xt,indent:nn,index:ai});var si=bn(xt),qn=Hn==null?void 0:Hn.has(si);if(xt&&Array.isArray(xt[ln])&&qn)for(var Mi=0;Mi<xt[ln].length;Mi+=1)mn(pt,xt[ln][Mi],nn+1,ln,Hn,bn,Mi)}function qt(pt,xt,nn,ln){var Hn=Le.useMemo(function(){if(nn!=null&&nn.size){for(var bn=[],ai=0;ai<(pt==null?void 0:pt.length);ai+=1){var si=pt[ai];mn(bn,si,0,xt,nn,ln,ai)}return bn}return pt==null?void 0:pt.map(function(qn,Mi){return{record:qn,indent:0,index:Mi}})},[pt,xt,nn,ln]);return Hn}function Gn(pt){var xt=pt.prefixCls,nn=pt.children,ln=pt.component,Hn=pt.cellComponent,bn=pt.className,ai=pt.expanded,si=pt.colSpan,qn=pt.isEmpty,Mi=Xe(Ae,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Di=Mi.scrollbarSize,Ni=Mi.fixHeader,gr=Mi.fixColumn,dr=Mi.componentWidth,nr=Mi.horizonScroll,Kr=nn;return(qn?nr&&dr:gr)&&(Kr=Le.createElement("div",{style:{width:dr-(Ni?Di:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(xt,"-expanded-row-fixed")},Kr)),Le.createElement(ln,{className:bn,style:{display:ai?null:"none"}},Le.createElement(Qn,{component:Hn,prefixCls:xt,colSpan:si},Kr))}var Kn=Gn;function Nt(pt,xt,nn,ln){var Hn=Xe(Ae,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),bn=Hn.flattenColumns,ai=Hn.expandableType,si=Hn.expandedKeys,qn=Hn.childrenColumnName,Mi=Hn.onTriggerExpand,Di=Hn.rowExpandable,Ni=Hn.onRow,gr=Hn.expandRowByClick,dr=Hn.rowClassName,nr=ai==="nest",Kr=ai==="row"&&(!Di||Di(pt)),sr=Kr||nr,Rr=si&&si.has(xt),Tr=qn&&pt&&pt[qn],to=(0,Je.useEvent)(Mi),mo=Ni==null?void 0:Ni(pt,nn),To=mo==null?void 0:mo.onClick,Vr=function(lo){gr&&sr&&Mi(pt,lo);for(var Qr=arguments.length,br=new Array(Qr>1?Qr-1:0),oo=1;oo<Qr;oo++)br[oo-1]=arguments[oo];To==null||To.apply(void 0,[lo].concat(br))},po;typeof dr=="string"?po=dr:typeof dr=="function"&&(po=dr(pt,nn,ln));var Xo=Wt(bn);return(0,bt.Z)((0,bt.Z)({},Hn),{},{columnsKey:Xo,nestExpandable:nr,expanded:Rr,hasNestChildren:Tr,record:pt,onTriggerExpand:to,rowSupportExpand:Kr,expandable:sr,rowProps:(0,bt.Z)((0,bt.Z)({},mo),{},{className:nt()(po,mo==null?void 0:mo.className),onClick:Vr})})}function sn(pt,xt,nn,ln,Hn){var bn=pt.record,ai=pt.prefixCls,si=pt.columnsKey,qn=pt.fixedInfoList,Mi=pt.expandIconColumnIndex,Di=pt.nestExpandable,Ni=pt.indentSize,gr=pt.expandIcon,dr=pt.expanded,nr=pt.hasNestChildren,Kr=pt.onTriggerExpand,sr=si[nn],Rr=qn[nn],Tr;nn===(Mi||0)&&Di&&(Tr=Le.createElement(Le.Fragment,null,Le.createElement("span",{style:{paddingLeft:"".concat(Ni*ln,"px")},className:"".concat(ai,"-row-indent indent-level-").concat(ln)}),gr({prefixCls:ai,expanded:dr,expandable:nr,record:bn,onExpand:Kr})));var to;return xt.onCell&&(to=xt.onCell(bn,Hn)),{key:sr,fixedInfo:Rr,appendCellNode:Tr,additionalCellProps:to||{}}}function Fn(pt){var xt=pt.className,nn=pt.style,ln=pt.record,Hn=pt.index,bn=pt.renderIndex,ai=pt.rowKey,si=pt.indent,qn=si===void 0?0:si,Mi=pt.rowComponent,Di=pt.cellComponent,Ni=pt.scopeCellComponent,gr=Nt(ln,ai,Hn,qn),dr=gr.prefixCls,nr=gr.flattenColumns,Kr=gr.expandedRowClassName,sr=gr.expandedRowRender,Rr=gr.rowProps,Tr=gr.expanded,to=gr.rowSupportExpand,mo=Le.useState(!1),To=(0,Ke.Z)(mo,2),Vr=To[0],po=To[1];Le.useEffect(function(){Tr&&po(!0)},[Tr]);var Xo=Le.createElement(Mi,(0,Et.Z)({},Rr,{"data-row-key":ai,className:nt()(xt,"".concat(dr,"-row"),"".concat(dr,"-row-level-").concat(qn),Rr==null?void 0:Rr.className),style:(0,bt.Z)((0,bt.Z)({},nn),Rr==null?void 0:Rr.style)}),nr.map(function(br,oo){var Mo=br.render,zo=br.dataIndex,Ho=br.className,Ur=sn(gr,br,oo,qn,Hn),Yo=Ur.key,na=Ur.fixedInfo,Ta=Ur.appendCellNode,ma=Ur.additionalCellProps;return Le.createElement(Qn,(0,Et.Z)({className:Ho,ellipsis:br.ellipsis,align:br.align,scope:br.rowScope,component:br.rowScope?Ni:Di,prefixCls:dr,key:Yo,record:ln,index:Hn,renderIndex:bn,dataIndex:zo,render:Mo,shouldCellUpdate:br.shouldCellUpdate},na,{appendNode:Ta,additionalProps:ma}))})),Jr;if(to&&(Vr||Tr)){var lo=sr(ln,Hn,qn+1,Tr),Qr=Kr&&Kr(ln,Hn,qn);Jr=Le.createElement(Kn,{expanded:Tr,className:nt()("".concat(dr,"-expanded-row"),"".concat(dr,"-expanded-row-level-").concat(qn+1),Qr),prefixCls:dr,component:Mi,cellComponent:Di,colSpan:nr.length,isEmpty:!1},lo)}return Le.createElement(Le.Fragment,null,Xo,Jr)}Fn.displayName="BodyRow";var hn=ve(Fn);function Mn(pt){var xt=pt.columnKey,nn=pt.onColumnResize,ln=Le.useRef();return Le.useEffect(function(){ln.current&&nn(xt,ln.current.offsetWidth)},[]),Le.createElement(yt.Z,{data:xt},Le.createElement("td",{ref:ln,style:{padding:0,border:0,height:0}},Le.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function li(pt){var xt=pt.prefixCls,nn=pt.columnsKey,ln=pt.onColumnResize;return Le.createElement("tr",{"aria-hidden":"true",className:"".concat(xt,"-measure-row"),style:{height:0,fontSize:0}},Le.createElement(yt.Z.Collection,{onBatchResize:function(bn){bn.forEach(function(ai){var si=ai.data,qn=ai.size;ln(si,qn.offsetWidth)})}},nn.map(function(Hn){return Le.createElement(Mn,{key:Hn,columnKey:Hn,onColumnResize:ln})})))}function pi(pt){var xt=pt.data,nn=pt.measureColumnWidth,ln=Xe(Ae,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Hn=ln.prefixCls,bn=ln.getComponent,ai=ln.onColumnResize,si=ln.flattenColumns,qn=ln.getRowKey,Mi=ln.expandedKeys,Di=ln.childrenColumnName,Ni=ln.emptyNode,gr=qt(xt,Di,Mi,qn),dr=Le.useRef({renderWithProps:!1}),nr=bn(["body","wrapper"],"tbody"),Kr=bn(["body","row"],"tr"),sr=bn(["body","cell"],"td"),Rr=bn(["body","cell"],"th"),Tr;xt.length?Tr=gr.map(function(mo,To){var Vr=mo.record,po=mo.indent,Xo=mo.index,Jr=qn(Vr,To);return Le.createElement(hn,{key:Jr,rowKey:Jr,record:Vr,index:To,renderIndex:Xo,rowComponent:Kr,cellComponent:sr,scopeCellComponent:Rr,getRowKey:qn,indent:po})}):Tr=Le.createElement(Kn,{expanded:!0,className:"".concat(Hn,"-placeholder"),prefixCls:Hn,component:Kr,cellComponent:sr,colSpan:si.length,isEmpty:!0},Ni);var to=Wt(si);return Le.createElement(Ut.Provider,{value:dr.current},Le.createElement(nr,{className:"".concat(Hn,"-tbody")},nn&&Le.createElement(li,{prefixCls:Hn,columnsKey:to,onColumnResize:ai}),Tr))}pi.displayName="Body";var mi=ve(pi),Li=["expandable"],Gi="RC_TABLE_INTERNAL_COL_DEFINE";function ar(pt){var xt=pt.expandable,nn=(0,Ee.Z)(pt,Li),ln;return"expandable"in pt?ln=(0,bt.Z)((0,bt.Z)({},nn),xt):ln=nn,ln.showExpandColumn===!1&&(ln.expandIconColumnIndex=-1),ln}var Xi=["columnType"];function wr(pt){for(var xt=pt.colWidths,nn=pt.columns,ln=pt.columCount,Hn=[],bn=ln||nn.length,ai=!1,si=bn-1;si>=0;si-=1){var qn=xt[si],Mi=nn&&nn[si],Di=Mi&&Mi[Gi];if(qn||Di||ai){var Ni=Di||{},gr=Ni.columnType,dr=(0,Ee.Z)(Ni,Xi);Hn.unshift(Le.createElement("col",(0,Et.Z)({key:si,style:{width:qn}},dr))),ai=!0}}return Le.createElement("colgroup",null,Hn)}var vr=wr,ji=pe(26407),Lr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function jn(pt,xt){return(0,Le.useMemo)(function(){for(var nn=[],ln=0;ln<xt;ln+=1){var Hn=pt[ln];if(Hn!==void 0)nn[ln]=Hn;else return null}return nn},[pt.join("_"),xt])}var Ne=Le.forwardRef(function(pt,xt){var nn=pt.className,ln=pt.noData,Hn=pt.columns,bn=pt.flattenColumns,ai=pt.colWidths,si=pt.columCount,qn=pt.stickyOffsets,Mi=pt.direction,Di=pt.fixHeader,Ni=pt.stickyTopOffset,gr=pt.stickyBottomOffset,dr=pt.stickyClassName,nr=pt.onScroll,Kr=pt.maxContentScroll,sr=pt.children,Rr=(0,Ee.Z)(pt,Lr),Tr=Xe(Ae,["prefixCls","scrollbarSize","isSticky"]),to=Tr.prefixCls,mo=Tr.scrollbarSize,To=Tr.isSticky,Vr=To&&!Di?0:mo,po=Le.useRef(null),Xo=Le.useCallback(function(Ho){(0,ct.mH)(xt,Ho),(0,ct.mH)(po,Ho)},[]);Le.useEffect(function(){var Ho;function Ur(Yo){var na=Yo,Ta=na.currentTarget,ma=na.deltaX;ma&&(nr({currentTarget:Ta,scrollLeft:Ta.scrollLeft+ma}),Yo.preventDefault())}return(Ho=po.current)===null||Ho===void 0||Ho.addEventListener("wheel",Ur),function(){var Yo;(Yo=po.current)===null||Yo===void 0||Yo.removeEventListener("wheel",Ur)}},[]);var Jr=Le.useMemo(function(){return bn.every(function(Ho){return Ho.width})},[bn]),lo=bn[bn.length-1],Qr={fixed:lo?lo.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(to,"-cell-scrollbar")}}},br=(0,Le.useMemo)(function(){return Vr?[].concat((0,ji.Z)(Hn),[Qr]):Hn},[Vr,Hn]),oo=(0,Le.useMemo)(function(){return Vr?[].concat((0,ji.Z)(bn),[Qr]):bn},[Vr,bn]),Mo=(0,Le.useMemo)(function(){var Ho=qn.right,Ur=qn.left;return(0,bt.Z)((0,bt.Z)({},qn),{},{left:Mi==="rtl"?[].concat((0,ji.Z)(Ur.map(function(Yo){return Yo+Vr})),[0]):Ur,right:Mi==="rtl"?Ho:[].concat((0,ji.Z)(Ho.map(function(Yo){return Yo+Vr})),[0]),isSticky:To})},[Vr,qn,To]),zo=jn(ai,si);return Le.createElement("div",{style:(0,bt.Z)({overflow:"hidden"},To?{top:Ni,bottom:gr}:{}),ref:Xo,className:nt()(nn,(0,He.Z)({},dr,!!dr))},Le.createElement("table",{style:{tableLayout:"fixed",visibility:ln||zo?null:"hidden"}},(!ln||!Kr||Jr)&&Le.createElement(vr,{colWidths:zo?[].concat((0,ji.Z)(zo),[Vr]):[],columCount:si+1,columns:oo}),sr((0,bt.Z)((0,bt.Z)({},Rr),{},{stickyOffsets:Mo,columns:br,flattenColumns:oo}))))});Ne.displayName="FixedHolder";var Ei=Le.memo(Ne);function Oi(pt){var xt=pt.cells,nn=pt.stickyOffsets,ln=pt.flattenColumns,Hn=pt.rowComponent,bn=pt.cellComponent,ai=pt.tdCellComponent,si=pt.onHeaderRow,qn=pt.index,Mi=Xe(Ae,["prefixCls","direction"]),Di=Mi.prefixCls,Ni=Mi.direction,gr;si&&(gr=si(xt.map(function(nr){return nr.column}),qn));var dr=Wt(xt.map(function(nr){return nr.column}));return Le.createElement(Hn,gr,xt.map(function(nr,Kr){var sr=nr.column,Rr=Ot(nr.colStart,nr.colEnd,ln,nn,Ni,sr),Tr;return sr&&sr.onHeaderCell&&(Tr=nr.column.onHeaderCell(sr)),Le.createElement(Qn,(0,Et.Z)({},nr,{scope:sr.title?nr.colSpan>1?"colgroup":"col":null,ellipsis:sr.ellipsis,align:sr.align,component:sr.title?bn:ai,prefixCls:Di,key:dr[Kr]},Rr,{additionalProps:Tr,rowType:"header"}))}))}Oi.displayName="HeaderRow";var on=Oi;function ui(pt){var xt=[];function nn(ai,si){var qn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;xt[qn]=xt[qn]||[];var Mi=si,Di=ai.filter(Boolean).map(function(Ni){var gr={key:Ni.key,className:Ni.className||"",children:Ni.title,column:Ni,colStart:Mi},dr=1,nr=Ni.children;return nr&&nr.length>0&&(dr=nn(nr,Mi,qn+1).reduce(function(Kr,sr){return Kr+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,xt[qn].push(gr),Mi+=dr,dr});return Di}nn(pt,0);for(var ln=xt.length,Hn=function(si){xt[si].forEach(function(qn){!("rowSpan"in qn)&&!qn.hasSubColumns&&(qn.rowSpan=ln-si)})},bn=0;bn<ln;bn+=1)Hn(bn);return xt}function vi(pt){var xt=pt.stickyOffsets,nn=pt.columns,ln=pt.flattenColumns,Hn=pt.onHeaderRow,bn=Xe(Ae,["prefixCls","getComponent"]),ai=bn.prefixCls,si=bn.getComponent,qn=Le.useMemo(function(){return ui(nn)},[nn]),Mi=si(["header","wrapper"],"thead"),Di=si(["header","row"],"tr"),Ni=si(["header","cell"],"th"),gr=si(["header","cell"],"td");return Le.createElement(Mi,{className:"".concat(ai,"-thead")},qn.map(function(dr,nr){var Kr=Le.createElement(on,{key:nr,flattenColumns:ln,cells:dr,stickyOffsets:xt,rowComponent:Di,cellComponent:Ni,tdCellComponent:gr,onHeaderRow:Hn,index:nr});return Kr}))}var bi=ve(vi),In=pe(11592);function Gt(pt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof xt=="number"?xt:xt.endsWith("%")?pt*parseFloat(xt)/100:null}function Kt(pt,xt){return Le.useMemo(function(){if(xt&&xt>0){var nn=0,ln=0;pt.forEach(function(Mi){var Di=Gt(xt,Mi.width);Di?nn+=Di:ln+=1});var Hn=xt-nn,bn=ln,ai=Hn/ln,si=0,qn=pt.map(function(Mi){var Di=(0,bt.Z)({},Mi),Ni=Gt(xt,Di.width);if(Ni)Di.width=Ni;else{var gr=Math.floor(ai);Di.width=bn===1?Hn:gr,Hn-=gr,bn-=1}return si+=Di.width,Di});return[qn,si]}return[pt,xt]},[pt,xt])}var jt=["children"],ft=["fixed"];function an(pt){return(0,In.Z)(pt).filter(function(xt){return Le.isValidElement(xt)}).map(function(xt){var nn=xt.key,ln=xt.props,Hn=ln.children,bn=(0,Ee.Z)(ln,jt),ai=(0,bt.Z)({key:nn},bn);return Hn&&(ai.children=an(Hn)),ai})}function vn(pt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return pt.filter(function(nn){return nn&&(0,qe.Z)(nn)==="object"}).reduce(function(nn,ln,Hn){var bn=ln.fixed,ai=bn===!0?"left":bn,si="".concat(xt,"-").concat(Hn),qn=ln.children;return qn&&qn.length>0?[].concat((0,ji.Z)(nn),(0,ji.Z)(vn(qn,si).map(function(Mi){return(0,bt.Z)({fixed:ai},Mi)}))):[].concat((0,ji.Z)(nn),[(0,bt.Z)((0,bt.Z)({key:si},ln),{},{fixed:ai})])},[])}function Bt(pt){for(var xt=!0,nn=0;nn<pt.length;nn+=1){var ln=pt[nn];if(xt&&ln.fixed!=="left")xt=!1;else if(!xt&&ln.fixed==="left"){warning(!1,"Index ".concat(nn-1," of `columns` missing `fixed='left'` prop."));break}}for(var Hn=!0,bn=pt.length-1;bn>=0;bn-=1){var ai=pt[bn];if(Hn&&ai.fixed!=="right")Hn=!1;else if(!Hn&&ai.fixed==="right"){warning(!1,"Index ".concat(bn+1," of `columns` missing `fixed='right'` prop."));break}}}function at(pt){return pt.map(function(xt){var nn=xt.fixed,ln=(0,Ee.Z)(xt,ft),Hn=nn;return nn==="left"?Hn="right":nn==="right"&&(Hn="left"),(0,bt.Z)({fixed:Hn},ln)})}function cn(pt,xt){var nn=pt.prefixCls,ln=pt.columns,Hn=pt.children,bn=pt.expandable,ai=pt.expandedKeys,si=pt.columnTitle,qn=pt.getRowKey,Mi=pt.onTriggerExpand,Di=pt.expandIcon,Ni=pt.rowExpandable,gr=pt.expandIconColumnIndex,dr=pt.direction,nr=pt.expandRowByClick,Kr=pt.columnWidth,sr=pt.fixed,Rr=pt.scrollWidth,Tr=Le.useMemo(function(){return ln||an(Hn)},[ln,Hn]),to=Le.useMemo(function(){if(bn){var lo,Qr=Tr.slice();if(!Qr.includes(ge)){var br=gr||0;br>=0&&Qr.splice(br,0,ge)}var oo=Qr.indexOf(ge);Qr=Qr.filter(function(Ur,Yo){return Ur!==ge||Yo===oo});var Mo=Tr[oo],zo;(sr==="left"||sr)&&!gr?zo="left":(sr==="right"||sr)&&gr===Tr.length?zo="right":zo=Mo?Mo.fixed:null;var Ho=(lo={},(0,He.Z)(lo,Gi,{className:"".concat(nn,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,He.Z)(lo,"title",si),(0,He.Z)(lo,"fixed",zo),(0,He.Z)(lo,"className","".concat(nn,"-row-expand-icon-cell")),(0,He.Z)(lo,"width",Kr),(0,He.Z)(lo,"render",function(Yo,na,Ta){var ma=qn(na,Ta),ds=ai.has(ma),ja=Ni?Ni(na):!0,ta=Di({prefixCls:nn,expanded:ds,expandable:ja,record:na,onExpand:Mi});return nr?Le.createElement("span",{onClick:function(xa){return xa.stopPropagation()}},ta):ta}),lo);return Qr.map(function(Ur){return Ur===ge?Ho:Ur})}return Tr.filter(function(Ur){return Ur!==ge})},[bn,Tr,qn,ai,Di,dr]),mo=Le.useMemo(function(){var lo=to;return xt&&(lo=xt(lo)),lo.length||(lo=[{render:function(){return null}}]),lo},[xt,to,dr]),To=Le.useMemo(function(){return dr==="rtl"?at(vn(mo)):vn(mo)},[mo,dr,Rr]),Vr=Kt(To,Rr),po=(0,Ke.Z)(Vr,2),Xo=po[0],Jr=po[1];return[mo,Xo,Jr]}var Sn=cn;function Un(pt){var xt,nn=pt.prefixCls,ln=pt.record,Hn=pt.onExpand,bn=pt.expanded,ai=pt.expandable,si="".concat(nn,"-row-expand-icon");if(!ai)return Le.createElement("span",{className:nt()(si,"".concat(nn,"-row-spaced"))});var qn=function(Di){Hn(ln,Di),Di.stopPropagation()};return Le.createElement("span",{className:nt()(si,(xt={},(0,He.Z)(xt,"".concat(nn,"-row-expanded"),bn),(0,He.Z)(xt,"".concat(nn,"-row-collapsed"),!bn),xt)),onClick:qn})}function un(pt,xt,nn){var ln=[];function Hn(bn){(bn||[]).forEach(function(ai,si){ln.push(xt(ai,si)),Hn(ai[nn])})}return Hn(pt),ln}function Rt(pt,xt,nn){var ln=ar(pt),Hn=ln.expandIcon,bn=ln.expandedRowKeys,ai=ln.defaultExpandedRowKeys,si=ln.defaultExpandAllRows,qn=ln.expandedRowRender,Mi=ln.onExpand,Di=ln.onExpandedRowsChange,Ni=ln.childrenColumnName,gr=Hn||Un,dr=Ni||"children",nr=Le.useMemo(function(){return qn?"row":pt.expandable&&pt.internalHooks===Oe&&pt.expandable.__PARENT_RENDER_ICON__||xt.some(function(To){return To&&(0,qe.Z)(To)==="object"&&To[dr]})?"nest":!1},[!!qn,xt]),Kr=Le.useState(function(){return ai||(si?un(xt,nn,dr):[])}),sr=(0,Ke.Z)(Kr,2),Rr=sr[0],Tr=sr[1],to=Le.useMemo(function(){return new Set(bn||Rr||[])},[bn,Rr]),mo=Le.useCallback(function(To){var Vr=nn(To,xt.indexOf(To)),po,Xo=to.has(Vr);Xo?(to.delete(Vr),po=(0,ji.Z)(to)):po=[].concat((0,ji.Z)(to),[Vr]),Tr(po),Mi&&Mi(!Xo,To),Di&&Di(po)},[nn,to,xt,Mi,Di]);return[ln,nr,to,gr,dr,mo]}function zn(pt,xt,nn,ln){var Hn=pt.map(function(bn,ai){return Ot(ai,ai,pt,xt,nn,ln==null?void 0:ln[ai])});return(0,Dt.Z)(function(){return Hn},[Hn],function(bn,ai){return!(0,_e.Z)(bn,ai)})}function ni(pt){var xt=(0,Le.useRef)(pt),nn=(0,Le.useState)({}),ln=(0,Ke.Z)(nn,2),Hn=ln[1],bn=(0,Le.useRef)(null),ai=(0,Le.useRef)([]);function si(qn){ai.current.push(qn);var Mi=Promise.resolve();bn.current=Mi,Mi.then(function(){if(bn.current===Mi){var Di=ai.current,Ni=xt.current;ai.current=[],Di.forEach(function(gr){xt.current=gr(xt.current)}),bn.current=null,Ni!==xt.current&&Hn({})}})}return(0,Le.useEffect)(function(){return function(){bn.current=null}},[]),[xt.current,si]}function gi(pt){var xt=(0,Le.useRef)(pt||null),nn=(0,Le.useRef)();function ln(){window.clearTimeout(nn.current)}function Hn(ai){xt.current=ai,ln(),nn.current=window.setTimeout(function(){xt.current=null,nn.current=void 0},100)}function bn(){return xt.current}return(0,Le.useEffect)(function(){return ln},[]),[Hn,bn]}function tn(){var pt=Le.useState(-1),xt=(0,Ke.Z)(pt,2),nn=xt[0],ln=xt[1],Hn=Le.useState(-1),bn=(0,Ke.Z)(Hn,2),ai=bn[0],si=bn[1],qn=Le.useCallback(function(Mi,Di){ln(Mi),si(Di)},[]);return[nn,ai,qn]}var Bn=pe(47273),Ft=(0,Bn.Z)()?window:null;function wn(pt,xt){var nn=(0,qe.Z)(pt)==="object"?pt:{},ln=nn.offsetHeader,Hn=ln===void 0?0:ln,bn=nn.offsetSummary,ai=bn===void 0?0:bn,si=nn.offsetScroll,qn=si===void 0?0:si,Mi=nn.getContainer,Di=Mi===void 0?function(){return Ft}:Mi,Ni=Di()||Ft;return Le.useMemo(function(){var gr=!!pt;return{isSticky:gr,stickyClassName:gr?"".concat(xt,"-sticky-holder"):"",offsetHeader:Hn,offsetSummary:ai,offsetScroll:qn,container:Ni}},[qn,Hn,ai,xt,Ni])}function gn(pt,xt,nn){var ln=(0,Le.useMemo)(function(){for(var Hn=[],bn=[],ai=0,si=0,qn=0;qn<xt;qn+=1)if(nn==="rtl"){bn[qn]=si,si+=pt[qn]||0;var Mi=xt-qn-1;Hn[Mi]=ai,ai+=pt[Mi]||0}else{Hn[qn]=ai,ai+=pt[qn]||0;var Di=xt-qn-1;bn[Di]=si,si+=pt[Di]||0}return{left:Hn,right:bn}},[pt,xt,nn]);return ln}var yn=gn;function On(pt){var xt=pt.className,nn=pt.children;return Le.createElement("div",{className:xt},nn)}var $n=On,Yn=pe(8224),ii=pe(55468),Xn=function(xt,nn){var ln,Hn,bn=xt.scrollBodyRef,ai=xt.onScroll,si=xt.offsetScroll,qn=xt.container,Mi=Xe(Ae,"prefixCls"),Di=((ln=bn.current)===null||ln===void 0?void 0:ln.scrollWidth)||0,Ni=((Hn=bn.current)===null||Hn===void 0?void 0:Hn.clientWidth)||0,gr=Di&&Ni*(Ni/Di),dr=Le.useRef(),nr=ni({scrollLeft:0,isHiddenScrollBar:!1}),Kr=(0,Ke.Z)(nr,2),sr=Kr[0],Rr=Kr[1],Tr=Le.useRef({delta:0,x:0}),to=Le.useState(!1),mo=(0,Ke.Z)(to,2),To=mo[0],Vr=mo[1],po=function(){Vr(!1)},Xo=function(oo){oo.persist(),Tr.current.delta=oo.pageX-sr.scrollLeft,Tr.current.x=0,Vr(!0),oo.preventDefault()},Jr=function(oo){var Mo,zo=oo||((Mo=window)===null||Mo===void 0?void 0:Mo.event),Ho=zo.buttons;if(!To||Ho===0){To&&Vr(!1);return}var Ur=Tr.current.x+oo.pageX-Tr.current.x-Tr.current.delta;Ur<=0&&(Ur=0),Ur+gr>=Ni&&(Ur=Ni-gr),ai({scrollLeft:Ur/Ni*(Di+2)}),Tr.current.x=oo.pageX},lo=function(){if(bn.current){var oo=(0,ii.os)(bn.current).top,Mo=oo+bn.current.offsetHeight,zo=qn===window?document.documentElement.scrollTop+window.innerHeight:(0,ii.os)(qn).top+qn.clientHeight;Mo-(0,Zt.Z)()<=zo||oo>=zo-si?Rr(function(Ho){return(0,bt.Z)((0,bt.Z)({},Ho),{},{isHiddenScrollBar:!0})}):Rr(function(Ho){return(0,bt.Z)((0,bt.Z)({},Ho),{},{isHiddenScrollBar:!1})})}},Qr=function(oo){Rr(function(Mo){return(0,bt.Z)((0,bt.Z)({},Mo),{},{scrollLeft:oo/Di*Ni||0})})};return Le.useImperativeHandle(nn,function(){return{setScrollLeft:Qr}}),Le.useEffect(function(){var br=(0,Yn.Z)(document.body,"mouseup",po,!1),oo=(0,Yn.Z)(document.body,"mousemove",Jr,!1);return lo(),function(){br.remove(),oo.remove()}},[gr,To]),Le.useEffect(function(){var br=(0,Yn.Z)(qn,"scroll",lo,!1),oo=(0,Yn.Z)(window,"resize",lo,!1);return function(){br.remove(),oo.remove()}},[qn]),Le.useEffect(function(){sr.isHiddenScrollBar||Rr(function(br){var oo=bn.current;return oo?(0,bt.Z)((0,bt.Z)({},br),{},{scrollLeft:oo.scrollLeft/oo.scrollWidth*oo.clientWidth}):br})},[sr.isHiddenScrollBar]),Di<=Ni||!gr||sr.isHiddenScrollBar?null:Le.createElement("div",{style:{height:(0,Zt.Z)(),width:Ni,bottom:si},className:"".concat(Mi,"-sticky-scroll")},Le.createElement("div",{onMouseDown:Xo,ref:dr,className:nt()("".concat(Mi,"-sticky-scroll-bar"),(0,He.Z)({},"".concat(Mi,"-sticky-scroll-bar-active"),To)),style:{width:"".concat(gr,"px"),transform:"translate3d(".concat(sr.scrollLeft,"px, 0, 0)")}}))},di=Le.forwardRef(Xn);function Hi(pt){return null}var $i=Hi;function Wi(pt){return null}var Xt=Wi,Si="rc-table",Ki=[],Ti={};function cr(){return"No Data"}function Qi(pt){var xt,nn=(0,bt.Z)({rowKey:"key",prefixCls:Si,emptyText:cr},pt),ln=nn.prefixCls,Hn=nn.className,bn=nn.rowClassName,ai=nn.style,si=nn.data,qn=nn.rowKey,Mi=nn.scroll,Di=nn.tableLayout,Ni=nn.direction,gr=nn.title,dr=nn.footer,nr=nn.summary,Kr=nn.caption,sr=nn.id,Rr=nn.showHeader,Tr=nn.components,to=nn.emptyText,mo=nn.onRow,To=nn.onHeaderRow,Vr=nn.internalHooks,po=nn.transformColumns,Xo=nn.internalRefs,Jr=nn.tailor,lo=nn.sticky,Qr=si||Ki,br=!!Qr.length,oo=Vr===Oe,Mo=Le.useCallback(function(Pa,ls){return(0,ht.Z)(Tr,Pa)||ls},[Tr]),zo=Le.useMemo(function(){return typeof qn=="function"?qn:function(Pa){var ls=Pa&&Pa[qn];return ls}},[qn]),Ho=Mo(["body"]),Ur=tn(),Yo=(0,Ke.Z)(Ur,3),na=Yo[0],Ta=Yo[1],ma=Yo[2],ds=Rt(nn,Qr,zo),ja=(0,Ke.Z)(ds,6),ta=ja[0],Fo=ja[1],xa=ja[2],hs=ja[3],Qa=ja[4],Ns=ja[5],Wo=Mi==null?void 0:Mi.x,Oo=Le.useState(0),Zo=(0,Ke.Z)(Oo,2),xo=Zo[0],Aa=Zo[1],vo=Sn((0,bt.Z)((0,bt.Z)((0,bt.Z)({},nn),ta),{},{expandable:!!ta.expandedRowRender,columnTitle:ta.columnTitle,expandedKeys:xa,getRowKey:zo,onTriggerExpand:Ns,expandIcon:hs,expandIconColumnIndex:ta.expandIconColumnIndex,direction:Ni,scrollWidth:oo&&Jr&&typeof Wo=="number"?Wo:null}),oo?po:null),Jo=(0,Ke.Z)(vo,3),ga=Jo[0],va=Jo[1],Us=Jo[2],Zs=Us!=null?Us:Wo,cl=Le.useMemo(function(){return{columns:ga,flattenColumns:va}},[ga,va]),ka=Le.useRef(),il=Le.useRef(),Fs=Le.useRef(),Ws=Le.useRef(),uc=Le.useRef(),Ia=Le.useState(!1),$a=(0,Ke.Z)(Ia,2),Oa=$a[0],qa=$a[1],As=Le.useState(!1),da=(0,Ke.Z)(As,2),Xa=da[0],_s=da[1],dl=ni(new Map),hu=(0,Ke.Z)(dl,2),Yl=hu[0],Ds=hu[1],Jl=Wt(va),Ql=Jl.map(function(Pa){return Yl.get(Pa)}),za=Le.useMemo(function(){return Ql},[Ql.join("_")]),rl=yn(za,va.length,Ni),es=Mi&&Ln(Mi.y),Ya=Mi&&Ln(Zs)||!!ta.fixed,fu=Ya&&va.some(function(Pa){var ls=Pa.fixed;return ls}),Pc=Le.useRef(),Nu=wn(lo,ln),Fu=Nu.isSticky,gu=Nu.offsetHeader,ql=Nu.offsetSummary,Da=Nu.offsetScroll,rs=Nu.stickyClassName,Bs=Nu.container,os=Le.useMemo(function(){return nr==null?void 0:nr(Qr)},[nr,Qr]),ba=(es||Fu)&&Le.isValidElement(os)&&os.type===ye&&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=Le.useCallback(function(Pa,ls){(0,St.Z)(ka.current)&&Ds(function(Sl){if(Sl.get(Pa)!==ls){var Au=new Map(Sl);return Au.set(Pa,ls),Au}return Sl})},[]),fn=gi(null),Rc=(0,Ke.Z)(fn,2),Xu=Rc[0],af=Rc[1];function bd(Pa,ls){ls&&(typeof ls=="function"?ls(Pa):ls.scrollLeft!==Pa&&(ls.scrollLeft=Pa,ls.scrollLeft!==Pa&&setTimeout(function(){ls.scrollLeft=Pa},0)))}var Ed=(0,st.Z)(function(Pa){var ls=Pa.currentTarget,Sl=Pa.scrollLeft,Au=Ni==="rtl",Du=typeof Sl=="number"?Sl:ls.scrollLeft,Fd=ls||Ti;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!==xo&&(Dh(),Aa(ka.current?ka.current.offsetWidth:Sl))},Gs=Le.useRef(!1);Le.useEffect(function(){Gs.current&&Dh()},[Ya,si,ga.length]),Le.useEffect(function(){Gs.current=!0},[]);var Qd=Le.useState(0),Md=(0,Ke.Z)(Qd,2),qd=Md[0],sf=Md[1],Zf=Le.useState(!0),eh=(0,Ke.Z)(Zf,2),th=eh[0],pu=eh[1];Le.useEffect(function(){(!Jr||!oo)&&(Fs.current instanceof Element?sf((0,Zt.o)(Fs.current).width):sf((0,Zt.o)(Ws.current).width)),pu((0,rt.G)("position","sticky"))},[]),Le.useEffect(function(){oo&&Xo&&(Xo.body.current=Fs.current)});var Ld=Le.useCallback(function(Pa){return Le.createElement(Le.Fragment,null,Le.createElement(bi,Pa),ba==="top"&&Le.createElement(vt,Pa,os))},[ba,os]),lf=Le.useCallback(function(Pa){return Le.createElement(vt,Pa,os)},[os]),Yu=Mo(["table"],"table"),jc=Le.useMemo(function(){return Di||(fu?Zs==="max-content"?"auto":"fixed":es||Fu||va.some(function(Pa){var ls=Pa.ellipsis;return ls})?"fixed":"auto")},[es,fu,va,Di,Fu]),Nd,cd={colWidths:za,columCount:va.length,stickyOffsets:rl,onHeaderRow:To,fixHeader:es,scroll:Mi},jl=Le.useMemo(function(){return br?null:typeof to=="function"?to():to},[br,to]),dd=Le.createElement(mi,{data:Qr,measureColumnWidth:es||Ya||Fu}),Bh=Le.createElement(vr,{colWidths:va.map(function(Pa){var ls=Pa.width;return ls}),columns:va}),eu=Kr!=null?Le.createElement("caption",{className:"".concat(ln,"-caption")},Kr):void 0,wc=(0,dn.Z)(nn,{data:!0}),nh=(0,dn.Z)(nn,{aria:!0});if(es||Fu){var ih;typeof Ho=="function"?(ih=Ho(Qr,{scrollbarSize:qd,ref:Fs,onScroll:Ed}),cd.colWidths=va.map(function(Pa,ls){var Sl=Pa.width,Au=ls===va.length-1?Sl-qd:Sl;return typeof Au=="number"&&!Number.isNaN(Au)?Au:0})):ih=Le.createElement("div",{style:(0,bt.Z)((0,bt.Z)({},Ts),Rl),onScroll:Ed,ref:Fs,className:nt()("".concat(ln,"-body"))},Le.createElement(Yu,(0,Et.Z)({style:(0,bt.Z)((0,bt.Z)({},zu),{},{tableLayout:jc})},nh),eu,Bh,dd,!ba&&os&&Le.createElement(vt,{stickyOffsets:rl,flattenColumns:va,columns:ga},os)));var zc=(0,bt.Z)((0,bt.Z)((0,bt.Z)({noData:!Qr.length,maxContentScroll:Ya&&Zs==="max-content"},cd),cl),{},{direction:Ni,stickyClassName:rs,onScroll:Ed});Nd=Le.createElement(Le.Fragment,null,Rr!==!1&&Le.createElement(Ei,(0,Et.Z)({},zc,{stickyTopOffset:gu,className:"".concat(ln,"-header"),ref:il}),Ld),ih,ba&&ba!=="top"&&Le.createElement(Ei,(0,Et.Z)({},zc,{stickyBottomOffset:ql,className:"".concat(ln,"-summary"),ref:uc}),lf),Fu&&Le.createElement(di,{ref:Pc,offsetScroll:Da,scrollBodyRef:Fs,onScroll:Ed,container:Bs}))}else Nd=Le.createElement("div",{style:(0,bt.Z)((0,bt.Z)({},Ts),Rl),className:nt()("".concat(ln,"-content")),onScroll:Ed,ref:Fs},Le.createElement(Yu,(0,Et.Z)({style:(0,bt.Z)((0,bt.Z)({},zu),{},{tableLayout:jc})},nh),eu,Bh,Rr!==!1&&Le.createElement(bi,(0,Et.Z)({},cd,cl)),dd,os&&Le.createElement(vt,{stickyOffsets:rl,flattenColumns:va,columns:ga},os)));var Cl=Le.createElement("div",(0,Et.Z)({className:nt()(ln,Hn,(xt={},(0,He.Z)(xt,"".concat(ln,"-rtl"),Ni==="rtl"),(0,He.Z)(xt,"".concat(ln,"-ping-left"),Oa),(0,He.Z)(xt,"".concat(ln,"-ping-right"),Xa),(0,He.Z)(xt,"".concat(ln,"-layout-fixed"),Di==="fixed"),(0,He.Z)(xt,"".concat(ln,"-fixed-header"),es),(0,He.Z)(xt,"".concat(ln,"-fixed-column"),fu),(0,He.Z)(xt,"".concat(ln,"-scroll-horizontal"),Ya),(0,He.Z)(xt,"".concat(ln,"-has-fix-left"),va[0]&&va[0].fixed),(0,He.Z)(xt,"".concat(ln,"-has-fix-right"),va[va.length-1]&&va[va.length-1].fixed==="right"),xt)),style:ai,id:sr,ref:ka},wc),gr&&Le.createElement($n,{className:"".concat(ln,"-title")},gr(Qr)),Le.createElement("div",{ref:Ws,className:"".concat(ln,"-container")},Nd),dr&&Le.createElement($n,{className:"".concat(ln,"-footer")},dr(Qr)));Ya&&(Cl=Le.createElement(yt.Z,{onResize:Qg},Cl));var Th=zn(va,rl,Ni,ga),$s=Le.useMemo(function(){return{scrollX:Zs,prefixCls:ln,getComponent:Mo,scrollbarSize:qd,direction:Ni,fixedInfoList:Th,isSticky:Fu,supportSticky:th,componentWidth:xo,fixHeader:es,fixColumn:fu,horizonScroll:Ya,tableLayout:jc,rowClassName:bn,expandedRowClassName:ta.expandedRowClassName,expandIcon:hs,expandableType:Fo,expandRowByClick:ta.expandRowByClick,expandedRowRender:ta.expandedRowRender,onTriggerExpand:Ns,expandIconColumnIndex:ta.expandIconColumnIndex,indentSize:ta.indentSize,allColumnsFixedLeft:va.every(function(Pa){return Pa.fixed==="left"}),emptyNode:jl,columns:ga,flattenColumns:va,onColumnResize:Cd,hoverStartRow:na,hoverEndRow:Ta,onHover:ma,rowExpandable:ta.rowExpandable,onRow:mo,getRowKey:zo,expandedKeys:xa,childrenColumnName:Qa}},[Zs,ln,Mo,qd,Ni,Th,Fu,th,xo,es,fu,Ya,jc,bn,ta.expandedRowClassName,hs,Fo,ta.expandRowByClick,ta.expandedRowRender,Ns,ta.expandIconColumnIndex,ta.indentSize,jl,ga,va,Cd,na,Ta,ma,ta.rowExpandable,mo,zo,xa,Qa]);return Le.createElement(Ae.Provider,{value:$s},Cl)}function yr(pt){return he(Qi,pt)}var fr=yr();fr.EXPAND_COLUMN=ge,fr.INTERNAL_HOOKS=Oe,fr.Column=$i,fr.ColumnGroup=Xt,fr.Summary=Ye;var Vi=fr,Mr=pe(4409),Dn=Pt(null),Wr=Pt(null);function _n(pt,xt,nn){var ln=xt||1;return nn[pt+ln]-(nn[pt]||0)}function Ir(pt){var xt=pt.rowInfo,nn=pt.column,ln=pt.colIndex,Hn=pt.indent,bn=pt.index,ai=pt.renderIndex,si=pt.record,qn=pt.style,Mi=pt.className,Di=pt.inverse,Ni=pt.getHeight,gr=nn.render,dr=nn.dataIndex,nr=nn.className,Kr=nn.width,sr=Xe(Wr,["columnsOffset"]),Rr=sr.columnsOffset,Tr=sn(xt,nn,ln,Hn,bn),to=Tr.key,mo=Tr.fixedInfo,To=Tr.appendCellNode,Vr=Tr.additionalCellProps,po=Vr.style,Xo=Vr.colSpan,Jr=Xo===void 0?1:Xo,lo=Vr.rowSpan,Qr=lo===void 0?1:lo,br=ln-1,oo=_n(br,Jr,Rr),Mo=Jr>1?Kr-oo:0,zo=(0,bt.Z)((0,bt.Z)((0,bt.Z)({},po),qn),{},{flex:"0 0 ".concat(oo,"px"),width:"".concat(oo,"px"),marginRight:Mo,pointerEvents:"auto"}),Ho=Le.useMemo(function(){return Di?Qr<=1:Jr===0||Qr===0||Qr>1},[Qr,Jr,Di]);Ho?zo.visibility="hidden":Di&&(zo.height=Ni==null?void 0:Ni(Qr));var Ur=Ho?function(){return null}:gr,Yo={};return(Qr===0||Jr===0)&&(Yo.rowSpan=1,Yo.colSpan=1),Le.createElement(Qn,(0,Et.Z)({className:nt()(nr,Mi),ellipsis:nn.ellipsis,align:nn.align,scope:nn.rowScope,component:"div",prefixCls:xt.prefixCls,key:to,record:si,index:bn,renderIndex:ai,dataIndex:dr,render:Ur,shouldCellUpdate:nn.shouldCellUpdate},mo,{appendNode:To,additionalProps:(0,bt.Z)((0,bt.Z)({},Vr),{},{style:zo},Yo)}))}var eo=Ir,xr=["data","index","className","rowKey","style","extra","getHeight"],bo=Le.forwardRef(function(pt,xt){var nn=pt.data,ln=pt.index,Hn=pt.className,bn=pt.rowKey,ai=pt.style,si=pt.extra,qn=pt.getHeight,Mi=(0,Ee.Z)(pt,xr),Di=nn.record,Ni=nn.indent,gr=nn.index,dr=Xe(Ae,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),nr=dr.scrollX,Kr=dr.flattenColumns,sr=dr.prefixCls,Rr=dr.fixColumn,Tr=dr.componentWidth,to=Nt(Di,bn,ln,Ni),mo=to.rowSupportExpand,To=to.expanded,Vr=to.rowProps,po=to.expandedRowRender,Xo=to.expandedRowClassName,Jr;if(mo&&To){var lo=po(Di,ln,Ni+1,To),Qr=Xo==null?void 0:Xo(Di,ln,Ni),br={};Rr&&(br={style:(0,He.Z)({},"--virtual-width","".concat(Tr,"px"))});var oo="".concat(sr,"-expanded-row-cell");Jr=Le.createElement("div",{className:nt()("".concat(sr,"-expanded-row"),"".concat(sr,"-expanded-row-level-").concat(Ni+1),Qr)},Le.createElement(Qn,{component:"div",prefixCls:sr,className:nt()(oo,(0,He.Z)({},"".concat(oo,"-fixed"),Rr)),additionalProps:br},lo))}var Mo=(0,bt.Z)((0,bt.Z)({},ai),{},{width:nr});si&&(Mo.position="absolute",Mo.pointerEvents="none");var zo=Le.createElement("div",(0,Et.Z)({},Vr,Mi,{ref:mo?null:xt,className:nt()(Hn,"".concat(sr,"-row"),Vr==null?void 0:Vr.className,(0,He.Z)({},"".concat(sr,"-row-extra"),si)),style:(0,bt.Z)((0,bt.Z)({},Mo),Vr==null?void 0:Vr.style)}),Kr.map(function(Ho,Ur){return Le.createElement(eo,{key:Ur,rowInfo:to,column:Ho,colIndex:Ur,indent:Ni,index:ln,renderIndex:gr,record:Di,inverse:si,getHeight:qn})}));return mo?Le.createElement("div",{ref:xt},zo,Jr):zo}),Yr=ve(bo),ur=Yr,ir=Le.forwardRef(function(pt,xt){var nn=pt.data,ln=pt.onScroll,Hn=Xe(Ae,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),bn=Hn.flattenColumns,ai=Hn.onColumnResize,si=Hn.getRowKey,qn=Hn.expandedKeys,Mi=Hn.prefixCls,Di=Hn.childrenColumnName,Ni=Hn.emptyNode,gr=Hn.scrollX,dr=Xe(Dn),nr=dr.scrollY,Kr=dr.listItemHeight,sr=Le.useRef(),Rr=qt(nn,Di,qn,si),Tr=Le.useMemo(function(){var Jr=0;return bn.map(function(lo){var Qr=lo.width,br=lo.key;return Jr+=Qr,[br,Qr,Jr]})},[bn]),to=Le.useMemo(function(){return Tr.map(function(Jr){return Jr[2]})},[Tr]);Le.useEffect(function(){Tr.forEach(function(Jr){var lo=(0,Ke.Z)(Jr,2),Qr=lo[0],br=lo[1];ai(Qr,br)})},[Tr]),Le.useImperativeHandle(xt,function(){var Jr={};return Object.defineProperty(Jr,"scrollLeft",{get:function(){var Qr;return((Qr=sr.current)===null||Qr===void 0?void 0:Qr.getScrollInfo().x)||0},set:function(Qr){var br;(br=sr.current)===null||br===void 0||br.scrollTo({left:Qr})}}),Jr});var mo=function(lo,Qr){var br,oo=(br=Rr[Qr])===null||br===void 0?void 0:br.record,Mo=lo.onCell;if(Mo){var zo,Ho=Mo(oo,Qr);return(zo=Ho==null?void 0:Ho.rowSpan)!==null&&zo!==void 0?zo:1}return 1},To=function(lo){var Qr=lo.start,br=lo.end,oo=lo.getSize,Mo=lo.offsetY;if(br<0)return null;for(var zo=bn.filter(function(Wo){return mo(Wo,Qr)===0}),Ho=Qr,Ur=function(Oo){if(zo=zo.filter(function(Zo){return mo(Zo,Oo)===0}),!zo.length)return Ho=Oo,"break"},Yo=Qr;Yo>=0;Yo-=1){var na=Ur(Yo);if(na==="break")break}for(var Ta=bn.filter(function(Wo){return mo(Wo,br)!==1}),ma=br,ds=function(Oo){if(Ta=Ta.filter(function(Zo){return mo(Zo,Oo)!==1}),!Ta.length)return ma=Math.max(Oo-1,br),"break"},ja=br;ja<Rr.length;ja+=1){var ta=ds(ja);if(ta==="break")break}for(var Fo=[],xa=function(Oo){var Zo=Rr[Oo];if(!Zo)return"continue";bn.some(function(xo){return mo(xo,Oo)>1})&&Fo.push(Oo)},hs=Ho;hs<=ma;hs+=1)var Qa=xa(hs);var Ns=Fo.map(function(Wo){var Oo=Rr[Wo],Zo=si(Oo.record,Wo),xo=function(Jo){var ga=Wo+Jo-1,va=si(Rr[ga].record,ga),Us=oo(Zo,va);return Us.bottom-Us.top},Aa=oo(Zo);return Le.createElement(ur,{key:Wo,data:Oo,rowKey:Zo,index:Wo,style:{top:-Mo+Aa.top},extra:!0,getHeight:xo})});return Ns},Vr=Le.useMemo(function(){return{columnsOffset:to}},[to]),po="".concat(Mi,"-tbody"),Xo;return Rr.length?Xo=Le.createElement(Mr.Z,{fullHeight:!1,ref:sr,className:nt()(po,"".concat(po,"-virtual")),height:nr,itemHeight:Kr||24,data:Rr,itemKey:function(lo){return si(lo.record)},scrollWidth:gr,onVirtualScroll:function(lo){var Qr=lo.x;ln({scrollLeft:Qr})},extraRender:To},function(Jr,lo,Qr){var br=si(Jr.record,lo);return Le.createElement(ur,(0,Et.Z)({data:Jr,rowKey:br,index:lo},Qr))}):Xo=Le.createElement("div",{className:nt()("".concat(Mi,"-placeholder"))},Le.createElement(Qn,{component:"div",prefixCls:Mi},Ni)),Le.createElement(Wr.Provider,{value:Vr},Xo)}),qi=ve(ir),Dr=qi,Ai=function(xt,nn){var ln=nn.ref,Hn=nn.onScroll;return Le.createElement(Dr,{ref:ln,data:xt,onScroll:Hn})},et=100;function jr(pt){var xt=pt.columns,nn=pt.scroll,ln=pt.prefixCls,Hn=ln===void 0?Si:ln,bn=pt.className,ai=pt.listItemHeight,si=nn||{},qn=si.x,Mi=si.y;typeof qn!="number"&&(qn=((xt||[]).length+1)*et),typeof Mi!="number"&&(Mi=500);var Di=Le.useMemo(function(){return{scrollY:Mi,listItemHeight:ai}},[Mi,ai]);return Le.createElement(Dn.Provider,{value:Di},Le.createElement(Vi,(0,Et.Z)({},pt,{className:nt()(bn,"".concat(Hn,"-virtual")),scroll:(0,bt.Z)((0,bt.Z)({},nn),{},{x:qn}),components:{body:Ai},columns:xt,internalHooks:Oe,tailor:!0})))}function yo(pt){return he(jr,pt)}var Or=yo(),wo=null;function co(pt){return null}var $o=co;function Gr(pt){return null}var zr=Gr,Nr=pe(2738),Eo=pe(68031),or=pe(36355),mr=pe(93891),$r=pe(19716),hi=pe(8628),Ao=pe(31724),Vo=pe(58421),sa=pe(71418),ko=pe(88088);function Io(pt){return function(nn){let{prefixCls:ln,onExpand:Hn,record:bn,expanded:ai,expandable:si}=nn;const qn=`${ln}-row-expand-icon`;return Le.createElement("button",{type:"button",onClick:Mi=>{Hn(bn,Mi),Mi.stopPropagation()},className:nt()(qn,{[`${qn}-spaced`]:!si,[`${qn}-expanded`]:si&&ai,[`${qn}-collapsed`]:si&&!ai}),"aria-label":ai?pt.collapse:pt.expand,"aria-expanded":ai})}}var _o=Io;function la(pt,xt){return"key"in pt&&pt.key!==void 0&&pt.key!==null?pt.key:pt.dataIndex?Array.isArray(pt.dataIndex)?pt.dataIndex.join("."):pt.dataIndex:xt}function pa(pt,xt){return xt?`${xt}-${pt}`:`${pt}`}function Lt(pt,xt){return typeof pt=="function"?pt(xt):pt}function wi(pt,xt){const nn=Lt(pt,xt);return Object.prototype.toString.call(nn)==="[object Object]"?"":nn}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"},Yi=_t,Ci=pe(7657),Cr=function(xt,nn){return Le.createElement(Ci.Z,(0,Et.Z)({},xt,{ref:nn,icon:Yi}))},Ri=Le.forwardRef(Cr),Ii=Ri,er=pe(56762);function tr(pt){const xt=Le.useRef(pt),nn=(0,er.Z)();return[()=>xt.current,ln=>{xt.current=ln,nn()}]}var hr=pe(3113),Sr=pe(24905),kr=pe(38854),Er=pe(64165),Br=pe(20834),Zr=pe(40875),zi=pe(5112),oa=pe(17574),Ra=pe(47472),Ls=pe(92832);function Ys(pt){let{value:xt,onChange:nn,filterSearch:ln,tablePrefixCls:Hn,locale:bn}=pt;return ln?Le.createElement("div",{className:`${Hn}-filter-dropdown-search`},Le.createElement(Ls.default,{prefix:Le.createElement(Ra.Z,null),placeholder:bn.filterSearchPlaceholder,onChange:nn,value:xt,htmlSize:1,className:`${Hn}-filter-dropdown-search-input`})):null}var tl=Ys,Ui=pe(10228);const La=pt=>{const{keyCode:xt}=pt;xt===Ui.Z.ENTER&&pt.stopPropagation()};var zs=Le.forwardRef((pt,xt)=>Le.createElement("div",{className:pt.className,onClick:nn=>nn.stopPropagation(),onKeyDown:La,ref:xt},pt.children));function su(pt){let xt=[];return(pt||[]).forEach(nn=>{let{value:ln,children:Hn}=nn;xt.push(ln),Hn&&(xt=[].concat((0,ji.Z)(xt),(0,ji.Z)(su(Hn))))}),xt}function lu(pt){return pt.some(xt=>{let{children:nn}=xt;return nn})}function So(pt,xt){return typeof xt=="string"||typeof xt=="number"?xt==null?void 0:xt.toString().toLowerCase().includes(pt.trim().toLowerCase()):!1}function yc(pt){let{filters:xt,prefixCls:nn,filteredKeys:ln,filterMultiple:Hn,searchValue:bn,filterSearch:ai}=pt;return xt.map((si,qn)=>{const Mi=String(si.value);if(si.children)return{key:Mi||qn,label:si.text,popupClassName:`${nn}-dropdown-submenu`,children:yc({filters:si.children,prefixCls:nn,filteredKeys:ln,filterMultiple:Hn,searchValue:bn,filterSearch:ai})};const Di=Hn?Sr.default:zi.ZP,Ni={key:si.value!==void 0?Mi:qn,label:Le.createElement(Le.Fragment,null,Le.createElement(Di,{checked:ln.includes(Mi)}),Le.createElement("span",null,si.text))};return bn.trim()?typeof ai=="function"?ai(bn,si)?Ni:null:So(bn,si.text)?Ni:null:Ni})}function Ml(pt){var xt,nn;const{tablePrefixCls:ln,prefixCls:Hn,column:bn,dropdownPrefixCls:ai,columnKey:si,filterMultiple:qn,filterMode:Mi="menu",filterSearch:Di=!1,filterState:Ni,triggerFilter:gr,locale:dr,children:nr,getPopupContainer:Kr}=pt,{filterDropdownOpen:sr,onFilterDropdownOpenChange:Rr,filterResetToDefaultFilteredValue:Tr,defaultFilteredValue:to,filterDropdownVisible:mo,onFilterDropdownVisibleChange:To}=bn,[Vr,po]=Le.useState(!1),Xo=!!(Ni&&(!((xt=Ni.filteredKeys)===null||xt===void 0)&&xt.length||Ni.forceFiltered)),Jr=vo=>{po(vo),Rr==null||Rr(vo),To==null||To(vo)},lo=(nn=sr!=null?sr:mo)!==null&&nn!==void 0?nn:Vr,Qr=Ni==null?void 0:Ni.filteredKeys,[br,oo]=tr(Qr||[]),Mo=vo=>{let{selectedKeys:Jo}=vo;oo(Jo)},zo=(vo,Jo)=>{let{node:ga,checked:va}=Jo;Mo(qn?{selectedKeys:vo}:{selectedKeys:va&&ga.key?[ga.key]:[]})};Le.useEffect(()=>{Vr&&Mo({selectedKeys:Qr||[]})},[Qr]);const[Ho,Ur]=Le.useState([]),Yo=vo=>{Ur(vo)},[na,Ta]=Le.useState(""),ma=vo=>{const{value:Jo}=vo.target;Ta(Jo)};Le.useEffect(()=>{Vr||Ta("")},[Vr]);const ds=vo=>{const Jo=vo&&vo.length?vo:null;if(Jo===null&&(!Ni||!Ni.filteredKeys)||(0,_e.Z)(Jo,Ni==null?void 0:Ni.filteredKeys,!0))return null;gr({column:bn,key:si,filteredKeys:Jo})},ja=()=>{Jr(!1),ds(br())},ta=function(){let{confirm:vo,closeDropdown:Jo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};vo&&ds([]),Jo&&Jr(!1),Ta(""),oo(Tr?(to||[]).map(ga=>String(ga)):[])},Fo=function(){let{closeDropdown:vo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};vo&&Jr(!1),ds(br())},xa=vo=>{vo&&Qr!==void 0&&oo(Qr||[]),Jr(vo),!vo&&!bn.filterDropdown&&ja()},hs=nt()({[`${ai}-menu-without-submenu`]:!lu(bn.filters||[])}),Qa=vo=>{if(vo.target.checked){const Jo=su(bn==null?void 0:bn.filters).map(ga=>String(ga));oo(Jo)}else oo([])},Ns=vo=>{let{filters:Jo}=vo;return(Jo||[]).map((ga,va)=>{const Us=String(ga.value),Zs={title:ga.text,key:ga.value!==void 0?Us:va};return ga.children&&(Zs.children=Ns({filters:ga.children})),Zs})},Wo=vo=>{var Jo;return Object.assign(Object.assign({},vo),{text:vo.title,value:vo.key,children:((Jo=vo.children)===null||Jo===void 0?void 0:Jo.map(ga=>Wo(ga)))||[]})};let Oo;if(typeof bn.filterDropdown=="function")Oo=bn.filterDropdown({prefixCls:`${ai}-custom`,setSelectedKeys:vo=>Mo({selectedKeys:vo}),selectedKeys:br(),confirm:Fo,clearFilters:ta,filters:bn.filters,visible:lo,close:()=>{Jr(!1)}});else if(bn.filterDropdown)Oo=bn.filterDropdown;else{const vo=br()||[],Jo=()=>(bn.filters||[]).length===0?Le.createElement(Er.Z,{image:Er.Z.PRESENTED_IMAGE_SIMPLE,description:dr.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Mi==="tree"?Le.createElement(Le.Fragment,null,Le.createElement(tl,{filterSearch:Di,value:na,onChange:ma,tablePrefixCls:ln,locale:dr}),Le.createElement("div",{className:`${ln}-filter-dropdown-tree`},qn?Le.createElement(Sr.default,{checked:vo.length===su(bn.filters).length,indeterminate:vo.length>0&&vo.length<su(bn.filters).length,className:`${ln}-filter-dropdown-checkall`,onChange:Qa},dr.filterCheckall):null,Le.createElement(oa.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:qn,checkStrictly:!qn,className:`${ai}-menu`,onCheck:zo,checkedKeys:vo,selectedKeys:vo,showIcon:!1,treeData:Ns({filters:bn.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:na.trim()?va=>typeof Di=="function"?Di(na,Wo(va)):So(na,va.title):void 0}))):Le.createElement(Le.Fragment,null,Le.createElement(tl,{filterSearch:Di,value:na,onChange:ma,tablePrefixCls:ln,locale:dr}),Le.createElement(Br.default,{selectable:!0,multiple:qn,prefixCls:`${ai}-menu`,className:hs,onSelect:Mo,onDeselect:Mo,selectedKeys:vo,getPopupContainer:Kr,openKeys:Ho,onOpenChange:Yo,items:yc({filters:bn.filters||[],filterSearch:Di,prefixCls:Hn,filteredKeys:br(),filterMultiple:qn,searchValue:na})})),ga=()=>Tr?(0,_e.Z)((to||[]).map(va=>String(va)),vo,!0):vo.length===0;Oo=Le.createElement(Le.Fragment,null,Jo(),Le.createElement("div",{className:`${Hn}-dropdown-btns`},Le.createElement(hr.ZP,{type:"link",size:"small",disabled:ga(),onClick:()=>ta()},dr.filterReset),Le.createElement(hr.ZP,{type:"primary",size:"small",onClick:ja},dr.filterConfirm)))}bn.filterDropdown&&(Oo=Le.createElement(Zr.J,{selectable:void 0},Oo));const Zo=()=>Le.createElement(zs,{className:`${Hn}-dropdown`},Oo);let xo;typeof bn.filterIcon=="function"?xo=bn.filterIcon(Xo):bn.filterIcon?xo=bn.filterIcon:xo=Le.createElement(Ii,null);const{direction:Aa}=Le.useContext(or.E_);return Le.createElement("div",{className:`${Hn}-column`},Le.createElement("span",{className:`${ln}-column-title`},nr),Le.createElement(kr.Z,{dropdownRender:Zo,trigger:["click"],open:lo,onOpenChange:xa,getPopupContainer:Kr,placement:Aa==="rtl"?"bottomLeft":"bottomRight"},Le.createElement("span",{role:"button",tabIndex:-1,className:nt()(`${Hn}-trigger`,{active:Xo}),onClick:vo=>{vo.stopPropagation()}},xo)))}var as=Ml;function vl(pt,xt,nn){let ln=[];return(pt||[]).forEach((Hn,bn)=>{var ai;const si=pa(bn,nn);if(Hn.filters||"filterDropdown"in Hn||"onFilter"in Hn)if("filteredValue"in Hn){let qn=Hn.filteredValue;"filterDropdown"in Hn||(qn=(ai=qn==null?void 0:qn.map(String))!==null&&ai!==void 0?ai:qn),ln.push({column:Hn,key:la(Hn,si),filteredKeys:qn,forceFiltered:Hn.filtered})}else ln.push({column:Hn,key:la(Hn,si),filteredKeys:xt&&Hn.defaultFilteredValue?Hn.defaultFilteredValue:void 0,forceFiltered:Hn.filtered});"children"in Hn&&(ln=[].concat((0,ji.Z)(ln),(0,ji.Z)(vl(Hn.children,xt,si))))}),ln}function ju(pt,xt,nn,ln,Hn,bn,ai,si){return nn.map((qn,Mi)=>{const Di=pa(Mi,si),{filterMultiple:Ni=!0,filterMode:gr,filterSearch:dr}=qn;let nr=qn;if(nr.filters||nr.filterDropdown){const Kr=la(nr,Di),sr=ln.find(Rr=>{let{key:Tr}=Rr;return Kr===Tr});nr=Object.assign(Object.assign({},nr),{title:Rr=>Le.createElement(as,{tablePrefixCls:pt,prefixCls:`${pt}-filter`,dropdownPrefixCls:xt,column:nr,columnKey:Kr,filterState:sr,filterMultiple:Ni,filterMode:gr,filterSearch:dr,triggerFilter:bn,locale:Hn,getPopupContainer:ai},Lt(qn.title,Rr))})}return"children"in nr&&(nr=Object.assign(Object.assign({},nr),{children:ju(pt,xt,nr.children,ln,Hn,bn,ai,Di)})),nr})}function rc(pt){const xt={};return pt.forEach(nn=>{let{key:ln,filteredKeys:Hn,column:bn}=nn;const{filters:ai,filterDropdown:si}=bn;if(si)xt[ln]=Hn||null;else if(Array.isArray(Hn)){const qn=su(ai);xt[ln]=qn.filter(Mi=>Hn.includes(String(Mi)))}else xt[ln]=null}),xt}function wl(pt,xt){return xt.reduce((nn,ln)=>{const{column:{onFilter:Hn,filters:bn},filteredKeys:ai}=ln;return Hn&&ai&&ai.length?nn.filter(si=>ai.some(qn=>{const Mi=su(bn),Di=Mi.findIndex(gr=>String(gr)===String(qn)),Ni=Di!==-1?Mi[Di]:qn;return Hn(Ni,si)})):nn},pt)}const sl=pt=>pt.flatMap(xt=>"children"in xt?[xt].concat((0,ji.Z)(sl(xt.children||[]))):[xt]);function td(pt){let{prefixCls:xt,dropdownPrefixCls:nn,mergedColumns:ln,onFilterChange:Hn,getPopupContainer:bn,locale:ai}=pt;const si=Le.useMemo(()=>sl(ln||[]),[ln]),[qn,Mi]=Le.useState(()=>vl(si,!0)),Di=Le.useMemo(()=>{const nr=vl(si,!1);if(nr.length===0)return nr;let Kr=!0,sr=!0;if(nr.forEach(Rr=>{let{filteredKeys:Tr}=Rr;Tr!==void 0?Kr=!1:sr=!1}),Kr){const Rr=(si||[]).map((Tr,to)=>la(Tr,pa(to)));return qn.filter(Tr=>{let{key:to}=Tr;return Rr.includes(to)}).map(Tr=>{const to=si[Rr.findIndex(mo=>mo===Tr.key)];return Object.assign(Object.assign({},Tr),{column:Object.assign(Object.assign({},Tr.column),to),forceFiltered:to.filtered})})}return nr},[si,qn]),Ni=Le.useMemo(()=>rc(Di),[Di]),gr=nr=>{const Kr=Di.filter(sr=>{let{key:Rr}=sr;return Rr!==nr.key});Kr.push(nr),Mi(Kr),Hn(rc(Kr),Kr)};return[nr=>ju(xt,nn,nr,Di,ai,gr,bn),Di,Ni]}var nd=td;function kc(pt,xt,nn){const ln=Le.useRef({});function Hn(bn){if(!ln.current||ln.current.data!==pt||ln.current.childrenColumnName!==xt||ln.current.getRowKey!==nn){let si=function(qn){qn.forEach((Mi,Di)=>{const Ni=nn(Mi,Di);ai.set(Ni,Mi),Mi&&typeof Mi=="object"&&xt in Mi&&si(Mi[xt]||[])})};const ai=new Map;si(pt),ln.current={data:pt,childrenColumnName:xt,kvMap:ai,getRowKey:nn}}return ln.current.kvMap.get(bn)}return[Hn]}var _d=pe(50371),id=function(pt,xt){var nn={};for(var ln in pt)Object.prototype.hasOwnProperty.call(pt,ln)&&xt.indexOf(ln)<0&&(nn[ln]=pt[ln]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Hn=0,ln=Object.getOwnPropertySymbols(pt);Hn<ln.length;Hn++)xt.indexOf(ln[Hn])<0&&Object.prototype.propertyIsEnumerable.call(pt,ln[Hn])&&(nn[ln[Hn]]=pt[ln[Hn]]);return nn};const Ic=10;function Js(pt,xt){const nn={current:pt.current,pageSize:pt.pageSize};return Object.keys(xt&&typeof xt=="object"?xt:{}).forEach(Hn=>{const bn=pt[Hn];typeof bn!="function"&&(nn[Hn]=bn)}),nn}function uu(pt,xt,nn){const ln=nn&&typeof nn=="object"?nn:{},{total:Hn=0}=ln,bn=id(ln,["total"]),[ai,si]=(0,Le.useState)(()=>({current:"defaultCurrent"in bn?bn.defaultCurrent:1,pageSize:"defaultPageSize"in bn?bn.defaultPageSize:Ic})),qn=(0,_d.Z)(ai,bn,{total:Hn>0?Hn:pt}),Mi=Math.ceil((Hn||pt)/qn.pageSize);qn.current>Mi&&(qn.current=Mi||1);const Di=(gr,dr)=>{si({current:gr!=null?gr:1,pageSize:dr||qn.pageSize})},Ni=(gr,dr)=>{var nr;nn&&((nr=nn.onChange)===null||nr===void 0||nr.call(nn,gr,dr)),Di(gr,dr),xt(gr,dr||(qn==null?void 0:qn.pageSize))};return nn===!1?[{},()=>{}]:[Object.assign(Object.assign({},qn),{onChange:Ni}),Di]}var xd=uu,Eu=pe(84105),Sc=pe(35654),Ko=pe(90782),Sa=pe(71430),ll=pe(18929);const Ss={},ms="SELECT_ALL",Ua="SELECT_INVERT",ss="SELECT_NONE",xs=[],vs=(pt,xt)=>{let nn=[];return(xt||[]).forEach(ln=>{nn.push(ln),ln&&typeof ln=="object"&&pt in ln&&(nn=[].concat((0,ji.Z)(nn),(0,ji.Z)(vs(pt,ln[pt]))))}),nn};var _l=(pt,xt)=>{const{preserveSelectedRowKeys:nn,selectedRowKeys:ln,defaultSelectedRowKeys:Hn,getCheckboxProps:bn,onChange:ai,onSelect:si,onSelectAll:qn,onSelectInvert:Mi,onSelectNone:Di,onSelectMultiple:Ni,columnWidth:gr,type:dr,selections:nr,fixed:Kr,renderCell:sr,hideSelectAll:Rr,checkStrictly:Tr=!0}=xt||{},{prefixCls:to,data:mo,pageData:To,getRecordByKey:Vr,getRowKey:po,expandType:Xo,childrenColumnName:Jr,locale:lo,getPopupContainer:Qr}=pt,[br,oo]=(0,ll.Z)(ln||Hn||xs,{value:ln}),Mo=Le.useRef(new Map),zo=(0,Le.useCallback)(Wo=>{if(nn){const Oo=new Map;Wo.forEach(Zo=>{let xo=Vr(Zo);!xo&&Mo.current.has(Zo)&&(xo=Mo.current.get(Zo)),Oo.set(Zo,xo)}),Mo.current=Oo}},[Vr,nn]);Le.useEffect(()=>{zo(br)},[br]);const{keyEntities:Ho}=(0,Le.useMemo)(()=>{if(Tr)return{keyEntities:null};let Wo=mo;if(nn){const Oo=new Set(mo.map((xo,Aa)=>po(xo,Aa))),Zo=Array.from(Mo.current).reduce((xo,Aa)=>{let[vo,Jo]=Aa;return Oo.has(vo)?xo:xo.concat(Jo)},[]);Wo=[].concat((0,ji.Z)(Wo),(0,ji.Z)(Zo))}return(0,Sa.I8)(Wo,{externalGetKey:po,childrenPropName:Jr})},[mo,po,Tr,Jr,nn]),Ur=(0,Le.useMemo)(()=>vs(Jr,To),[Jr,To]),Yo=(0,Le.useMemo)(()=>{const Wo=new Map;return Ur.forEach((Oo,Zo)=>{const xo=po(Oo,Zo),Aa=(bn?bn(Oo):null)||{};Wo.set(xo,Aa)}),Wo},[Ur,po,bn]),na=(0,Le.useCallback)(Wo=>{var Oo;return!!(!((Oo=Yo.get(po(Wo)))===null||Oo===void 0)&&Oo.disabled)},[Yo,po]),[Ta,ma]=(0,Le.useMemo)(()=>{if(Tr)return[br||[],[]];const{checkedKeys:Wo,halfCheckedKeys:Oo}=(0,Ko.S)(br,!0,Ho,na);return[Wo||[],Oo]},[br,Tr,Ho,na]),ds=(0,Le.useMemo)(()=>{const Wo=dr==="radio"?Ta.slice(0,1):Ta;return new Set(Wo)},[Ta,dr]),ja=(0,Le.useMemo)(()=>dr==="radio"?new Set:new Set(ma),[ma,dr]),[ta,Fo]=(0,Le.useState)(null);Le.useEffect(()=>{xt||oo(xs)},[!!xt]);const xa=(0,Le.useCallback)((Wo,Oo)=>{let Zo,xo;zo(Wo),nn?(Zo=Wo,xo=Wo.map(Aa=>Mo.current.get(Aa))):(Zo=[],xo=[],Wo.forEach(Aa=>{const vo=Vr(Aa);vo!==void 0&&(Zo.push(Aa),xo.push(vo))})),oo(Zo),ai==null||ai(Zo,xo,{type:Oo})},[oo,Vr,ai,nn]),hs=(0,Le.useCallback)((Wo,Oo,Zo,xo)=>{if(si){const Aa=Zo.map(vo=>Vr(vo));si(Vr(Wo),Oo,Aa,xo)}xa(Zo,"single")},[si,Vr,xa]),Qa=(0,Le.useMemo)(()=>!nr||Rr?null:(nr===!0?[ms,Ua,ss]:nr).map(Oo=>Oo===ms?{key:"all",text:lo.selectionAll,onSelect(){xa(mo.map((Zo,xo)=>po(Zo,xo)).filter(Zo=>{const xo=Yo.get(Zo);return!(xo!=null&&xo.disabled)||ds.has(Zo)}),"all")}}:Oo===Ua?{key:"invert",text:lo.selectInvert,onSelect(){const Zo=new Set(ds);To.forEach((Aa,vo)=>{const Jo=po(Aa,vo),ga=Yo.get(Jo);ga!=null&&ga.disabled||(Zo.has(Jo)?Zo.delete(Jo):Zo.add(Jo))});const xo=Array.from(Zo);Mi&&Mi(xo),xa(xo,"invert")}}:Oo===ss?{key:"none",text:lo.selectNone,onSelect(){Di==null||Di(),xa(Array.from(ds).filter(Zo=>{const xo=Yo.get(Zo);return xo==null?void 0:xo.disabled}),"none")}}:Oo).map(Oo=>Object.assign(Object.assign({},Oo),{onSelect:function(){for(var Zo,xo,Aa=arguments.length,vo=new Array(Aa),Jo=0;Jo<Aa;Jo++)vo[Jo]=arguments[Jo];(xo=Oo.onSelect)===null||xo===void 0||(Zo=xo).call.apply(Zo,[Oo].concat(vo)),Fo(null)}})),[nr,ds,To,po,Mi,xa]);return[(0,Le.useCallback)(Wo=>{var Oo;if(!xt)return Wo.filter(Ia=>Ia!==Ss);let Zo=(0,ji.Z)(Wo);const xo=new Set(ds),Aa=Ur.map(po).filter(Ia=>!Yo.get(Ia).disabled),vo=Aa.every(Ia=>xo.has(Ia)),Jo=Aa.some(Ia=>xo.has(Ia)),ga=()=>{const Ia=[];vo?Aa.forEach(Oa=>{xo.delete(Oa),Ia.push(Oa)}):Aa.forEach(Oa=>{xo.has(Oa)||(xo.add(Oa),Ia.push(Oa))});const $a=Array.from(xo);qn==null||qn(!vo,$a.map(Oa=>Vr(Oa)),Ia.map(Oa=>Vr(Oa))),xa($a,"all"),Fo(null)};let va;if(dr!=="radio"){let Ia;if(Qa){const da={getPopupContainer:Qr,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=Le.createElement("div",{className:`${to}-selection-extra`},Le.createElement(kr.Z,{menu:da,getPopupContainer:Qr},Le.createElement("span",null,Le.createElement(Eu.Z,null))))}const $a=Ur.map((da,Xa)=>{const _s=po(da,Xa),dl=Yo.get(_s)||{};return Object.assign({checked:xo.has(_s)},dl)}).filter(da=>{let{disabled:Xa}=da;return Xa}),Oa=!!$a.length&&$a.length===Ur.length,qa=Oa&&$a.every(da=>{let{checked:Xa}=da;return Xa}),As=Oa&&$a.some(da=>{let{checked:Xa}=da;return Xa});va=!Rr&&Le.createElement("div",{className:`${to}-selection`},Le.createElement(Sr.default,{checked:Oa?qa:!!Ur.length&&vo,indeterminate:Oa?!qa&&As:!vo&&Jo,onChange:ga,disabled:Ur.length===0||Oa,"aria-label":Ia?"Custom selection":"Select all",skipGroup:!0}),Ia)}let Us;dr==="radio"?Us=(Ia,$a,Oa)=>{const qa=po($a,Oa),As=xo.has(qa);return{node:Le.createElement(zi.ZP,Object.assign({},Yo.get(qa),{checked:As,onClick:da=>da.stopPropagation(),onChange:da=>{xo.has(qa)||hs(qa,!0,[qa],da.nativeEvent)}})),checked:As}}:Us=(Ia,$a,Oa)=>{var qa;const As=po($a,Oa),da=xo.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:Le.createElement(Sr.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&&Tr){const za=new Set([ta,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&&Tr){const za=Aa.slice(Jl,Ql+1),rl=[];da?za.forEach(Ya=>{xo.has(Ya)&&(rl.push(Ya),xo.delete(Ya))}):za.forEach(Ya=>{xo.has(Ya)||(rl.push(Ya),xo.add(Ya))});const es=Array.from(xo);Ni==null||Ni(!da,es.map(Ya=>Vr(Ya)),rl.map(Ya=>Vr(Ya))),xa(es,"multiple")}else{const za=Ta;if(Tr){const rl=da?(0,Sc._5)(za,As):(0,Sc.L0)(za,As);hs(As,!da,rl,Yl)}else{const rl=(0,Ko.S)([].concat((0,ji.Z)(za),[As]),!0,Ho,na),{checkedKeys:es,halfCheckedKeys:Ya}=rl;let fu=es;if(da){const Pc=new Set(es);Pc.delete(As),fu=(0,Ko.S)(Array.from(Pc),{checked:!1,halfCheckedKeys:Ya},Ho,na).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(!Zo.includes(Ss))if(Zo.findIndex(Ia=>{var $a;return(($a=Ia[Gi])===null||$a===void 0?void 0:$a.columnType)==="EXPAND_COLUMN"})===0){const[Ia,...$a]=Zo;Zo=[Ia,Ss].concat((0,ji.Z)($a))}else Zo=[Ss].concat((0,ji.Z)(Zo));const cl=Zo.indexOf(Ss);Zo=Zo.filter((Ia,$a)=>Ia!==Ss||$a===cl);const ka=Zo[cl-1],il=Zo[cl+1];let Fs=Kr;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&&((Oo=ka[Gi])===null||Oo===void 0?void 0:Oo.columnType)==="EXPAND_COLUMN"&&ka.fixed===void 0&&(ka.fixed=Fs);const Ws=nt()(`${to}-selection-col`,{[`${to}-selection-col-with-dropdown`]:nr&&dr==="checkbox"}),uc={fixed:Fs,width:gr,className:`${to}-selection-column`,title:xt.columnTitle||va,render:Zs,onCell:xt.onCell,[Gi]:{className:Ws}};return Zo.map(Ia=>Ia===Ss?uc:Ia)},[po,Ur,xt,Ta,ds,ja,gr,Qa,Xo,ta,Yo,Ni,hs,na]),ds]},is=pe(89489),bh=pe(59477),Eh=pe(6848);const Uu="ascend",ro="descend";function rd(pt){return typeof pt.sorter=="object"&&typeof pt.sorter.multiple=="number"?pt.sorter.multiple:!1}function en(pt){return typeof pt=="function"?pt:pt&&typeof pt=="object"&&pt.compare?pt.compare:!1}function Pi(pt,xt){return xt?pt[pt.indexOf(xt)+1]:pt[0]}function Mh(pt,xt,nn){let ln=[];function Hn(bn,ai){ln.push({column:bn,key:la(bn,ai),multiplePriority:rd(bn),sortOrder:bn.sortOrder})}return(pt||[]).forEach((bn,ai)=>{const si=pa(ai,nn);bn.children?("sortOrder"in bn&&Hn(bn,si),ln=[].concat((0,ji.Z)(ln),(0,ji.Z)(Mh(bn.children,xt,si)))):bn.sorter&&("sortOrder"in bn?Hn(bn,si):xt&&bn.defaultSortOrder&&ln.push({column:bn,key:la(bn,si),multiplePriority:rd(bn),sortOrder:bn.defaultSortOrder}))}),ln}function Lh(pt,xt,nn,ln,Hn,bn,ai,si){return(xt||[]).map((qn,Mi)=>{const Di=pa(Mi,si);let Ni=qn;if(Ni.sorter){const gr=Ni.sortDirections||Hn,dr=Ni.showSorterTooltip===void 0?ai:Ni.showSorterTooltip,nr=la(Ni,Di),Kr=nn.find(Xo=>{let{key:Jr}=Xo;return Jr===nr}),sr=Kr?Kr.sortOrder:null,Rr=Pi(gr,sr);let Tr;if(qn.sortIcon)Tr=qn.sortIcon({sortOrder:sr});else{const Xo=gr.includes(Uu)&&Le.createElement(bh.Z,{className:nt()(`${pt}-column-sorter-up`,{active:sr===Uu})}),Jr=gr.includes(ro)&&Le.createElement(is.Z,{className:nt()(`${pt}-column-sorter-down`,{active:sr===ro})});Tr=Le.createElement("span",{className:nt()(`${pt}-column-sorter`,{[`${pt}-column-sorter-full`]:!!(Xo&&Jr)})},Le.createElement("span",{className:`${pt}-column-sorter-inner`,"aria-hidden":"true"},Xo,Jr))}const{cancelSort:to,triggerAsc:mo,triggerDesc:To}=bn||{};let Vr=to;Rr===ro?Vr=To:Rr===Uu&&(Vr=mo);const po=typeof dr=="object"?dr:{title:Vr};Ni=Object.assign(Object.assign({},Ni),{className:nt()(Ni.className,{[`${pt}-column-sort`]:sr}),title:Xo=>{const Jr=Le.createElement("div",{className:`${pt}-column-sorters`},Le.createElement("span",{className:`${pt}-column-title`},Lt(qn.title,Xo)),Tr);return dr?Le.createElement(Eh.Z,Object.assign({},po),Jr):Jr},onHeaderCell:Xo=>{const Jr=qn.onHeaderCell&&qn.onHeaderCell(Xo)||{},lo=Jr.onClick,Qr=Jr.onKeyDown;Jr.onClick=Mo=>{ln({column:qn,key:nr,sortOrder:Rr,multiplePriority:rd(qn)}),lo==null||lo(Mo)},Jr.onKeyDown=Mo=>{Mo.keyCode===Ui.Z.ENTER&&(ln({column:qn,key:nr,sortOrder:Rr,multiplePriority:rd(qn)}),Qr==null||Qr(Mo))};const br=wi(qn.title,{}),oo=br==null?void 0:br.toString();return sr?Jr["aria-sort"]=sr==="ascend"?"ascending":"descending":Jr["aria-label"]=oo||"",Jr.className=nt()(Jr.className,`${pt}-column-has-sorters`),Jr.tabIndex=0,qn.ellipsis&&(Jr.title=(br!=null?br:"").toString()),Jr}})}return"children"in Ni&&(Ni=Object.assign(Object.assign({},Ni),{children:Lh(pt,Ni.children,nn,ln,Hn,bn,ai,Di)})),Ni})}function ac(pt){const{column:xt,sortOrder:nn}=pt;return{column:xt,order:nn,field:xt.dataIndex,columnKey:xt.key}}function cu(pt){const xt=pt.filter(nn=>{let{sortOrder:ln}=nn;return ln}).map(ac);return xt.length===0&&pt.length?Object.assign(Object.assign({},ac(pt[pt.length-1])),{column:void 0}):xt.length<=1?xt[0]||{}:xt}function Mu(pt,xt,nn){const ln=xt.slice().sort((ai,si)=>si.multiplePriority-ai.multiplePriority),Hn=pt.slice(),bn=ln.filter(ai=>{let{column:{sorter:si},sortOrder:qn}=ai;return en(si)&&qn});return bn.length?Hn.sort((ai,si)=>{for(let qn=0;qn<bn.length;qn+=1){const Mi=bn[qn],{column:{sorter:Di},sortOrder:Ni}=Mi,gr=en(Di);if(gr&&Ni){const dr=gr(ai,si,Ni);if(dr!==0)return Ni===Uu?dr:-dr}}return 0}).map(ai=>{const si=ai[nn];return si?Object.assign(Object.assign({},ai),{[nn]:Mu(si,xt,nn)}):ai}):Hn}function Nh(pt){let{prefixCls:xt,mergedColumns:nn,onSorterChange:ln,sortDirections:Hn,tableLocale:bn,showSorterTooltip:ai}=pt;const[si,qn]=Le.useState(Mh(nn,!0)),Mi=Le.useMemo(()=>{let nr=!0;const Kr=Mh(nn,!1);if(!Kr.length)return si;const sr=[];function Rr(to){nr?sr.push(to):sr.push(Object.assign(Object.assign({},to),{sortOrder:null}))}let Tr=null;return Kr.forEach(to=>{Tr===null?(Rr(to),to.sortOrder&&(to.multiplePriority===!1?nr=!1:Tr=!0)):(Tr&&to.multiplePriority!==!1||(nr=!1),Rr(to))}),sr},[nn,si]),Di=Le.useMemo(()=>{const nr=Mi.map(Kr=>{let{column:sr,sortOrder:Rr}=Kr;return{column:sr,order:Rr}});return{sortColumns:nr,sortColumn:nr[0]&&nr[0].column,sortOrder:nr[0]&&nr[0].order}},[Mi]);function Ni(nr){let Kr;nr.multiplePriority===!1||!Mi.length||Mi[0].multiplePriority===!1?Kr=[nr]:Kr=[].concat((0,ji.Z)(Mi.filter(sr=>{let{key:Rr}=sr;return Rr!==nr.key})),[nr]),qn(Kr),ln(cu(Kr),Kr)}return[nr=>Lh(xt,nr,Mi,Ni,Hn,bn,ai),Mi,Di,()=>cu(Mi)]}function Pd(pt,xt){return pt.map(nn=>{const ln=Object.assign({},nn);return ln.title=Lt(nn.title,xt),"children"in ln&&(ln.children=Pd(ln.children,xt)),ln})}function ys(pt){return[Le.useCallback(nn=>Pd(nn,pt),[pt])]}var Bo=yr((pt,xt)=>{const{_renderTimes:nn}=pt,{_renderTimes:ln}=xt;return nn!==ln}),yl=yo((pt,xt)=>{const{_renderTimes:nn}=pt,{_renderTimes:ln}=xt;return nn!==ln}),ul=pe(64993),_a=pe(17313),ia=pe(83116),Hs=pe(37613),Ja=pt=>{const{componentCls:xt}=pt,nn=`${pt.lineWidth}px ${pt.lineType} ${pt.tableBorderColor}`,ln=(Hn,bn,ai)=>({[`&${xt}-${Hn}`]:{[`> ${xt}-container`]:{[`> ${xt}-content, > ${xt}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${xt}-expanded-row-fixed`]:{margin:`-${bn}px -${ai+pt.lineWidth}px`}}}}}});return{[`${xt}-wrapper`]:{[`${xt}${xt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${xt}-title`]:{border:nn,borderBottom:0},[`> ${xt}-container`]:{borderInlineStart:nn,borderTop:nn,[`
> ${xt}-content,
> ${xt}-header,
> ${xt}-body,
> ${xt}-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:nn},"> thead":{"> tr:not(:last-child) > th":{borderBottom:nn},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${xt}-cell-fix-right-first::after`]:{borderInlineEnd:nn}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${xt}-expanded-row-fixed`]:{margin:`-${pt.tablePaddingVertical}px -${pt.tablePaddingHorizontal+pt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:pt.lineWidth,bottom:0,borderInlineEnd:nn,content:'""'}}}}}},[`&${xt}-scroll-horizontal`]:{[`> ${xt}-container > ${xt}-body`]:{"> table > tbody":{[`
> tr${xt}-expanded-row,
> tr${xt}-placeholder
`]:{"> th, > td":{borderInlineEnd:0}}}}}},ln("middle",pt.tablePaddingVerticalMiddle,pt.tablePaddingHorizontalMiddle)),ln("small",pt.tablePaddingVerticalSmall,pt.tablePaddingHorizontalSmall)),{[`> ${xt}-footer`]:{border:nn,borderTop:0}}),[`${xt}-cell`]:{[`${xt}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${pt.lineWidth}px 0 ${pt.lineWidth}px ${pt.tableHeaderBg}`}},[`${xt}-bordered ${xt}-cell-scrollbar`]:{borderInlineEnd:nn}}}},nl=pt=>{const{componentCls:xt}=pt;return{[`${xt}-wrapper`]:{[`${xt}-cell-ellipsis`]:Object.assign(Object.assign({},_a.vS),{wordBreak:"keep-all",[`
&${xt}-cell-fix-left-last,
&${xt}-cell-fix-right-first
`]:{overflow:"visible",[`${xt}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${xt}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},wa=pt=>{const{componentCls:xt}=pt;return{[`${xt}-wrapper`]:{[`${xt}-tbody > tr${xt}-placeholder`]:{textAlign:"center",color:pt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:pt.colorBgContainer}}}}},Ll=pe(15969),Va=pt=>{const{componentCls:xt,antCls:nn,controlInteractiveSize:ln,motionDurationSlow:Hn,lineWidth:bn,paddingXS:ai,lineType:si,tableBorderColor:qn,tableExpandIconBg:Mi,tableExpandColumnWidth:Di,borderRadius:Ni,fontSize:gr,fontSizeSM:dr,lineHeight:nr,tablePaddingVertical:Kr,tablePaddingHorizontal:sr,tableExpandedRowBg:Rr,paddingXXS:Tr}=pt,to=ln/2-bn,mo=to*2+bn*3,To=`${bn}px ${si} ${qn}`,Vr=Tr-bn;return{[`${xt}-wrapper`]:{[`${xt}-expand-icon-col`]:{width:Di},[`${xt}-row-expand-icon-cell`]:{textAlign:"center",[`${xt}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${xt}-row-indent`]:{height:1,float:"left"},[`${xt}-row-expand-icon`]:Object.assign(Object.assign({},(0,Ll.N)(pt)),{position:"relative",float:"left",boxSizing:"border-box",width:mo,height:mo,padding:0,color:"inherit",lineHeight:`${mo}px`,background:Mi,border:To,borderRadius:Ni,transform:`scale(${ln/mo})`,transition:`all ${Hn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Hn} ease-out`,content:'""'},"&::before":{top:to,insetInlineEnd:Vr,insetInlineStart:Vr,height:bn},"&::after":{top:Vr,bottom:Vr,insetInlineStart:to,width:bn,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"}}),[`${xt}-row-indent + ${xt}-row-expand-icon`]:{marginTop:(gr*nr-bn*3)/2-Math.ceil((dr*1.4-bn*3)/2),marginInlineEnd:ai},[`tr${xt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Rr}},[`${nn}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${xt}-expanded-row-fixed`]:{position:"relative",margin:`-${Kr}px -${sr}px`,padding:`${Kr}px ${sr}px`}}}},Ps=pt=>{const{componentCls:xt,antCls:nn,iconCls:ln,tableFilterDropdownWidth:Hn,tableFilterDropdownSearchWidth:bn,paddingXXS:ai,paddingXS:si,colorText:qn,lineWidth:Mi,lineType:Di,tableBorderColor:Ni,tableHeaderIconColor:gr,fontSizeSM:dr,tablePaddingHorizontal:nr,borderRadius:Kr,motionDurationSlow:sr,colorTextDescription:Rr,colorPrimary:Tr,tableHeaderFilterActiveBg:to,colorTextDisabled:mo,tableFilterDropdownBg:To,tableFilterDropdownHeight:Vr,controlItemBgHover:po,controlItemBgActive:Xo,boxShadowSecondary:Jr,filterDropdownMenuBg:lo}=pt,Qr=`${nn}-dropdown`,br=`${xt}-filter-dropdown`,oo=`${nn}-tree`,Mo=`${Mi}px ${Di} ${Ni}`;return[{[`${xt}-wrapper`]:{[`${xt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${xt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-ai,marginInline:`${ai}px ${-nr/2}px`,padding:`0 ${ai}px`,color:gr,fontSize:dr,borderRadius:Kr,cursor:"pointer",transition:`all ${sr}`,"&:hover":{color:Rr,background:to},"&.active":{color:Tr}}}},{[`${nn}-dropdown`]:{[br]:Object.assign(Object.assign({},(0,_a.Wf)(pt)),{minWidth:Hn,backgroundColor:To,borderRadius:Kr,boxShadow:Jr,overflow:"hidden",[`${Qr}-menu`]:{maxHeight:Vr,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:lo,"&:empty::after":{display:"block",padding:`${si}px 0`,color:mo,fontSize:dr,textAlign:"center",content:'"Not Found"'}},[`${br}-tree`]:{paddingBlock:`${si}px 0`,paddingInline:si,[oo]:{padding:0},[`${oo}-treenode ${oo}-node-content-wrapper:hover`]:{backgroundColor:po},[`${oo}-treenode-checkbox-checked ${oo}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:Xo}}},[`${br}-search`]:{padding:si,borderBottom:Mo,"&-input":{input:{minWidth:bn},[ln]:{color:mo}}},[`${br}-checkall`]:{width:"100%",marginBottom:ai,marginInlineStart:ai},[`${br}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${si-Mi}px ${si}px`,overflow:"hidden",borderTop:Mo}})}},{[`${nn}-dropdown ${br}, ${br}-submenu`]:{[`${nn}-checkbox-wrapper + span`]:{paddingInlineStart:si,color:qn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},ad=pt=>{const{componentCls:xt,lineWidth:nn,colorSplit:ln,motionDurationSlow:Hn,zIndexTableFixed:bn,tableBg:ai,zIndexTableSticky:si}=pt,qn=ln;return{[`${xt}-wrapper`]:{[`
${xt}-cell-fix-left,
${xt}-cell-fix-right
`]:{position:"sticky !important",zIndex:bn,background:ai},[`
${xt}-cell-fix-left-first::after,
${xt}-cell-fix-left-last::after
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-nn,width:30,transform:"translateX(100%)",transition:`box-shadow ${Hn}`,content:'""',pointerEvents:"none"},[`${xt}-cell-fix-left-all::after`]:{display:"none"},[`
${xt}-cell-fix-right-first::after,
${xt}-cell-fix-right-last::after
`]:{position:"absolute",top:0,bottom:-nn,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${Hn}`,content:'""',pointerEvents:"none"},[`${xt}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:si+1,width:30,transition:`box-shadow ${Hn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${xt}-ping-left`]:{[`&:not(${xt}-has-fix-left) ${xt}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${qn}`}},[`
${xt}-cell-fix-left-first::after,
${xt}-cell-fix-left-last::after
`]:{boxShadow:`inset 10px 0 8px -8px ${qn}`},[`${xt}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${xt}-ping-right`]:{[`&:not(${xt}-has-fix-right) ${xt}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${qn}`}},[`
${xt}-cell-fix-right-first::after,
${xt}-cell-fix-right-last::after
`]:{boxShadow:`inset -10px 0 8px -8px ${qn}`}}}}},Rf=pt=>{const{componentCls:xt,antCls:nn}=pt;return{[`${xt}-wrapper`]:{[`${xt}-pagination${nn}-pagination`]:{margin:`${pt.margin}px 0`},[`${xt}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:pt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},jf=pt=>{const{componentCls:xt,tableRadius:nn}=pt;return{[`${xt}-wrapper`]:{[xt]:{[`${xt}-title, ${xt}-header`]:{borderRadius:`${nn}px ${nn}px 0 0`},[`${xt}-title + ${xt}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${xt}-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:nn,borderStartEndRadius:nn,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:nn},"> *:last-child":{borderStartEndRadius:nn}}},"&-footer":{borderRadius:`0 0 ${nn}px ${nn}px`}}}}},wd=pt=>{const{componentCls:xt}=pt;return{[`${xt}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${xt}-pagination-left`]:{justifyContent:"flex-end"},[`${xt}-pagination-right`]:{justifyContent:"flex-start"},[`${xt}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${xt}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${xt}-row-indent`]:{float:"right"}}}}},Xd=pt=>{const{componentCls:xt,antCls:nn,iconCls:ln,fontSizeIcon:Hn,padding:bn,paddingXS:ai,tableHeaderIconColor:si,tableHeaderIconColorHover:qn,tableSelectionColumnWidth:Mi}=pt;return{[`${xt}-wrapper`]:{[`${xt}-selection-col`]:{width:Mi,[`&${xt}-selection-col-with-dropdown`]:{width:Mi+Hn+bn/4}},[`${xt}-bordered ${xt}-selection-col`]:{width:Mi+ai*2,[`&${xt}-selection-col-with-dropdown`]:{width:Mi+Hn+bn/4+ai*2}},[`
table tr th${xt}-selection-column,
table tr td${xt}-selection-column
`]:{paddingInlineEnd:pt.paddingXS,paddingInlineStart:pt.paddingXS,textAlign:"center",[`${nn}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${xt}-selection-column${xt}-cell-fix-left`]:{zIndex:pt.zIndexTableFixed+1},[`table tr th${xt}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${xt}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${xt}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${pt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${pt.tablePaddingHorizontal/4}px`,[ln]:{color:si,fontSize:Hn,verticalAlign:"baseline","&:hover":{color:qn}}}}}},ud=pt=>{const{componentCls:xt}=pt,nn=(ln,Hn,bn,ai)=>({[`${xt}${xt}-${ln}`]:{fontSize:ai,[`
${xt}-title,
${xt}-footer,
${xt}-cell,
${xt}-thead > tr > th,
${xt}-tbody > tr > th,
${xt}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{padding:`${Hn}px ${bn}px`},[`${xt}-filter-trigger`]:{marginInlineEnd:`-${bn/2}px`},[`${xt}-expanded-row-fixed`]:{margin:`-${Hn}px -${bn}px`},[`${xt}-tbody`]:{[`${xt}-wrapper:only-child ${xt}`]:{marginBlock:`-${Hn}px`,marginInline:`${pt.tableExpandColumnWidth-bn}px -${bn}px`}},[`${xt}-selection-column`]:{paddingInlineStart:`${bn/4}px`}}});return{[`${xt}-wrapper`]:Object.assign(Object.assign({},nn("middle",pt.tablePaddingVerticalMiddle,pt.tablePaddingHorizontalMiddle,pt.tableFontSizeMiddle)),nn("small",pt.tablePaddingVerticalSmall,pt.tablePaddingHorizontalSmall,pt.tableFontSizeSmall))}},sc=pt=>{const{componentCls:xt,marginXXS:nn,fontSizeIcon:ln,tableHeaderIconColor:Hn,tableHeaderIconColorHover:bn}=pt;return{[`${xt}-wrapper`]:{[`${xt}-thead th${xt}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${pt.motionDurationSlow}`,"&:hover":{background:pt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:pt.colorPrimary},[`
&${xt}-cell-fix-left:hover,
&${xt}-cell-fix-right:hover
`]:{background:pt.tableFixedHeaderSortActiveBg}},[`${xt}-thead th${xt}-column-sort`]:{background:pt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${xt}-column-sort`]:{background:pt.tableBodySortBg},[`${xt}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${xt}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${xt}-column-sorter`]:{marginInlineStart:nn,color:Hn,fontSize:0,transition:`color ${pt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:ln,"&.active":{color:pt.colorPrimary}},[`${xt}-column-sorter-up + ${xt}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${xt}-column-sorters:hover ${xt}-column-sorter`]:{color:bn}}}},_u=pt=>{const{componentCls:xt,opacityLoading:nn,tableScrollThumbBg:ln,tableScrollThumbBgHover:Hn,tableScrollThumbSize:bn,tableScrollBg:ai,zIndexTableSticky:si,stickyScrollBarBorderRadius:qn}=pt,Mi=`${pt.lineWidth}px ${pt.lineType} ${pt.tableBorderColor}`;return{[`${xt}-wrapper`]:{[`${xt}-sticky`]:{"&-holder":{position:"sticky",zIndex:si,background:pt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${bn}px !important`,zIndex:si,display:"flex",alignItems:"center",background:ai,borderTop:Mi,opacity:nn,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:bn,backgroundColor:ln,borderRadius:qn,transition:`all ${pt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:Hn}}}}}}},kl=pt=>{const{componentCls:xt,lineWidth:nn,tableBorderColor:ln}=pt,Hn=`${nn}px ${pt.lineType} ${ln}`;return{[`${xt}-wrapper`]:{[`${xt}-summary`]:{position:"relative",zIndex:pt.zIndexTableFixed,background:pt.tableBg,"> tr":{"> th, > td":{borderBottom:Hn}}},[`div${xt}-summary`]:{boxShadow:`0 -${nn}px 0 ${ln}`}}}},xc=pt=>{const{componentCls:xt}=pt,nn=`${pt.lineWidth}px ${pt.lineType} ${pt.tableBorderColor}`,ln=`${xt}-expanded-row-cell`;return{[`${xt}-wrapper`]:{[`${xt}-tbody-virtual`]:{[`${xt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${xt}-cell`]:{borderBottom:nn},[`${xt}-expanded-row`]:{[`${ln}${ln}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${pt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${xt}-bordered`]:{[`${xt}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:nn,position:"absolute"},[`${xt}-cell`]:{borderInlineEnd:nn,[`&${xt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-pt.lineWidth,borderInlineStart:nn}}}}}}};const Lu=pt=>{const{componentCls:xt,fontWeightStrong:nn,tablePaddingVertical:ln,tablePaddingHorizontal:Hn,lineWidth:bn,lineType:ai,tableBorderColor:si,tableFontSize:qn,tableBg:Mi,tableRadius:Di,tableHeaderTextColor:Ni,motionDurationMid:gr,tableHeaderBg:dr,tableHeaderCellSplitColor:nr,tableRowHoverBg:Kr,tableSelectedRowBg:sr,tableSelectedRowHoverBg:Rr,tableFooterTextColor:Tr,tableFooterBg:to,paddingContentVerticalLG:mo}=pt,To=`${bn}px ${ai} ${si}`;return{[`${xt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,_a.dF)()),{[xt]:Object.assign(Object.assign({},(0,_a.Wf)(pt)),{fontSize:qn,background:Mi,borderRadius:`${Di}px ${Di}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Di}px ${Di}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
${xt}-cell,
${xt}-thead > tr > th,
${xt}-tbody > tr > th,
${xt}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{position:"relative",padding:`${mo}px ${Hn}px`,overflowWrap:"break-word"},[`${xt}-title`]:{padding:`${ln}px ${Hn}px`},[`${xt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Ni,fontWeight:nn,textAlign:"start",background:dr,borderBottom:To,transition:`background ${gr} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${xt}-selection-column):not(${xt}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:nr,transform:"translateY(-50%)",transition:`background-color ${gr}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${xt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${gr}, border-color ${gr}`,borderBottom:To,[`
> ${xt}-wrapper:only-child,
> ${xt}-expanded-row-fixed > ${xt}-wrapper:only-child
`]:{[xt]:{marginBlock:`-${ln}px`,marginInline:`${pt.tableExpandColumnWidth-Hn}px -${Hn}px`,[`${xt}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Ni,fontWeight:nn,textAlign:"start",background:dr,borderBottom:To,transition:`background ${gr} ease`},[`
&${xt}-row:hover > th,
&${xt}-row:hover > td,
> th${xt}-cell-row-hover,
> td${xt}-cell-row-hover
`]:{background:Kr},[`&${xt}-row-selected`]:{"> th, > td":{background:sr},"&:hover > th, &:hover > td":{background:Rr}}}},[`${xt}-footer`]:{padding:`${ln}px ${Hn}px`,color:Tr,background:to}})}};var lc=(0,ia.Z)("Table",pt=>{const{colorTextHeading:xt,colorSplit:nn,colorIcon:ln,colorIconHover:Hn,opacityLoading:bn,colorBgContainer:ai,controlInteractiveSize:si,headerBg:qn,headerColor:Mi,headerSortActiveBg:Di,headerSortHoverBg:Ni,bodySortBg:gr,rowHoverBg:dr,rowSelectedBg:nr,rowSelectedHoverBg:Kr,rowExpandedBg:sr,cellPaddingBlock:Rr,cellPaddingInline:Tr,cellPaddingBlockMD:to,cellPaddingInlineMD:mo,cellPaddingBlockSM:To,cellPaddingInlineSM:Vr,borderColor:po,footerBg:Xo,footerColor:Jr,headerBorderRadius:lo,cellFontSize:Qr,cellFontSizeMD:br,cellFontSizeSM:oo,headerSplitColor:Mo,fixedHeaderSortActiveBg:zo,headerFilterHoverBg:Ho,filterDropdownBg:Ur,expandIconBg:Yo,selectionColumnWidth:na,stickyScrollBarBg:Ta}=pt,ma=new ul.C(ln),ds=new ul.C(Hn),ja=2,ta=(0,Hs.TS)(pt,{tableFontSize:Qr,tableBg:ai,tableRadius:lo,tablePaddingVertical:Rr,tablePaddingHorizontal:Tr,tablePaddingVerticalMiddle:to,tablePaddingHorizontalMiddle:mo,tablePaddingVerticalSmall:To,tablePaddingHorizontalSmall:Vr,tableBorderColor:po,tableHeaderTextColor:Mi,tableHeaderBg:qn,tableFooterTextColor:Jr,tableFooterBg:Xo,tableHeaderCellSplitColor:Mo,tableHeaderSortBg:Di,tableHeaderSortHoverBg:Ni,tableHeaderIconColor:ma.clone().setAlpha(ma.getAlpha()*bn).toRgbString(),tableHeaderIconColorHover:ds.clone().setAlpha(ds.getAlpha()*bn).toRgbString(),tableBodySortBg:gr,tableFixedHeaderSortActiveBg:zo,tableHeaderFilterActiveBg:Ho,tableFilterDropdownBg:Ur,tableRowHoverBg:dr,tableSelectedRowBg:nr,tableSelectedRowHoverBg:Kr,zIndexTableFixed:ja,zIndexTableSticky:ja+1,tableFontSizeMiddle:br,tableFontSizeSmall:oo,tableSelectionColumnWidth:na,tableExpandIconBg:Yo,tableExpandColumnWidth:si+2*pt.padding,tableExpandedRowBg:sr,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Ta,tableScrollThumbBgHover:xt,tableScrollBg:nn});return[Lu(ta),Rf(ta),kl(ta),sc(ta),Ps(ta),Ja(ta),jf(ta),Va(ta),kl(ta),wa(ta),Xd(ta),ad(ta),_u(ta),nl(ta),ud(ta),wd(ta),xc(ta)]},pt=>{const{colorFillAlter:xt,colorBgContainer:nn,colorTextHeading:ln,colorFillSecondary:Hn,colorFillContent:bn,controlItemBgActive:ai,controlItemBgActiveHover:si,padding:qn,paddingSM:Mi,paddingXS:Di,colorBorderSecondary:Ni,borderRadiusLG:gr,fontSize:dr,controlHeight:nr,colorTextPlaceholder:Kr}=pt,sr=new ul.C(Hn).onBackground(nn).toHexShortString(),Rr=new ul.C(bn).onBackground(nn).toHexShortString(),Tr=new ul.C(xt).onBackground(nn).toHexShortString();return{headerBg:Tr,headerColor:ln,headerSortActiveBg:sr,headerSortHoverBg:Rr,bodySortBg:Tr,rowHoverBg:Tr,rowSelectedBg:ai,rowSelectedHoverBg:si,rowExpandedBg:xt,cellPaddingBlock:qn,cellPaddingInline:qn,cellPaddingBlockMD:Mi,cellPaddingInlineMD:Di,cellPaddingBlockSM:Di,cellPaddingInlineSM:Di,borderColor:Ni,headerBorderRadius:gr,footerBg:Tr,footerColor:ln,cellFontSize:dr,cellFontSizeMD:dr,cellFontSizeSM:dr,headerSplitColor:Ni,fixedHeaderSortActiveBg:sr,headerFilterHoverBg:bn,filterDropdownMenuBg:nn,filterDropdownBg:nn,expandIconBg:nn,selectionColumnWidth:nr,stickyScrollBarBg:Kr,stickyScrollBarBorderRadius:100}});const Jd=[],of=(pt,xt)=>{const{prefixCls:nn,className:ln,rootClassName:Hn,style:bn,size:ai,bordered:si,dropdownPrefixCls:qn,dataSource:Mi,pagination:Di,rowSelection:Ni,rowKey:gr="key",rowClassName:dr,columns:nr,children:Kr,childrenColumnName:sr,onChange:Rr,getPopupContainer:Tr,loading:to,expandIcon:mo,expandable:To,expandedRowRender:Vr,expandIconColumnIndex:po,indentSize:Xo,scroll:Jr,sortDirections:lo,locale:Qr,showSorterTooltip:br=!0,virtual:oo}=pt,Mo=Le.useMemo(()=>nr||an(Kr),[nr,Kr]),zo=Le.useMemo(()=>Mo.some(Da=>Da.responsive),[Mo]),Ho=(0,hi.Z)(zo),Ur=Le.useMemo(()=>{const Da=new Set(Object.keys(Ho).filter(rs=>Ho[rs]));return Mo.filter(rs=>!rs.responsive||rs.responsive.some(Bs=>Da.has(Bs)))},[Mo,Ho]),Yo=(0,Nr.Z)(pt,["className","style","columns"]),{locale:na=Ao.Z,direction:Ta,table:ma,renderEmpty:ds,getPrefixCls:ja,getPopupContainer:ta}=Le.useContext(or.E_),Fo=(0,$r.Z)(ai),xa=Object.assign(Object.assign({},na.Table),Qr),hs=Mi||Jd,Qa=ja("table",nn),Ns=ja("dropdown",qn),Wo=Object.assign({childrenColumnName:sr,expandIconColumnIndex:po},To),{childrenColumnName:Oo="children"}=Wo,Zo=Le.useMemo(()=>hs.some(Da=>Da==null?void 0:Da[Oo])?"nest":Vr||To&&To.expandedRowRender?"row":null,[hs]),xo={body:Le.useRef()},Aa=Le.useMemo(()=>typeof gr=="function"?gr:Da=>Da==null?void 0:Da[gr],[gr]),[vo]=kc(hs,Oo,Aa),Jo={},ga=function(Da,rs){let Bs=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var os,ba,Ts;const Rl=Object.assign(Object.assign({},Jo),Da);Bs&&((os=Jo.resetPagination)===null||os===void 0||os.call(Jo),!((ba=Rl.pagination)===null||ba===void 0)&&ba.current&&(Rl.pagination.current=1),Di&&Di.onChange&&Di.onChange(1,(Ts=Rl.pagination)===null||Ts===void 0?void 0:Ts.pageSize)),Jr&&Jr.scrollToFirstRowOnChange!==!1&&xo.body.current&&(0,Eo.Z)(0,{getContainer:()=>xo.body.current}),Rr==null||Rr(Rl.pagination,Rl.filters,Rl.sorter,{currentDataSource:wl(Mu(hs,Rl.sorterStates,Oo),Rl.filterStates),action:rs})},va=(Da,rs)=>{ga({sorter:Da,sorterStates:rs},"sort",!1)},[Us,Zs,cl,ka]=Nh({prefixCls:Qa,mergedColumns:Ur,onSorterChange:va,sortDirections:lo||["ascend","descend"],tableLocale:xa,showSorterTooltip:br}),il=Le.useMemo(()=>Mu(hs,Zs,Oo),[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:xa,dropdownPrefixCls:Ns,mergedColumns:Ur,onFilterChange:Fs,getPopupContainer:Tr||ta}),$a=wl(il,uc);Jo.filters=Ia,Jo.filterStates=uc;const Oa=Le.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,Di);Jo.pagination=Di===!1?{}:Js(da,Di),Jo.resetPagination=Xa;const _s=Le.useMemo(()=>{if(Di===!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)},[!!Di,$a,da&&da.current,da&&da.pageSize,da&&da.total]),[dl,hu]=_l({prefixCls:Qa,data:$a,pageData:_s,getRowKey:Aa,getRecordByKey:vo,expandType:Zo,childrenColumnName:Oo,locale:xa,getPopupContainer:Tr||ta},Ni),Yl=(Da,rs,Bs)=>{let os;return typeof dr=="function"?os=nt()(dr(Da,rs,Bs)):os=nt()(dr),nt()({[`${Qa}-row-selected`]:hu.has(Aa(Da,rs))},os)};Wo.__PARENT_RENDER_ICON__=Wo.expandIcon,Wo.expandIcon=Wo.expandIcon||mo||_o(xa),Zo==="nest"&&Wo.expandIconColumnIndex===void 0?Wo.expandIconColumnIndex=Ni?1:0:Wo.expandIconColumnIndex>0&&Ni&&(Wo.expandIconColumnIndex-=1),typeof Wo.indentSize!="number"&&(Wo.indentSize=typeof Xo=="number"?Xo:15);const Ds=Le.useCallback(Da=>qa(dl(Ws(Us(Da)))),[Us,Ws,dl]);let Jl,Ql;if(Di!==!1&&(da!=null&&da.total)){let Da;da.size?Da=da.size:Da=Fo==="small"||Fo==="middle"?"small":void 0;const rs=ba=>Le.createElement(Vo.Z,Object.assign({},da,{className:nt()(`${Qa}-pagination ${Qa}-pagination-${ba}`,da.className),size:Da})),Bs=Ta==="rtl"?"left":"right",{position:os}=da;if(os!==null&&Array.isArray(os)){const ba=os.find(zu=>zu.includes("top")),Ts=os.find(zu=>zu.includes("bottom")),Rl=os.every(zu=>`${zu}`=="none");!ba&&!Ts&&!Rl&&(Ql=rs(Bs)),ba&&(Jl=rs(ba.toLowerCase().replace("top",""))),Ts&&(Ql=rs(Ts.toLowerCase().replace("bottom","")))}else Ql=rs(Bs)}let za;typeof to=="boolean"?za={spinning:to}:typeof to=="object"&&(za=Object.assign({spinning:!0},to));const[rl,es]=lc(Qa),[,Ya]=(0,ko.Z)(),fu=nt()(`${Qa}-wrapper`,ma==null?void 0:ma.className,{[`${Qa}-wrapper-rtl`]:Ta==="rtl"},ln,Hn,es),Pc=Object.assign(Object.assign({},ma==null?void 0:ma.style),bn),Nu=Qr&&Qr.emptyText||(ds==null?void 0:ds("Table"))||Le.createElement(mr.Z,{componentName:"Table"}),Fu=oo?yl:Bo,gu={},ql=Le.useMemo(()=>{const{fontSize:Da,lineHeight:rs,padding:Bs,paddingXS:os,paddingSM:ba}=Ya,Ts=Math.floor(Da*rs);switch(Fo){case"large":return Bs*2+Ts;case"small":return os*2+Ts;default:return ba*2+Ts}},[Ya,Fo]);return oo&&(gu.listItemHeight=ql),rl(Le.createElement("div",{ref:xt,className:fu,style:Pc},Le.createElement(sa.Z,Object.assign({spinning:!1},za),Jl,Le.createElement(Fu,Object.assign({},gu,Yo,{columns:Ur,direction:Ta,expandable:Wo,prefixCls:Qa,className:nt()({[`${Qa}-middle`]:Fo==="middle",[`${Qa}-small`]:Fo==="small",[`${Qa}-bordered`]:si,[`${Qa}-empty`]:hs.length===0}),data:_s,rowKey:Aa,rowClassName:Yl,emptyText:Nu,internalHooks:Oe,internalRefs:xo,transformColumns:Ds})),Ql)))};var Ah=Le.forwardRef(of);const Hf=(pt,xt)=>{const nn=Le.useRef(0);return nn.current+=1,Le.createElement(Ah,Object.assign({},pt,{ref:xt,_renderTimes:nn.current}))},Ol=Le.forwardRef(Hf);Ol.SELECTION_COLUMN=Ss,Ol.EXPAND_COLUMN=ge,Ol.SELECTION_ALL=ms,Ol.SELECTION_INVERT=Ua,Ol.SELECTION_NONE=ss,Ol.Column=$o,Ol.ColumnGroup=zr,Ol.Summary=Ye;var Oc=Ol,dg=Oc},12563:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return bt}});var ge=pe(59301),Oe=pe(99267),Ke=pe(92310),st=pe.n(Ke),Ge=pe(36785),_e=pe(47729),Le=pe(14088),Tt=pe(36355),Pt=pe(17313),Xe=pe(37613),Et=pe(83116);const ct=He=>{const{paddingXXS:wt,lineWidth:nt,tagPaddingHorizontal:Dt,componentCls:ht}=He,zt=Dt-nt,Yt=wt-nt;return{[ht]:Object.assign(Object.assign({},(0,Pt.Wf)(He)),{display:"inline-block",height:"auto",marginInlineEnd:He.marginXS,paddingInline:zt,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",[`&${ht}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:He.defaultColor},[`${ht}-close-icon`]:{marginInlineStart:Yt,color:He.colorTextDescription,fontSize:He.tagIconSize,cursor:"pointer",transition:`all ${He.motionDurationMid}`,"&:hover":{color:He.colorTextHeading}},[`&${ht}-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(${ht}-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:zt}}),[`${ht}-borderless`]:{borderColor:"transparent",background:He.tagBorderlessBg}}},It=He=>{const{lineWidth:wt,fontSizeIcon:nt}=He,Dt=He.fontSizeSM,ht=`${He.lineHeightSM*Dt}px`;return(0,Xe.TS)(He,{tagFontSize:Dt,tagLineHeight:ht,tagIconSize:nt-2*wt,tagPaddingHorizontal:8,tagBorderlessBg:He.colorFillTertiary})},Be=He=>({defaultBg:He.colorFillQuaternary,defaultColor:He.colorText});var ne=(0,Et.Z)("Tag",He=>{const wt=It(He);return ct(wt)},Be),ee=function(He,wt){var nt={};for(var Dt in He)Object.prototype.hasOwnProperty.call(He,Dt)&&wt.indexOf(Dt)<0&&(nt[Dt]=He[Dt]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,Dt=Object.getOwnPropertySymbols(He);ht<Dt.length;ht++)wt.indexOf(Dt[ht])<0&&Object.prototype.propertyIsEnumerable.call(He,Dt[ht])&&(nt[Dt[ht]]=He[Dt[ht]]);return nt},se=He=>{const{prefixCls:wt,style:nt,className:Dt,checked:ht,onChange:zt,onClick:Yt}=He,Ut=ee(He,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:it,tag:Ve}=ge.useContext(Tt.E_),Wt=An=>{zt==null||zt(!ht),Yt==null||Yt(An)},Ln=it("tag",wt),[Nn,$t]=ne(Ln),rn=st()(Ln,`${Ln}-checkable`,{[`${Ln}-checkable-checked`]:ht},Ve==null?void 0:Ve.className,Dt,$t);return Nn(ge.createElement("span",Object.assign({},Ut,{style:Object.assign(Object.assign({},nt),Ve==null?void 0:Ve.style),className:rn,onClick:Wt})))},he=pe(45157);const ve=He=>(0,he.Z)(He,(wt,nt)=>{let{textColor:Dt,lightBorderColor:ht,lightColor:zt,darkColor:Yt}=nt;return{[`${He.componentCls}-${wt}`]:{color:Dt,background:zt,borderColor:ht,"&-inverse":{color:He.colorTextLightSolid,background:Yt,borderColor:Yt},[`&${He.componentCls}-borderless`]:{borderColor:"transparent"}}}});var be=(0,Et.b)(["Tag","preset"],He=>{const wt=It(He);return ve(wt)},Be);function ke(He){return typeof He!="string"?He:He.charAt(0).toUpperCase()+He.slice(1)}const Ae=(He,wt,nt)=>{const Dt=ke(nt);return{[`${He.componentCls}-${wt}`]:{color:He[`color${nt}`],background:He[`color${Dt}Bg`],borderColor:He[`color${Dt}Border`],[`&${He.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ze=(0,Et.b)(["Tag","status"],He=>{const wt=It(He);return[Ae(wt,"success","Success"),Ae(wt,"processing","Info"),Ae(wt,"error","Error"),Ae(wt,"warning","Warning")]},Be),Ze=function(He,wt){var nt={};for(var Dt in He)Object.prototype.hasOwnProperty.call(He,Dt)&&wt.indexOf(Dt)<0&&(nt[Dt]=He[Dt]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,Dt=Object.getOwnPropertySymbols(He);ht<Dt.length;ht++)wt.indexOf(Dt[ht])<0&&Object.prototype.propertyIsEnumerable.call(He,Dt[ht])&&(nt[Dt[ht]]=He[Dt[ht]]);return nt};const ot=(He,wt)=>{const{prefixCls:nt,className:Dt,rootClassName:ht,style:zt,children:Yt,icon:Ut,color:it,onClose:Ve,closeIcon:Wt,closable:Ln,bordered:Nn=!0}=He,$t=Ze(He,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:rn,direction:An,tag:ti}=ge.useContext(Tt.E_),[xn,Qn]=ge.useState(!0);ge.useEffect(()=>{"visible"in $t&&Qn($t.visible)},[$t.visible]);const Ot=(0,Ge.o2)(it),Cn=(0,Ge.yT)(it),Wn=Ot||Cn,We=Object.assign(Object.assign({backgroundColor:it&&!Wn?it:void 0},ti==null?void 0:ti.style),zt),Ee=rn("tag",nt),[Pe,De]=ne(Ee),Fe=st()(Ee,ti==null?void 0:ti.className,{[`${Ee}-${it}`]:Wn,[`${Ee}-has-color`]:it&&!Wn,[`${Ee}-hidden`]:!xn,[`${Ee}-rtl`]:An==="rtl",[`${Ee}-borderless`]:!Nn},Dt,ht,De),ye=St=>{St.stopPropagation(),Ve==null||Ve(St),!St.defaultPrevented&&Qn(!1)},[,Qe]=(0,_e.Z)(Ln,Wt,St=>St===null?ge.createElement(Oe.Z,{className:`${Ee}-close-icon`,onClick:ye}):ge.createElement("span",{className:`${Ee}-close-icon`,onClick:ye},St),null,!1),vt=typeof $t.onClick=="function"||Yt&&Yt.type==="a",Ye=Ut||null,Je=Ye?ge.createElement(ge.Fragment,null,Ye,Yt&&ge.createElement("span",null,Yt)):Yt,yt=ge.createElement("span",Object.assign({},$t,{ref:wt,className:Fe,style:We}),Je,Qe,Ot&&ge.createElement(be,{key:"preset",prefixCls:Ee}),Cn&&ge.createElement(ze,{key:"status",prefixCls:Ee}));return Pe(vt?ge.createElement(Le.Z,{component:"Tag"},yt):yt)},qe=ge.forwardRef(ot);qe.CheckableTag=se;var bt=qe},98228:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return Lr}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(92413),st=pe(26407),Ge=pe(33708),_e=pe(33606),Le=pe(37061),Tt=pe(39559),Pt=pe(77861),Xe=pe(17115),Et=pe(90782),ct=pe(18929),It=pe(48736),Be=pe(59301),ne=function(jn){var Ne=Be.useRef({valueLabels:new Map});return Be.useMemo(function(){var Ei=Ne.current.valueLabels,Oi=new Map,on=jn.map(function(ui){var vi,bi=ui.value,In=(vi=ui.label)!==null&&vi!==void 0?vi:Ei.get(bi);return Oi.set(bi,In),(0,Ge.Z)((0,Ge.Z)({},ui),{},{label:In})});return Ne.current.valueLabels=Oi,[on]},[jn])},ee=function(jn,Ne,Ei,Oi){return Be.useMemo(function(){var on=jn.map(function(In){var Gt=In.value;return Gt}),ui=Ne.map(function(In){var Gt=In.value;return Gt}),vi=on.filter(function(In){return!Oi[In]});if(Ei){var bi=(0,Et.S)(on,!0,Oi);on=bi.checkedKeys,ui=bi.halfCheckedKeys}return[Array.from(new Set([].concat((0,st.Z)(vi),(0,st.Z)(on)))),ui]},[jn,Ne,Ei,Oi])},ce=pe(71430),se=function(jn,Ne){return Be.useMemo(function(){var Ei=(0,ce.I8)(jn,{fieldNames:Ne,initWrapper:function(on){return(0,Ge.Z)((0,Ge.Z)({},on),{},{valueEntities:new Map})},processEntity:function(on,ui){var vi=on.node[Ne.value];if(0)var bi;ui.valueEntities.set(vi,on)}});return Ei},[jn,Ne])},he=pe(400),ve=pe(11592),be=function(){return null},ke=be,Ae=["children","value"];function ze(jn){return(0,ve.Z)(jn).map(function(Ne){if(!Be.isValidElement(Ne)||!Ne.type)return null;var Ei=Ne,Oi=Ei.key,on=Ei.props,ui=on.children,vi=on.value,bi=(0,Le.Z)(on,Ae),In=(0,Ge.Z)({key:Oi,value:vi},bi),Gt=ze(ui);return Gt.length&&(In.children=Gt),In}).filter(function(Ne){return Ne})}function Ze(jn){if(!jn)return jn;var Ne=(0,Ge.Z)({},jn);return"props"in Ne||Object.defineProperty(Ne,"props",{get:function(){return(0,It.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),Ne}}),Ne}function ot(jn,Ne,Ei,Oi,on,ui){var vi=null,bi=null;function In(){function Gt(Kt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Kt.map(function(an,vn){var Bt="".concat(jt,"-").concat(vn),at=an[ui.value],cn=Ei.includes(at),Sn=Gt(an[ui.children]||[],Bt,cn),Un=Be.createElement(ke,an,Sn.map(function(Rt){return Rt.node}));if(Ne===at&&(vi=Un),cn){var un={pos:Bt,node:Un,children:Sn};return ft||bi.push(un),un}return null}).filter(function(an){return an})}bi||(bi=[],Gt(Oi),bi.sort(function(Kt,jt){var ft=Kt.node.props.value,an=jt.node.props.value,vn=Ei.indexOf(ft),Bt=Ei.indexOf(an);return vn-Bt}))}Object.defineProperty(jn,"triggerNode",{get:function(){return(0,It.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),In(),vi}}),Object.defineProperty(jn,"allCheckedNodes",{get:function(){return(0,It.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),In(),on?bi:bi.map(function(Kt){var jt=Kt.node;return jt})}})}var qe=function(jn,Ne,Ei){var Oi=Ei.treeNodeFilterProp,on=Ei.filterTreeNode,ui=Ei.fieldNames,vi=ui.children;return Be.useMemo(function(){if(!Ne||on===!1)return jn;var bi;if(typeof on=="function")bi=on;else{var In=Ne.toUpperCase();bi=function(jt,ft){var an=ft[Oi];return String(an).toUpperCase().includes(In)}}function Gt(Kt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Kt.reduce(function(ft,an){var vn=an[vi],Bt=jt||bi(Ne,Ze(an)),at=Gt(vn||[],Bt);return(Bt||at.length)&&ft.push((0,Ge.Z)((0,Ge.Z)({},an),{},(0,he.Z)({isLeaf:void 0},vi,at))),ft},[])}return Gt(jn)},[jn,Ne,vi,Oi,on])};function bt(jn){var Ne=Be.useRef();Ne.current=jn;var Ei=Be.useCallback(function(){return Ne.current.apply(Ne,arguments)},[]);return Ei}function He(jn,Ne){var Ei=Ne.id,Oi=Ne.pId,on=Ne.rootPId,ui={},vi=[],bi=jn.map(function(In){var Gt=(0,Ge.Z)({},In),Kt=Gt[Ei];return ui[Kt]=Gt,Gt.key=Gt.key||Kt,Gt});return bi.forEach(function(In){var Gt=In[Oi],Kt=ui[Gt];Kt&&(Kt.children=Kt.children||[],Kt.children.push(In)),(Gt===on||!Kt&&on===null)&&vi.push(In)}),vi}function wt(jn,Ne,Ei){return Be.useMemo(function(){return jn?Ei?He(jn,(0,Ge.Z)({id:"id",pId:"pId",rootPId:null},Ei!==!0?Ei:{})):jn:ze(Ne)},[Ne,Ei,jn])}var nt=Be.createContext(null),Dt=nt,ht=pe(10228),zt=pe(80547),Yt=pe(23130),Ut=Be.createContext(null),it=Ut;function Ve(jn){return Array.isArray(jn)?jn:jn!==void 0?[jn]:[]}function Wt(jn){var Ne=jn||{},Ei=Ne.label,Oi=Ne.value,on=Ne.children,ui=Oi||"value";return{_title:Ei?[Ei]:["title","label"],value:ui,key:ui,children:on||"children"}}function Ln(jn){return!jn||jn.disabled||jn.disableCheckbox||jn.checkable===!1}function Nn(jn,Ne){var Ei=[];function Oi(on){on.forEach(function(ui){var vi=ui[Ne.children];vi&&(Ei.push(ui[Ne.value]),Oi(vi))})}return Oi(jn),Ei}function $t(jn){return jn==null}var rn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},An=function(Ne,Ei){var Oi=(0,Pt.lk)(),on=Oi.prefixCls,ui=Oi.multiple,vi=Oi.searchValue,bi=Oi.toggleOpen,In=Oi.open,Gt=Oi.notFoundContent,Kt=Be.useContext(it),jt=Kt.virtual,ft=Kt.listHeight,an=Kt.listItemHeight,vn=Kt.treeData,Bt=Kt.fieldNames,at=Kt.onSelect,cn=Kt.dropdownMatchSelectWidth,Sn=Kt.treeExpandAction,Un=Be.useContext(Dt),un=Un.checkable,Rt=Un.checkedKeys,zn=Un.halfCheckedKeys,ni=Un.treeExpandedKeys,gi=Un.treeDefaultExpandAll,tn=Un.treeDefaultExpandedKeys,Bn=Un.onTreeExpand,Ft=Un.treeIcon,wn=Un.showTreeIcon,gn=Un.switcherIcon,yn=Un.treeLine,On=Un.treeNodeFilterProp,$n=Un.loadData,Yn=Un.treeLoadedKeys,ii=Un.treeMotion,Xn=Un.onTreeLoad,di=Un.keyEntities,Hi=Be.useRef(),$i=(0,zt.Z)(function(){return vn},[In,vn],function(qi,Dr){return Dr[0]&&qi[1]!==Dr[1]}),Wi=Be.useState(null),Xt=(0,_e.Z)(Wi,2),Si=Xt[0],Ki=Xt[1],Ti=di[Si],cr=Be.useMemo(function(){return un?{checked:Rt,halfChecked:zn}:null},[un,Rt,zn]);Be.useEffect(function(){if(In&&!ui&&Rt.length){var qi;(qi=Hi.current)===null||qi===void 0||qi.scrollTo({key:Rt[0]}),Ki(Rt[0])}},[In]);var Qi=String(vi).toLowerCase(),yr=function(Dr){return Qi?String(Dr[On]).toLowerCase().includes(Qi):!1},fr=Be.useState(tn),Vi=(0,_e.Z)(fr,2),Mr=Vi[0],Dn=Vi[1],Wr=Be.useState(null),_n=(0,_e.Z)(Wr,2),Ir=_n[0],eo=_n[1],xr=Be.useMemo(function(){return ni?(0,st.Z)(ni):vi?Ir:Mr},[Mr,Ir,ni,vi]);Be.useEffect(function(){vi&&eo(Nn(vn,Bt))},[vi]);var bo=function(Dr){Dn(Dr),eo(Dr),Bn&&Bn(Dr)},Yr=function(Dr){Dr.preventDefault()},ur=function(Dr,Ai){var et=Ai.node;un&&Ln(et)||(at(et.key,{selected:!Rt.includes(et.key)}),ui||bi(!1))};if(Be.useImperativeHandle(Ei,function(){var qi;return{scrollTo:(qi=Hi.current)===null||qi===void 0?void 0:qi.scrollTo,onKeyDown:function(Ai){var et,jr=Ai.which;switch(jr){case ht.Z.UP:case ht.Z.DOWN:case ht.Z.LEFT:case ht.Z.RIGHT:(et=Hi.current)===null||et===void 0||et.onKeyDown(Ai);break;case ht.Z.ENTER:{if(Ti){var yo=(Ti==null?void 0:Ti.node)||{},Or=yo.selectable,wo=yo.value;Or!==!1&&ur(null,{node:{key:Si},selected:!Rt.includes(wo)})}break}case ht.Z.ESC:bi(!1)}},onKeyUp:function(){}}}),$i.length===0)return Be.createElement("div",{role:"listbox",className:"".concat(on,"-empty"),onMouseDown:Yr},Gt);var ir={fieldNames:Bt};return Yn&&(ir.loadedKeys=Yn),xr&&(ir.expandedKeys=xr),Be.createElement("div",{onMouseDown:Yr},Ti&&In&&Be.createElement("span",{style:rn,"aria-live":"assertive"},Ti.node.value),Be.createElement(Yt.Z,(0,Ke.Z)({ref:Hi,focusable:!1,prefixCls:"".concat(on,"-tree"),treeData:$i,height:ft,itemHeight:an,virtual:jt!==!1&&cn!==!1,multiple:ui,icon:Ft,showIcon:wn,switcherIcon:gn,showLine:yn,loadData:vi?null:$n,motion:ii,activeKey:Si,checkable:un,checkStrictly:!0,checkedKeys:cr,selectedKeys:un?[]:Rt,defaultExpandAll:gi},ir,{onActiveChange:Ki,onSelect:ur,onCheck:ur,onExpand:bo,onLoad:Xn,filterTreeNode:yr,expandAction:Sn})))},ti=Be.forwardRef(An);ti.displayName="OptionList";var xn=ti,Qn="SHOW_ALL",Ot="SHOW_PARENT",Cn="SHOW_CHILD";function Wn(jn,Ne,Ei,Oi){var on=new Set(jn);return Ne===Cn?jn.filter(function(ui){var vi=Ei[ui];return!(vi&&vi.children&&vi.children.some(function(bi){var In=bi.node;return on.has(In[Oi.value])})&&vi.children.every(function(bi){var In=bi.node;return Ln(In)||on.has(In[Oi.value])}))}):Ne===Ot?jn.filter(function(ui){var vi=Ei[ui],bi=vi?vi.parent:null;return!(bi&&!Ln(bi.node)&&on.has(bi.key))}):jn}function We(jn){var Ne=jn.searchPlaceholder,Ei=jn.treeCheckStrictly,Oi=jn.treeCheckable,on=jn.labelInValue,ui=jn.value,vi=jn.multiple;warning(!Ne,"`searchPlaceholder` has been removed."),Ei&&on===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(on||Ei)&&warning(toArray(ui).every(function(bi){return bi&&_typeof(bi)==="object"&&"value"in bi}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),Ei||vi||Oi?warning(!ui||Array.isArray(ui),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(ui),"`value` should not be array when `TreeSelect` is single mode.")}var Ee=null,Pe=["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 De(jn){return!jn||(0,Tt.Z)(jn)!=="object"}var Fe=Be.forwardRef(function(jn,Ne){var Ei=jn.id,Oi=jn.prefixCls,on=Oi===void 0?"rc-tree-select":Oi,ui=jn.value,vi=jn.defaultValue,bi=jn.onChange,In=jn.onSelect,Gt=jn.onDeselect,Kt=jn.searchValue,jt=jn.inputValue,ft=jn.onSearch,an=jn.autoClearSearchValue,vn=an===void 0?!0:an,Bt=jn.filterTreeNode,at=jn.treeNodeFilterProp,cn=at===void 0?"value":at,Sn=jn.showCheckedStrategy,Un=jn.treeNodeLabelProp,un=jn.multiple,Rt=jn.treeCheckable,zn=jn.treeCheckStrictly,ni=jn.labelInValue,gi=jn.fieldNames,tn=jn.treeDataSimpleMode,Bn=jn.treeData,Ft=jn.children,wn=jn.loadData,gn=jn.treeLoadedKeys,yn=jn.onTreeLoad,On=jn.treeDefaultExpandAll,$n=jn.treeExpandedKeys,Yn=jn.treeDefaultExpandedKeys,ii=jn.onTreeExpand,Xn=jn.treeExpandAction,di=jn.virtual,Hi=jn.listHeight,$i=Hi===void 0?200:Hi,Wi=jn.listItemHeight,Xt=Wi===void 0?20:Wi,Si=jn.onDropdownVisibleChange,Ki=jn.dropdownMatchSelectWidth,Ti=Ki===void 0?!0:Ki,cr=jn.treeLine,Qi=jn.treeIcon,yr=jn.showTreeIcon,fr=jn.switcherIcon,Vi=jn.treeMotion,Mr=(0,Le.Z)(jn,Pe),Dn=(0,Xe.ZP)(Ei),Wr=Rt&&!zn,_n=Rt||zn,Ir=zn||ni,eo=_n||un,xr=(0,ct.Z)(vi,{value:ui}),bo=(0,_e.Z)(xr,2),Yr=bo[0],ur=bo[1],ir=Be.useMemo(function(){return Rt?Sn||Cn:Qn},[Sn,Rt]),qi=Be.useMemo(function(){return Wt(gi)},[JSON.stringify(gi)]),Dr=(0,ct.Z)("",{value:Kt!==void 0?Kt:jt,postState:function(hr){return hr||""}}),Ai=(0,_e.Z)(Dr,2),et=Ai[0],jr=Ai[1],yo=function(hr){jr(hr),ft==null||ft(hr)},Or=wt(Bn,Ft,tn),wo=se(Or,qi),co=wo.keyEntities,$o=wo.valueEntities,Gr=Be.useCallback(function(tr){var hr=[],Sr=[];return tr.forEach(function(kr){$o.has(kr)?Sr.push(kr):hr.push(kr)}),{missingRawValues:hr,existRawValues:Sr}},[$o]),zr=qe(Or,et,{fieldNames:qi,treeNodeFilterProp:cn,filterTreeNode:Bt}),Nr=Be.useCallback(function(tr){if(tr){if(Un)return tr[Un];for(var hr=qi._title,Sr=0;Sr<hr.length;Sr+=1){var kr=tr[hr[Sr]];if(kr!==void 0)return kr}}},[qi,Un]),Eo=Be.useCallback(function(tr){var hr=Ve(tr);return hr.map(function(Sr){return De(Sr)?{value:Sr}:Sr})},[]),or=Be.useCallback(function(tr){var hr=Eo(tr);return hr.map(function(Sr){var kr=Sr.label,Er=Sr.value,Br=Sr.halfChecked,Zr,zi=$o.get(Er);if(zi){var oa;kr=(oa=kr)!==null&&oa!==void 0?oa:Nr(zi.node),Zr=zi.node.disabled}else if(kr===void 0){var Ra=Eo(Yr).find(function(Ls){return Ls.value===Er});kr=Ra.label}return{label:kr,value:Er,halfChecked:Br,disabled:Zr}})},[$o,Nr,Eo,Yr]),mr=Be.useMemo(function(){return Eo(Yr)},[Eo,Yr]),$r=Be.useMemo(function(){var tr=[],hr=[];return mr.forEach(function(Sr){Sr.halfChecked?hr.push(Sr):tr.push(Sr)}),[tr,hr]},[mr]),hi=(0,_e.Z)($r,2),Ao=hi[0],Vo=hi[1],sa=Be.useMemo(function(){return Ao.map(function(tr){return tr.value})},[Ao]),ko=ee(Ao,Vo,Wr,co),Io=(0,_e.Z)(ko,2),_o=Io[0],la=Io[1],pa=Be.useMemo(function(){var tr=Wn(_o,ir,co,qi),hr=tr.map(function(Br){var Zr,zi,oa;return(Zr=(zi=co[Br])===null||zi===void 0||(oa=zi.node)===null||oa===void 0?void 0:oa[qi.value])!==null&&Zr!==void 0?Zr:Br}),Sr=hr.map(function(Br){var Zr=Ao.find(function(zi){return zi.value===Br});return{value:Br,label:Zr==null?void 0:Zr.label}}),kr=or(Sr),Er=kr[0];return!eo&&Er&&$t(Er.value)&&$t(Er.label)?[]:kr.map(function(Br){var Zr;return(0,Ge.Z)((0,Ge.Z)({},Br),{},{label:(Zr=Br.label)!==null&&Zr!==void 0?Zr:Br.value})})},[qi,eo,_o,Ao,or,ir,co]),Lt=ne(pa),wi=(0,_e.Z)(Lt,1),_t=wi[0],Yi=bt(function(tr,hr,Sr){var kr=or(tr);if(ur(kr),vn&&jr(""),bi){var Er=tr;if(Wr){var Br=Wn(tr,ir,co,qi);Er=Br.map(function(Ba){var zs=$o.get(Ba);return zs?zs.node[qi.value]:Ba})}var Zr=hr||{triggerValue:void 0,selected:void 0},zi=Zr.triggerValue,oa=Zr.selected,Ra=Er;if(zn){var Ls=Vo.filter(function(Ba){return!Er.includes(Ba.value)});Ra=[].concat((0,st.Z)(Ra),(0,st.Z)(Ls))}var Ys=or(Ra),tl={preValue:Ao,triggerValue:zi},Ui=!0;(zn||Sr==="selection"&&!oa)&&(Ui=!1),ot(tl,zi,tr,Or,Ui,qi),_n?tl.checked=oa:tl.selected=oa;var La=Ir?Ys:Ys.map(function(Ba){return Ba.value});bi(eo?La:La[0],Ir?null:Ys.map(function(Ba){return Ba.label}),tl)}}),Ci=Be.useCallback(function(tr,hr){var Sr,kr=hr.selected,Er=hr.source,Br=co[tr],Zr=Br==null?void 0:Br.node,zi=(Sr=Zr==null?void 0:Zr[qi.value])!==null&&Sr!==void 0?Sr:tr;if(!eo)Yi([zi],{selected:!0,triggerValue:zi},"option");else{var oa=kr?[].concat((0,st.Z)(sa),[zi]):_o.filter(function(zs){return zs!==zi});if(Wr){var Ra=Gr(oa),Ls=Ra.missingRawValues,Ys=Ra.existRawValues,tl=Ys.map(function(zs){return $o.get(zs).key}),Ui;if(kr){var La=(0,Et.S)(tl,!0,co);Ui=La.checkedKeys}else{var Ba=(0,Et.S)(tl,{checked:!1,halfCheckedKeys:la},co);Ui=Ba.checkedKeys}oa=[].concat((0,st.Z)(Ls),(0,st.Z)(Ui.map(function(zs){return co[zs].node[qi.value]})))}Yi(oa,{selected:kr,triggerValue:zi},Er||"option")}kr||!eo?In==null||In(zi,Ze(Zr)):Gt==null||Gt(zi,Ze(Zr))},[Gr,$o,co,qi,eo,sa,Yi,Wr,In,Gt,_o,la]),Cr=Be.useCallback(function(tr){if(Si){var hr={};Object.defineProperty(hr,"documentClickClose",{get:function(){return(0,It.ZP)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),Si(tr,hr)}},[Si]),Ri=bt(function(tr,hr){var Sr=tr.map(function(kr){return kr.value});if(hr.type==="clear"){Yi(Sr,{},"selection");return}hr.values.length&&Ci(hr.values[0].value,{selected:!1,source:"selection"})}),Ii=Be.useMemo(function(){return{virtual:di,dropdownMatchSelectWidth:Ti,listHeight:$i,listItemHeight:Xt,treeData:zr,fieldNames:qi,onSelect:Ci,treeExpandAction:Xn}},[di,Ti,$i,Xt,zr,qi,Ci,Xn]),er=Be.useMemo(function(){return{checkable:_n,loadData:wn,treeLoadedKeys:gn,onTreeLoad:yn,checkedKeys:_o,halfCheckedKeys:la,treeDefaultExpandAll:On,treeExpandedKeys:$n,treeDefaultExpandedKeys:Yn,onTreeExpand:ii,treeIcon:Qi,treeMotion:Vi,showTreeIcon:yr,switcherIcon:fr,treeLine:cr,treeNodeFilterProp:cn,keyEntities:co}},[_n,wn,gn,yn,_o,la,On,$n,Yn,ii,Qi,Vi,yr,fr,cr,cn,co]);return Be.createElement(it.Provider,{value:Ii},Be.createElement(Dt.Provider,{value:er},Be.createElement(Pt.Ac,(0,Ke.Z)({ref:Ne},Mr,{id:Dn,prefixCls:on,mode:eo?"multiple":void 0,displayValues:_t,onDisplayValuesChange:Ri,searchValue:et,onSearch:yo,OptionList:xn,emptyOptions:!Or.length,onDropdownVisibleChange:Cr,dropdownMatchSelectWidth:Ti}))))}),ye=Fe;ye.TreeNode=ke,ye.SHOW_ALL=Qn,ye.SHOW_PARENT=Ot,ye.SHOW_CHILD=Cn;var Qe=ye,vt=Qe,Ye=pe(2738),Je=pe(53487),yt=pe(62892),St=pe(19080),rt=pe(36355),Zt=pe(1684),dn=pe(93891),mn=pe(19716),qt=pe(32441),Gn=pe(14154),Kn=pe(58582),Nt=pe(84443),sn=pe(66339),Fn=pe(33234),hn=pe(71997),Mn=pe(98447),li=pe(37613),pi=pe(83116),mi=pe(20648);const Li=jn=>{const{componentCls:Ne,treePrefixCls:Ei,colorBgElevated:Oi}=jn,on=`.${Ei}`;return[{[`${Ne}-dropdown`]:[{padding:`${jn.paddingXS}px ${jn.paddingXS/2}px`},(0,mi.Yk)(Ei,(0,li.TS)(jn,{colorBgContainer:Oi})),{[on]:{borderRadius:0,[`${on}-list-holder-inner`]:{alignItems:"stretch",[`${on}-treenode`]:{[`${on}-node-content-wrapper`]:{flex:"auto"}}}}},(0,Mn.C2)(`${Ei}-checkbox`,jn),{"&-rtl":{direction:"rtl",[`${on}-switcher${on}-switcher_close`]:{[`${on}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function Gi(jn,Ne){return(0,pi.Z)("TreeSelect",Ei=>{const Oi=(0,li.TS)(Ei,{treePrefixCls:Ne});return[Li(Oi)]},mi.TM)(jn)}var ar=function(jn,Ne){var Ei={};for(var Oi in jn)Object.prototype.hasOwnProperty.call(jn,Oi)&&Ne.indexOf(Oi)<0&&(Ei[Oi]=jn[Oi]);if(jn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,Oi=Object.getOwnPropertySymbols(jn);on<Oi.length;on++)Ne.indexOf(Oi[on])<0&&Object.prototype.propertyIsEnumerable.call(jn,Oi[on])&&(Ei[Oi[on]]=jn[Oi[on]]);return Ei};const Xi=(jn,Ne)=>{var Ei,{prefixCls:Oi,size:on,disabled:ui,bordered:vi=!0,className:bi,rootClassName:In,treeCheckable:Gt,multiple:Kt,listHeight:jt=256,listItemHeight:ft=26,placement:an,notFoundContent:vn,switcherIcon:Bt,treeLine:at,getPopupContainer:cn,popupClassName:Sn,dropdownClassName:Un,treeIcon:un=!1,transitionName:Rt,choiceTransitionName:zn="",status:ni,treeExpandAction:gi,builtinPlacements:tn,dropdownMatchSelectWidth:Bn,popupMatchSelectWidth:Ft,allowClear:wn}=jn,gn=ar(jn,["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:yn,getPrefixCls:On,renderEmpty:$n,direction:Yn,virtual:ii,popupMatchSelectWidth:Xn,popupOverflow:di}=Be.useContext(rt.E_),Hi=On(),$i=On("select",Oi),Wi=On("select-tree",Oi),Xt=On("tree-select",Oi),{compactSize:Si,compactItemClassnames:Ki}=(0,Fn.ri)($i,Yn),[Ti,cr]=(0,Gn.Z)($i),[Qi]=Gi(Xt,Wi),yr=Oe()(Sn||Un,`${Xt}-dropdown`,{[`${Xt}-dropdown-rtl`]:Yn==="rtl"},In,cr),fr=!!(Gt||Kt),Vi=(0,Nt.Z)(gn.suffixIcon,gn.showArrow),Mr=(Ei=Ft!=null?Ft:Bn)!==null&&Ei!==void 0?Ei:Xn,{status:Dn,hasFeedback:Wr,isFormItemInput:_n,feedbackIcon:Ir}=Be.useContext(qt.aM),eo=(0,St.F)(Dn,ni),{suffixIcon:xr,removeIcon:bo,clearIcon:Yr}=(0,sn.Z)(Object.assign(Object.assign({},gn),{multiple:fr,showSuffixIcon:Vi,hasFeedback:Wr,feedbackIcon:Ir,prefixCls:$i,componentName:"TreeSelect"})),ur=wn===!0?{clearIcon:Yr}:wn;let ir;vn!==void 0?ir=vn:ir=($n==null?void 0:$n("Select"))||Be.createElement(dn.Z,{componentName:"Select"});const qi=(0,Ye.Z)(gn,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),Dr=Be.useMemo(()=>an!==void 0?an:Yn==="rtl"?"bottomRight":"bottomLeft",[an,Yn]),Ai=(0,Kn.Z)(tn,di),et=(0,mn.Z)($o=>{var Gr;return(Gr=on!=null?on:Si)!==null&&Gr!==void 0?Gr:$o}),jr=Be.useContext(Zt.Z),yo=ui!=null?ui:jr,Or=Oe()(!Oi&&Xt,{[`${$i}-lg`]:et==="large",[`${$i}-sm`]:et==="small",[`${$i}-rtl`]:Yn==="rtl",[`${$i}-borderless`]:!vi,[`${$i}-in-form-item`]:_n},(0,St.Z)($i,eo,Wr),Ki,bi,In,cr),wo=$o=>Be.createElement(hn.Z,{prefixCls:Wi,switcherIcon:Bt,treeNodeProps:$o,showLine:at}),co=Be.createElement(vt,Object.assign({virtual:ii,disabled:yo},qi,{dropdownMatchSelectWidth:Mr,builtinPlacements:Ai,ref:Ne,prefixCls:$i,className:Or,listHeight:jt,listItemHeight:ft,treeCheckable:Gt&&Be.createElement("span",{className:`${$i}-tree-checkbox-inner`}),treeLine:!!at,suffixIcon:xr,multiple:fr,placement:Dr,removeIcon:bo,allowClear:ur,switcherIcon:wo,showTreeIcon:un,notFoundContent:ir,getPopupContainer:cn||yn,treeMotion:null,dropdownClassName:yr,choiceTransitionName:(0,yt.m)(Hi,"",zn),transitionName:(0,yt.m)(Hi,"slide-up",Rt),treeExpandAction:gi}));return Ti(Qi(co))},vr=Be.forwardRef(Xi),ji=(0,Je.Z)(vr);vr.TreeNode=ke,vr.SHOW_ALL=Qn,vr.SHOW_PARENT=Ot,vr.SHOW_CHILD=Cn,vr._InternalPanelDoNotUseOrYouWillBeFired=ji;var Lr=vr},17574:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return it}});var ge=pe(23130),Oe=pe(26407),Ke=pe(52671),st=pe(8657),Ge=pe(92413),_e=pe(59301),Le={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"},Tt=Le,Pt=pe(7657),Xe=function(Wt,Ln){return _e.createElement(Pt.Z,(0,Ge.Z)({},Wt,{ref:Ln,icon:Tt}))},Et=_e.forwardRef(Xe),ct=Et,It=pe(92310),Be=pe.n(It),ne=pe(35654),ee=pe(71430),ce=pe(36355),se=pe(56082),he=pe(62892),ve=pe(20648);const be=4;function ke(Ve){const{dropPosition:Wt,dropLevelOffset:Ln,prefixCls:Nn,indent:$t,direction:rn="ltr"}=Ve,An=rn==="ltr"?"left":"right",ti=rn==="ltr"?"right":"left",xn={[An]:-Ln*$t+be,[ti]:0};switch(Wt){case-1:xn.top=-3;break;case 1:xn.bottom=-3;break;default:xn.bottom=-3,xn[An]=$t+be;break}return _e.createElement("div",{style:xn,className:`${Nn}-drop-indicator`})}var Ae=pe(71997),Ze=_e.forwardRef((Ve,Wt)=>{const{getPrefixCls:Ln,direction:Nn,virtual:$t,tree:rn}=_e.useContext(ce.E_),{prefixCls:An,className:ti,showIcon:xn=!1,showLine:Qn,switcherIcon:Ot,blockNode:Cn=!1,children:Wn,checkable:We=!1,selectable:Ee=!0,draggable:Pe,motion:De,style:Fe}=Ve,ye=Ln("tree",An),Qe=Ln(),vt=De!=null?De:Object.assign(Object.assign({},(0,he.Z)(Qe)),{motionAppear:!1}),Ye=Object.assign(Object.assign({},Ve),{checkable:We,selectable:Ee,showIcon:xn,motion:vt,blockNode:Cn,showLine:!!Qn,dropIndicatorRender:ke}),[Je,yt]=(0,ve.ZP)(ye),St=_e.useMemo(()=>{if(!Pe)return!1;let Zt={};switch(typeof Pe){case"function":Zt.nodeDraggable=Pe;break;case"object":Zt=Object.assign({},Pe);break;default:break}return Zt.icon!==!1&&(Zt.icon=Zt.icon||_e.createElement(se.Z,null)),Zt},[Pe]),rt=Zt=>_e.createElement(Ae.Z,{prefixCls:ye,switcherIcon:Ot,treeNodeProps:Zt,showLine:Qn});return Je(_e.createElement(ge.Z,Object.assign({itemHeight:20,ref:Wt,virtual:$t},Ye,{style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Fe),prefixCls:ye,className:Be()({[`${ye}-icon-hide`]:!xn,[`${ye}-block-node`]:Cn,[`${ye}-unselectable`]:!Ee,[`${ye}-rtl`]:Nn==="rtl"},rn==null?void 0:rn.className,ti,yt),direction:Nn,checkable:We&&_e.createElement("span",{className:`${ye}-checkbox-inner`}),selectable:Ee,switcherIcon:rt,draggable:St}),Wn))}),ot;(function(Ve){Ve[Ve.None=0]="None",Ve[Ve.Start=1]="Start",Ve[Ve.End=2]="End"})(ot||(ot={}));function qe(Ve,Wt){function Ln(Nn){const{key:$t,children:rn}=Nn;Wt($t,Nn)!==!1&&qe(rn||[],Wt)}Ve.forEach(Ln)}function bt(Ve){let{treeData:Wt,expandedKeys:Ln,startKey:Nn,endKey:$t}=Ve;const rn=[];let An=ot.None;if(Nn&&Nn===$t)return[Nn];if(!Nn||!$t)return[];function ti(xn){return xn===Nn||xn===$t}return qe(Wt,xn=>{if(An===ot.End)return!1;if(ti(xn)){if(rn.push(xn),An===ot.None)An=ot.Start;else if(An===ot.Start)return An=ot.End,!1}else An===ot.Start&&rn.push(xn);return Ln.includes(xn)}),rn}function He(Ve,Wt){const Ln=(0,Oe.Z)(Wt),Nn=[];return qe(Ve,($t,rn)=>{const An=Ln.indexOf($t);return An!==-1&&(Nn.push(rn),Ln.splice(An,1)),!!Ln.length}),Nn}var wt=function(Ve,Wt){var Ln={};for(var Nn in Ve)Object.prototype.hasOwnProperty.call(Ve,Nn)&&Wt.indexOf(Nn)<0&&(Ln[Nn]=Ve[Nn]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $t=0,Nn=Object.getOwnPropertySymbols(Ve);$t<Nn.length;$t++)Wt.indexOf(Nn[$t])<0&&Object.prototype.propertyIsEnumerable.call(Ve,Nn[$t])&&(Ln[Nn[$t]]=Ve[Nn[$t]]);return Ln};function nt(Ve){const{isLeaf:Wt,expanded:Ln}=Ve;return Wt?_e.createElement(Ke.Z,null):Ln?_e.createElement(st.Z,null):_e.createElement(ct,null)}function Dt(Ve){let{treeData:Wt,children:Ln}=Ve;return Wt||(0,ee.zn)(Ln)}const ht=(Ve,Wt)=>{var{defaultExpandAll:Ln,defaultExpandParent:Nn,defaultExpandedKeys:$t}=Ve,rn=wt(Ve,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const An=_e.useRef(),ti=_e.useRef(),xn=()=>{const{keyEntities:St}=(0,ee.I8)(Dt(rn));let rt;return Ln?rt=Object.keys(St):Nn?rt=(0,ne.r7)(rn.expandedKeys||$t||[],St):rt=rn.expandedKeys||$t,rt},[Qn,Ot]=_e.useState(rn.selectedKeys||rn.defaultSelectedKeys||[]),[Cn,Wn]=_e.useState(()=>xn());_e.useEffect(()=>{"selectedKeys"in rn&&Ot(rn.selectedKeys)},[rn.selectedKeys]),_e.useEffect(()=>{"expandedKeys"in rn&&Wn(rn.expandedKeys)},[rn.expandedKeys]);const We=(St,rt)=>{var Zt;return"expandedKeys"in rn||Wn(St),(Zt=rn.onExpand)===null||Zt===void 0?void 0:Zt.call(rn,St,rt)},Ee=(St,rt)=>{var Zt;const{multiple:dn}=rn,{node:mn,nativeEvent:qt}=rt,{key:Gn=""}=mn,Kn=Dt(rn),Nt=Object.assign(Object.assign({},rt),{selected:!0}),sn=(qt==null?void 0:qt.ctrlKey)||(qt==null?void 0:qt.metaKey),Fn=qt==null?void 0:qt.shiftKey;let hn;dn&&sn?(hn=St,An.current=Gn,ti.current=hn,Nt.selectedNodes=He(Kn,hn)):dn&&Fn?(hn=Array.from(new Set([].concat((0,Oe.Z)(ti.current||[]),(0,Oe.Z)(bt({treeData:Kn,expandedKeys:Cn,startKey:Gn,endKey:An.current}))))),Nt.selectedNodes=He(Kn,hn)):(hn=[Gn],An.current=Gn,ti.current=hn,Nt.selectedNodes=He(Kn,hn)),(Zt=rn.onSelect)===null||Zt===void 0||Zt.call(rn,hn,Nt),"selectedKeys"in rn||Ot(hn)},{getPrefixCls:Pe,direction:De}=_e.useContext(ce.E_),{prefixCls:Fe,className:ye,showIcon:Qe=!0,expandAction:vt="click"}=rn,Ye=wt(rn,["prefixCls","className","showIcon","expandAction"]),Je=Pe("tree",Fe),yt=Be()(`${Je}-directory`,{[`${Je}-directory-rtl`]:De==="rtl"},ye);return _e.createElement(Ze,Object.assign({icon:nt,ref:Wt,blockNode:!0},Ye,{showIcon:Qe,expandAction:vt,prefixCls:Je,className:yt,expandedKeys:Cn,selectedKeys:Qn,onSelect:Ee,onExpand:We}))};var Yt=_e.forwardRef(ht);const Ut=Ze;Ut.DirectoryTree=Yt,Ut.TreeNode=ge.O;var it=Ut},20648:function(Vn,Pn,pe){"use strict";pe.d(Pn,{TM:function(){return It},Yk:function(){return ct}});var ge=pe(93083),Oe=pe(98447),Ke=pe(17313),st=pe(8378),Ge=pe(37613),_e=pe(83116);const Le=new ge.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Tt=(Be,ne)=>({[`.${Be}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${ne.motionDurationSlow}`}}}),Pt=(Be,ne)=>({[`.${Be}-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:'""'}}}),Xe=(Be,ne)=>{const{treeCls:ee,treeNodeCls:ce,treeNodePadding:se,titleHeight:he,nodeSelectedBg:ve,nodeHoverBg:be}=ne,ke=ne.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,Ke.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,Ke.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:Le,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,Ke.oN)(ne)),[`&:not(${ce}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:he,lineHeight:`${he}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:he}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},Tt(Be,ne)),{position:"relative",flex:"none",alignSelf:"stretch",width:he,margin:0,lineHeight:`${he}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:he/2,bottom:-se,marginInlineStart:-1,borderInlineEnd:`1px solid ${ne.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:he/2*.8,height:he/2,borderBottom:`1px solid ${ne.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:ke},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:he,margin:0,padding:`0 ${ne.paddingXS/2}px`,color:"inherit",lineHeight:`${he}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:ve},[`${ee}-iconEle`]:{display:"inline-block",width:he,height:he,lineHeight:`${he}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${he}px`,userSelect:"none"},Pt(Be,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:he/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:`${he/2}px !important`}}}}})}},Et=Be=>{const{treeCls:ne,treeNodeCls:ee,treeNodePadding:ce,directoryNodeSelectedBg:se,directoryNodeSelectedColor:he}=Be;return{[`${ne}${ne}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ce,insetInlineStart:0,transition:`background-color ${Be.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Be.controlItemBgHover}},"> *":{zIndex:1},[`${ne}-switcher`]:{transition:`color ${Be.motionDurationMid}`},[`${ne}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${ne}-node-selected`]:{color:he,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:se},[`${ne}-switcher`]:{color:he},[`${ne}-node-content-wrapper`]:{color:he,background:"transparent"}}}}}},ct=(Be,ne)=>{const ee=`.${Be}`,ce=`${ee}-treenode`,se=ne.paddingXS/2,he=(0,Ge.TS)(ne,{treeCls:ee,treeNodeCls:ce,treeNodePadding:se});return[Xe(Be,he),Et(he)]},It=Be=>{const{controlHeightSM:ne}=Be;return{titleHeight:ne,nodeHoverBg:Be.controlItemBgHover,nodeSelectedBg:Be.controlItemBgActive}};Pn.ZP=(0,_e.Z)("Tree",(Be,ne)=>{let{prefixCls:ee}=ne;return[{[Be.componentCls]:(0,Oe.C2)(`${ee}-checkbox`,Be)},ct(ee,Be),(0,st.Z)(Be)]},Be=>{const{colorTextLightSolid:ne,colorPrimary:ee}=Be;return Object.assign(Object.assign({},It(Be)),{directoryNodeSelectedColor:ne,directoryNodeSelectedBg:ee})})},71997:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ce}});var ge=pe(92413),Oe=pe(59301),Ke={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"},st=Ke,Ge=pe(7657),_e=function(he,ve){return Oe.createElement(Ge.Z,(0,ge.Z)({},he,{ref:ve,icon:st}))},Le=Oe.forwardRef(_e),Tt=Le,Pt=pe(52671),Xe=pe(58617),Et=pe(15075),ct=pe(43531),It=pe(92310),Be=pe.n(It),ne=pe(92343),ce=se=>{const{prefixCls:he,switcherIcon:ve,treeNodeProps:be,showLine:ke}=se,{isLeaf:Ae,expanded:ze,loading:Ze}=be;if(Ze)return Oe.createElement(Xe.Z,{className:`${he}-switcher-loading-icon`});let ot;if(ke&&typeof ke=="object"&&(ot=ke.showLeafIcon),Ae){if(!ke)return null;if(typeof ot!="boolean"&&ot){const He=typeof ot=="function"?ot(be):ot,wt=`${he}-switcher-line-custom-icon`;return(0,ne.l$)(He)?(0,ne.Tm)(He,{className:Be()(He.props.className||"",wt)}):He}return ot?Oe.createElement(Pt.Z,{className:`${he}-switcher-line-icon`}):Oe.createElement("span",{className:`${he}-switcher-leaf-line`})}const qe=`${he}-switcher-icon`,bt=typeof ve=="function"?ve(be):ve;return(0,ne.l$)(bt)?(0,ne.Tm)(bt,{className:Be()(bt.props.className||"",qe)}):bt!==void 0?bt:ke?ze?Oe.createElement(Et.Z,{className:`${he}-switcher-line-icon`}):Oe.createElement(ct.Z,{className:`${he}-switcher-line-icon`}):Oe.createElement(Tt,{className:qe})}},54580:function(Vn,Pn,pe){"use strict";pe.d(Pn,{default:function(){return Bn}});var ge=pe(59301),Oe=pe(26407),Ke=pe(92310),st=pe.n(Ke),Ge=pe(92413),_e=pe(6909),Le=pe(4771),Tt=pe(9427),Pt=pe(25440),Xe=pe(400),Et=pe(37061),ct=pe(85195),It=pe(39559),Be=pe(20569),ne=pe(26112);function ee(Ft,wn){var gn="cannot ".concat(Ft.method," ").concat(Ft.action," ").concat(wn.status,"'"),yn=new Error(gn);return yn.status=wn.status,yn.method=Ft.method,yn.url=Ft.action,yn}function ce(Ft){var wn=Ft.responseText||Ft.response;if(!wn)return wn;try{return JSON.parse(wn)}catch(gn){return wn}}function se(Ft){var wn=new XMLHttpRequest;Ft.onProgress&&wn.upload&&(wn.upload.onprogress=function($n){$n.total>0&&($n.percent=$n.loaded/$n.total*100),Ft.onProgress($n)});var gn=new FormData;Ft.data&&Object.keys(Ft.data).forEach(function(On){var $n=Ft.data[On];if(Array.isArray($n)){$n.forEach(function(Yn){gn.append("".concat(On,"[]"),Yn)});return}gn.append(On,$n)}),Ft.file instanceof Blob?gn.append(Ft.filename,Ft.file,Ft.file.name):gn.append(Ft.filename,Ft.file),wn.onerror=function($n){Ft.onError($n)},wn.onload=function(){return wn.status<200||wn.status>=300?Ft.onError(ee(Ft,wn),ce(wn)):Ft.onSuccess(ce(wn),wn)},wn.open(Ft.method,Ft.action,!0),Ft.withCredentials&&"withCredentials"in wn&&(wn.withCredentials=!0);var yn=Ft.headers||{};return yn["X-Requested-With"]!==null&&wn.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(yn).forEach(function(On){yn[On]!==null&&wn.setRequestHeader(On,yn[On])}),wn.send(gn),{abort:function(){wn.abort()}}}var he=+new Date,ve=0;function be(){return"rc-upload-".concat(he,"-").concat(++ve)}var ke=pe(48736),Ae=function(Ft,wn){if(Ft&&wn){var gn=Array.isArray(wn)?wn:wn.split(","),yn=Ft.name||"",On=Ft.type||"",$n=On.replace(/\/.*$/,"");return gn.some(function(Yn){var ii=Yn.trim();if(/^\*(\/\*)?$/.test(Yn))return!0;if(ii.charAt(0)==="."){var Xn=yn.toLowerCase(),di=ii.toLowerCase(),Hi=[di];return(di===".jpg"||di===".jpeg")&&(Hi=[".jpg",".jpeg"]),Hi.some(function($i){return Xn.endsWith($i)})}return/\/\*$/.test(ii)?$n===ii.replace(/\/.*$/,""):On===ii?!0:/^\w+$/.test(ii)?((0,ke.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ii,"'.Skip for check.")),!0):!1})}return!0};function ze(Ft,wn){var gn=Ft.createReader(),yn=[];function On(){gn.readEntries(function($n){var Yn=Array.prototype.slice.apply($n);yn=yn.concat(Yn);var ii=!Yn.length;ii?wn(yn):On()})}On()}var Ze=function(wn,gn,yn){var On=function $n(Yn,ii){Yn&&(Yn.path=ii||"",Yn.isFile?Yn.file(function(Xn){yn(Xn)&&(Yn.fullPath&&!Xn.webkitRelativePath&&(Object.defineProperties(Xn,{webkitRelativePath:{writable:!0}}),Xn.webkitRelativePath=Yn.fullPath.replace(/^\//,""),Object.defineProperties(Xn,{webkitRelativePath:{writable:!1}})),gn([Xn]))}):Yn.isDirectory&&ze(Yn,function(Xn){Xn.forEach(function(di){$n(di,"".concat(ii).concat(Yn.name,"/"))})}))};wn.forEach(function($n){On($n.webkitGetAsEntry())})},ot=Ze,qe=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],bt=function(Ft){(0,Tt.Z)(gn,Ft);var wn=(0,Pt.Z)(gn);function gn(){var yn;(0,_e.Z)(this,gn);for(var On=arguments.length,$n=new Array(On),Yn=0;Yn<On;Yn++)$n[Yn]=arguments[Yn];return yn=wn.call.apply(wn,[this].concat($n)),yn.state={uid:be()},yn.reqs={},yn.fileInput=void 0,yn._isMounted=void 0,yn.onChange=function(ii){var Xn=yn.props,di=Xn.accept,Hi=Xn.directory,$i=ii.target.files,Wi=(0,Oe.Z)($i).filter(function(Xt){return!Hi||Ae(Xt,di)});yn.uploadFiles(Wi),yn.reset()},yn.onClick=function(ii){var Xn=yn.fileInput;if(Xn){var di=ii.target,Hi=yn.props.onClick;if(di&&di.tagName==="BUTTON"){var $i=Xn.parentNode;$i.focus(),di.blur()}Xn.click(),Hi&&Hi(ii)}},yn.onKeyDown=function(ii){ii.key==="Enter"&&yn.onClick(ii)},yn.onFileDrop=function(ii){var Xn=yn.props.multiple;if(ii.preventDefault(),ii.type!=="dragover")if(yn.props.directory)ot(Array.prototype.slice.call(ii.dataTransfer.items),yn.uploadFiles,function(Hi){return Ae(Hi,yn.props.accept)});else{var di=(0,Oe.Z)(ii.dataTransfer.files).filter(function(Hi){return Ae(Hi,yn.props.accept)});Xn===!1&&(di=di.slice(0,1)),yn.uploadFiles(di)}},yn.uploadFiles=function(ii){var Xn=(0,Oe.Z)(ii),di=Xn.map(function(Hi){return Hi.uid=be(),yn.processFile(Hi,Xn)});Promise.all(di).then(function(Hi){var $i=yn.props.onBatchStart;$i==null||$i(Hi.map(function(Wi){var Xt=Wi.origin,Si=Wi.parsedFile;return{file:Xt,parsedFile:Si}})),Hi.filter(function(Wi){return Wi.parsedFile!==null}).forEach(function(Wi){yn.post(Wi)})})},yn.processFile=function(){var ii=(0,Be.Z)((0,ct.Z)().mark(function Xn(di,Hi){var $i,Wi,Xt,Si,Ki,Ti,cr,Qi,yr;return(0,ct.Z)().wrap(function(Vi){for(;;)switch(Vi.prev=Vi.next){case 0:if($i=yn.props.beforeUpload,Wi=di,!$i){Vi.next=14;break}return Vi.prev=3,Vi.next=6,$i(di,Hi);case 6:Wi=Vi.sent,Vi.next=12;break;case 9:Vi.prev=9,Vi.t0=Vi.catch(3),Wi=!1;case 12:if(Wi!==!1){Vi.next=14;break}return Vi.abrupt("return",{origin:di,parsedFile:null,action:null,data:null});case 14:if(Xt=yn.props.action,typeof Xt!="function"){Vi.next=21;break}return Vi.next=18,Xt(di);case 18:Si=Vi.sent,Vi.next=22;break;case 21:Si=Xt;case 22:if(Ki=yn.props.data,typeof Ki!="function"){Vi.next=29;break}return Vi.next=26,Ki(di);case 26:Ti=Vi.sent,Vi.next=30;break;case 29:Ti=Ki;case 30:return cr=((0,It.Z)(Wi)==="object"||typeof Wi=="string")&&Wi?Wi:di,cr instanceof File?Qi=cr:Qi=new File([cr],di.name,{type:di.type}),yr=Qi,yr.uid=di.uid,Vi.abrupt("return",{origin:di,data:Ti,parsedFile:yr,action:Si});case 35:case"end":return Vi.stop()}},Xn,null,[[3,9]])}));return function(Xn,di){return ii.apply(this,arguments)}}(),yn.saveFileInput=function(ii){yn.fileInput=ii},yn}return(0,Le.Z)(gn,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(On){var $n=this,Yn=On.data,ii=On.origin,Xn=On.action,di=On.parsedFile;if(this._isMounted){var Hi=this.props,$i=Hi.onStart,Wi=Hi.customRequest,Xt=Hi.name,Si=Hi.headers,Ki=Hi.withCredentials,Ti=Hi.method,cr=ii.uid,Qi=Wi||se,yr={action:Xn,filename:Xt,data:Yn,file:di,headers:Si,withCredentials:Ki,method:Ti||"post",onProgress:function(Vi){var Mr=$n.props.onProgress;Mr==null||Mr(Vi,di)},onSuccess:function(Vi,Mr){var Dn=$n.props.onSuccess;Dn==null||Dn(Vi,di,Mr),delete $n.reqs[cr]},onError:function(Vi,Mr){var Dn=$n.props.onError;Dn==null||Dn(Vi,Mr,di),delete $n.reqs[cr]}};$i(ii),this.reqs[cr]=Qi(yr)}}},{key:"reset",value:function(){this.setState({uid:be()})}},{key:"abort",value:function(On){var $n=this.reqs;if(On){var Yn=On.uid?On.uid:On;$n[Yn]&&$n[Yn].abort&&$n[Yn].abort(),delete $n[Yn]}else Object.keys($n).forEach(function(ii){$n[ii]&&$n[ii].abort&&$n[ii].abort(),delete $n[ii]})}},{key:"render",value:function(){var On=this.props,$n=On.component,Yn=On.prefixCls,ii=On.className,Xn=On.disabled,di=On.id,Hi=On.style,$i=On.multiple,Wi=On.accept,Xt=On.capture,Si=On.children,Ki=On.directory,Ti=On.openFileDialogOnClick,cr=On.onMouseEnter,Qi=On.onMouseLeave,yr=(0,Et.Z)(On,qe),fr=st()((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},Yn,!0),"".concat(Yn,"-disabled"),Xn),ii,ii)),Vi=Ki?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Mr=Xn?{}:{onClick:Ti?this.onClick:function(){},onKeyDown:Ti?this.onKeyDown:function(){},onMouseEnter:cr,onMouseLeave:Qi,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return ge.createElement($n,(0,Ge.Z)({},Mr,{className:fr,role:"button",style:Hi}),ge.createElement("input",(0,Ge.Z)({},(0,ne.Z)(yr,{aria:!0,data:!0}),{id:di,disabled:Xn,type:"file",ref:this.saveFileInput,onClick:function(Wr){return Wr.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:Wi},Vi,{multiple:$i,onChange:this.onChange},Xt!=null?{capture:Xt}:{})),Si)}}]),gn}(ge.Component),He=bt;function wt(){}var nt=function(Ft){(0,Tt.Z)(gn,Ft);var wn=(0,Pt.Z)(gn);function gn(){var yn;(0,_e.Z)(this,gn);for(var On=arguments.length,$n=new Array(On),Yn=0;Yn<On;Yn++)$n[Yn]=arguments[Yn];return yn=wn.call.apply(wn,[this].concat($n)),yn.uploader=void 0,yn.saveUploader=function(ii){yn.uploader=ii},yn}return(0,Le.Z)(gn,[{key:"abort",value:function(On){this.uploader.abort(On)}},{key:"render",value:function(){return ge.createElement(He,(0,Ge.Z)({},this.props,{ref:this.saveUploader}))}}]),gn}(ge.Component);nt.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:wt,onError:wt,onSuccess:wt,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var Dt=nt,ht=Dt,zt=pe(18929),Yt=pe(4676),Ut=pe(36355),it=pe(1684),Ve=pe(9763),Wt=pe(31724),Ln={icon:function(wn,gn){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:gn}},{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:wn}}]}},name:"file",theme:"twotone"},Nn=Ln,$t=pe(7657),rn=function(wn,gn){return ge.createElement($t.Z,(0,Ge.Z)({},wn,{ref:gn,icon:Nn}))},An=ge.forwardRef(rn),ti=An,xn=pe(58617),Qn={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"},Ot=Qn,Cn=function(wn,gn){return ge.createElement($t.Z,(0,Ge.Z)({},wn,{ref:gn,icon:Ot}))},Wn=ge.forwardRef(Cn),We=Wn,Ee={icon:function(wn,gn){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:wn}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:gn}},{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:gn}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:gn}},{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:wn}}]}},name:"picture",theme:"twotone"},Pe=Ee,De=function(wn,gn){return ge.createElement($t.Z,(0,Ge.Z)({},wn,{ref:gn,icon:Pe}))},Fe=ge.forwardRef(De),ye=Fe,Qe=pe(77900),vt=pe(56762),Ye=pe(62892),Je=pe(92343),yt=pe(3113);function St(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 rt(Ft,wn){const gn=(0,Oe.Z)(wn),yn=gn.findIndex(On=>{let{uid:$n}=On;return $n===Ft.uid});return yn===-1?gn.push(Ft):gn[yn]=Ft,gn}function Zt(Ft,wn){const gn=Ft.uid!==void 0?"uid":"name";return wn.filter(yn=>yn[gn]===Ft[gn])[0]}function dn(Ft,wn){const gn=Ft.uid!==void 0?"uid":"name",yn=wn.filter(On=>On[gn]!==Ft[gn]);return yn.length===wn.length?null:yn}const mn=function(){const wn=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),yn=wn[wn.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(yn)||[""])[0]},qt=Ft=>Ft.indexOf("image/")===0,Gn=Ft=>{if(Ft.type&&!Ft.thumbUrl)return qt(Ft.type);const wn=Ft.thumbUrl||Ft.url||"",gn=mn(wn);return/^data:image\//.test(wn)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(gn)?!0:!(/^data:/.test(wn)||gn)},Kn=200;function Nt(Ft){return new Promise(wn=>{if(!Ft.type||!qt(Ft.type)){wn("");return}const gn=document.createElement("canvas");gn.width=Kn,gn.height=Kn,gn.style.cssText=`position: fixed; left: 0; top: 0; width: ${Kn}px; height: ${Kn}px; z-index: 9999; display: none;`,document.body.appendChild(gn);const yn=gn.getContext("2d"),On=new Image;if(On.onload=()=>{const{width:$n,height:Yn}=On;let ii=Kn,Xn=Kn,di=0,Hi=0;$n>Yn?(Xn=Yn*(Kn/$n),Hi=-(Xn-ii)/2):(ii=$n*(Kn/Yn),di=-(ii-Xn)/2),yn.drawImage(On,di,Hi,ii,Xn);const $i=gn.toDataURL();document.body.removeChild(gn),window.URL.revokeObjectURL(On.src),wn($i)},On.crossOrigin="anonymous",Ft.type.startsWith("image/svg+xml")){const $n=new FileReader;$n.onload=()=>{$n.result&&(On.src=$n.result)},$n.readAsDataURL(Ft)}else if(Ft.type.startsWith("image/gif")){const $n=new FileReader;$n.onload=()=>{$n.result&&wn($n.result)},$n.readAsDataURL(Ft)}else On.src=window.URL.createObjectURL(Ft)})}var sn=pe(26227),Fn=pe(41464),hn=pe(15277),Mn=pe(93948),li=pe(6848),mi=ge.forwardRef((Ft,wn)=>{let{prefixCls:gn,className:yn,style:On,locale:$n,listType:Yn,file:ii,items:Xn,progress:di,iconRender:Hi,actionIconRender:$i,itemRender:Wi,isImgUrl:Xt,showPreviewIcon:Si,showRemoveIcon:Ki,showDownloadIcon:Ti,previewIcon:cr,removeIcon:Qi,downloadIcon:yr,onPreview:fr,onDownload:Vi,onClose:Mr}=Ft;var Dn,Wr;const{status:_n}=ii,[Ir,eo]=ge.useState(_n);ge.useEffect(()=>{_n!=="removed"&&eo(_n)},[_n]);const[xr,bo]=ge.useState(!1);ge.useEffect(()=>{const or=setTimeout(()=>{bo(!0)},300);return()=>{clearTimeout(or)}},[]);const Yr=Hi(ii);let ur=ge.createElement("div",{className:`${gn}-icon`},Yr);if(Yn==="picture"||Yn==="picture-card"||Yn==="picture-circle")if(Ir==="uploading"||!ii.thumbUrl&&!ii.url){const or=st()(`${gn}-list-item-thumbnail`,{[`${gn}-list-item-file`]:Ir!=="uploading"});ur=ge.createElement("div",{className:or},Yr)}else{const or=Xt!=null&&Xt(ii)?ge.createElement("img",{src:ii.thumbUrl||ii.url,alt:ii.name,className:`${gn}-list-item-image`,crossOrigin:ii.crossOrigin}):Yr,mr=st()(`${gn}-list-item-thumbnail`,{[`${gn}-list-item-file`]:Xt&&!Xt(ii)});ur=ge.createElement("a",{className:mr,onClick:$r=>fr(ii,$r),href:ii.url||ii.thumbUrl,target:"_blank",rel:"noopener noreferrer"},or)}const ir=st()(`${gn}-list-item`,`${gn}-list-item-${Ir}`),qi=typeof ii.linkProps=="string"?JSON.parse(ii.linkProps):ii.linkProps,Dr=Ki?$i((typeof Qi=="function"?Qi(ii):Qi)||ge.createElement(sn.Z,null),()=>Mr(ii),gn,$n.removeFile):null,Ai=Ti&&Ir==="done"?$i((typeof yr=="function"?yr(ii):yr)||ge.createElement(Fn.Z,null),()=>Vi(ii),gn,$n.downloadFile):null,et=Yn!=="picture-card"&&Yn!=="picture-circle"&&ge.createElement("span",{key:"download-delete",className:st()(`${gn}-list-item-actions`,{picture:Yn==="picture"})},Ai,Dr),jr=st()(`${gn}-list-item-name`),yo=ii.url?[ge.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:jr,title:ii.name},qi,{href:ii.url,onClick:or=>fr(ii,or)}),ii.name),et]:[ge.createElement("span",{key:"view",className:jr,onClick:or=>fr(ii,or),title:ii.name},ii.name),et],Or={pointerEvents:"none",opacity:.5},wo=Si?ge.createElement("a",{href:ii.url||ii.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:ii.url||ii.thumbUrl?void 0:Or,onClick:or=>fr(ii,or),title:$n.previewFile},typeof cr=="function"?cr(ii):cr||ge.createElement(hn.Z,null)):null,co=(Yn==="picture-card"||Yn==="picture-circle")&&Ir!=="uploading"&&ge.createElement("span",{className:`${gn}-list-item-actions`},wo,Ir==="done"&&Ai,Dr),{getPrefixCls:$o}=ge.useContext(Ut.E_),Gr=$o(),zr=ge.createElement("div",{className:ir},ur,yo,co,xr&&ge.createElement(Qe.default,{motionName:`${Gr}-fade`,visible:Ir==="uploading",motionDeadline:2e3},or=>{let{className:mr}=or;const $r="percent"in ii?ge.createElement(Mn.Z,Object.assign({},di,{type:"line",percent:ii.percent,"aria-label":ii["aria-label"],"aria-labelledby":ii["aria-labelledby"]})):null;return ge.createElement("div",{className:st()(`${gn}-list-item-progress`,mr)},$r)})),Nr=ii.response&&typeof ii.response=="string"?ii.response:((Dn=ii.error)===null||Dn===void 0?void 0:Dn.statusText)||((Wr=ii.error)===null||Wr===void 0?void 0:Wr.message)||$n.uploadError,Eo=Ir==="error"?ge.createElement(li.Z,{title:Nr,getPopupContainer:or=>or.parentNode},zr):zr;return ge.createElement("div",{className:st()(`${gn}-list-item-container`,yn),style:On,ref:wn},Wi?Wi(Eo,ii,Xn,{download:Vi.bind(null,ii),preview:fr.bind(null,ii),remove:Mr.bind(null,ii)}):Eo)});const Li=(Ft,wn)=>{const{listType:gn="text",previewFile:yn=Nt,onPreview:On,onDownload:$n,onRemove:Yn,locale:ii,iconRender:Xn,isImageUrl:di=Gn,prefixCls:Hi,items:$i=[],showPreviewIcon:Wi=!0,showRemoveIcon:Xt=!0,showDownloadIcon:Si=!1,removeIcon:Ki,previewIcon:Ti,downloadIcon:cr,progress:Qi={size:[-1,2],showInfo:!1},appendAction:yr,appendActionVisible:fr=!0,itemRender:Vi,disabled:Mr}=Ft,Dn=(0,vt.Z)(),[Wr,_n]=ge.useState(!1);ge.useEffect(()=>{gn!=="picture"&&gn!=="picture-card"&&gn!=="picture-circle"||($i||[]).forEach(Or=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(Or.originFileObj instanceof File||Or.originFileObj instanceof Blob)||Or.thumbUrl!==void 0||(Or.thumbUrl="",yn&&yn(Or.originFileObj).then(wo=>{Or.thumbUrl=wo||"",Dn()}))})},[gn,$i,yn]),ge.useEffect(()=>{_n(!0)},[]);const Ir=(Or,wo)=>{if(On)return wo==null||wo.preventDefault(),On(Or)},eo=Or=>{typeof $n=="function"?$n(Or):Or.url&&window.open(Or.url)},xr=Or=>{Yn==null||Yn(Or)},bo=Or=>{if(Xn)return Xn(Or,gn);const wo=Or.status==="uploading",co=di&&di(Or)?ge.createElement(ye,null):ge.createElement(ti,null);let $o=wo?ge.createElement(xn.Z,null):ge.createElement(We,null);return gn==="picture"?$o=wo?ge.createElement(xn.Z,null):co:(gn==="picture-card"||gn==="picture-circle")&&($o=wo?ii.uploading:co),$o},Yr=(Or,wo,co,$o)=>{const Gr={type:"text",size:"small",title:$o,onClick:zr=>{wo(),(0,Je.l$)(Or)&&Or.props.onClick&&Or.props.onClick(zr)},className:`${co}-list-item-action`,disabled:Mr};if((0,Je.l$)(Or)){const zr=(0,Je.Tm)(Or,Object.assign(Object.assign({},Or.props),{onClick:()=>{}}));return ge.createElement(yt.ZP,Object.assign({},Gr,{icon:zr}))}return ge.createElement(yt.ZP,Object.assign({},Gr),ge.createElement("span",null,Or))};ge.useImperativeHandle(wn,()=>({handlePreview:Ir,handleDownload:eo}));const{getPrefixCls:ur}=ge.useContext(Ut.E_),ir=ur("upload",Hi),qi=ur(),Dr=st()(`${ir}-list`,`${ir}-list-${gn}`),Ai=(0,Oe.Z)($i.map(Or=>({key:Or.uid,file:Or})));let jr={motionDeadline:2e3,motionName:`${ir}-${gn==="picture-card"||gn==="picture-circle"?"animate-inline":"animate"}`,keys:Ai,motionAppear:Wr};const yo=ge.useMemo(()=>{const Or=Object.assign({},(0,Ye.Z)(qi));return delete Or.onAppearEnd,delete Or.onEnterEnd,delete Or.onLeaveEnd,Or},[qi]);return gn!=="picture-card"&&gn!=="picture-circle"&&(jr=Object.assign(Object.assign({},yo),jr)),ge.createElement("div",{className:Dr},ge.createElement(Qe.CSSMotionList,Object.assign({},jr,{component:!1}),Or=>{let{key:wo,file:co,className:$o,style:Gr}=Or;return ge.createElement(mi,{key:wo,locale:ii,prefixCls:ir,className:$o,style:Gr,file:co,items:$i,progress:Qi,listType:gn,isImgUrl:di,showPreviewIcon:Wi,showRemoveIcon:Xt,showDownloadIcon:Si,removeIcon:Ki,previewIcon:Ti,downloadIcon:cr,iconRender:bo,actionIconRender:Yr,itemRender:Vi,onPreview:Ir,onDownload:eo,onClose:xr})}),yr&&ge.createElement(Qe.default,Object.assign({},jr,{visible:fr,forceRender:!0}),Or=>{let{className:wo,style:co}=Or;return(0,Je.Tm)(yr,$o=>({className:st()($o.className,wo),style:Object.assign(Object.assign(Object.assign({},co),{pointerEvents:wo?"none":void 0}),$o.style)}))}))};var ar=ge.forwardRef(Li),Xi=pe(17313),wr=pe(8378),vr=pe(83116),ji=pe(37613),jn=Ft=>{const{componentCls:wn,iconCls:gn}=Ft;return{[`${wn}-wrapper`]:{[`${wn}-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}`,[wn]:{padding:`${Ft.padding}px 0`},[`${wn}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${wn}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${wn}-disabled):hover`]:{borderColor:Ft.colorPrimaryHover},[`p${wn}-drag-icon`]:{marginBottom:Ft.margin,[gn]:{color:Ft.colorPrimary,fontSize:Ft.uploadThumbnailSize}},[`p${wn}-text`]:{margin:`0 0 ${Ft.marginXXS}px`,color:Ft.colorTextHeading,fontSize:Ft.fontSizeLG},[`p${wn}-hint`]:{color:Ft.colorTextDescription,fontSize:Ft.fontSize},[`&${wn}-disabled`]:{cursor:"not-allowed",[`p${wn}-drag-icon ${gn},
p${wn}-text,
p${wn}-hint
`]:{color:Ft.colorTextDisabled}}}}}},Ei=Ft=>{const{componentCls:wn,antCls:gn,iconCls:yn,fontSize:On,lineHeight:$n}=Ft,Yn=`${wn}-list-item`,ii=`${Yn}-actions`,Xn=`${Yn}-action`,di=Math.round(On*$n);return{[`${wn}-wrapper`]:{[`${wn}-list`]:Object.assign(Object.assign({},(0,Xi.dF)()),{lineHeight:Ft.lineHeight,[Yn]:{position:"relative",height:Ft.lineHeight*On,marginTop:Ft.marginXS,fontSize:On,display:"flex",alignItems:"center",transition:`background-color ${Ft.motionDurationSlow}`,"&:hover":{backgroundColor:Ft.controlItemBgHover},[`${Yn}-name`]:Object.assign(Object.assign({},Xi.vS),{padding:`0 ${Ft.paddingXS}px`,lineHeight:$n,flex:"auto",transition:`all ${Ft.motionDurationSlow}`}),[ii]:{[Xn]:{opacity:0},[`${Xn}${gn}-btn-sm`]:{height:di,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
${Xn}:focus-visible,
&.picture ${Xn}
`]:{opacity:1},[yn]:{color:Ft.actionsColor,transition:`all ${Ft.motionDurationSlow}`},[`&:hover ${yn}`]:{color:Ft.colorText}},[`${wn}-icon ${yn}`]:{color:Ft.colorTextDescription,fontSize:On},[`${Yn}-progress`]:{position:"absolute",bottom:-Ft.uploadProgressOffset,width:"100%",paddingInlineStart:On+Ft.paddingXS,fontSize:On,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Yn}:hover ${Xn}`]:{opacity:1,color:Ft.colorText},[`${Yn}-error`]:{color:Ft.colorError,[`${Yn}-name, ${wn}-icon ${yn}`]:{color:Ft.colorError},[ii]:{[`${yn}, ${yn}:hover`]:{color:Ft.colorError},[Xn]:{opacity:1}}},[`${wn}-list-item-container`]:{transition:`opacity ${Ft.motionDurationSlow}, height ${Ft.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Oi=pe(93083),on=pe(1950);const ui=new Oi.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),vi=new Oi.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var In=Ft=>{const{componentCls:wn}=Ft,gn=`${wn}-animate-inline`;return[{[`${wn}-wrapper`]:{[`${gn}-appear, ${gn}-enter, ${gn}-leave`]:{animationDuration:Ft.motionDurationSlow,animationTimingFunction:Ft.motionEaseInOutCirc,animationFillMode:"forwards"},[`${gn}-appear, ${gn}-enter`]:{animationName:ui},[`${gn}-leave`]:{animationName:vi}}},{[`${wn}-wrapper`]:(0,on.J$)(Ft)},ui,vi]},Gt=pe(93398),Kt=pe(64993);const jt=Ft=>{const{componentCls:wn,iconCls:gn,uploadThumbnailSize:yn,uploadProgressOffset:On}=Ft,$n=`${wn}-list`,Yn=`${$n}-item`;return{[`${wn}-wrapper`]:{[`
${$n}${$n}-picture,
${$n}${$n}-picture-card,
${$n}${$n}-picture-circle
`]:{[Yn]:{position:"relative",height:yn+Ft.lineWidth*2+Ft.paddingXS*2,padding:Ft.paddingXS,border:`${Ft.lineWidth}px ${Ft.lineType} ${Ft.colorBorder}`,borderRadius:Ft.borderRadiusLG,"&:hover":{background:"transparent"},[`${Yn}-thumbnail`]:Object.assign(Object.assign({},Xi.vS),{width:yn,height:yn,lineHeight:`${yn+Ft.paddingSM}px`,textAlign:"center",flex:"none",[gn]:{fontSize:Ft.fontSizeHeading2,color:Ft.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${Yn}-progress`]:{bottom:On,width:`calc(100% - ${Ft.paddingSM*2}px)`,marginTop:0,paddingInlineStart:yn+Ft.paddingXS}},[`${Yn}-error`]:{borderColor:Ft.colorError,[`${Yn}-thumbnail ${gn}`]:{[`svg path[fill='${Gt.blue[0]}']`]:{fill:Ft.colorErrorBg},[`svg path[fill='${Gt.blue.primary}']`]:{fill:Ft.colorError}}},[`${Yn}-uploading`]:{borderStyle:"dashed",[`${Yn}-name`]:{marginBottom:On}}},[`${$n}${$n}-picture-circle ${Yn}`]:{[`&, &::before, ${Yn}-thumbnail`]:{borderRadius:"50%"}}}}},ft=Ft=>{const{componentCls:wn,iconCls:gn,fontSizeLG:yn,colorTextLightSolid:On}=Ft,$n=`${wn}-list`,Yn=`${$n}-item`,ii=Ft.uploadPicCardSize;return{[`
${wn}-wrapper${wn}-picture-card-wrapper,
${wn}-wrapper${wn}-picture-circle-wrapper
`]:Object.assign(Object.assign({},(0,Xi.dF)()),{display:"inline-block",width:"100%",[`${wn}${wn}-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}`,[`> ${wn}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${wn}-disabled):hover`]:{borderColor:Ft.colorPrimary}},[`${$n}${$n}-picture-card, ${$n}${$n}-picture-circle`]:{[`${$n}-item-container`]:{display:"inline-block",width:ii,height:ii,marginBlock:`0 ${Ft.marginXS}px`,marginInline:`0 ${Ft.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[Yn]:{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:'" "'}},[`${Yn}:hover`]:{[`&::before, ${Yn}-actions`]:{opacity:1}},[`${Yn}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${Ft.motionDurationSlow}`,[`${gn}-eye, ${gn}-download, ${gn}-delete`]:{zIndex:10,width:yn,margin:`0 ${Ft.marginXXS}px`,fontSize:yn,cursor:"pointer",transition:`all ${Ft.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${Yn}-actions, ${Yn}-actions:hover`]:{[`${gn}-eye, ${gn}-download, ${gn}-delete`]:{color:new Kt.C(On).setAlpha(.65).toRgbString(),"&:hover":{color:On}}},[`${Yn}-thumbnail, ${Yn}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${Yn}-name`]:{display:"none",textAlign:"center"},[`${Yn}-file + ${Yn}-name`]:{position:"absolute",bottom:Ft.margin,display:"block",width:`calc(100% - ${Ft.paddingXS*2}px)`},[`${Yn}-uploading`]:{[`&${Yn}`]:{backgroundColor:Ft.colorFillAlter},[`&::before, ${gn}-eye, ${gn}-download, ${gn}-delete`]:{display:"none"}},[`${Yn}-progress`]:{bottom:Ft.marginXL,width:`calc(100% - ${Ft.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${wn}-wrapper${wn}-picture-circle-wrapper`]:{[`${wn}${wn}-select`]:{borderRadius:"50%"}}}};var vn=Ft=>{const{componentCls:wn}=Ft;return{[`${wn}-rtl`]:{direction:"rtl"}}};const Bt=Ft=>{const{componentCls:wn,colorTextDisabled:gn}=Ft;return{[`${wn}-wrapper`]:Object.assign(Object.assign({},(0,Xi.Wf)(Ft)),{[wn]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${wn}-select`]:{display:"inline-block"},[`${wn}-disabled`]:{color:gn,cursor:"not-allowed"}})}};var at=(0,vr.Z)("Upload",Ft=>{const{fontSizeHeading3:wn,fontSize:gn,lineHeight:yn,lineWidth:On,controlHeightLG:$n}=Ft,Yn=Math.round(gn*yn),ii=(0,ji.TS)(Ft,{uploadThumbnailSize:wn*2,uploadProgressOffset:Yn/2+On,uploadPicCardSize:$n*2.55});return[Bt(ii),jn(ii),jt(ii),ft(ii),Ei(ii),In(ii),vn(ii),(0,wr.Z)(ii)]},Ft=>({actionsColor:Ft.colorTextDescription})),cn=function(Ft,wn,gn,yn){function On($n){return $n instanceof gn?$n:new gn(function(Yn){Yn($n)})}return new(gn||(gn=Promise))(function($n,Yn){function ii(Hi){try{di(yn.next(Hi))}catch($i){Yn($i)}}function Xn(Hi){try{di(yn.throw(Hi))}catch($i){Yn($i)}}function di(Hi){Hi.done?$n(Hi.value):On(Hi.value).then(ii,Xn)}di((yn=yn.apply(Ft,wn||[])).next())})};const Sn=`__LIST_IGNORE_${Date.now()}__`,Un=(Ft,wn)=>{const{fileList:gn,defaultFileList:yn,onRemove:On,showUploadList:$n=!0,listType:Yn="text",onPreview:ii,onDownload:Xn,onChange:di,onDrop:Hi,previewFile:$i,disabled:Wi,locale:Xt,iconRender:Si,isImageUrl:Ki,progress:Ti,prefixCls:cr,className:Qi,type:yr="select",children:fr,style:Vi,itemRender:Mr,maxCount:Dn,data:Wr={},multiple:_n=!1,action:Ir="",accept:eo="",supportServerRender:xr=!0,rootClassName:bo}=Ft,Yr=ge.useContext(it.Z),ur=Wi!=null?Wi:Yr,[ir,qi]=(0,zt.Z)(yn||[],{value:gn,postState:Ri=>Ri!=null?Ri:[]}),[Dr,Ai]=ge.useState("drop"),et=ge.useRef(null);ge.useMemo(()=>{const Ri=Date.now();(gn||[]).forEach((Ii,er)=>{!Ii.uid&&!Object.isFrozen(Ii)&&(Ii.uid=`__AUTO__${Ri}_${er}__`)})},[gn]);const jr=(Ri,Ii,er)=>{let tr=(0,Oe.Z)(Ii),hr=!1;Dn===1?tr=tr.slice(-1):Dn&&(hr=tr.length>Dn,tr=tr.slice(0,Dn)),(0,Yt.flushSync)(()=>{qi(tr)});const Sr={file:Ri,fileList:tr};er&&(Sr.event=er),(!hr||tr.some(kr=>kr.uid===Ri.uid))&&(0,Yt.flushSync)(()=>{di==null||di(Sr)})},yo=(Ri,Ii)=>cn(void 0,void 0,void 0,function*(){const{beforeUpload:er,transformFile:tr}=Ft;let hr=Ri;if(er){const Sr=yield er(Ri,Ii);if(Sr===!1)return!1;if(delete Ri[Sn],Sr===Sn)return Object.defineProperty(Ri,Sn,{value:!0,configurable:!0}),!1;typeof Sr=="object"&&Sr&&(hr=Sr)}return tr&&(hr=yield tr(hr)),hr}),Or=Ri=>{const Ii=Ri.filter(hr=>!hr.file[Sn]);if(!Ii.length)return;const er=Ii.map(hr=>St(hr.file));let tr=(0,Oe.Z)(ir);er.forEach(hr=>{tr=rt(hr,tr)}),er.forEach((hr,Sr)=>{let kr=hr;if(Ii[Sr].parsedFile)hr.status="uploading";else{const{originFileObj:Er}=hr;let Br;try{Br=new File([Er],Er.name,{type:Er.type})}catch(Zr){Br=new Blob([Er],{type:Er.type}),Br.name=Er.name,Br.lastModifiedDate=new Date,Br.lastModified=new Date().getTime()}Br.uid=hr.uid,kr=Br}jr(kr,tr)})},wo=(Ri,Ii,er)=>{try{typeof Ri=="string"&&(Ri=JSON.parse(Ri))}catch(Sr){}if(!Zt(Ii,ir))return;const tr=St(Ii);tr.status="done",tr.percent=100,tr.response=Ri,tr.xhr=er;const hr=rt(tr,ir);jr(tr,hr)},co=(Ri,Ii)=>{if(!Zt(Ii,ir))return;const er=St(Ii);er.status="uploading",er.percent=Ri.percent;const tr=rt(er,ir);jr(er,tr,Ri)},$o=(Ri,Ii,er)=>{if(!Zt(er,ir))return;const tr=St(er);tr.error=Ri,tr.response=Ii,tr.status="error";const hr=rt(tr,ir);jr(tr,hr)},Gr=Ri=>{let Ii;Promise.resolve(typeof On=="function"?On(Ri):On).then(er=>{var tr;if(er===!1)return;const hr=dn(Ri,ir);hr&&(Ii=Object.assign(Object.assign({},Ri),{status:"removed"}),ir==null||ir.forEach(Sr=>{const kr=Ii.uid!==void 0?"uid":"name";Sr[kr]===Ii[kr]&&!Object.isFrozen(Sr)&&(Sr.status="removed")}),(tr=et.current)===null||tr===void 0||tr.abort(Ii),jr(Ii,hr))})},zr=Ri=>{Ai(Ri.type),Ri.type==="drop"&&(Hi==null||Hi(Ri))};ge.useImperativeHandle(wn,()=>({onBatchStart:Or,onSuccess:wo,onProgress:co,onError:$o,fileList:ir,upload:et.current}));const{getPrefixCls:Nr,direction:Eo,upload:or}=ge.useContext(Ut.E_),mr=Nr("upload",cr),$r=Object.assign(Object.assign({onBatchStart:Or,onError:$o,onProgress:co,onSuccess:wo},Ft),{data:Wr,multiple:_n,action:Ir,accept:eo,supportServerRender:xr,prefixCls:mr,disabled:ur,beforeUpload:yo,onChange:void 0});delete $r.className,delete $r.style,(!fr||ur)&&delete $r.id;const[hi,Ao]=at(mr),[Vo]=(0,Ve.Z)("Upload",Wt.Z.Upload),{showRemoveIcon:sa,showPreviewIcon:ko,showDownloadIcon:Io,removeIcon:_o,previewIcon:la,downloadIcon:pa}=typeof $n=="boolean"?{}:$n,Lt=(Ri,Ii)=>$n?ge.createElement(ar,{prefixCls:mr,listType:Yn,items:ir,previewFile:$i,onPreview:ii,onDownload:Xn,onRemove:Gr,showRemoveIcon:!ur&&sa,showPreviewIcon:ko,showDownloadIcon:Io,removeIcon:_o,previewIcon:la,downloadIcon:pa,iconRender:Si,locale:Object.assign(Object.assign({},Vo),Xt),isImageUrl:Ki,progress:Ti,appendAction:Ri,appendActionVisible:Ii,itemRender:Mr,disabled:ur}):Ri,wi=st()(`${mr}-wrapper`,Qi,bo,Ao,or==null?void 0:or.className,{[`${mr}-rtl`]:Eo==="rtl",[`${mr}-picture-card-wrapper`]:Yn==="picture-card",[`${mr}-picture-circle-wrapper`]:Yn==="picture-circle"}),_t=Object.assign(Object.assign({},or==null?void 0:or.style),Vi);if(yr==="drag"){const Ri=st()(Ao,mr,`${mr}-drag`,{[`${mr}-drag-uploading`]:ir.some(Ii=>Ii.status==="uploading"),[`${mr}-drag-hover`]:Dr==="dragover",[`${mr}-disabled`]:ur,[`${mr}-rtl`]:Eo==="rtl"});return hi(ge.createElement("span",{className:wi},ge.createElement("div",{className:Ri,style:_t,onDrop:zr,onDragOver:zr,onDragLeave:zr},ge.createElement(ht,Object.assign({},$r,{ref:et,className:`${mr}-btn`}),ge.createElement("div",{className:`${mr}-drag-container`},fr))),Lt()))}const Yi=st()(mr,`${mr}-select`,{[`${mr}-disabled`]:ur}),Cr=(Ri=>ge.createElement("div",{className:Yi,style:Ri},ge.createElement(ht,Object.assign({},$r,{ref:et}))))(fr?void 0:{display:"none"});return hi(Yn==="picture-card"||Yn==="picture-circle"?ge.createElement("span",{className:wi},Lt(Cr,!!fr)):ge.createElement("span",{className:wi},Cr,Lt()))};var Rt=ge.forwardRef(Un),zn=function(Ft,wn){var gn={};for(var yn in Ft)Object.prototype.hasOwnProperty.call(Ft,yn)&&wn.indexOf(yn)<0&&(gn[yn]=Ft[yn]);if(Ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var On=0,yn=Object.getOwnPropertySymbols(Ft);On<yn.length;On++)wn.indexOf(yn[On])<0&&Object.prototype.propertyIsEnumerable.call(Ft,yn[On])&&(gn[yn[On]]=Ft[yn[On]]);return gn},gi=ge.forwardRef((Ft,wn)=>{var{style:gn,height:yn}=Ft,On=zn(Ft,["style","height"]);return ge.createElement(Rt,Object.assign({ref:wn},On,{type:"drag",style:Object.assign(Object.assign({},gn),{height:yn})}))});const tn=Rt;tn.Dragger=gi,tn.LIST_IGNORE=Sn;var Bn=tn},99498:function(Vn,Pn,pe){(function(ge){ge(pe(89780))})(function(ge){ge.defineOption("placeholder","",function(Tt,Pt,Xe){var Et=Xe&&Xe!=ge.Init;if(Pt&&!Et)Tt.on("blur",Ge),Tt.on("change",_e),Tt.on("swapDoc",_e),ge.on(Tt.getInputField(),"compositionupdate",Tt.state.placeholderCompose=function(){st(Tt)}),_e(Tt);else if(!Pt&&Et){Tt.off("blur",Ge),Tt.off("change",_e),Tt.off("swapDoc",_e),ge.off(Tt.getInputField(),"compositionupdate",Tt.state.placeholderCompose),Oe(Tt);var ct=Tt.getWrapperElement();ct.className=ct.className.replace(" CodeMirror-empty","")}Pt&&!Tt.hasFocus()&&Ge(Tt)});function Oe(Tt){Tt.state.placeholder&&(Tt.state.placeholder.parentNode.removeChild(Tt.state.placeholder),Tt.state.placeholder=null)}function Ke(Tt){Oe(Tt);var Pt=Tt.state.placeholder=document.createElement("pre");Pt.style.cssText="height: 0; overflow: visible",Pt.style.direction=Tt.getOption("direction"),Pt.className="CodeMirror-placeholder CodeMirror-line-like";var Xe=Tt.getOption("placeholder");typeof Xe=="string"&&(Xe=document.createTextNode(Xe)),Pt.appendChild(Xe),Tt.display.lineSpace.insertBefore(Pt,Tt.display.lineSpace.firstChild)}function st(Tt){setTimeout(function(){var Pt=!1,Xe=Tt.getInputField();Xe.nodeName=="TEXTAREA"?Pt=!Xe.value:Tt.lineCount()==1&&(Pt=!/[^\u200b]/.test(Xe.querySelector(".CodeMirror-line").textContent)),Pt?Ke(Tt):Oe(Tt)},20)}function Ge(Tt){Le(Tt)&&Ke(Tt)}function _e(Tt){var Pt=Tt.getWrapperElement(),Xe=Le(Tt);Pt.className=Pt.className.replace(" CodeMirror-empty","")+(Xe?" CodeMirror-empty":""),Xe?Ke(Tt):Oe(Tt)}function Le(Tt){return Tt.lineCount()===1&&Tt.getLine(0)===""}})},25717:function(Vn,Pn,pe){(function(ge){ge(pe(89780))})(function(ge){var Oe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ke=ge.Pos;ge.defineOption("autoCloseBrackets",!1,function(ne,ee,ce){ce&&ce!=ge.Init&&(ne.removeKeyMap(Ge),ne.state.closeBrackets=null),ee&&(_e(st(ee,"pairs")),ne.state.closeBrackets=ee,ne.addKeyMap(Ge))});function st(ne,ee){return ee=="pairs"&&typeof ne=="string"?ne:typeof ne=="object"&&ne[ee]!=null?ne[ee]:Oe[ee]}var Ge={Backspace:Pt,Enter:Xe};function _e(ne){for(var ee=0;ee<ne.length;ee++){var ce=ne.charAt(ee),se="'"+ce+"'";Ge[se]||(Ge[se]=Le(ce))}}_e(Oe.pairs+"`");function Le(ne){return function(ee){return ct(ee,ne)}}function Tt(ne){var ee=ne.state.closeBrackets;if(!ee||ee.override)return ee;var ce=ne.getModeAt(ne.getCursor());return ce.closeBrackets||ee}function Pt(ne){var ee=Tt(ne);if(!ee||ne.getOption("disableInput"))return ge.Pass;for(var ce=st(ee,"pairs"),se=ne.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return ge.Pass;var ve=It(ne,se[he].head);if(!ve||ce.indexOf(ve)%2!=0)return ge.Pass}for(var he=se.length-1;he>=0;he--){var be=se[he].head;ne.replaceRange("",Ke(be.line,be.ch-1),Ke(be.line,be.ch+1),"+delete")}}function Xe(ne){var ee=Tt(ne),ce=ee&&st(ee,"explode");if(!ce||ne.getOption("disableInput"))return ge.Pass;for(var se=ne.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return ge.Pass;var ve=It(ne,se[he].head);if(!ve||ce.indexOf(ve)%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 ke=0;ke<se.length;ke++){var Ae=se[ke].head.line;ne.indentLine(Ae,null,!0),ne.indentLine(Ae+1,null,!0)}})}function Et(ne){var ee=ge.cmpPos(ne.anchor,ne.head)>0;return{anchor:new Ke(ne.anchor.line,ne.anchor.ch+(ee?-1:1)),head:new Ke(ne.head.line,ne.head.ch+(ee?1:-1))}}function ct(ne,ee){var ce=Tt(ne);if(!ce||ne.getOption("disableInput"))return ge.Pass;var se=st(ce,"pairs"),he=se.indexOf(ee);if(he==-1)return ge.Pass;for(var ve=st(ce,"closeBefore"),be=st(ce,"triples"),ke=se.charAt(he+1)==ee,Ae=ne.listSelections(),ze=he%2==0,Ze,ot=0;ot<Ae.length;ot++){var qe=Ae[ot],bt=qe.head,He,wt=ne.getRange(bt,Ke(bt.line,bt.ch+1));if(ze&&!qe.empty())He="surround";else if((ke||!ze)&&wt==ee)ke&&Be(ne,bt)?He="both":be.indexOf(ee)>=0&&ne.getRange(bt,Ke(bt.line,bt.ch+3))==ee+ee+ee?He="skipThree":He="skip";else if(ke&&bt.ch>1&&be.indexOf(ee)>=0&&ne.getRange(Ke(bt.line,bt.ch-2),bt)==ee+ee){if(bt.ch>2&&/\bstring/.test(ne.getTokenTypeAt(Ke(bt.line,bt.ch-2))))return ge.Pass;He="addFour"}else if(ke){var nt=bt.ch==0?" ":ne.getRange(Ke(bt.line,bt.ch-1),bt);if(!ge.isWordChar(wt)&&nt!=ee&&!ge.isWordChar(nt))He="both";else return ge.Pass}else if(ze&&(wt.length===0||/\s/.test(wt)||ve.indexOf(wt)>-1))He="both";else return ge.Pass;if(!Ze)Ze=He;else if(Ze!=He)return ge.Pass}var Dt=he%2?se.charAt(he-1):ee,ht=he%2?ee:se.charAt(he+1);ne.operation(function(){if(Ze=="skip")ne.execCommand("goCharRight");else if(Ze=="skipThree")for(var zt=0;zt<3;zt++)ne.execCommand("goCharRight");else if(Ze=="surround"){for(var Yt=ne.getSelections(),zt=0;zt<Yt.length;zt++)Yt[zt]=Dt+Yt[zt]+ht;ne.replaceSelections(Yt,"around"),Yt=ne.listSelections().slice();for(var zt=0;zt<Yt.length;zt++)Yt[zt]=Et(Yt[zt]);ne.setSelections(Yt)}else Ze=="both"?(ne.replaceSelection(Dt+ht,null),ne.triggerElectric(Dt+ht),ne.execCommand("goCharLeft")):Ze=="addFour"&&(ne.replaceSelection(Dt+Dt+Dt+Dt,"before"),ne.execCommand("goCharRight"))})}function It(ne,ee){var ce=ne.getRange(Ke(ee.line,ee.ch-1),Ke(ee.line,ee.ch+1));return ce.length==2?ce:null}function Be(ne,ee){var ce=ne.getTokenAt(Ke(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,Pn,pe){(function(ge){ge(pe(89780),pe(32855))})(function(ge){ge.defineOption("autoCloseTags",!1,function(Pt,Xe,Et){if(Et!=ge.Init&&Et&&Pt.removeKeyMap("autoCloseTags"),!!Xe){var ct={name:"autoCloseTags"};(typeof Xe!="object"||Xe.whenClosing!==!1)&&(ct["'/'"]=function(It){return _e(It)}),(typeof Xe!="object"||Xe.whenOpening!==!1)&&(ct["'>'"]=function(It){return st(It)}),Pt.addKeyMap(ct)}});var Oe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ke=["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 st(Pt){if(Pt.getOption("disableInput"))return ge.Pass;for(var Xe=Pt.listSelections(),Et=[],ct=Pt.getOption("autoCloseTags"),It=0;It<Xe.length;It++){if(!Xe[It].empty())return ge.Pass;var Be=Xe[It].head,ne=Pt.getTokenAt(Be),ee=ge.innerMode(Pt.getMode(),ne.state),ce=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(ce),he=se&&se.name;if(!he)return ge.Pass;var ve=ee.mode.configuration=="html",be=typeof ct=="object"&&ct.dontCloseTags||ve&&Oe,ke=typeof ct=="object"&&ct.indentTags||ve&&Ke;ne.end>Be.ch&&(he=he.slice(0,he.length-ne.end+Be.ch));var Ae=he.toLowerCase();if(!he||ne.type=="string"&&(ne.end!=Be.ch||!/[\"\']/.test(ne.string.charAt(ne.string.length-1))||ne.string.length==1)||ne.type=="tag"&&se.close||ne.string.indexOf("/")==Be.ch-ne.start-1||be&&Le(be,Ae)>-1||Tt(Pt,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(ce)||[],he,Be,!0))return ge.Pass;var ze=typeof ct=="object"&&ct.emptyTags;if(ze&&Le(ze,he)>-1){Et[It]={text:"/>",newPos:ge.Pos(Be.line,Be.ch+2)};continue}var Ze=ke&&Le(ke,Ae)>-1;Et[It]={indent:Ze,text:">"+(Ze?`
`:"")+"</"+he+">",newPos:Ze?ge.Pos(Be.line+1,0):ge.Pos(Be.line,Be.ch+1)}}for(var ot=typeof ct=="object"&&ct.dontIndentOnAutoClose,It=Xe.length-1;It>=0;It--){var qe=Et[It];Pt.replaceRange(qe.text,Xe[It].head,Xe[It].anchor,"+insert");var bt=Pt.listSelections().slice(0);bt[It]={head:qe.newPos,anchor:qe.newPos},Pt.setSelections(bt),!ot&&qe.indent&&(Pt.indentLine(qe.newPos.line,null,!0),Pt.indentLine(qe.newPos.line+1,null,!0))}}function Ge(Pt,Xe){for(var Et=Pt.listSelections(),ct=[],It=Xe?"/":"</",Be=Pt.getOption("autoCloseTags"),ne=typeof Be=="object"&&Be.dontIndentOnSlash,ee=0;ee<Et.length;ee++){if(!Et[ee].empty())return ge.Pass;var ce=Et[ee].head,se=Pt.getTokenAt(ce),he=ge.innerMode(Pt.getMode(),se.state),ve=he.state;if(Xe&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=ce.ch-1))return ge.Pass;var be,ke=he.mode.name!="xml"&&Pt.getMode().name=="htmlmixed";if(ke&&he.mode.name=="javascript")be=It+"script";else if(ke&&he.mode.name=="css")be=It+"style";else{var Ae=he.mode.xmlCurrentContext&&he.mode.xmlCurrentContext(ve);if(!Ae||Ae.length&&Tt(Pt,Ae,Ae[Ae.length-1],ce))return ge.Pass;be=It+Ae[Ae.length-1]}Pt.getLine(ce.line).charAt(se.end)!=">"&&(be+=">"),ct[ee]=be}if(Pt.replaceSelections(ct),Et=Pt.listSelections(),!ne)for(var ee=0;ee<Et.length;ee++)(ee==Et.length-1||Et[ee].head.line<Et[ee+1].head.line)&&Pt.indentLine(Et[ee].head.line)}function _e(Pt){return Pt.getOption("disableInput")?ge.Pass:Ge(Pt,!0)}ge.commands.closeTag=function(Pt){return Ge(Pt)};function Le(Pt,Xe){if(Pt.indexOf)return Pt.indexOf(Xe);for(var Et=0,ct=Pt.length;Et<ct;++Et)if(Pt[Et]==Xe)return Et;return-1}function Tt(Pt,Xe,Et,ct,It){if(!ge.scanForClosingTag)return!1;var Be=Math.min(Pt.lastLine()+1,ct.line+500),ne=ge.scanForClosingTag(Pt,ct,null,Be);if(!ne||ne.tag!=Et)return!1;for(var ee=It?1:0,ce=Xe.length-1;ce>=0&&Xe[ce]==Et;ce--)++ee;ct=ne.to;for(var ce=1;ce<ee;ce++){var se=ge.scanForClosingTag(Pt,ct,null,Be);if(!se||se.tag!=Et)return!1;ct=se.to}return!0}})},32855:function(Vn,Pn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";var Oe=ge.Pos;function Ke(ce,se){return ce.line-se.line||ce.ch-se.ch}var st="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",Ge=st+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",_e=new RegExp("<(/?)(["+st+"]["+Ge+"]*)","g");function Le(ce,se,he,ve){this.line=se,this.ch=he,this.cm=ce,this.text=ce.getLine(se),this.min=ve?Math.max(ve.from,ce.firstLine()):ce.firstLine(),this.max=ve?Math.min(ve.to-1,ce.lastLine()):ce.lastLine()}function Tt(ce,se){var he=ce.cm.getTokenTypeAt(Oe(ce.line,se));return he&&/\btag\b/.test(he)}function Pt(ce){if(!(ce.line>=ce.max))return ce.ch=0,ce.text=ce.cm.getLine(++ce.line),!0}function Xe(ce){if(!(ce.line<=ce.min))return ce.text=ce.cm.getLine(--ce.line),ce.ch=ce.text.length,!0}function Et(ce){for(;;){var se=ce.text.indexOf(">",ce.ch);if(se==-1){if(Pt(ce))continue;return}if(!Tt(ce,se+1)){ce.ch=se+1;continue}var he=ce.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(ce.text.slice(he+1,se));return ce.ch=se+1,ve?"selfClose":"regular"}}function ct(ce){for(;;){var se=ce.ch?ce.text.lastIndexOf("<",ce.ch-1):-1;if(se==-1){if(Xe(ce))continue;return}if(!Tt(ce,se+1)){ce.ch=se;continue}_e.lastIndex=se,ce.ch=se;var he=_e.exec(ce.text);if(he&&he.index==se)return he}}function It(ce){for(;;){_e.lastIndex=ce.ch;var se=_e.exec(ce.text);if(!se){if(Pt(ce))continue;return}if(!Tt(ce,se.index+1)){ce.ch=se.index+1;continue}return ce.ch=se.index+se[0].length,se}}function Be(ce){for(;;){var se=ce.ch?ce.text.lastIndexOf(">",ce.ch-1):-1;if(se==-1){if(Xe(ce))continue;return}if(!Tt(ce,se+1)){ce.ch=se;continue}var he=ce.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(ce.text.slice(he+1,se));return ce.ch=se+1,ve?"selfClose":"regular"}}function ne(ce,se){for(var he=[];;){var ve=It(ce),be,ke=ce.line,Ae=ce.ch-(ve?ve[0].length:0);if(!ve||!(be=Et(ce)))return;if(be!="selfClose")if(ve[1]){for(var ze=he.length-1;ze>=0;--ze)if(he[ze]==ve[2]){he.length=ze;break}if(ze<0&&(!se||se==ve[2]))return{tag:ve[2],from:Oe(ke,Ae),to:Oe(ce.line,ce.ch)}}else he.push(ve[2])}}function ee(ce,se){for(var he=[];;){var ve=Be(ce);if(!ve)return;if(ve=="selfClose"){ct(ce);continue}var be=ce.line,ke=ce.ch,Ae=ct(ce);if(!Ae)return;if(Ae[1])he.push(Ae[2]);else{for(var ze=he.length-1;ze>=0;--ze)if(he[ze]==Ae[2]){he.length=ze;break}if(ze<0&&(!se||se==Ae[2]))return{tag:Ae[2],from:Oe(ce.line,ce.ch),to:Oe(be,ke)}}}}ge.registerHelper("fold","xml",function(ce,se){for(var he=new Le(ce,se.line,0);;){var ve=It(he);if(!ve||he.line!=se.line)return;var be=Et(he);if(!be)return;if(!ve[1]&&be!="selfClose"){var ke=Oe(he.line,he.ch),Ae=ne(he,ve[2]);return Ae&&Ke(Ae.from,ke)>0?{from:ke,to:Ae.from}:null}}}),ge.findMatchingTag=function(ce,se,he){var ve=new Le(ce,se.line,se.ch,he);if(!(ve.text.indexOf(">")==-1&&ve.text.indexOf("<")==-1)){var be=Et(ve),ke=be&&Oe(ve.line,ve.ch),Ae=be&&ct(ve);if(!(!be||!Ae||Ke(ve,se)>0)){var ze={from:Oe(ve.line,ve.ch),to:ke,tag:Ae[2]};return be=="selfClose"?{open:ze,close:null,at:"open"}:Ae[1]?{open:ee(ve,Ae[2]),close:ze,at:"close"}:(ve=new Le(ce,ke.line,ke.ch,he),{open:ze,close:ne(ve,Ae[2]),at:"open"})}}},ge.findEnclosingTag=function(ce,se,he,ve){for(var be=new Le(ce,se.line,se.ch,he);;){var ke=ee(be,ve);if(!ke)break;var Ae=new Le(ce,se.line,se.ch,he),ze=ne(Ae,ke.tag);if(ze)return{open:ke,close:ze}}},ge.scanForClosingTag=function(ce,se,he,ve){var be=new Le(ce,se.line,se.ch,ve?{from:0,to:ve}:null);return ne(be,he)}})},89780:function(Vn){(function(Pn,pe){Vn.exports=pe()})(this,function(){"use strict";var Pn=navigator.userAgent,pe=navigator.platform,ge=/gecko\/\d/i.test(Pn),Oe=/MSIE \d/.test(Pn),Ke=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Pn),st=/Edge\/(\d+)/.exec(Pn),Ge=Oe||Ke||st,_e=Ge&&(Oe?document.documentMode||6:+(st||Ke)[1]),Le=!st&&/WebKit\//.test(Pn),Tt=Le&&/Qt\/\d+\.\d+/.test(Pn),Pt=!st&&/Chrome\//.test(Pn),Xe=/Opera\//.test(Pn),Et=/Apple Computer/.test(navigator.vendor),ct=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Pn),It=/PhantomJS/.test(Pn),Be=!st&&/AppleWebKit/.test(Pn)&&/Mobile\/\w+/.test(Pn),ne=/Android/.test(Pn),ee=Be||ne||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Pn),ce=Be||/Mac/.test(pe),se=/\bCrOS\b/.test(Pn),he=/win/i.test(pe),ve=Xe&&Pn.match(/Version\/(\d*\.\d*)/);ve&&(ve=Number(ve[1])),ve&&ve>=15&&(Xe=!1,Le=!0);var be=ce&&(Tt||Xe&&(ve==null||ve<12.11)),ke=ge||Ge&&_e>=9;function Ae(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var ze=function(ie,ae){var fe=ie.className,de=Ae(ae).exec(fe);if(de){var Se=fe.slice(de.index+de[0].length);ie.className=fe.slice(0,de.index)+(Se?de[1]+Se:"")}};function Ze(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function ot(ie,ae){return Ze(ie).appendChild(ae)}function qe(ie,ae,fe,de){var Se=document.createElement(ie);if(fe&&(Se.className=fe),de&&(Se.style.cssText=de),typeof ae=="string")Se.appendChild(document.createTextNode(ae));else if(ae)for(var Re=0;Re<ae.length;++Re)Se.appendChild(ae[Re]);return Se}function bt(ie,ae,fe,de){var Se=qe(ie,ae,fe,de);return Se.setAttribute("role","presentation"),Se}var He;document.createRange?He=function(ie,ae,fe,de){var Se=document.createRange();return Se.setEnd(de||ie,fe),Se.setStart(ie,ae),Se}:He=function(ie,ae,fe){var de=document.body.createTextRange();try{de.moveToElementText(ie.parentNode)}catch(Se){return de}return de.collapse(!0),de.moveEnd("character",fe),de.moveStart("character",ae),de};function wt(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 nt(){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 Dt(ie,ae){var fe=ie.className;Ae(ae).test(fe)||(ie.className+=(fe?" ":"")+ae)}function ht(ie,ae){for(var fe=ie.split(" "),de=0;de<fe.length;de++)fe[de]&&!Ae(fe[de]).test(ae)&&(ae+=" "+fe[de]);return ae}var zt=function(ie){ie.select()};Be?zt=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:Ge&&(zt=function(ie){try{ie.select()}catch(ae){}});function Yt(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function Ut(ie,ae,fe){ae||(ae={});for(var de in ie)ie.hasOwnProperty(de)&&(fe!==!1||!ae.hasOwnProperty(de))&&(ae[de]=ie[de]);return ae}function it(ie,ae,fe,de,Se){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Re=de||0,Ue=Se||0;;){var dt=ie.indexOf(" ",Re);if(dt<0||dt>=ae)return Ue+(ae-Re);Ue+=dt-Re,Ue+=fe-Ue%fe,Re=dt+1}}var Ve=function(){this.id=null,this.f=null,this.time=0,this.handler=Yt(this.onTimeout,this)};Ve.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ve.prototype.set=function(ie,ae){this.f=ae;var fe=+new Date+ie;(!this.id||fe<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=fe)};function Wt(ie,ae){for(var fe=0;fe<ie.length;++fe)if(ie[fe]==ae)return fe;return-1}var Ln=50,Nn={toString:function(){return"CodeMirror.Pass"}},$t={scroll:!1},rn={origin:"*mouse"},An={origin:"+move"};function ti(ie,ae,fe){for(var de=0,Se=0;;){var Re=ie.indexOf(" ",de);Re==-1&&(Re=ie.length);var Ue=Re-de;if(Re==ie.length||Se+Ue>=ae)return de+Math.min(Ue,ae-Se);if(Se+=Re-de,Se+=fe-Se%fe,de=Re+1,Se>=ae)return de}}var xn=[""];function Qn(ie){for(;xn.length<=ie;)xn.push(Ot(xn)+" ");return xn[ie]}function Ot(ie){return ie[ie.length-1]}function Cn(ie,ae){for(var fe=[],de=0;de<ie.length;de++)fe[de]=ae(ie[de],de);return fe}function Wn(ie,ae,fe){for(var de=0,Se=fe(ae);de<ie.length&&fe(ie[de])<=Se;)de++;ie.splice(de,0,ae)}function We(){}function Ee(ie,ae){var fe;return Object.create?fe=Object.create(ie):(We.prototype=ie,fe=new We),ae&&Ut(ae,fe),fe}var Pe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function De(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Pe.test(ie))}function Fe(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&De(ie)?!0:ae.test(ie):De(ie)}function ye(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var Qe=/[\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 vt(ie){return ie.charCodeAt(0)>=768&&Qe.test(ie)}function Ye(ie,ae,fe){for(;(fe<0?ae>0:ae<ie.length)&&vt(ie.charAt(ae));)ae+=fe;return ae}function Je(ie,ae,fe){for(var de=ae>fe?-1:1;;){if(ae==fe)return ae;var Se=(ae+fe)/2,Re=de<0?Math.ceil(Se):Math.floor(Se);if(Re==ae)return ie(Re)?ae:fe;ie(Re)?fe=Re:ae=Re+de}}function yt(ie,ae,fe,de){if(!ie)return de(ae,fe,"ltr",0);for(var Se=!1,Re=0;Re<ie.length;++Re){var Ue=ie[Re];(Ue.from<fe&&Ue.to>ae||ae==fe&&Ue.to==ae)&&(de(Math.max(Ue.from,ae),Math.min(Ue.to,fe),Ue.level==1?"rtl":"ltr",Re),Se=!0)}Se||de(ae,fe,"ltr")}var St=null;function rt(ie,ae,fe){var de;St=null;for(var Se=0;Se<ie.length;++Se){var Re=ie[Se];if(Re.from<ae&&Re.to>ae)return Se;Re.to==ae&&(Re.from!=Re.to&&fe=="before"?de=Se:St=Se),Re.from==ae&&(Re.from!=Re.to&&fe!="before"?de=Se:St=Se)}return de!=null?de:St}var Zt=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function fe(Ht){return Ht<=247?ie.charAt(Ht):1424<=Ht&&Ht<=1524?"R":1536<=Ht&&Ht<=1785?ae.charAt(Ht-1536):1774<=Ht&&Ht<=2220?"r":8192<=Ht&&Ht<=8203?"w":Ht==8204?"b":"L"}var de=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Se=/[stwN]/,Re=/[LRr]/,Ue=/[Lb1n]/,dt=/[1n]/;function lt(Ht,Rn,Qt){this.level=Ht,this.from=Rn,this.to=Qt}return function(Ht,Rn){var Qt=Rn=="ltr"?"L":"R";if(Ht.length==0||Rn=="ltr"&&!de.test(Ht))return!1;for(var ci=Ht.length,oi=[],Ji=0;Ji<ci;++Ji)oi.push(fe(Ht.charCodeAt(Ji)));for(var lr=0,Pr=Qt;lr<ci;++lr){var _r=oi[lr];_r=="m"?oi[lr]=Pr:Pr=_r}for(var fo=0,ao=Qt;fo<ci;++fo){var Co=oi[fo];Co=="1"&&ao=="r"?oi[fo]="n":Re.test(Co)&&(ao=Co,Co=="r"&&(oi[fo]="R"))}for(var Qo=1,so=oi[0];Qo<ci-1;++Qo){var ha=oi[Qo];ha=="+"&&so=="1"&&oi[Qo+1]=="1"?oi[Qo]="1":ha==","&&so==oi[Qo+1]&&(so=="1"||so=="n")&&(oi[Qo]=so),so=ha}for(var ws=0;ws<ci;++ws){var Pl=oi[ws];if(Pl==",")oi[ws]="N";else if(Pl=="%"){var ks=void 0;for(ks=ws+1;ks<ci&&oi[ks]=="%";++ks);for(var mu=ws&&oi[ws-1]=="!"||ks<ci&&oi[ks]=="1"?"1":"N",zl=ws;zl<ks;++zl)oi[zl]=mu;ws=ks-1}}for(var fl=0,vu=Qt;fl<ci;++fl){var Nl=oi[fl];vu=="L"&&Nl=="1"?oi[fl]="L":Re.test(Nl)&&(vu=Nl)}for(var gl=0;gl<ci;++gl)if(Se.test(oi[gl])){var Za=void 0;for(Za=gl+1;Za<ci&&Se.test(oi[Za]);++Za);for(var Is=(gl?oi[gl-1]:Qt)=="L",bl=(Za<ci?oi[Za]:Qt)=="L",Fl=Is==bl?Is?"L":"R":Qt,cc=gl;cc<Za;++cc)oi[cc]=Fl;gl=Za-1}for(var Os=[],Zu,xe=0;xe<ci;)if(Ue.test(oi[xe])){var Ce=xe;for(++xe;xe<ci&&Ue.test(oi[xe]);++xe);Os.push(new lt(0,Ce,xe))}else{var Ie=xe,$e=Os.length,mt=Rn=="rtl"?1:0;for(++xe;xe<ci&&oi[xe]!="L";++xe);for(var gt=Ie;gt<xe;)if(dt.test(oi[gt])){Ie<gt&&(Os.splice($e,0,new lt(1,Ie,gt)),$e+=mt);var At=gt;for(++gt;gt<xe&&dt.test(oi[gt]);++gt);Os.splice($e,0,new lt(2,At,gt)),$e+=mt,Ie=gt}else++gt;Ie<xe&&Os.splice($e,0,new lt(1,Ie,xe))}return Rn=="ltr"&&(Os[0].level==1&&(Zu=Ht.match(/^\s+/))&&(Os[0].from=Zu[0].length,Os.unshift(new lt(0,0,Zu[0].length))),Ot(Os).level==1&&(Zu=Ht.match(/\s+$/))&&(Ot(Os).to-=Zu[0].length,Os.push(new lt(0,ci-Zu[0].length,ci)))),Rn=="rtl"?Os.reverse():Os}}();function dn(ie,ae){var fe=ie.order;return fe==null&&(fe=ie.order=Zt(ie.text,ae)),fe}var mn=[],qt=function(ie,ae,fe){if(ie.addEventListener)ie.addEventListener(ae,fe,!1);else if(ie.attachEvent)ie.attachEvent("on"+ae,fe);else{var de=ie._handlers||(ie._handlers={});de[ae]=(de[ae]||mn).concat(fe)}};function Gn(ie,ae){return ie._handlers&&ie._handlers[ae]||mn}function Kn(ie,ae,fe){if(ie.removeEventListener)ie.removeEventListener(ae,fe,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,fe);else{var de=ie._handlers,Se=de&&de[ae];if(Se){var Re=Wt(Se,fe);Re>-1&&(de[ae]=Se.slice(0,Re).concat(Se.slice(Re+1)))}}}function Nt(ie,ae){var fe=Gn(ie,ae);if(fe.length)for(var de=Array.prototype.slice.call(arguments,2),Se=0;Se<fe.length;++Se)fe[Se].apply(null,de)}function sn(ie,ae,fe){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),Nt(ie,fe||ae.type,ie,ae),mi(ae)||ae.codemirrorIgnore}function Fn(ie){var ae=ie._handlers&&ie._handlers.cursorActivity;if(ae)for(var fe=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),de=0;de<ae.length;++de)Wt(fe,ae[de])==-1&&fe.push(ae[de])}function hn(ie,ae){return Gn(ie,ae).length>0}function Mn(ie){ie.prototype.on=function(ae,fe){qt(this,ae,fe)},ie.prototype.off=function(ae,fe){Kn(this,ae,fe)}}function li(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function pi(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function mi(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function Li(ie){li(ie),pi(ie)}function Gi(ie){return ie.target||ie.srcElement}function ar(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 Xi=function(){if(Ge&&_e<9)return!1;var ie=qe("div");return"draggable"in ie||"dragDrop"in ie}(),wr;function vr(ie){if(wr==null){var ae=qe("span","\u200B");ot(ie,qe("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(wr=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(Ge&&_e<8))}var fe=wr?qe("span","\u200B"):qe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return fe.setAttribute("cm-text",""),fe}var ji;function Lr(ie){if(ji!=null)return ji;var ae=ot(ie,document.createTextNode("A\u062EA")),fe=He(ae,0,1).getBoundingClientRect(),de=He(ae,1,2).getBoundingClientRect();return Ze(ie),!fe||fe.left==fe.right?!1:ji=de.right-fe.right<3}var jn=`
b`.split(/\n/).length!=3?function(ie){for(var ae=0,fe=[],de=ie.length;ae<=de;){var Se=ie.indexOf(`
`,ae);Se==-1&&(Se=ie.length);var Re=ie.slice(ae,ie.charAt(Se-1)=="\r"?Se-1:Se),Ue=Re.indexOf("\r");Ue!=-1?(fe.push(Re.slice(0,Ue)),ae+=Ue+1):(fe.push(Re),ae=Se+1)}return fe}:function(ie){return ie.split(/\r\n?|\n/)},Ne=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(fe){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},Ei=function(){var ie=qe("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),Oi=null;function on(ie){if(Oi!=null)return Oi;var ae=ot(ie,qe("span","x")),fe=ae.getBoundingClientRect(),de=He(ae,0,1).getBoundingClientRect();return Oi=Math.abs(fe.left-de.left)>1}var ui={},vi={};function bi(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),ui[ie]=ae}function In(ie,ae){vi[ie]=ae}function Gt(ie){if(typeof ie=="string"&&vi.hasOwnProperty(ie))ie=vi[ie];else if(ie&&typeof ie.name=="string"&&vi.hasOwnProperty(ie.name)){var ae=vi[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=Ee(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return Gt("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return Gt("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Kt(ie,ae){ae=Gt(ae);var fe=ui[ae.name];if(!fe)return Kt(ie,"text/plain");var de=fe(ie,ae);if(jt.hasOwnProperty(ae.name)){var Se=jt[ae.name];for(var Re in Se)Se.hasOwnProperty(Re)&&(de.hasOwnProperty(Re)&&(de["_"+Re]=de[Re]),de[Re]=Se[Re])}if(de.name=ae.name,ae.helperType&&(de.helperType=ae.helperType),ae.modeProps)for(var Ue in ae.modeProps)de[Ue]=ae.modeProps[Ue];return de}var jt={};function ft(ie,ae){var fe=jt.hasOwnProperty(ie)?jt[ie]:jt[ie]={};Ut(ae,fe)}function an(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var fe={};for(var de in ae){var Se=ae[de];Se instanceof Array&&(Se=Se.concat([])),fe[de]=Se}return fe}function vn(ie,ae){for(var fe;ie.innerMode&&(fe=ie.innerMode(ae),!(!fe||fe.mode==ie));)ae=fe.state,ie=fe.mode;return fe||{mode:ie,state:ae}}function Bt(ie,ae,fe){return ie.startState?ie.startState(ae,fe):!0}var at=function(ie,ae,fe){this.pos=this.start=0,this.string=ie,this.tabSize=ae||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=fe};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),fe;if(typeof ie=="string"?fe=ae==ie:fe=ae&&(ie.test?ie.test(ae):ie(ae)),fe)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,fe){if(typeof ie=="string"){var de=function(Ue){return fe?Ue.toLowerCase():Ue},Se=this.string.substr(this.pos,ie.length);if(de(Se)==de(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var Re=this.string.slice(this.pos).match(ie);return Re&&Re.index>0?null:(Re&&ae!==!1&&(this.pos+=Re[0].length),Re)}},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 fe=ie;!fe.lines;)for(var de=0;;++de){var Se=fe.children[de],Re=Se.chunkSize();if(ae<Re){fe=Se;break}ae-=Re}return fe.lines[ae]}function Sn(ie,ae,fe){var de=[],Se=ae.line;return ie.iter(ae.line,fe.line+1,function(Re){var Ue=Re.text;Se==fe.line&&(Ue=Ue.slice(0,fe.ch)),Se==ae.line&&(Ue=Ue.slice(ae.ch)),de.push(Ue),++Se}),de}function Un(ie,ae,fe){var de=[];return ie.iter(ae,fe,function(Se){de.push(Se.text)}),de}function un(ie,ae){var fe=ae-ie.height;if(fe)for(var de=ie;de;de=de.parent)de.height+=fe}function Rt(ie){if(ie.parent==null)return null;for(var ae=ie.parent,fe=Wt(ae.lines,ie),de=ae.parent;de;ae=de,de=de.parent)for(var Se=0;de.children[Se]!=ae;++Se)fe+=de.children[Se].chunkSize();return fe+ae.first}function zn(ie,ae){var fe=ie.first;e:do{for(var de=0;de<ie.children.length;++de){var Se=ie.children[de],Re=Se.height;if(ae<Re){ie=Se;continue e}ae-=Re,fe+=Se.chunkSize()}return fe}while(!ie.lines);for(var Ue=0;Ue<ie.lines.length;++Ue){var dt=ie.lines[Ue],lt=dt.height;if(ae<lt)break;ae-=lt}return fe+Ue}function ni(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function gi(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function tn(ie,ae,fe){if(fe===void 0&&(fe=null),!(this instanceof tn))return new tn(ie,ae,fe);this.line=ie,this.ch=ae,this.sticky=fe}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 wn(ie){return tn(ie.line,ie.ch)}function gn(ie,ae){return Bn(ie,ae)<0?ae:ie}function yn(ie,ae){return Bn(ie,ae)<0?ie:ae}function On(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function $n(ie,ae){if(ae.line<ie.first)return tn(ie.first,0);var fe=ie.first+ie.size-1;return ae.line>fe?tn(fe,cn(ie,fe).text.length):Yn(ae,cn(ie,ae.line).text.length)}function Yn(ie,ae){var fe=ie.ch;return fe==null||fe>ae?tn(ie.line,ae):fe<0?tn(ie.line,0):ie}function ii(ie,ae){for(var fe=[],de=0;de<ae.length;de++)fe[de]=$n(ie,ae[de]);return fe}var Xn=function(ie,ae){this.state=ie,this.lookAhead=ae},di=function(ie,ae,fe,de){this.state=ae,this.doc=ie,this.line=fe,this.maxLookAhead=de||0,this.baseTokens=null,this.baseTokenPos=1};di.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},di.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}},di.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},di.fromSaved=function(ie,ae,fe){return ae instanceof Xn?new di(ie,an(ie.mode,ae.state),fe,ae.lookAhead):new di(ie,an(ie.mode,ae),fe)},di.prototype.save=function(ie){var ae=ie!==!1?an(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Xn(ae,this.maxLookAhead):ae};function Hi(ie,ae,fe,de){var Se=[ie.state.modeGen],Re={};yr(ie,ae.text,ie.doc.mode,fe,function(Ht,Rn){return Se.push(Ht,Rn)},Re,de);for(var Ue=fe.state,dt=function(Ht){fe.baseTokens=Se;var Rn=ie.state.overlays[Ht],Qt=1,ci=0;fe.state=!0,yr(ie,ae.text,Rn.mode,fe,function(oi,Ji){for(var lr=Qt;ci<oi;){var Pr=Se[Qt];Pr>oi&&Se.splice(Qt,1,oi,Se[Qt+1],Pr),Qt+=2,ci=Math.min(oi,Pr)}if(Ji)if(Rn.opaque)Se.splice(lr,Qt-lr,oi,"overlay "+Ji),Qt=lr+2;else for(;lr<Qt;lr+=2){var _r=Se[lr+1];Se[lr+1]=(_r?_r+" ":"")+"overlay "+Ji}},Re),fe.state=Ue,fe.baseTokens=null,fe.baseTokenPos=1},lt=0;lt<ie.state.overlays.length;++lt)dt(lt);return{styles:Se,classes:Re.bgClass||Re.textClass?Re:null}}function $i(ie,ae,fe){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var de=Wi(ie,Rt(ae)),Se=ae.text.length>ie.options.maxHighlightLength&&an(ie.doc.mode,de.state),Re=Hi(ie,ae,de);Se&&(de.state=Se),ae.stateAfter=de.save(!Se),ae.styles=Re.styles,Re.classes?ae.styleClasses=Re.classes:ae.styleClasses&&(ae.styleClasses=null),fe===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function Wi(ie,ae,fe){var de=ie.doc,Se=ie.display;if(!de.mode.startState)return new di(de,!0,ae);var Re=fr(ie,ae,fe),Ue=Re>de.first&&cn(de,Re-1).stateAfter,dt=Ue?di.fromSaved(de,Ue,Re):new di(de,Bt(de.mode),Re);return de.iter(Re,ae,function(lt){Xt(ie,lt.text,dt);var Ht=dt.line;lt.stateAfter=Ht==ae-1||Ht%5==0||Ht>=Se.viewFrom&&Ht<Se.viewTo?dt.save():null,dt.nextLine()}),fe&&(de.modeFrontier=dt.line),dt}function Xt(ie,ae,fe,de){var Se=ie.doc.mode,Re=new at(ae,ie.options.tabSize,fe);for(Re.start=Re.pos=de||0,ae==""&&Si(Se,fe.state);!Re.eol();)Ki(Se,Re,fe.state),Re.start=Re.pos}function Si(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var fe=vn(ie,ae);if(fe.mode.blankLine)return fe.mode.blankLine(fe.state)}}function Ki(ie,ae,fe,de){for(var Se=0;Se<10;Se++){de&&(de[0]=vn(ie,fe).mode);var Re=ie.token(ae,fe);if(ae.pos>ae.start)return Re}throw new Error("Mode "+ie.name+" failed to advance stream.")}var Ti=function(ie,ae,fe){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=fe};function cr(ie,ae,fe,de){var Se=ie.doc,Re=Se.mode,Ue;ae=$n(Se,ae);var dt=cn(Se,ae.line),lt=Wi(ie,ae.line,fe),Ht=new at(dt.text,ie.options.tabSize,lt),Rn;for(de&&(Rn=[]);(de||Ht.pos<ae.ch)&&!Ht.eol();)Ht.start=Ht.pos,Ue=Ki(Re,Ht,lt.state),de&&Rn.push(new Ti(Ht,Ue,an(Se.mode,lt.state)));return de?Rn:new Ti(Ht,Ue,lt.state)}function Qi(ie,ae){if(ie)for(;;){var fe=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!fe)break;ie=ie.slice(0,fe.index)+ie.slice(fe.index+fe[0].length);var de=fe[1]?"bgClass":"textClass";ae[de]==null?ae[de]=fe[2]:new RegExp("(?:^|\\s)"+fe[2]+"(?:$|\\s)").test(ae[de])||(ae[de]+=" "+fe[2])}return ie}function yr(ie,ae,fe,de,Se,Re,Ue){var dt=fe.flattenSpans;dt==null&&(dt=ie.options.flattenSpans);var lt=0,Ht=null,Rn=new at(ae,ie.options.tabSize,de),Qt,ci=ie.options.addModeClass&&[null];for(ae==""&&Qi(Si(fe,de.state),Re);!Rn.eol();){if(Rn.pos>ie.options.maxHighlightLength?(dt=!1,Ue&&Xt(ie,ae,de,Rn.pos),Rn.pos=ae.length,Qt=null):Qt=Qi(Ki(fe,Rn,de.state,ci),Re),ci){var oi=ci[0].name;oi&&(Qt="m-"+(Qt?oi+" "+Qt:oi))}if(!dt||Ht!=Qt){for(;lt<Rn.start;)lt=Math.min(Rn.start,lt+5e3),Se(lt,Ht);Ht=Qt}Rn.start=Rn.pos}for(;lt<Rn.pos;){var Ji=Math.min(Rn.pos,lt+5e3);Se(Ji,Ht),lt=Ji}}function fr(ie,ae,fe){for(var de,Se,Re=ie.doc,Ue=fe?-1:ae-(ie.doc.mode.innerMode?1e3:100),dt=ae;dt>Ue;--dt){if(dt<=Re.first)return Re.first;var lt=cn(Re,dt-1),Ht=lt.stateAfter;if(Ht&&(!fe||dt+(Ht instanceof Xn?Ht.lookAhead:0)<=Re.modeFrontier))return dt;var Rn=it(lt.text,null,ie.options.tabSize);(Se==null||de>Rn)&&(Se=dt-1,de=Rn)}return Se}function Vi(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var fe=ie.first,de=ae-1;de>fe;de--){var Se=cn(ie,de).stateAfter;if(Se&&(!(Se instanceof Xn)||de+Se.lookAhead<ae)){fe=de+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,fe)}}var Mr=!1,Dn=!1;function Wr(){Mr=!0}function _n(){Dn=!0}function Ir(ie,ae,fe){this.marker=ie,this.from=ae,this.to=fe}function eo(ie,ae){if(ie)for(var fe=0;fe<ie.length;++fe){var de=ie[fe];if(de.marker==ae)return de}}function xr(ie,ae){for(var fe,de=0;de<ie.length;++de)ie[de]!=ae&&(fe||(fe=[])).push(ie[de]);return fe}function bo(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function Yr(ie,ae,fe){var de;if(ie)for(var Se=0;Se<ie.length;++Se){var Re=ie[Se],Ue=Re.marker,dt=Re.from==null||(Ue.inclusiveLeft?Re.from<=ae:Re.from<ae);if(dt||Re.from==ae&&Ue.type=="bookmark"&&(!fe||!Re.marker.insertLeft)){var lt=Re.to==null||(Ue.inclusiveRight?Re.to>=ae:Re.to>ae);(de||(de=[])).push(new Ir(Ue,Re.from,lt?null:Re.to))}}return de}function ur(ie,ae,fe){var de;if(ie)for(var Se=0;Se<ie.length;++Se){var Re=ie[Se],Ue=Re.marker,dt=Re.to==null||(Ue.inclusiveRight?Re.to>=ae:Re.to>ae);if(dt||Re.from==ae&&Ue.type=="bookmark"&&(!fe||Re.marker.insertLeft)){var lt=Re.from==null||(Ue.inclusiveLeft?Re.from<=ae:Re.from<ae);(de||(de=[])).push(new Ir(Ue,lt?null:Re.from-ae,Re.to==null?null:Re.to-ae))}}return de}function ir(ie,ae){if(ae.full)return null;var fe=ni(ie,ae.from.line)&&cn(ie,ae.from.line).markedSpans,de=ni(ie,ae.to.line)&&cn(ie,ae.to.line).markedSpans;if(!fe&&!de)return null;var Se=ae.from.ch,Re=ae.to.ch,Ue=Bn(ae.from,ae.to)==0,dt=Yr(fe,Se,Ue),lt=ur(de,Re,Ue),Ht=ae.text.length==1,Rn=Ot(ae.text).length+(Ht?Se:0);if(dt)for(var Qt=0;Qt<dt.length;++Qt){var ci=dt[Qt];if(ci.to==null){var oi=eo(lt,ci.marker);oi?Ht&&(ci.to=oi.to==null?null:oi.to+Rn):ci.to=Se}}if(lt)for(var Ji=0;Ji<lt.length;++Ji){var lr=lt[Ji];if(lr.to!=null&&(lr.to+=Rn),lr.from==null){var Pr=eo(dt,lr.marker);Pr||(lr.from=Rn,Ht&&(dt||(dt=[])).push(lr))}else lr.from+=Rn,Ht&&(dt||(dt=[])).push(lr)}dt&&(dt=qi(dt)),lt&&lt!=dt&&(lt=qi(lt));var _r=[dt];if(!Ht){var fo=ae.text.length-2,ao;if(fo>0&&dt)for(var Co=0;Co<dt.length;++Co)dt[Co].to==null&&(ao||(ao=[])).push(new Ir(dt[Co].marker,null,null));for(var Qo=0;Qo<fo;++Qo)_r.push(ao);_r.push(lt)}return _r}function qi(ie){for(var ae=0;ae<ie.length;++ae){var fe=ie[ae];fe.from!=null&&fe.from==fe.to&&fe.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function Dr(ie,ae,fe){var de=null;if(ie.iter(ae.line,fe.line+1,function(oi){if(oi.markedSpans)for(var Ji=0;Ji<oi.markedSpans.length;++Ji){var lr=oi.markedSpans[Ji].marker;lr.readOnly&&(!de||Wt(de,lr)==-1)&&(de||(de=[])).push(lr)}}),!de)return null;for(var Se=[{from:ae,to:fe}],Re=0;Re<de.length;++Re)for(var Ue=de[Re],dt=Ue.find(0),lt=0;lt<Se.length;++lt){var Ht=Se[lt];if(!(Bn(Ht.to,dt.from)<0||Bn(Ht.from,dt.to)>0)){var Rn=[lt,1],Qt=Bn(Ht.from,dt.from),ci=Bn(Ht.to,dt.to);(Qt<0||!Ue.inclusiveLeft&&!Qt)&&Rn.push({from:Ht.from,to:dt.from}),(ci>0||!Ue.inclusiveRight&&!ci)&&Rn.push({from:dt.to,to:Ht.to}),Se.splice.apply(Se,Rn),lt+=Rn.length-3}}return Se}function Ai(ie){var ae=ie.markedSpans;if(ae){for(var fe=0;fe<ae.length;++fe)ae[fe].marker.detachLine(ie);ie.markedSpans=null}}function et(ie,ae){if(ae){for(var fe=0;fe<ae.length;++fe)ae[fe].marker.attachLine(ie);ie.markedSpans=ae}}function jr(ie){return ie.inclusiveLeft?-1:0}function yo(ie){return ie.inclusiveRight?1:0}function Or(ie,ae){var fe=ie.lines.length-ae.lines.length;if(fe!=0)return fe;var de=ie.find(),Se=ae.find(),Re=Bn(de.from,Se.from)||jr(ie)-jr(ae);if(Re)return-Re;var Ue=Bn(de.to,Se.to)||yo(ie)-yo(ae);return Ue||ae.id-ie.id}function wo(ie,ae){var fe=Dn&&ie.markedSpans,de;if(fe)for(var Se=void 0,Re=0;Re<fe.length;++Re)Se=fe[Re],Se.marker.collapsed&&(ae?Se.from:Se.to)==null&&(!de||Or(de,Se.marker)<0)&&(de=Se.marker);return de}function co(ie){return wo(ie,!0)}function $o(ie){return wo(ie,!1)}function Gr(ie,ae){var fe=Dn&&ie.markedSpans,de;if(fe)for(var Se=0;Se<fe.length;++Se){var Re=fe[Se];Re.marker.collapsed&&(Re.from==null||Re.from<ae)&&(Re.to==null||Re.to>ae)&&(!de||Or(de,Re.marker)<0)&&(de=Re.marker)}return de}function zr(ie,ae,fe,de,Se){var Re=cn(ie,ae),Ue=Dn&&Re.markedSpans;if(Ue)for(var dt=0;dt<Ue.length;++dt){var lt=Ue[dt];if(lt.marker.collapsed){var Ht=lt.marker.find(0),Rn=Bn(Ht.from,fe)||jr(lt.marker)-jr(Se),Qt=Bn(Ht.to,de)||yo(lt.marker)-yo(Se);if(!(Rn>=0&&Qt<=0||Rn<=0&&Qt>=0)&&(Rn<=0&&(lt.marker.inclusiveRight&&Se.inclusiveLeft?Bn(Ht.to,fe)>=0:Bn(Ht.to,fe)>0)||Rn>=0&&(lt.marker.inclusiveRight&&Se.inclusiveLeft?Bn(Ht.from,de)<=0:Bn(Ht.from,de)<0)))return!0}}}function Nr(ie){for(var ae;ae=co(ie);)ie=ae.find(-1,!0).line;return ie}function Eo(ie){for(var ae;ae=$o(ie);)ie=ae.find(1,!0).line;return ie}function or(ie){for(var ae,fe;ae=$o(ie);)ie=ae.find(1,!0).line,(fe||(fe=[])).push(ie);return fe}function mr(ie,ae){var fe=cn(ie,ae),de=Nr(fe);return fe==de?ae:Rt(de)}function $r(ie,ae){if(ae>ie.lastLine())return ae;var fe=cn(ie,ae),de;if(!hi(ie,fe))return ae;for(;de=$o(fe);)fe=de.find(1,!0).line;return Rt(fe)+1}function hi(ie,ae){var fe=Dn&&ae.markedSpans;if(fe){for(var de=void 0,Se=0;Se<fe.length;++Se)if(de=fe[Se],!!de.marker.collapsed){if(de.from==null)return!0;if(!de.marker.widgetNode&&de.from==0&&de.marker.inclusiveLeft&&Ao(ie,ae,de))return!0}}}function Ao(ie,ae,fe){if(fe.to==null){var de=fe.marker.find(1,!0);return Ao(ie,de.line,eo(de.line.markedSpans,fe.marker))}if(fe.marker.inclusiveRight&&fe.to==ae.text.length)return!0;for(var Se=void 0,Re=0;Re<ae.markedSpans.length;++Re)if(Se=ae.markedSpans[Re],Se.marker.collapsed&&!Se.marker.widgetNode&&Se.from==fe.to&&(Se.to==null||Se.to!=fe.from)&&(Se.marker.inclusiveLeft||fe.marker.inclusiveRight)&&Ao(ie,ae,Se))return!0}function Vo(ie){ie=Nr(ie);for(var ae=0,fe=ie.parent,de=0;de<fe.lines.length;++de){var Se=fe.lines[de];if(Se==ie)break;ae+=Se.height}for(var Re=fe.parent;Re;fe=Re,Re=fe.parent)for(var Ue=0;Ue<Re.children.length;++Ue){var dt=Re.children[Ue];if(dt==fe)break;ae+=dt.height}return ae}function sa(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,fe,de=ie;fe=co(de);){var Se=fe.find(0,!0);de=Se.from.line,ae+=Se.from.ch-Se.to.ch}for(de=ie;fe=$o(de);){var Re=fe.find(0,!0);ae-=de.text.length-Re.from.ch,de=Re.to.line,ae+=de.text.length-Re.to.ch}return ae}function ko(ie){var ae=ie.display,fe=ie.doc;ae.maxLine=cn(fe,fe.first),ae.maxLineLength=sa(ae.maxLine),ae.maxLineChanged=!0,fe.iter(function(de){var Se=sa(de);Se>ae.maxLineLength&&(ae.maxLineLength=Se,ae.maxLine=de)})}var Io=function(ie,ae,fe){this.text=ie,et(this,ae),this.height=fe?fe(this):1};Io.prototype.lineNo=function(){return Rt(this)},Mn(Io);function _o(ie,ae,fe,de){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),Ai(ie),et(ie,fe);var Se=de?de(ie):1;Se!=ie.height&&un(ie,Se)}function la(ie){ie.parent=null,Ai(ie)}var pa={},Lt={};function wi(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var fe=ae.addModeClass?Lt:pa;return fe[ie]||(fe[ie]=ie.replace(/\S+/g,"cm-$&"))}function _t(ie,ae){var fe=bt("span",null,null,Le?"padding-right: .1px":null),de={pre:bt("pre",[fe],"CodeMirror-line"),content:fe,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 Re=Se?ae.rest[Se-1]:ae.line,Ue=void 0;de.pos=0,de.addToken=Ci,Lr(ie.display.measure)&&(Ue=dn(Re,ie.doc.direction))&&(de.addToken=Ri(de.addToken,Ue)),de.map=[];var dt=ae!=ie.display.externalMeasured&&Rt(Re);er(Re,de,$i(ie,Re,dt)),Re.styleClasses&&(Re.styleClasses.bgClass&&(de.bgClass=ht(Re.styleClasses.bgClass,de.bgClass||"")),Re.styleClasses.textClass&&(de.textClass=ht(Re.styleClasses.textClass,de.textClass||""))),de.map.length==0&&de.map.push(0,0,de.content.appendChild(vr(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(Le){var lt=de.content.lastChild;(/\bcm-tab\b/.test(lt.className)||lt.querySelector&&lt.querySelector(".cm-tab"))&&(de.content.className="cm-tab-wrap-hack")}return Nt(ie,"renderLine",ie,ae.line,de.pre),de.pre.className&&(de.textClass=ht(de.pre.className,de.textClass||"")),de}function Yi(ie){var ae=qe("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function Ci(ie,ae,fe,de,Se,Re,Ue){if(ae){var dt=ie.splitSpaces?Cr(ae,ie.trailingSpace):ae,lt=ie.cm.state.specialChars,Ht=!1,Rn;if(!lt.test(ae))ie.col+=ae.length,Rn=document.createTextNode(dt),ie.map.push(ie.pos,ie.pos+ae.length,Rn),Ge&&_e<9&&(Ht=!0),ie.pos+=ae.length;else{Rn=document.createDocumentFragment();for(var Qt=0;;){lt.lastIndex=Qt;var ci=lt.exec(ae),oi=ci?ci.index-Qt:ae.length-Qt;if(oi){var Ji=document.createTextNode(dt.slice(Qt,Qt+oi));Ge&&_e<9?Rn.appendChild(qe("span",[Ji])):Rn.appendChild(Ji),ie.map.push(ie.pos,ie.pos+oi,Ji),ie.col+=oi,ie.pos+=oi}if(!ci)break;Qt+=oi+1;var lr=void 0;if(ci[0]==" "){var Pr=ie.cm.options.tabSize,_r=Pr-ie.col%Pr;lr=Rn.appendChild(qe("span",Qn(_r),"cm-tab")),lr.setAttribute("role","presentation"),lr.setAttribute("cm-text"," "),ie.col+=_r}else ci[0]=="\r"||ci[0]==`
`?(lr=Rn.appendChild(qe("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]),Ge&&_e<9?Rn.appendChild(qe("span",[lr])):Rn.appendChild(lr),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,lr),ie.pos++}}if(ie.trailingSpace=dt.charCodeAt(ae.length-1)==32,fe||de||Se||Ht||Re||Ue){var fo=fe||"";de&&(fo+=de),Se&&(fo+=Se);var ao=qe("span",[Rn],fo,Re);if(Ue)for(var Co in Ue)Ue.hasOwnProperty(Co)&&Co!="style"&&Co!="class"&&ao.setAttribute(Co,Ue[Co]);return ie.content.appendChild(ao)}ie.content.appendChild(Rn)}}function Cr(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var fe=ae,de="",Se=0;Se<ie.length;Se++){var Re=ie.charAt(Se);Re==" "&&fe&&(Se==ie.length-1||ie.charCodeAt(Se+1)==32)&&(Re="\xA0"),de+=Re,fe=Re==" "}return de}function Ri(ie,ae){return function(fe,de,Se,Re,Ue,dt,lt){Se=Se?Se+" cm-force-border":"cm-force-border";for(var Ht=fe.pos,Rn=Ht+de.length;;){for(var Qt=void 0,ci=0;ci<ae.length&&(Qt=ae[ci],!(Qt.to>Ht&&Qt.from<=Ht));ci++);if(Qt.to>=Rn)return ie(fe,de,Se,Re,Ue,dt,lt);ie(fe,de.slice(0,Qt.to-Ht),Se,Re,null,dt,lt),Re=null,de=de.slice(Qt.to-Ht),Ht=Qt.to}}}function Ii(ie,ae,fe,de){var Se=!de&&fe.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",fe.id)),Se&&(ie.cm.display.input.setUneditable(Se),ie.content.appendChild(Se)),ie.pos+=ae,ie.trailingSpace=!1}function er(ie,ae,fe){var de=ie.markedSpans,Se=ie.text,Re=0;if(!de){for(var Ue=1;Ue<fe.length;Ue+=2)ae.addToken(ae,Se.slice(Re,Re=fe[Ue]),wi(fe[Ue+1],ae.cm.options));return}for(var dt=Se.length,lt=0,Ht=1,Rn="",Qt,ci,oi=0,Ji,lr,Pr,_r,fo;;){if(oi==lt){Ji=lr=Pr=ci="",fo=null,_r=null,oi=1/0;for(var ao=[],Co=void 0,Qo=0;Qo<de.length;++Qo){var so=de[Qo],ha=so.marker;if(ha.type=="bookmark"&&so.from==lt&&ha.widgetNode)ao.push(ha);else if(so.from<=lt&&(so.to==null||so.to>lt||ha.collapsed&&so.to==lt&&so.from==lt)){if(so.to!=null&&so.to!=lt&&oi>so.to&&(oi=so.to,lr=""),ha.className&&(Ji+=" "+ha.className),ha.css&&(ci=(ci?ci+";":"")+ha.css),ha.startStyle&&so.from==lt&&(Pr+=" "+ha.startStyle),ha.endStyle&&so.to==oi&&(Co||(Co=[])).push(ha.endStyle,so.to),ha.title&&((fo||(fo={})).title=ha.title),ha.attributes)for(var ws in ha.attributes)(fo||(fo={}))[ws]=ha.attributes[ws];ha.collapsed&&(!_r||Or(_r.marker,ha)<0)&&(_r=so)}else so.from>lt&&oi>so.from&&(oi=so.from)}if(Co)for(var Pl=0;Pl<Co.length;Pl+=2)Co[Pl+1]==oi&&(lr+=" "+Co[Pl]);if(!_r||_r.from==lt)for(var ks=0;ks<ao.length;++ks)Ii(ae,0,ao[ks]);if(_r&&(_r.from||0)==lt){if(Ii(ae,(_r.to==null?dt+1:_r.to)-lt,_r.marker,_r.from==null),_r.to==null)return;_r.to==lt&&(_r=!1)}}if(lt>=dt)break;for(var mu=Math.min(dt,oi);;){if(Rn){var zl=lt+Rn.length;if(!_r){var fl=zl>mu?Rn.slice(0,mu-lt):Rn;ae.addToken(ae,fl,Qt?Qt+Ji:Ji,Pr,lt+fl.length==oi?lr:"",ci,fo)}if(zl>=mu){Rn=Rn.slice(mu-lt),lt=mu;break}lt=zl,Pr=""}Rn=Se.slice(Re,Re=fe[Ht++]),Qt=wi(fe[Ht++],ae.cm.options)}}}function tr(ie,ae,fe){this.line=ae,this.rest=or(ae),this.size=this.rest?Rt(Ot(this.rest))-fe+1:1,this.node=this.text=null,this.hidden=hi(ie,ae)}function hr(ie,ae,fe){for(var de=[],Se,Re=ae;Re<fe;Re=Se){var Ue=new tr(ie.doc,cn(ie.doc,Re),Re);Se=Re+Ue.size,de.push(Ue)}return de}var Sr=null;function kr(ie){Sr?Sr.ops.push(ie):ie.ownsGroup=Sr={ops:[ie],delayedCallbacks:[]}}function Er(ie){var ae=ie.delayedCallbacks,fe=0;do{for(;fe<ae.length;fe++)ae[fe].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(fe<ae.length)}function Br(ie,ae){var fe=ie.ownsGroup;if(fe)try{Er(fe)}finally{Sr=null,ae(fe)}}var Zr=null;function zi(ie,ae){var fe=Gn(ie,ae);if(fe.length){var de=Array.prototype.slice.call(arguments,2),Se;Sr?Se=Sr.delayedCallbacks:Zr?Se=Zr:(Se=Zr=[],setTimeout(oa,0));for(var Re=function(dt){Se.push(function(){return fe[dt].apply(null,de)})},Ue=0;Ue<fe.length;++Ue)Re(Ue)}}function oa(){var ie=Zr;Zr=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function Ra(ie,ae,fe,de){for(var Se=0;Se<ae.changes.length;Se++){var Re=ae.changes[Se];Re=="text"?Ui(ie,ae):Re=="gutter"?Ba(ie,ae,fe,de):Re=="class"?La(ie,ae):Re=="widget"&&zs(ie,ae,de)}ae.changes=null}function Ls(ie){return ie.node==ie.text&&(ie.node=qe("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),Ge&&_e<8&&(ie.node.style.zIndex=2)),ie.node}function Ys(ie,ae){var fe=ae.bgClass?ae.bgClass+" "+(ae.line.bgClass||""):ae.line.bgClass;if(fe&&(fe+=" CodeMirror-linebackground"),ae.background)fe?ae.background.className=fe:(ae.background.parentNode.removeChild(ae.background),ae.background=null);else if(fe){var de=Ls(ae);ae.background=de.insertBefore(qe("div",null,fe),de.firstChild),ie.display.input.setUneditable(ae.background)}}function tl(ie,ae){var fe=ie.display.externalMeasured;return fe&&fe.line==ae.line?(ie.display.externalMeasured=null,ae.measure=fe.measure,fe.built):_t(ie,ae)}function Ui(ie,ae){var fe=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)):fe&&(ae.text.className=fe)}function La(ie,ae){Ys(ie,ae),ae.line.wrapClass?Ls(ae).className=ae.line.wrapClass:ae.node!=ae.text&&(ae.node.className="");var fe=ae.textClass?ae.textClass+" "+(ae.line.textClass||""):ae.line.textClass;ae.text.className=fe||""}function Ba(ie,ae,fe,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=qe("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 Re=ae.line.gutterMarkers;if(ie.options.lineNumbers||Re){var Ue=Ls(ae),dt=ae.gutter=qe("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?de.fixedPos:-de.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(dt),Ue.insertBefore(dt,ae.text),ae.line.gutterClass&&(dt.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Re||!Re["CodeMirror-linenumbers"])&&(ae.lineNumber=dt.appendChild(qe("div",gi(ie.options,fe),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+de.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Re)for(var lt=0;lt<ie.display.gutterSpecs.length;++lt){var Ht=ie.display.gutterSpecs[lt].className,Rn=Re.hasOwnProperty(Ht)&&Re[Ht];Rn&&dt.appendChild(qe("div",[Rn],"CodeMirror-gutter-elt","left: "+de.gutterLeft[Ht]+"px; width: "+de.gutterWidth[Ht]+"px"))}}}function zs(ie,ae,fe){ae.alignable&&(ae.alignable=null);for(var de=Ae("CodeMirror-linewidget"),Se=ae.node.firstChild,Re=void 0;Se;Se=Re)Re=Se.nextSibling,de.test(Se.className)&&ae.node.removeChild(Se);lu(ie,ae,fe)}function su(ie,ae,fe,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,fe,de),lu(ie,ae,de),ae.node}function lu(ie,ae,fe){if(So(ie,ae.line,ae,fe,!0),ae.rest)for(var de=0;de<ae.rest.length;de++)So(ie,ae.rest[de],ae,fe,!1)}function So(ie,ae,fe,de,Se){if(ae.widgets)for(var Re=Ls(fe),Ue=0,dt=ae.widgets;Ue<dt.length;++Ue){var lt=dt[Ue],Ht=qe("div",[lt.node],"CodeMirror-linewidget"+(lt.className?" "+lt.className:""));lt.handleMouseEvents||Ht.setAttribute("cm-ignore-events","true"),yc(lt,Ht,fe,de),ie.display.input.setUneditable(Ht),Se&&lt.above?Re.insertBefore(Ht,fe.gutter||fe.text):Re.appendChild(Ht),zi(lt,"redraw")}}function yc(ie,ae,fe,de){if(ie.noHScroll){(fe.alignable||(fe.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(!wt(document.body,ie.node)){var fe="position: relative;";ie.coverGutter&&(fe+="margin-left: -"+ae.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(fe+="width: "+ae.display.wrapper.clientWidth+"px;"),ot(ae.display.measure,qe("div",[ie.node],null,fe))}return ie.height=ie.node.parentNode.offsetHeight}function as(ie,ae){for(var fe=Gi(ae);fe!=ie.wrapper;fe=fe.parentNode)if(!fe||fe.nodeType==1&&fe.getAttribute("cm-ignore-events")=="true"||fe.parentNode==ie.sizer&&fe!=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=ot(ie.measure,qe("pre","x","CodeMirror-line-like")),fe=window.getComputedStyle?window.getComputedStyle(ae):ae.currentStyle,de={left:parseInt(fe.paddingLeft),right:parseInt(fe.paddingRight)};return!isNaN(de.left)&&!isNaN(de.right)&&(ie.cachedPaddingH=de),de}function wl(ie){return Ln-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,fe){var de=ie.options.lineWrapping,Se=de&&sl(ie);if(!ae.measure.heights||de&&ae.measure.width!=Se){var Re=ae.measure.heights=[];if(de){ae.measure.width=Se;for(var Ue=ae.text.firstChild.getClientRects(),dt=0;dt<Ue.length-1;dt++){var lt=Ue[dt],Ht=Ue[dt+1];Math.abs(lt.bottom-Ht.bottom)>2&&Re.push((lt.bottom+Ht.top)/2-fe.top)}}Re.push(fe.bottom-fe.top)}}function kc(ie,ae,fe){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(Rt(ie.rest[Se])>fe)return{map:ie.measure.maps[Se],cache:ie.measure.caches[Se],before:!0}}function _d(ie,ae){ae=Nr(ae);var fe=Rt(ae),de=ie.display.externalMeasured=new tr(ie.doc,ae,fe);de.lineN=fe;var Se=de.built=_t(ie,de);return de.text=Se.pre,ot(ie.display.lineMeasure,Se.pre),de}function id(ie,ae,fe,de){return uu(ie,Js(ie,ae),fe,de)}function Ic(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[ul(ie,ae)];var fe=ie.display.externalMeasured;if(fe&&ae>=fe.lineN&&ae<fe.lineN+fe.size)return fe}function Js(ie,ae){var fe=Rt(ae),de=Ic(ie,fe);de&&!de.text?de=null:de&&de.changes&&(Ra(ie,de,fe,Nh(ie)),ie.curOp.forceUpdate=!0),de||(de=_d(ie,ae));var Se=kc(de,ae,fe);return{line:ae,view:de,rect:null,map:Se.map,cache:Se.cache,before:Se.before,hasHeights:!1}}function uu(ie,ae,fe,de,Se){ae.before&&(fe=-1);var Re=fe+(de||""),Ue;return ae.cache.hasOwnProperty(Re)?Ue=ae.cache[Re]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(nd(ie,ae.view,ae.rect),ae.hasHeights=!0),Ue=Ko(ie,ae,fe,de),Ue.bogus||(ae.cache[Re]=Ue)),{left:Ue.left,right:Ue.right,top:Se?Ue.rtop:Ue.top,bottom:Se?Ue.rbottom:Ue.bottom}}var xd={left:0,right:0,top:0,bottom:0};function Eu(ie,ae,fe){for(var de,Se,Re,Ue,dt,lt,Ht=0;Ht<ie.length;Ht+=3)if(dt=ie[Ht],lt=ie[Ht+1],ae<dt?(Se=0,Re=1,Ue="left"):ae<lt?(Se=ae-dt,Re=Se+1):(Ht==ie.length-3||ae==lt&&ie[Ht+3]>ae)&&(Re=lt-dt,Se=Re-1,ae>=lt&&(Ue="right")),Se!=null){if(de=ie[Ht+2],dt==lt&&fe==(de.insertLeft?"left":"right")&&(Ue=fe),fe=="left"&&Se==0)for(;Ht&&ie[Ht-2]==ie[Ht-3]&&ie[Ht-1].insertLeft;)de=ie[(Ht-=3)+2],Ue="left";if(fe=="right"&&Se==lt-dt)for(;Ht<ie.length-3&&ie[Ht+3]==ie[Ht+4]&&!ie[Ht+5].insertLeft;)de=ie[(Ht+=3)+2],Ue="right";break}return{node:de,start:Se,end:Re,collapse:Ue,coverStart:dt,coverEnd:lt}}function Sc(ie,ae){var fe=xd;if(ae=="left")for(var de=0;de<ie.length&&(fe=ie[de]).left==fe.right;de++);else for(var Se=ie.length-1;Se>=0&&(fe=ie[Se]).left==fe.right;Se--);return fe}function Ko(ie,ae,fe,de){var Se=Eu(ae.map,fe,de),Re=Se.node,Ue=Se.start,dt=Se.end,lt=Se.collapse,Ht;if(Re.nodeType==3){for(var Rn=0;Rn<4;Rn++){for(;Ue&&vt(ae.line.text.charAt(Se.coverStart+Ue));)--Ue;for(;Se.coverStart+dt<Se.coverEnd&&vt(ae.line.text.charAt(Se.coverStart+dt));)++dt;if(Ge&&_e<9&&Ue==0&&dt==Se.coverEnd-Se.coverStart?Ht=Re.parentNode.getBoundingClientRect():Ht=Sc(He(Re,Ue,dt).getClientRects(),de),Ht.left||Ht.right||Ue==0)break;dt=Ue,Ue=Ue-1,lt="right"}Ge&&_e<11&&(Ht=Sa(ie.display.measure,Ht))}else{Ue>0&&(lt=de="right");var Qt;ie.options.lineWrapping&&(Qt=Re.getClientRects()).length>1?Ht=Qt[de=="right"?Qt.length-1:0]:Ht=Re.getBoundingClientRect()}if(Ge&&_e<9&&!Ue&&(!Ht||!Ht.left&&!Ht.right)){var ci=Re.parentNode.getClientRects()[0];ci?Ht={left:ci.left,right:ci.left+Mu(ie.display),top:ci.top,bottom:ci.bottom}:Ht=xd}for(var oi=Ht.top-ae.rect.top,Ji=Ht.bottom-ae.rect.top,lr=(oi+Ji)/2,Pr=ae.view.measure.heights,_r=0;_r<Pr.length-1&&!(lr<Pr[_r]);_r++);var fo=_r?Pr[_r-1]:0,ao=Pr[_r],Co={left:(lt=="right"?Ht.right:Ht.left)-ae.rect.left,right:(lt=="left"?Ht.left:Ht.right)-ae.rect.left,top:fo,bottom:ao};return!Ht.left&&!Ht.right&&(Co.bogus=!0),ie.options.singleCursorHeightPerLine||(Co.rtop=oi,Co.rbottom=Ji),Co}function Sa(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!on(ie))return ae;var fe=screen.logicalXDPI/screen.deviceXDPI,de=screen.logicalYDPI/screen.deviceYDPI;return{left:ae.left*fe,right:ae.right*fe,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,Ze(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 Pt&&ne?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ss(){return Pt&&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 fe=0;fe<ie.widgets.length;++fe)ie.widgets[fe].above&&(ae+=Ml(ie.widgets[fe]));return ae}function vs(ie,ae,fe,de,Se){if(!Se){var Re=xs(ae);fe.top+=Re,fe.bottom+=Re}if(de=="line")return fe;de||(de="local");var Ue=Vo(ae);if(de=="local"?Ue+=vl(ie.display):Ue-=ie.display.viewOffset,de=="page"||de=="window"){var dt=ie.display.lineSpace.getBoundingClientRect();Ue+=dt.top+(de=="window"?0:ss());var lt=dt.left+(de=="window"?0:Ua());fe.left+=lt,fe.right+=lt}return fe.top+=Ue,fe.bottom+=Ue,fe}function oc(ie,ae,fe){if(fe=="div")return ae;var de=ae.left,Se=ae.top;if(fe=="page")de-=Ua(),Se-=ss();else if(fe=="local"||!fe){var Re=ie.display.sizer.getBoundingClientRect();de+=Re.left,Se+=Re.top}var Ue=ie.display.lineSpace.getBoundingClientRect();return{left:de-Ue.left,top:Se-Ue.top}}function _l(ie,ae,fe,de,Se){return de||(de=cn(ie.doc,ae.line)),vs(ie,de,id(ie,de,ae.ch,Se),fe)}function is(ie,ae,fe,de,Se,Re){de=de||cn(ie.doc,ae.line),Se||(Se=Js(ie,de));function Ue(Ji,lr){var Pr=uu(ie,Se,Ji,lr?"right":"left",Re);return lr?Pr.left=Pr.right:Pr.right=Pr.left,vs(ie,de,Pr,fe)}var dt=dn(de,ie.doc.direction),lt=ae.ch,Ht=ae.sticky;if(lt>=de.text.length?(lt=de.text.length,Ht="before"):lt<=0&&(lt=0,Ht="after"),!dt)return Ue(Ht=="before"?lt-1:lt,Ht=="before");function Rn(Ji,lr,Pr){var _r=dt[lr],fo=_r.level==1;return Ue(Pr?Ji-1:Ji,fo!=Pr)}var Qt=rt(dt,lt,Ht),ci=St,oi=Rn(lt,Qt,Ht=="before");return ci!=null&&(oi.other=Rn(lt,ci,Ht!="before")),oi}function bh(ie,ae){var fe=0;ae=$n(ie.doc,ae),ie.options.lineWrapping||(fe=Mu(ie.display)*ae.ch);var de=cn(ie.doc,ae.line),Se=Vo(de)+vl(ie.display);return{left:fe,right:fe,top:Se,bottom:Se+de.height}}function Eh(ie,ae,fe,de,Se){var Re=tn(ie,ae,fe);return Re.xRel=Se,de&&(Re.outside=de),Re}function Uu(ie,ae,fe){var de=ie.doc;if(fe+=ie.display.viewOffset,fe<0)return Eh(de.first,0,null,-1,-1);var Se=zn(de,fe),Re=de.first+de.size-1;if(Se>Re)return Eh(de.first+de.size-1,cn(de,Re).text.length,null,1,1);ae<0&&(ae=0);for(var Ue=cn(de,Se);;){var dt=Pi(ie,Ue,Se,ae,fe),lt=Gr(Ue,dt.ch+(dt.xRel>0||dt.outside>0?1:0));if(!lt)return dt;var Ht=lt.find(1);if(Ht.line==Se)return Ht;Ue=cn(de,Se=Ht.line)}}function ro(ie,ae,fe,de){de-=xs(ae);var Se=ae.text.length,Re=Je(function(Ue){return uu(ie,fe,Ue-1).bottom<=de},Se,0);return Se=Je(function(Ue){return uu(ie,fe,Ue).top>de},Re,Se),{begin:Re,end:Se}}function rd(ie,ae,fe,de){fe||(fe=Js(ie,ae));var Se=vs(ie,ae,uu(ie,fe,de),"line").top;return ro(ie,ae,fe,Se)}function en(ie,ae,fe,de){return ie.bottom<=fe?!1:ie.top>fe?!0:(de?ie.left:ie.right)>ae}function Pi(ie,ae,fe,de,Se){Se-=Vo(ae);var Re=Js(ie,ae),Ue=xs(ae),dt=0,lt=ae.text.length,Ht=!0,Rn=dn(ae,ie.doc.direction);if(Rn){var Qt=(ie.options.lineWrapping?Lh:Mh)(ie,ae,fe,Re,Rn,de,Se);Ht=Qt.level!=1,dt=Ht?Qt.from:Qt.to-1,lt=Ht?Qt.to:Qt.from-1}var ci=null,oi=null,Ji=Je(function(Qo){var so=uu(ie,Re,Qo);return so.top+=Ue,so.bottom+=Ue,en(so,de,Se,!1)?(so.top<=Se&&so.left<=de&&(ci=Qo,oi=so),!0):!1},dt,lt),lr,Pr,_r=!1;if(oi){var fo=de-oi.left<oi.right-de,ao=fo==Ht;Ji=ci+(ao?0:1),Pr=ao?"after":"before",lr=fo?oi.left:oi.right}else{!Ht&&(Ji==lt||Ji==dt)&&Ji++,Pr=Ji==0?"after":Ji==ae.text.length?"before":uu(ie,Re,Ji-(Ht?1:0)).bottom+Ue<=Se==Ht?"after":"before";var Co=is(ie,tn(fe,Ji,Pr),"line",ae,Re);lr=Co.left,_r=Se<Co.top?-1:Se>=Co.bottom?1:0}return Ji=Ye(ae.text,Ji,1),Eh(fe,Ji,Pr,_r,de-lr)}function Mh(ie,ae,fe,de,Se,Re,Ue){var dt=Je(function(Qt){var ci=Se[Qt],oi=ci.level!=1;return en(is(ie,tn(fe,oi?ci.to:ci.from,oi?"before":"after"),"line",ae,de),Re,Ue,!0)},0,Se.length-1),lt=Se[dt];if(dt>0){var Ht=lt.level!=1,Rn=is(ie,tn(fe,Ht?lt.from:lt.to,Ht?"after":"before"),"line",ae,de);en(Rn,Re,Ue,!0)&&Rn.top>Ue&&(lt=Se[dt-1])}return lt}function Lh(ie,ae,fe,de,Se,Re,Ue){var dt=ro(ie,ae,de,Ue),lt=dt.begin,Ht=dt.end;/\s/.test(ae.text.charAt(Ht-1))&&Ht--;for(var Rn=null,Qt=null,ci=0;ci<Se.length;ci++){var oi=Se[ci];if(!(oi.from>=Ht||oi.to<=lt)){var Ji=oi.level!=1,lr=uu(ie,de,Ji?Math.min(Ht,oi.to)-1:Math.max(lt,oi.from)).right,Pr=lr<Re?Re-lr+1e9:lr-Re;(!Rn||Qt>Pr)&&(Rn=oi,Qt=Pr)}}return Rn||(Rn=Se[Se.length-1]),Rn.from<lt&&(Rn={from:lt,to:Rn.to,level:Rn.level}),Rn.to>Ht&&(Rn={from:Rn.from,to:Ht,level:Rn.level}),Rn}var ac;function cu(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(ac==null){ac=qe("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)ac.appendChild(document.createTextNode("x")),ac.appendChild(qe("br"));ac.appendChild(document.createTextNode("x"))}ot(ie.measure,ac);var fe=ac.offsetHeight/50;return fe>3&&(ie.cachedTextHeight=fe),Ze(ie.measure),fe||1}function Mu(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=qe("span","xxxxxxxxxx"),fe=qe("pre",[ae],"CodeMirror-line-like");ot(ie.measure,fe);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,fe={},de={},Se=ae.gutters.clientLeft,Re=ae.gutters.firstChild,Ue=0;Re;Re=Re.nextSibling,++Ue){var dt=ie.display.gutterSpecs[Ue].className;fe[dt]=Re.offsetLeft+Re.clientLeft+Se,de[dt]=Re.clientWidth}return{fixedPos:Pd(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:fe,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),fe=ie.options.lineWrapping,de=fe&&Math.max(5,ie.display.scroller.clientWidth/Mu(ie.display)-3);return function(Se){if(hi(ie.doc,Se))return 0;var Re=0;if(Se.widgets)for(var Ue=0;Ue<Se.widgets.length;Ue++)Se.widgets[Ue].height&&(Re+=Se.widgets[Ue].height);return fe?Re+(Math.ceil(Se.text.length/de)||1)*ae:Re+ae}}function Bo(ie){var ae=ie.doc,fe=ys(ie);ae.iter(function(de){var Se=fe(de);Se!=de.height&&un(de,Se)})}function yl(ie,ae,fe,de){var Se=ie.display;if(!fe&&Gi(ae).getAttribute("cm-not-content")=="true")return null;var Re,Ue,dt=Se.lineSpace.getBoundingClientRect();try{Re=ae.clientX-dt.left,Ue=ae.clientY-dt.top}catch(Qt){return null}var lt=Uu(ie,Re,Ue),Ht;if(de&&lt.xRel>0&&(Ht=cn(ie.doc,lt.line).text).length==lt.ch){var Rn=it(Ht,Ht.length,ie.options.tabSize)-Ht.length;lt=tn(lt.line,Math.max(0,Math.round((Re-rc(ie.display).left)/Mu(ie.display))-Rn))}return lt}function ul(ie,ae){if(ae>=ie.display.viewTo||(ae-=ie.display.viewFrom,ae<0))return null;for(var fe=ie.display.view,de=0;de<fe.length;de++)if(ae-=fe[de].size,ae<0)return de}function _a(ie,ae,fe,de){ae==null&&(ae=ie.doc.first),fe==null&&(fe=ie.doc.first+ie.doc.size),de||(de=0);var Se=ie.display;if(de&&fe<Se.viewTo&&(Se.updateLineNumbers==null||Se.updateLineNumbers>ae)&&(Se.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=Se.viewTo)Dn&&mr(ie.doc,ae)<Se.viewTo&&Hs(ie);else if(fe<=Se.viewFrom)Dn&&$r(ie.doc,fe+de)>Se.viewFrom?Hs(ie):(Se.viewFrom+=de,Se.viewTo+=de);else if(ae<=Se.viewFrom&&fe>=Se.viewTo)Hs(ie);else if(ae<=Se.viewFrom){var Re=Xl(ie,fe,fe+de,1);Re?(Se.view=Se.view.slice(Re.index),Se.viewFrom=Re.lineN,Se.viewTo+=de):Hs(ie)}else if(fe>=Se.viewTo){var Ue=Xl(ie,ae,ae,-1);Ue?(Se.view=Se.view.slice(0,Ue.index),Se.viewTo=Ue.lineN):Hs(ie)}else{var dt=Xl(ie,ae,ae,-1),lt=Xl(ie,fe,fe+de,1);dt&&lt?(Se.view=Se.view.slice(0,dt.index).concat(hr(ie,dt.lineN,lt.lineN)).concat(Se.view.slice(lt.index)),Se.viewTo+=de):Hs(ie)}var Ht=Se.externalMeasured;Ht&&(fe<Ht.lineN?Ht.lineN+=de:ae<Ht.lineN+Ht.size&&(Se.externalMeasured=null))}function ia(ie,ae,fe){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 Re=de.view[ul(ie,ae)];if(Re.node!=null){var Ue=Re.changes||(Re.changes=[]);Wt(Ue,fe)==-1&&Ue.push(fe)}}}function Hs(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Xl(ie,ae,fe,de){var Se=ul(ie,ae),Re,Ue=ie.display.view;if(!Dn||fe==ie.doc.first+ie.doc.size)return{index:Se,lineN:fe};for(var dt=ie.display.viewFrom,lt=0;lt<Se;lt++)dt+=Ue[lt].size;if(dt!=ae){if(de>0){if(Se==Ue.length-1)return null;Re=dt+Ue[Se].size-ae,Se++}else Re=dt-ae;ae+=Re,fe+=Re}for(;mr(ie.doc,fe)!=fe;){if(Se==(de<0?0:Ue.length-1))return null;fe+=de*Ue[Se-(de<0?1:0)].size,Se+=de}return{index:Se,lineN:fe}}function Ja(ie,ae,fe){var de=ie.display,Se=de.view;Se.length==0||ae>=de.viewTo||fe<=de.viewFrom?(de.view=hr(ie,ae,fe),de.viewFrom=ae):(de.viewFrom>ae?de.view=hr(ie,ae,de.viewFrom).concat(de.view):de.viewFrom<ae&&(de.view=de.view.slice(ul(ie,ae))),de.viewFrom=ae,de.viewTo<fe?de.view=de.view.concat(hr(ie,de.viewTo,fe)):de.viewTo>fe&&(de.view=de.view.slice(0,ul(ie,fe)))),de.viewTo=fe}function du(ie){for(var ae=ie.display.view,fe=0,de=0;de<ae.length;de++){var Se=ae[de];!Se.hidden&&(!Se.node||Se.changes)&&++fe}return fe}function nl(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function od(ie,ae){ae===void 0&&(ae=!0);for(var fe=ie.doc,de={},Se=de.cursors=document.createDocumentFragment(),Re=de.selection=document.createDocumentFragment(),Ue=0;Ue<fe.sel.ranges.length;Ue++)if(!(!ae&&Ue==fe.sel.primIndex)){var dt=fe.sel.ranges[Ue];if(!(dt.from().line>=ie.display.viewTo||dt.to().line<ie.display.viewFrom)){var lt=dt.empty();(lt||ie.options.showCursorWhenSelecting)&&wa(ie,dt.head,Se),lt||Ca(ie,dt,Re)}}return de}function wa(ie,ae,fe){var de=is(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),Se=fe.appendChild(qe("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 Re=fe.appendChild(qe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Re.style.display="",Re.style.left=de.other.left+"px",Re.style.top=de.other.top+"px",Re.style.height=(de.other.bottom-de.other.top)*.85+"px"}}function Ll(ie,ae){return ie.top-ae.top||ie.left-ae.left}function Ca(ie,ae,fe){var de=ie.display,Se=ie.doc,Re=document.createDocumentFragment(),Ue=rc(ie.display),dt=Ue.left,lt=Math.max(de.sizerWidth,sl(ie)-de.sizer.offsetLeft)-Ue.right,Ht=Se.direction=="ltr";function Rn(ao,Co,Qo,so){Co<0&&(Co=0),Co=Math.round(Co),so=Math.round(so),Re.appendChild(qe("div",null,"CodeMirror-selected","position: absolute; left: "+ao+`px;
top: `+Co+"px; width: "+(Qo==null?lt-ao:Qo)+`px;
height: `+(so-Co)+"px"))}function Qt(ao,Co,Qo){var so=cn(Se,ao),ha=so.text.length,ws,Pl;function ks(fl,vu){return _l(ie,tn(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=dn(so,Se.direction);return yt(zl,Co||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=Co==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=(Ht?Fl:cc)&&Os,Ce=(Ht?cc:Fl)&&Zu,Ie=xe?dt:(Za?Is:bl).left,$e=Ce?lt:(Za?bl:Is).right;Rn(Ie,Is.top,$e-Ie,Is.bottom)}else{var mt,gt,At,Vt;Za?(mt=Ht&&Fl&&Os?dt:Is.left,gt=Ht?lt:mu(fl,Nl,"before"),At=Ht?dt:mu(vu,Nl,"after"),Vt=Ht&&cc&&Zu?lt:bl.right):(mt=Ht?mu(fl,Nl,"before"):dt,gt=!Ht&&Fl&&Os?lt:Is.right,At=!Ht&&cc&&Zu?dt:bl.left,Vt=Ht?mu(vu,Nl,"after"):lt),Rn(mt,Is.top,gt-mt,Is.bottom),Is.bottom<bl.top&&Rn(dt,Is.bottom,null,bl.top),Rn(At,bl.top,Vt-At,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(),oi=ae.to();if(ci.line==oi.line)Qt(ci.line,ci.ch,oi.ch);else{var Ji=cn(Se,ci.line),lr=cn(Se,oi.line),Pr=Nr(Ji)==Nr(lr),_r=Qt(ci.line,ci.ch,Pr?Ji.text.length+1:null).end,fo=Qt(oi.line,Pr?0:null,oi.ch).start;Pr&&(_r.top<fo.top-2?(Rn(_r.right,_r.top,null,_r.bottom),Rn(dt,fo.top,fo.left,fo.bottom)):Rn(_r.right,_r.top,fo.left-_r.right,_r.bottom)),_r.bottom<fo.top&&Rn(dt,_r.bottom,null,fo.top)}fe.appendChild(Re)}function Va(ie){if(ie.state.focused){var ae=ie.display;clearInterval(ae.blinker);var fe=!0;ae.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ae.blinker=setInterval(function(){ie.hasFocus()||ad(ie),ae.cursorDiv.style.visibility=(fe=!fe)?"":"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||(Nt(ie,"focus",ie,ae),ie.state.focused=!0,Dt(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Le&&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&&(Nt(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,fe=ae.lineDiv.offsetTop,de=0;de<ae.view.length;de++){var Se=ae.view[de],Re=ie.options.lineWrapping,Ue=void 0,dt=0;if(!Se.hidden){if(Ge&&_e<8){var lt=Se.node.offsetTop+Se.node.offsetHeight;Ue=lt-fe,fe=lt}else{var Ht=Se.node.getBoundingClientRect();Ue=Ht.bottom-Ht.top,!Re&&Se.text.firstChild&&(dt=Se.text.firstChild.getBoundingClientRect().right-Ht.left-1)}var Rn=Se.line.height-Ue;if((Rn>.005||Rn<-.005)&&(un(Se.line,Ue),Rf(Se.line),Se.rest))for(var Qt=0;Qt<Se.rest.length;Qt++)Rf(Se.rest[Qt]);if(dt>ie.display.sizerWidth){var ci=Math.ceil(dt/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 fe=ie.widgets[ae],de=fe.node.parentNode;de&&(fe.height=de.offsetHeight)}}function fa(ie,ae,fe){var de=fe&&fe.top!=null?Math.max(0,fe.top):ie.scroller.scrollTop;de=Math.floor(de-vl(ie));var Se=fe&&fe.bottom!=null?fe.bottom:de+ie.wrapper.clientHeight,Re=zn(ae,de),Ue=zn(ae,Se);if(fe&&fe.ensure){var dt=fe.ensure.from.line,lt=fe.ensure.to.line;dt<Re?(Re=dt,Ue=zn(ae,Vo(cn(ae,dt))+ie.wrapper.clientHeight)):Math.min(lt,ae.lastLine())>=Ue&&(Re=zn(ae,Vo(cn(ae,lt))-ie.wrapper.clientHeight),Ue=lt)}return{from:Re,to:Math.max(Ue,Re+1)}}function jf(ie,ae){if(!sn(ie,"scrollCursorIntoView")){var fe=ie.display,de=fe.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&&!It){var Re=qe("div","\u200B",null,`position: absolute;
top: `+(ae.top-fe.viewOffset-vl(ie.display))+`px;
height: `+(ae.bottom-ae.top+wl(ie)+fe.barHeight)+`px;
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Re),Re.scrollIntoView(Se),ie.display.lineSpace.removeChild(Re)}}}function sd(ie,ae,fe,de){de==null&&(de=0);var Se;!ie.options.lineWrapping&&ae==fe&&(ae=ae.ch?tn(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,fe=ae.sticky=="before"?tn(ae.line,ae.ch+1,"before"):ae);for(var Re=0;Re<5;Re++){var Ue=!1,dt=is(ie,ae),lt=!fe||fe==ae?dt:is(ie,fe);Se={left:Math.min(dt.left,lt.left),top:Math.min(dt.top,lt.top)-de,right:Math.max(dt.left,lt.left),bottom:Math.max(dt.bottom,lt.bottom)+de};var Ht=zf(ie,Se),Rn=ie.doc.scrollTop,Qt=ie.doc.scrollLeft;if(Ht.scrollTop!=null&&(_u(ie,Ht.scrollTop),Math.abs(ie.doc.scrollTop-Rn)>1&&(Ue=!0)),Ht.scrollLeft!=null&&(kl(ie,Ht.scrollLeft),Math.abs(ie.doc.scrollLeft-Qt)>1&&(Ue=!0)),!Ue)break}return Se}function wd(ie,ae){var fe=zf(ie,ae);fe.scrollTop!=null&&_u(ie,fe.scrollTop),fe.scrollLeft!=null&&kl(ie,fe.scrollLeft)}function zf(ie,ae){var fe=ie.display,de=cu(ie.display);ae.top<0&&(ae.top=0);var Se=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:fe.scroller.scrollTop,Re=td(ie),Ue={};ae.bottom-ae.top>Re&&(ae.bottom=ae.top+Re);var dt=ie.doc.height+ju(fe),lt=ae.top<de,Ht=ae.bottom>dt-de;if(ae.top<Se)Ue.scrollTop=lt?0:ae.top;else if(ae.bottom>Se+Re){var Rn=Math.min(ae.top,(Ht?dt:ae.bottom)-Re);Rn!=Se&&(Ue.scrollTop=Rn)}var Qt=ie.options.fixedGutter?0:fe.gutters.offsetWidth,ci=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:fe.scroller.scrollLeft-Qt,oi=sl(ie)-fe.gutters.offsetWidth,Ji=ae.right-ae.left>oi;return Ji&&(ae.right=ae.left+oi),ae.left<10?Ue.scrollLeft=0:ae.left<ci?Ue.scrollLeft=Math.max(0,ae.left+Qt-(Ji?0:10)):ae.right>oi+ci-3&&(Ue.scrollLeft=ae.right+(Ji?0:10)-oi),Ue}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,fe){(ae!=null||fe!=null)&&sc(ie),ae!=null&&(ie.curOp.scrollLeft=ae),fe!=null&&(ie.curOp.scrollTop=fe)}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 fe=bh(ie,ae.from),de=bh(ie,ae.to);Yd(ie,fe,de,ae.margin)}}function Yd(ie,ae,fe,de){var Se=zf(ie,{left:Math.min(ae.left,fe.left),top:Math.min(ae.top,fe.top)-de,right:Math.max(ae.right,fe.right),bottom:Math.max(ae.bottom,fe.bottom)+de});ud(ie,Se.scrollLeft,Se.scrollTop)}function _u(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(ge||Rr(ie,{top:ae}),Fh(ie,ae,!0),ge&&Rr(ie),Mi(ie,100))}function Fh(ie,ae,fe){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!fe)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function kl(ie,ae,fe,de){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((fe?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!de)&&(ie.doc.scrollLeft=ae,To(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function Il(ie){var ae=ie.display,fe=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?fe:0,docHeight:de,scrollHeight:de+wl(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:fe}}var xc=function(ie,ae,fe){this.cm=fe;var de=this.vert=qe("div",[qe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Se=this.horiz=qe("div",[qe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");de.tabIndex=Se.tabIndex=-1,ie(de),ie(Se),qt(de,"scroll",function(){de.clientHeight&&ae(de.scrollTop,"vertical")}),qt(Se,"scroll",function(){Se.clientWidth&&ae(Se.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ge&&_e<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xc.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,fe=ie.scrollHeight>ie.clientHeight+1,de=ie.nativeBarWidth;if(fe){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=fe?de+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Re=ie.viewWidth-ie.barLeft-(fe?de:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Re)+"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:fe?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&&!ct?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ve,this.disableVert=new Ve},xc.prototype.enableZeroWidthBar=function(ie,ae,fe){ie.style.pointerEvents="auto";function de(){var Se=ie.getBoundingClientRect(),Re=fe=="vert"?document.elementFromPoint(Se.right-1,(Se.top+Se.bottom)/2):document.elementFromPoint((Se.right+Se.left)/2,Se.bottom-1);Re!=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 fe=ie.display.barWidth,de=ie.display.barHeight;Jd(ie,ae);for(var Se=0;Se<4&&fe!=ie.display.barWidth||de!=ie.display.barHeight;Se++)fe!=ie.display.barWidth&&ie.options.lineWrapping&&Do(ie),Jd(ie,Il(ie)),fe=ie.display.barWidth,de=ie.display.barHeight}function Jd(ie,ae){var fe=ie.display,de=fe.scrollbars.update(ae);fe.sizer.style.paddingRight=(fe.barWidth=de.right)+"px",fe.sizer.style.paddingBottom=(fe.barHeight=de.bottom)+"px",fe.heightForcer.style.borderBottom=de.bottom+"px solid transparent",de.right&&de.bottom?(fe.scrollbarFiller.style.display="block",fe.scrollbarFiller.style.height=de.bottom+"px",fe.scrollbarFiller.style.width=de.right+"px"):fe.scrollbarFiller.style.display="",de.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(fe.gutterFiller.style.display="block",fe.gutterFiller.style.height=de.bottom+"px",fe.gutterFiller.style.width=ae.gutterWidth+"px"):fe.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),qt(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,fe){fe=="horizontal"?kl(ie,ae):_u(ie,ae)},ie),ie.display.scrollbars.addClass&&Dt(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},kr(ie.curOp)}function Oc(ie){var ae=ie.curOp;ae&&Br(ae,function(fe){for(var de=0;de<fe.ops.length;de++)fe.ops[de].cm.curOp=null;dg(fe)})}function dg(ie){for(var ae=ie.ops,fe=0;fe<ae.length;fe++)pt(ae[fe]);for(var de=0;de<ae.length;de++)xt(ae[de]);for(var Se=0;Se<ae.length;Se++)nn(ae[Se]);for(var Re=0;Re<ae.length;Re++)ln(ae[Re]);for(var Ue=0;Ue<ae.length;Ue++)Hn(ae[Ue])}function pt(ie){var ae=ie.cm,fe=ae.display;gr(ae),ie.updateMaxLine&&ko(ae),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<fe.viewFrom||ie.scrollToPos.to.line>=fe.viewTo)||fe.maxLineChanged&&ae.options.lineWrapping,ie.update=ie.mustUpdate&&new Ni(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function xt(ie){ie.updatedDisplay=ie.mustUpdate&&Kr(ie.cm,ie.update)}function nn(ie){var ae=ie.cm,fe=ae.display;ie.updatedDisplay&&Do(ae),ie.barMeasure=Il(ae),fe.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=id(ae,fe.maxLine,fe.maxLine.text.length).left+3,ae.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(fe.scroller.clientWidth,fe.sizer.offsetLeft+ie.adjustWidthTo+wl(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,fe.sizer.offsetLeft+ie.adjustWidthTo-sl(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=fe.input.prepareSelection())}function ln(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 fe=ie.focus&&ie.focus==nt();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,fe),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&lc(ae,ie.barMeasure),ie.updatedDisplay&&mo(ae,ie.barMeasure),ie.selectionChanged&&Va(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),fe&&cs(ie.cm)}function Hn(ie){var ae=ie.cm,fe=ae.display,de=ae.doc;if(ie.updatedDisplay&&sr(ae,ie.update),fe.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(fe.wheelStartX=fe.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,$n(de,ie.scrollToPos.from),$n(de,ie.scrollToPos.to),ie.scrollToPos.margin);jf(ae,Se)}var Re=ie.maybeHiddenMarkers,Ue=ie.maybeUnhiddenMarkers;if(Re)for(var dt=0;dt<Re.length;++dt)Re[dt].lines.length||Nt(Re[dt],"hide");if(Ue)for(var lt=0;lt<Ue.length;++lt)Ue[lt].lines.length&&Nt(Ue[lt],"unhide");fe.wrapper.offsetHeight&&(de.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&Nt(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function bn(ie,ae){if(ie.curOp)return ae();Ol(ie);try{return ae()}finally{Oc(ie)}}function ai(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);Ol(ie);try{return ae.apply(ie,arguments)}finally{Oc(ie)}}}function si(ie){return function(){if(this.curOp)return ie.apply(this,arguments);Ol(this);try{return ie.apply(this,arguments)}finally{Oc(this)}}}function qn(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,Yt(Di,ie))}function Di(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var fe=+new Date+ie.options.workTime,de=Wi(ie,ae.highlightFrontier),Se=[];ae.iter(de.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Re){if(de.line>=ie.display.viewFrom){var Ue=Re.styles,dt=Re.text.length>ie.options.maxHighlightLength?an(ae.mode,de.state):null,lt=Hi(ie,Re,de,!0);dt&&(de.state=dt),Re.styles=lt.styles;var Ht=Re.styleClasses,Rn=lt.classes;Rn?Re.styleClasses=Rn:Ht&&(Re.styleClasses=null);for(var Qt=!Ue||Ue.length!=Re.styles.length||Ht!=Rn&&(!Ht||!Rn||Ht.bgClass!=Rn.bgClass||Ht.textClass!=Rn.textClass),ci=0;!Qt&&ci<Ue.length;++ci)Qt=Ue[ci]!=Re.styles[ci];Qt&&Se.push(de.line),Re.stateAfter=de.save(),de.nextLine()}else Re.text.length<=ie.options.maxHighlightLength&&Xt(ie,Re.text,de),Re.stateAfter=de.line%5==0?de.save():null,de.nextLine();if(+new Date>fe)return Mi(ie,ie.options.workDelay),!0}),ae.highlightFrontier=de.line,ae.modeFrontier=Math.max(ae.modeFrontier,de.line),Se.length&&bn(ie,function(){for(var Re=0;Re<Se.length;Re++)ia(ie,Se[Re],"text")})}}var Ni=function(ie,ae,fe){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=fe,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++)Nt.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=nt();if(!ae||!wt(ie.display.lineDiv,ae))return null;var fe={activeElt:ae};if(window.getSelection){var de=window.getSelection();de.anchorNode&&de.extend&&wt(ie.display.lineDiv,de.anchorNode)&&(fe.anchorNode=de.anchorNode,fe.anchorOffset=de.anchorOffset,fe.focusNode=de.focusNode,fe.focusOffset=de.focusOffset)}return fe}function nr(ie){if(!(!ie||!ie.activeElt||ie.activeElt==nt())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&wt(document.body,ie.anchorNode)&&wt(document.body,ie.focusNode))){var ae=window.getSelection(),fe=document.createRange();fe.setEnd(ie.anchorNode,ie.anchorOffset),fe.collapse(!1),ae.removeAllRanges(),ae.addRange(fe),ae.extend(ie.focusNode,ie.focusOffset)}}function Kr(ie,ae){var fe=ie.display,de=ie.doc;if(ae.editorIsHidden)return Hs(ie),!1;if(!ae.force&&ae.visible.from>=fe.viewFrom&&ae.visible.to<=fe.viewTo&&(fe.updateLineNumbers==null||fe.updateLineNumbers>=fe.viewTo)&&fe.renderedView==fe.view&&du(ie)==0)return!1;Vr(ie)&&(Hs(ie),ae.dims=Nh(ie));var Se=de.first+de.size,Re=Math.max(ae.visible.from-ie.options.viewportMargin,de.first),Ue=Math.min(Se,ae.visible.to+ie.options.viewportMargin);fe.viewFrom<Re&&Re-fe.viewFrom<20&&(Re=Math.max(de.first,fe.viewFrom)),fe.viewTo>Ue&&fe.viewTo-Ue<20&&(Ue=Math.min(Se,fe.viewTo)),Dn&&(Re=mr(ie.doc,Re),Ue=$r(ie.doc,Ue));var dt=Re!=fe.viewFrom||Ue!=fe.viewTo||fe.lastWrapHeight!=ae.wrapperHeight||fe.lastWrapWidth!=ae.wrapperWidth;Ja(ie,Re,Ue),fe.viewOffset=Vo(cn(ie.doc,fe.viewFrom)),ie.display.mover.style.top=fe.viewOffset+"px";var lt=du(ie);if(!dt&&lt==0&&!ae.force&&fe.renderedView==fe.view&&(fe.updateLineNumbers==null||fe.updateLineNumbers>=fe.viewTo))return!1;var Ht=dr(ie);return lt>4&&(fe.lineDiv.style.display="none"),Tr(ie,fe.updateLineNumbers,ae.dims),lt>4&&(fe.lineDiv.style.display=""),fe.renderedView=fe.view,nr(Ht),Ze(fe.cursorDiv),Ze(fe.selectionDiv),fe.gutters.style.height=fe.sizer.style.minHeight=0,dt&&(fe.lastWrapHeight=ae.wrapperHeight,fe.lastWrapWidth=ae.wrapperWidth,Mi(ie,400)),fe.updateLineNumbers=null,!0}function sr(ie,ae){for(var fe=ae.viewport,de=!0;;de=!1){if(!de||!ie.options.lineWrapping||ae.oldDisplayWidth==sl(ie)){if(fe&&fe.top!=null&&(fe={top:Math.min(ie.doc.height+ju(ie.display)-td(ie),fe.top)}),ae.visible=fa(ie.display,ie.doc,fe),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else de&&(ae.visible=fa(ie.display,ie.doc,fe));if(!Kr(ie,ae))break;Do(ie);var Se=Il(ie);nl(ie),lc(ie,Se),mo(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 Rr(ie,ae){var fe=new Ni(ie,ae);if(Kr(ie,fe)){Do(ie),sr(ie,fe);var de=Il(ie);nl(ie),lc(ie,de),mo(ie,de),fe.finish()}}function Tr(ie,ae,fe){var de=ie.display,Se=ie.options.lineNumbers,Re=de.lineDiv,Ue=Re.firstChild;function dt(Ji){var lr=Ji.nextSibling;return Le&&ce&&ie.display.currentWheelTarget==Ji?Ji.style.display="none":Ji.parentNode.removeChild(Ji),lr}for(var lt=de.view,Ht=de.viewFrom,Rn=0;Rn<lt.length;Rn++){var Qt=lt[Rn];if(!Qt.hidden)if(!Qt.node||Qt.node.parentNode!=Re){var ci=su(ie,Qt,Ht,fe);Re.insertBefore(ci,Ue)}else{for(;Ue!=Qt.node;)Ue=dt(Ue);var oi=Se&&ae!=null&&ae<=Ht&&Qt.lineNumber;Qt.changes&&(Wt(Qt.changes,"gutter")>-1&&(oi=!1),Ra(ie,Qt,Ht,fe)),oi&&(Ze(Qt.lineNumber),Qt.lineNumber.appendChild(document.createTextNode(gi(ie.options,Ht)))),Ue=Qt.node.nextSibling}Ht+=Qt.size}for(;Ue;)Ue=dt(Ue)}function to(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function mo(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 To(ie){var ae=ie.display,fe=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,Re=de+"px",Ue=0;Ue<fe.length;Ue++)if(!fe[Ue].hidden){ie.options.fixedGutter&&(fe[Ue].gutter&&(fe[Ue].gutter.style.left=Re),fe[Ue].gutterBackground&&(fe[Ue].gutterBackground.style.left=Re));var dt=fe[Ue].alignable;if(dt)for(var lt=0;lt<dt.length;lt++)dt[lt].style.left=Re}ie.options.fixedGutter&&(ae.gutters.style.left=de+Se+"px")}}function Vr(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,fe=gi(ie.options,ae.first+ae.size-1),de=ie.display;if(fe.length!=de.lineNumChars){var Se=de.measure.appendChild(qe("div",[qe("div",fe)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Re=Se.firstChild.offsetWidth,Ue=Se.offsetWidth-Re;return de.lineGutter.style.width="",de.lineNumInnerWidth=Math.max(Re,de.lineGutter.offsetWidth-Ue)+1,de.lineNumWidth=de.lineNumInnerWidth+Ue,de.lineNumChars=de.lineNumInnerWidth?fe.length:-1,de.lineGutter.style.width=de.lineNumWidth+"px",to(ie.display),!0}return!1}function po(ie,ae){for(var fe=[],de=!1,Se=0;Se<ie.length;Se++){var Re=ie[Se],Ue=null;if(typeof Re!="string"&&(Ue=Re.style,Re=Re.className),Re=="CodeMirror-linenumbers")if(ae)de=!0;else continue;fe.push({className:Re,style:Ue})}return ae&&!de&&fe.push({className:"CodeMirror-linenumbers",style:null}),fe}function Xo(ie){var ae=ie.gutters,fe=ie.gutterSpecs;Ze(ae),ie.lineGutter=null;for(var de=0;de<fe.length;++de){var Se=fe[de],Re=Se.className,Ue=Se.style,dt=ae.appendChild(qe("div",null,"CodeMirror-gutter "+Re));Ue&&(dt.style.cssText=Ue),Re=="CodeMirror-linenumbers"&&(ie.lineGutter=dt,dt.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=fe.length?"":"none",to(ie)}function Jr(ie){Xo(ie.display),_a(ie),To(ie)}function lo(ie,ae,fe,de){var Se=this;this.input=fe,Se.scrollbarFiller=qe("div",null,"CodeMirror-scrollbar-filler"),Se.scrollbarFiller.setAttribute("cm-not-content","true"),Se.gutterFiller=qe("div",null,"CodeMirror-gutter-filler"),Se.gutterFiller.setAttribute("cm-not-content","true"),Se.lineDiv=bt("div",null,"CodeMirror-code"),Se.selectionDiv=qe("div",null,null,"position: relative; z-index: 1"),Se.cursorDiv=qe("div",null,"CodeMirror-cursors"),Se.measure=qe("div",null,"CodeMirror-measure"),Se.lineMeasure=qe("div",null,"CodeMirror-measure"),Se.lineSpace=bt("div",[Se.measure,Se.lineMeasure,Se.selectionDiv,Se.cursorDiv,Se.lineDiv],null,"position: relative; outline: none");var Re=bt("div",[Se.lineSpace],"CodeMirror-lines");Se.mover=qe("div",[Re],null,"position: relative"),Se.sizer=qe("div",[Se.mover],"CodeMirror-sizer"),Se.sizerWidth=null,Se.heightForcer=qe("div",null,null,"position: absolute; height: "+Ln+"px; width: 1px;"),Se.gutters=qe("div",null,"CodeMirror-gutters"),Se.lineGutter=null,Se.scroller=qe("div",[Se.sizer,Se.heightForcer,Se.gutters],"CodeMirror-scroll"),Se.scroller.setAttribute("tabIndex","-1"),Se.wrapper=qe("div",[Se.scrollbarFiller,Se.gutterFiller,Se.scroller],"CodeMirror"),Ge&&_e<8&&(Se.gutters.style.zIndex=-1,Se.scroller.style.paddingRight=0),!Le&&!(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=po(de.gutters,de.lineNumbers),Xo(Se),fe.init(Se)}var Qr=0,br=null;Ge?br=-.53:ge?br=15:Pt?br=-.7:Et&&(br=-1/3);function oo(ie){var ae=ie.wheelDeltaX,fe=ie.wheelDeltaY;return ae==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ae=ie.detail),fe==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?fe=ie.detail:fe==null&&(fe=ie.wheelDelta),{x:ae,y:fe}}function Mo(ie){var ae=oo(ie);return ae.x*=br,ae.y*=br,ae}function zo(ie,ae){var fe=oo(ae),de=fe.x,Se=fe.y,Re=ie.display,Ue=Re.scroller,dt=Ue.scrollWidth>Ue.clientWidth,lt=Ue.scrollHeight>Ue.clientHeight;if(de&&dt||Se&&lt){if(Se&&ce&&Le){e:for(var Ht=ae.target,Rn=Re.view;Ht!=Ue;Ht=Ht.parentNode)for(var Qt=0;Qt<Rn.length;Qt++)if(Rn[Qt].node==Ht){ie.display.currentWheelTarget=Ht;break e}}if(de&&!ge&&!Xe&&br!=null){Se&&lt&&_u(ie,Math.max(0,Ue.scrollTop+Se*br)),kl(ie,Math.max(0,Ue.scrollLeft+de*br)),(!Se||Se&&lt)&&li(ae),Re.wheelStartX=null;return}if(Se&&br!=null){var ci=Se*br,oi=ie.doc.scrollTop,Ji=oi+Re.wrapper.clientHeight;ci<0?oi=Math.max(0,oi+ci-50):Ji=Math.min(ie.doc.height,Ji+ci+50),Rr(ie,{top:oi,bottom:Ji})}Qr<20&&(Re.wheelStartX==null?(Re.wheelStartX=Ue.scrollLeft,Re.wheelStartY=Ue.scrollTop,Re.wheelDX=de,Re.wheelDY=Se,setTimeout(function(){if(Re.wheelStartX!=null){var lr=Ue.scrollLeft-Re.wheelStartX,Pr=Ue.scrollTop-Re.wheelStartY,_r=Pr&&Re.wheelDY&&Pr/Re.wheelDY||lr&&Re.wheelDX&&lr/Re.wheelDX;Re.wheelStartX=Re.wheelStartY=null,_r&&(br=(br*Qr+_r)/(Qr+1),++Qr)}},200)):(Re.wheelDX+=de,Re.wheelDY+=Se))}}var Ho=function(ie,ae){this.ranges=ie,this.primIndex=ae};Ho.prototype.primary=function(){return this.ranges[this.primIndex]},Ho.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 fe=this.ranges[ae],de=ie.ranges[ae];if(!Ft(fe.anchor,de.anchor)||!Ft(fe.head,de.head))return!1}return!0},Ho.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new Ur(wn(this.ranges[ae].anchor),wn(this.ranges[ae].head));return new Ho(ie,this.primIndex)},Ho.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Ho.prototype.contains=function(ie,ae){ae||(ae=ie);for(var fe=0;fe<this.ranges.length;fe++){var de=this.ranges[fe];if(Bn(ae,de.from())>=0&&Bn(ie,de.to())<=0)return fe}return-1};var Ur=function(ie,ae){this.anchor=ie,this.head=ae};Ur.prototype.from=function(){return yn(this.anchor,this.head)},Ur.prototype.to=function(){return gn(this.anchor,this.head)},Ur.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yo(ie,ae,fe){var de=ie&&ie.options.selectionsMayTouch,Se=ae[fe];ae.sort(function(ci,oi){return Bn(ci.from(),oi.from())}),fe=Wt(ae,Se);for(var Re=1;Re<ae.length;Re++){var Ue=ae[Re],dt=ae[Re-1],lt=Bn(dt.to(),Ue.from());if(de&&!Ue.empty()?lt>0:lt>=0){var Ht=yn(dt.from(),Ue.from()),Rn=gn(dt.to(),Ue.to()),Qt=dt.empty()?Ue.from()==Ue.head:dt.from()==dt.head;Re<=fe&&--fe,ae.splice(--Re,2,new Ur(Qt?Rn:Ht,Qt?Ht:Rn))}}return new Ho(ae,fe)}function na(ie,ae){return new Ho([new Ur(ie,ae||ie)],0)}function Ta(ie){return ie.text?tn(ie.from.line+ie.text.length-1,Ot(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function ma(ie,ae){if(Bn(ie,ae.from)<0)return ie;if(Bn(ie,ae.to)<=0)return Ta(ae);var fe=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),tn(fe,de)}function ds(ie,ae){for(var fe=[],de=0;de<ie.sel.ranges.length;de++){var Se=ie.sel.ranges[de];fe.push(new Ur(ma(Se.anchor,ae),ma(Se.head,ae)))}return Yo(ie.cm,fe,ie.sel.primIndex)}function ja(ie,ae,fe){return ie.line==ae.line?tn(fe.line,ie.ch-ae.ch+fe.ch):tn(fe.line+(ie.line-ae.line),ie.ch)}function ta(ie,ae,fe){for(var de=[],Se=tn(ie.first,0),Re=Se,Ue=0;Ue<ae.length;Ue++){var dt=ae[Ue],lt=ja(dt.from,Se,Re),Ht=ja(Ta(dt),Se,Re);if(Se=dt.to,Re=Ht,fe=="around"){var Rn=ie.sel.ranges[Ue],Qt=Bn(Rn.head,Rn.anchor)<0;de[Ue]=new Ur(Qt?Ht:lt,Qt?lt:Ht)}else de[Ue]=new Ur(lt,lt)}return new Ho(de,ie.sel.primIndex)}function Fo(ie){ie.doc.mode=Kt(ie.options,ie.doc.modeOption),xa(ie)}function xa(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&&Ot(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Qa(ie,ae,fe,de){function Se(fo){return fe?fe[fo]:null}function Re(fo,ao,Co){_o(fo,ao,Co,de),zi(fo,"change",fo,ae)}function Ue(fo,ao){for(var Co=[],Qo=fo;Qo<ao;++Qo)Co.push(new Io(Ht[Qo],Se(Qo),de));return Co}var dt=ae.from,lt=ae.to,Ht=ae.text,Rn=cn(ie,dt.line),Qt=cn(ie,lt.line),ci=Ot(Ht),oi=Se(Ht.length-1),Ji=lt.line-dt.line;if(ae.full)ie.insert(0,Ue(0,Ht.length)),ie.remove(Ht.length,ie.size-Ht.length);else if(hs(ie,ae)){var lr=Ue(0,Ht.length-1);Re(Qt,Qt.text,oi),Ji&&ie.remove(dt.line,Ji),lr.length&&ie.insert(dt.line,lr)}else if(Rn==Qt)if(Ht.length==1)Re(Rn,Rn.text.slice(0,dt.ch)+ci+Rn.text.slice(lt.ch),oi);else{var Pr=Ue(1,Ht.length-1);Pr.push(new Io(ci+Rn.text.slice(lt.ch),oi,de)),Re(Rn,Rn.text.slice(0,dt.ch)+Ht[0],Se(0)),ie.insert(dt.line+1,Pr)}else if(Ht.length==1)Re(Rn,Rn.text.slice(0,dt.ch)+Ht[0]+Qt.text.slice(lt.ch),Se(0)),ie.remove(dt.line+1,Ji);else{Re(Rn,Rn.text.slice(0,dt.ch)+Ht[0],Se(0)),Re(Qt,ci+Qt.text.slice(lt.ch),oi);var _r=Ue(1,Ht.length-1);Ji>1&&ie.remove(dt.line+1,Ji-1),ie.insert(dt.line+1,_r)}zi(ie,"change",ie,ae)}function Ns(ie,ae,fe){function de(Se,Re,Ue){if(Se.linked)for(var dt=0;dt<Se.linked.length;++dt){var lt=Se.linked[dt];if(lt.doc!=Re){var Ht=Ue&&lt.sharedHist;fe&&!Ht||(ae(lt.doc,Ht),de(lt.doc,Se,Ht))}}}de(ie,null,!0)}function Wo(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,Bo(ie),Fo(ie),Oo(ie),ie.options.lineWrapping||ko(ie),ie.options.mode=ae.modeOption,_a(ie)}function Oo(ie){(ie.doc.direction=="rtl"?Dt:ze)(ie.display.lineDiv,"CodeMirror-rtl")}function Zo(ie){bn(ie,function(){Oo(ie),_a(ie)})}function xo(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 fe={from:wn(ae.from),to:Ta(ae),text:Sn(ie,ae.from,ae.to)};return cl(ie,fe,ae.from.line,ae.to.line+1),Ns(ie,function(de){return cl(de,fe,ae.from.line,ae.to.line+1)},!0),fe}function vo(ie){for(;ie.length;){var ae=Ot(ie);if(ae.ranges)ie.pop();else break}}function Jo(ie,ae){if(ae)return vo(ie.done),Ot(ie.done);if(ie.done.length&&!Ot(ie.done).ranges)return Ot(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),Ot(ie.done)}function ga(ie,ae,fe,de){var Se=ie.history;Se.undone.length=0;var Re=+new Date,Ue,dt;if((Se.lastOp==de||Se.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&Se.lastModTime>Re-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(Ue=Jo(Se,Se.lastOp==de)))dt=Ot(Ue.changes),Bn(ae.from,ae.to)==0&&Bn(ae.from,dt.to)==0?dt.to=Ta(ae):Ue.changes.push(Aa(ie,ae));else{var lt=Ot(Se.done);for((!lt||!lt.ranges)&&Zs(ie.sel,Se.done),Ue={changes:[Aa(ie,ae)],generation:Se.generation},Se.done.push(Ue);Se.done.length>Se.undoDepth;)Se.done.shift(),Se.done[0].ranges||Se.done.shift()}Se.done.push(fe),Se.generation=++Se.maxGeneration,Se.lastModTime=Se.lastSelTime=Re,Se.lastOp=Se.lastSelOp=de,Se.lastOrigin=Se.lastSelOrigin=ae.origin,dt||Nt(ie,"historyAdded")}function va(ie,ae,fe,de){var Se=ae.charAt(0);return Se=="*"||Se=="+"&&fe.ranges.length==de.ranges.length&&fe.somethingSelected()==de.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Us(ie,ae,fe,de){var Se=ie.history,Re=de&&de.origin;fe==Se.lastSelOp||Re&&Se.lastSelOrigin==Re&&(Se.lastModTime==Se.lastSelTime&&Se.lastOrigin==Re||va(ie,Re,Ot(Se.done),ae))?Se.done[Se.done.length-1]=ae:Zs(ae,Se.done),Se.lastSelTime=+new Date,Se.lastSelOrigin=Re,Se.lastSelOp=fe,de&&de.clearRedo!==!1&&vo(Se.undone)}function Zs(ie,ae){var fe=Ot(ae);fe&&fe.ranges&&fe.equals(ie)||ae.push(ie)}function cl(ie,ae,fe,de){var Se=ae["spans_"+ie.id],Re=0;ie.iter(Math.max(ie.first,fe),Math.min(ie.first+ie.size,de),function(Ue){Ue.markedSpans&&((Se||(Se=ae["spans_"+ie.id]={}))[Re]=Ue.markedSpans),++Re})}function ka(ie){if(!ie)return null;for(var ae,fe=0;fe<ie.length;++fe)ie[fe].marker.explicitlyCleared?ae||(ae=ie.slice(0,fe)):ae&&ae.push(ie[fe]);return ae?ae.length?ae:null:ie}function il(ie,ae){var fe=ae["spans_"+ie.id];if(!fe)return null;for(var de=[],Se=0;Se<ae.text.length;++Se)de.push(ka(fe[Se]));return de}function Fs(ie,ae){var fe=il(ie,ae),de=ir(ie,ae);if(!fe)return de;if(!de)return fe;for(var Se=0;Se<fe.length;++Se){var Re=fe[Se],Ue=de[Se];if(Re&&Ue)e:for(var dt=0;dt<Ue.length;++dt){for(var lt=Ue[dt],Ht=0;Ht<Re.length;++Ht)if(Re[Ht].marker==lt.marker)continue e;Re.push(lt)}else Ue&&(fe[Se]=Ue)}return fe}function Ws(ie,ae,fe){for(var de=[],Se=0;Se<ie.length;++Se){var Re=ie[Se];if(Re.ranges){de.push(fe?Ho.prototype.deepCopy.call(Re):Re);continue}var Ue=Re.changes,dt=[];de.push({changes:dt});for(var lt=0;lt<Ue.length;++lt){var Ht=Ue[lt],Rn=void 0;if(dt.push({from:Ht.from,to:Ht.to,text:Ht.text}),ae)for(var Qt in Ht)(Rn=Qt.match(/^spans_(\d+)$/))&&Wt(ae,Number(Rn[1]))>-1&&(Ot(dt)[Qt]=Ht[Qt],delete Ht[Qt])}}return de}function uc(ie,ae,fe,de){if(de){var Se=ie.anchor;if(fe){var Re=Bn(ae,Se)<0;Re!=Bn(fe,Se)<0?(Se=ae,ae=fe):Re!=Bn(ae,fe)<0&&(ae=fe)}return new Ur(Se,ae)}else return new Ur(fe||ae,ae)}function Ia(ie,ae,fe,de,Se){Se==null&&(Se=ie.cm&&(ie.cm.display.shift||ie.extend)),Xa(ie,new Ho([uc(ie.sel.primary(),ae,fe,Se)],0),de)}function $a(ie,ae,fe){for(var de=[],Se=ie.cm&&(ie.cm.display.shift||ie.extend),Re=0;Re<ie.sel.ranges.length;Re++)de[Re]=uc(ie.sel.ranges[Re],ae[Re],null,Se);var Ue=Yo(ie.cm,de,ie.sel.primIndex);Xa(ie,Ue,fe)}function Oa(ie,ae,fe,de){var Se=ie.sel.ranges.slice(0);Se[ae]=fe,Xa(ie,Yo(ie.cm,Se,ie.sel.primIndex),de)}function qa(ie,ae,fe,de){Xa(ie,na(ae,fe),de)}function As(ie,ae,fe){var de={ranges:ae.ranges,update:function(Se){this.ranges=[];for(var Re=0;Re<Se.length;Re++)this.ranges[Re]=new Ur($n(ie,Se[Re].anchor),$n(ie,Se[Re].head))},origin:fe&&fe.origin};return Nt(ie,"beforeSelectionChange",ie,de),ie.cm&&Nt(ie.cm,"beforeSelectionChange",ie.cm,de),de.ranges!=ae.ranges?Yo(ie.cm,de.ranges,de.ranges.length-1):ae}function da(ie,ae,fe){var de=ie.history.done,Se=Ot(de);Se&&Se.ranges?(de[de.length-1]=ae,_s(ie,ae,fe)):Xa(ie,ae,fe)}function Xa(ie,ae,fe){_s(ie,ae,fe),Us(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,fe)}function _s(ie,ae,fe){(hn(ie,"beforeSelectionChange")||ie.cm&&hn(ie.cm,"beforeSelectionChange"))&&(ae=As(ie,ae,fe));var de=fe&&fe.bias||(Bn(ae.primary().head,ie.sel.primary().head)<0?-1:1);dl(ie,Yl(ie,ae,de,!0)),!(fe&&fe.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,Fn(ie.cm)),zi(ie,"cursorActivity",ie))}function hu(ie){dl(ie,Yl(ie,ie.sel,null,!1))}function Yl(ie,ae,fe,de){for(var Se,Re=0;Re<ae.ranges.length;Re++){var Ue=ae.ranges[Re],dt=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Re],lt=Jl(ie,Ue.anchor,dt&&dt.anchor,fe,de),Ht=Jl(ie,Ue.head,dt&&dt.head,fe,de);(Se||lt!=Ue.anchor||Ht!=Ue.head)&&(Se||(Se=ae.ranges.slice(0,Re)),Se[Re]=new Ur(lt,Ht))}return Se?Yo(ie.cm,Se,ae.primIndex):ae}function Ds(ie,ae,fe,de,Se){var Re=cn(ie,ae.line);if(Re.markedSpans)for(var Ue=0;Ue<Re.markedSpans.length;++Ue){var dt=Re.markedSpans[Ue],lt=dt.marker,Ht="selectLeft"in lt?!lt.selectLeft:lt.inclusiveLeft,Rn="selectRight"in lt?!lt.selectRight:lt.inclusiveRight;if((dt.from==null||(Ht?dt.from<=ae.ch:dt.from<ae.ch))&&(dt.to==null||(Rn?dt.to>=ae.ch:dt.to>ae.ch))){if(Se&&(Nt(lt,"beforeCursorEnter"),lt.explicitlyCleared))if(Re.markedSpans){--Ue;continue}else break;if(!lt.atomic)continue;if(fe){var Qt=lt.find(de<0?1:-1),ci=void 0;if((de<0?Rn:Ht)&&(Qt=Ql(ie,Qt,-de,Qt&&Qt.line==ae.line?Re:null)),Qt&&Qt.line==ae.line&&(ci=Bn(Qt,fe))&&(de<0?ci<0:ci>0))return Ds(ie,Qt,ae,de,Se)}var oi=lt.find(de<0?-1:1);return(de<0?Ht:Rn)&&(oi=Ql(ie,oi,de,oi.line==ae.line?Re:null)),oi?Ds(ie,oi,ae,de,Se):null}}return ae}function Jl(ie,ae,fe,de,Se){var Re=de||1,Ue=Ds(ie,ae,fe,Re,Se)||!Se&&Ds(ie,ae,fe,Re,!0)||Ds(ie,ae,fe,-Re,Se)||!Se&&Ds(ie,ae,fe,-Re,!0);return Ue||(ie.cantEdit=!0,tn(ie.first,0))}function Ql(ie,ae,fe,de){return fe<0&&ae.ch==0?ae.line>ie.first?$n(ie,tn(ae.line-1)):null:fe>0&&ae.ch==(de||cn(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?tn(ae.line+1,0):null:new tn(ae.line,ae.ch+fe)}function za(ie){ie.setSelection(tn(ie.firstLine(),0),tn(ie.lastLine()),$t)}function rl(ie,ae,fe){var de={canceled:!1,from:ae.from,to:ae.to,text:ae.text,origin:ae.origin,cancel:function(){return de.canceled=!0}};return fe&&(de.update=function(Se,Re,Ue,dt){Se&&(de.from=$n(ie,Se)),Re&&(de.to=$n(ie,Re)),Ue&&(de.text=Ue),dt!==void 0&&(de.origin=dt)}),Nt(ie,"beforeChange",ie,de),ie.cm&&Nt(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,fe){if(ie.cm){if(!ie.cm.curOp)return ai(ie.cm,es)(ie,ae,fe);if(ie.cm.state.suppressEdits)return}if(!((hn(ie,"beforeChange")||ie.cm&&hn(ie.cm,"beforeChange"))&&(ae=rl(ie,ae,!0),!ae))){var de=Mr&&!fe&&Dr(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 fe=ds(ie,ae);ga(ie,ae,fe,ie.cm?ie.cm.curOp.id:NaN),Nu(ie,ae,fe,ir(ie,ae));var de=[];Ns(ie,function(Se,Re){!Re&&Wt(de,Se.history)==-1&&(rs(Se.history,ae),de.push(Se.history)),Nu(Se,ae,null,ir(Se,ae))})}}function fu(ie,ae,fe){var de=ie.cm&&ie.cm.state.suppressEdits;if(!(de&&!fe)){for(var Se=ie.history,Re,Ue=ie.sel,dt=ae=="undo"?Se.done:Se.undone,lt=ae=="undo"?Se.undone:Se.done,Ht=0;Ht<dt.length&&(Re=dt[Ht],!(fe?Re.ranges&&!Re.equals(ie.sel):!Re.ranges));Ht++);if(Ht!=dt.length){for(Se.lastOrigin=Se.lastSelOrigin=null;;)if(Re=dt.pop(),Re.ranges){if(Zs(Re,lt),fe&&!Re.equals(ie.sel)){Xa(ie,Re,{clearRedo:!1});return}Ue=Re}else if(de){dt.push(Re);return}else break;var Rn=[];Zs(Ue,lt),lt.push({changes:Rn,generation:Se.generation}),Se.generation=Re.generation||++Se.maxGeneration;for(var Qt=hn(ie,"beforeChange")||ie.cm&&hn(ie.cm,"beforeChange"),ci=function(lr){var Pr=Re.changes[lr];if(Pr.origin=ae,Qt&&!rl(ie,Pr,!1))return dt.length=0,{};Rn.push(Aa(ie,Pr));var _r=lr?ds(ie,Pr):Ot(dt);Nu(ie,Pr,_r,Fs(ie,Pr)),!lr&&ie.cm&&ie.cm.scrollIntoView({from:Pr.from,to:Ta(Pr)});var fo=[];Ns(ie,function(ao,Co){!Co&&Wt(fo,ao.history)==-1&&(rs(ao.history,Pr),fo.push(ao.history)),Nu(ao,Pr,null,Fs(ao,Pr))})},oi=Re.changes.length-1;oi>=0;--oi){var Ji=ci(oi);if(Ji)return Ji.v}}}}function Pc(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new Ho(Cn(ie.sel.ranges,function(Se){return new Ur(tn(Se.anchor.line+ae,Se.anchor.ch),tn(Se.head.line+ae,Se.head.ch))}),ie.sel.primIndex),ie.cm)){_a(ie.cm,ie.first,ie.first-ae,ae);for(var fe=ie.cm.display,de=fe.viewFrom;de<fe.viewTo;de++)ia(ie.cm,de,"gutter")}}function Nu(ie,ae,fe,de){if(ie.cm&&!ie.cm.curOp)return ai(ie.cm,Nu)(ie,ae,fe,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:tn(ie.first,0),to:tn(ae.to.line+Se,ae.to.ch),text:[Ot(ae.text)],origin:ae.origin}}var Re=ie.lastLine();ae.to.line>Re&&(ae={from:ae.from,to:tn(Re,cn(ie,Re).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=Sn(ie,ae.from,ae.to),fe||(fe=ds(ie,ae)),ie.cm?Fu(ie.cm,ae,de):Qa(ie,ae,de),_s(ie,fe,$t),ie.cantEdit&&Jl(ie,tn(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function Fu(ie,ae,fe){var de=ie.doc,Se=ie.display,Re=ae.from,Ue=ae.to,dt=!1,lt=Re.line;ie.options.lineWrapping||(lt=Rt(Nr(cn(de,Re.line))),de.iter(lt,Ue.line+1,function(oi){if(oi==Se.maxLine)return dt=!0,!0})),de.sel.contains(ae.from,ae.to)>-1&&Fn(ie),Qa(de,ae,fe,ys(ie)),ie.options.lineWrapping||(de.iter(lt,Re.line+ae.text.length,function(oi){var Ji=sa(oi);Ji>Se.maxLineLength&&(Se.maxLine=oi,Se.maxLineLength=Ji,Se.maxLineChanged=!0,dt=!1)}),dt&&(ie.curOp.updateMaxLine=!0)),Vi(de,Re.line),Mi(ie,400);var Ht=ae.text.length-(Ue.line-Re.line)-1;ae.full?_a(ie):Re.line==Ue.line&&ae.text.length==1&&!hs(ie.doc,ae)?ia(ie,Re.line,"text"):_a(ie,Re.line,Ue.line+1,Ht);var Rn=hn(ie,"changes"),Qt=hn(ie,"change");if(Qt||Rn){var ci={from:Re,to:Ue,text:ae.text,removed:ae.removed,origin:ae.origin};Qt&&zi(ie,"change",ie,ci),Rn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(ci)}ie.display.selForContextMenu=null}function gu(ie,ae,fe,de,Se){var Re;de||(de=fe),Bn(de,fe)<0&&(Re=[de,fe],fe=Re[0],de=Re[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),es(ie,{from:fe,to:de,text:ae,origin:Se})}function ql(ie,ae,fe,de){fe<ie.line?ie.line+=de:ae<ie.line&&(ie.line=ae,ie.ch=0)}function Da(ie,ae,fe,de){for(var Se=0;Se<ie.length;++Se){var Re=ie[Se],Ue=!0;if(Re.ranges){Re.copied||(Re=ie[Se]=Re.deepCopy(),Re.copied=!0);for(var dt=0;dt<Re.ranges.length;dt++)ql(Re.ranges[dt].anchor,ae,fe,de),ql(Re.ranges[dt].head,ae,fe,de);continue}for(var lt=0;lt<Re.changes.length;++lt){var Ht=Re.changes[lt];if(fe<Ht.from.line)Ht.from=tn(Ht.from.line+de,Ht.from.ch),Ht.to=tn(Ht.to.line+de,Ht.to.ch);else if(ae<=Ht.to.line){Ue=!1;break}}Ue||(ie.splice(0,Se+1),Se=0)}}function rs(ie,ae){var fe=ae.from.line,de=ae.to.line,Se=ae.text.length-(de-fe)-1;Da(ie.done,fe,de,Se),Da(ie.undone,fe,de,Se)}function Bs(ie,ae,fe,de){var Se=ae,Re=ae;return typeof ae=="number"?Re=cn(ie,On(ie,ae)):Se=Rt(ae),Se==null?null:(de(Re,Se)&&ie.cm&&ia(ie.cm,Se,fe),Re)}function os(ie){this.lines=ie,this.parent=null;for(var ae=0,fe=0;fe<ie.length;++fe)ie[fe].parent=this,ae+=ie[fe].height;this.height=ae}os.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var fe=ie,de=ie+ae;fe<de;++fe){var Se=this.lines[fe];this.height-=Se.height,la(Se),zi(Se,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,fe){this.height+=fe,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,fe){for(var de=ie+ae;ie<de;++ie)if(fe(this.lines[ie]))return!0}};function ba(ie){this.children=ie;for(var ae=0,fe=0,de=0;de<ie.length;++de){var Se=ie[de];ae+=Se.chunkSize(),fe+=Se.height,Se.parent=this}this.size=ae,this.height=fe,this.parent=null}ba.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var fe=0;fe<this.children.length;++fe){var de=this.children[fe],Se=de.chunkSize();if(ie<Se){var Re=Math.min(ae,Se-ie),Ue=de.height;if(de.removeInner(ie,Re),this.height-=Ue-de.height,Se==Re&&(this.children.splice(fe--,1),de.parent=null),(ae-=Re)==0)break;ie=0}else ie-=Se}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof os))){var dt=[];this.collapse(dt),this.children=[new os(dt)],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,fe){this.size+=ae.length,this.height+=fe;for(var de=0;de<this.children.length;++de){var Se=this.children[de],Re=Se.chunkSize();if(ie<=Re){if(Se.insertInner(ie,ae,fe),Se.lines&&Se.lines.length>50){for(var Ue=Se.lines.length%25+25,dt=Ue;dt<Se.lines.length;){var lt=new os(Se.lines.slice(dt,dt+=25));Se.height-=lt.height,this.children.splice(++de,0,lt),lt.parent=this}Se.lines=Se.lines.slice(0,Ue),this.maybeSpill()}break}ie-=Re}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),fe=new ba(ae);if(ie.parent){ie.size-=fe.size,ie.height-=fe.height;var Se=Wt(ie.parent.children,ie);ie.parent.children.splice(Se+1,0,fe)}else{var de=new ba(ie.children);de.parent=ie,ie.children=[de,fe],ie=de}fe.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,fe){for(var de=0;de<this.children.length;++de){var Se=this.children[de],Re=Se.chunkSize();if(ie<Re){var Ue=Math.min(ae,Re-ie);if(Se.iterN(ie,Ue,fe))return!0;if((ae-=Ue)==0)break;ie=0}else ie-=Re}}};var Ts=function(ie,ae,fe){if(fe)for(var de in fe)fe.hasOwnProperty(de)&&(this[de]=fe[de]);this.doc=ie,this.node=ae};Ts.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,fe=this.line,de=Rt(fe);if(!(de==null||!ae)){for(var Se=0;Se<ae.length;++Se)ae[Se]==this&&ae.splice(Se--,1);ae.length||(fe.widgets=null);var Re=Ml(this);un(fe,Math.max(0,fe.height-Re)),ie&&(bn(ie,function(){Rl(ie,fe,-Re),ia(ie,de,"widget")}),zi(ie,"lineWidgetCleared",ie,this,de))}},Ts.prototype.changed=function(){var ie=this,ae=this.height,fe=this.doc.cm,de=this.line;this.height=null;var Se=Ml(this)-ae;Se&&(hi(this.doc,de)||un(de,de.height+Se),fe&&bn(fe,function(){fe.curOp.forceUpdate=!0,Rl(fe,de,Se),zi(fe,"lineWidgetChanged",fe,ie,Rt(de))}))},Mn(Ts);function Rl(ie,ae,fe){Vo(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Xd(ie,fe)}function zu(ie,ae,fe,de){var Se=new Ts(ie,fe,de),Re=ie.cm;return Re&&Se.noHScroll&&(Re.display.alignWidgets=!0),Bs(ie,ae,"widget",function(Ue){var dt=Ue.widgets||(Ue.widgets=[]);if(Se.insertAt==null?dt.push(Se):dt.splice(Math.min(dt.length-1,Math.max(0,Se.insertAt)),0,Se),Se.line=Ue,Re&&!hi(ie,Ue)){var lt=Vo(Ue)<ie.scrollTop;un(Ue,Ue.height+Ml(Se)),lt&&Xd(Re,Se.height),Re.curOp.forceUpdate=!0}return!0}),Re&&zi(Re,"lineWidgetAdded",Re,Se,typeof ae=="number"?ae:Rt(ae)),Se}var Cd=0,fn=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++Cd};fn.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&Ol(ie),hn(this,"clear")){var fe=this.find();fe&&zi(this,"clear",fe.from,fe.to)}for(var de=null,Se=null,Re=0;Re<this.lines.length;++Re){var Ue=this.lines[Re],dt=eo(Ue.markedSpans,this);ie&&!this.collapsed?ia(ie,Rt(Ue),"text"):ie&&(dt.to!=null&&(Se=Rt(Ue)),dt.from!=null&&(de=Rt(Ue))),Ue.markedSpans=xr(Ue.markedSpans,dt),dt.from==null&&this.collapsed&&!hi(this.doc,Ue)&&ie&&un(Ue,cu(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var lt=0;lt<this.lines.length;++lt){var Ht=Nr(this.lines[lt]),Rn=sa(Ht);Rn>ie.display.maxLineLength&&(ie.display.maxLine=Ht,ie.display.maxLineLength=Rn,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&&zi(ie,"markerCleared",ie,this,de,Se),ae&&Oc(ie),this.parent&&this.parent.clear()}},fn.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var fe,de,Se=0;Se<this.lines.length;++Se){var Re=this.lines[Se],Ue=eo(Re.markedSpans,this);if(Ue.from!=null&&(fe=tn(ae?Re:Rt(Re),Ue.from),ie==-1))return fe;if(Ue.to!=null&&(de=tn(ae?Re:Rt(Re),Ue.to),ie==1))return de}return fe&&{from:fe,to:de}},fn.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),fe=this,de=this.doc.cm;!ae||!de||bn(de,function(){var Se=ae.line,Re=Rt(ae.line),Ue=Ic(de,Re);if(Ue&&(ll(Ue),de.curOp.selectionChanged=de.curOp.forceUpdate=!0),de.curOp.updateMaxLine=!0,!hi(fe.doc,Se)&&fe.height!=null){var dt=fe.height;fe.height=null;var lt=Ml(fe)-dt;lt&&un(Se,Se.height+lt)}zi(de,"markerChanged",de,ie)})},fn.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)},fn.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)}},Mn(fn);function Rc(ie,ae,fe,de,Se){if(de&&de.shared)return af(ie,ae,fe,de,Se);if(ie.cm&&!ie.cm.curOp)return ai(ie.cm,Rc)(ie,ae,fe,de,Se);var Re=new fn(ie,Se),Ue=Bn(ae,fe);if(de&&Ut(de,Re,!1),Ue>0||Ue==0&&Re.clearWhenEmpty!==!1)return Re;if(Re.replacedWith&&(Re.collapsed=!0,Re.widgetNode=bt("span",[Re.replacedWith],"CodeMirror-widget"),de.handleMouseEvents||Re.widgetNode.setAttribute("cm-ignore-events","true"),de.insertLeft&&(Re.widgetNode.insertLeft=!0)),Re.collapsed){if(zr(ie,ae.line,ae,fe,Re)||ae.line!=fe.line&&zr(ie,fe.line,ae,fe,Re))throw new Error("Inserting collapsed marker partially overlapping an existing one");_n()}Re.addToHistory&&ga(ie,{from:ae,to:fe,origin:"markText"},ie.sel,NaN);var dt=ae.line,lt=ie.cm,Ht;if(ie.iter(dt,fe.line+1,function(Qt){lt&&Re.collapsed&&!lt.options.lineWrapping&&Nr(Qt)==lt.display.maxLine&&(Ht=!0),Re.collapsed&&dt!=ae.line&&un(Qt,0),bo(Qt,new Ir(Re,dt==ae.line?ae.ch:null,dt==fe.line?fe.ch:null)),++dt}),Re.collapsed&&ie.iter(ae.line,fe.line+1,function(Qt){hi(ie,Qt)&&un(Qt,0)}),Re.clearOnEnter&&qt(Re,"beforeCursorEnter",function(){return Re.clear()}),Re.readOnly&&(Wr(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Re.collapsed&&(Re.id=++Cd,Re.atomic=!0),lt){if(Ht&&(lt.curOp.updateMaxLine=!0),Re.collapsed)_a(lt,ae.line,fe.line+1);else if(Re.className||Re.startStyle||Re.endStyle||Re.css||Re.attributes||Re.title)for(var Rn=ae.line;Rn<=fe.line;Rn++)ia(lt,Rn,"text");Re.atomic&&hu(lt.doc),zi(lt,"markerAdded",lt,Re)}return Re}var Xu=function(ie,ae){this.markers=ie,this.primary=ae;for(var fe=0;fe<ie.length;++fe)ie[fe].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();zi(this,"clear")}},Xu.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},Mn(Xu);function af(ie,ae,fe,de,Se){de=Ut(de),de.shared=!1;var Re=[Rc(ie,ae,fe,de,Se)],Ue=Re[0],dt=de.widgetNode;return Ns(ie,function(lt){dt&&(de.widgetNode=dt.cloneNode(!0)),Re.push(Rc(lt,$n(lt,ae),$n(lt,fe),de,Se));for(var Ht=0;Ht<lt.linked.length;++Ht)if(lt.linked[Ht].isParent)return;Ue=Ot(Re)}),new Xu(Re,Ue)}function bd(ie){return ie.findMarks(tn(ie.first,0),ie.clipPos(tn(ie.lastLine())),function(ae){return ae.parent})}function Ed(ie,ae){for(var fe=0;fe<ae.length;fe++){var de=ae[fe],Se=de.find(),Re=ie.clipPos(Se.from),Ue=ie.clipPos(Se.to);if(Bn(Re,Ue)){var dt=Rc(ie,Re,Ue,de.primary,de.primary.type);de.markers.push(dt),dt.parent=de}}}function Dh(ie){for(var ae=function(de){var Se=ie[de],Re=[Se.primary.doc];Ns(Se.primary.doc,function(lt){return Re.push(lt)});for(var Ue=0;Ue<Se.markers.length;Ue++){var dt=Se.markers[Ue];Wt(Re,dt.doc)==-1&&(dt.parent=null,Se.markers.splice(Ue--,1))}},fe=0;fe<ie.length;fe++)ae(fe)}var Qg=0,Gs=function(ie,ae,fe,de,Se){if(!(this instanceof Gs))return new Gs(ie,ae,fe,de,Se);fe==null&&(fe=0),ba.call(this,[new os([new Io("",null)])]),this.first=fe,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=fe;var Re=tn(fe,0);this.sel=na(Re),this.history=new xo(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:Re,to:Re,text:ie}),Xa(this,na(Re),$t)};Gs.prototype=Ee(ba.prototype,{constructor:Gs,iter:function(ie,ae,fe){fe?this.iterN(ie-this.first,ae-ie,fe):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ae){for(var fe=0,de=0;de<ae.length;++de)fe+=ae[de].height;this.insertInner(ie-this.first,ae,fe)},remove:function(ie,ae){this.removeInner(ie-this.first,ae)},getValue:function(ie){var ae=Un(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:qn(function(ie){var ae=tn(this.first,0),fe=this.first+this.size-1;es(this,{from:ae,to:tn(fe,cn(this,fe).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&ud(this.cm,0,0),Xa(this,na(ae),$t)}),replaceRange:function(ie,ae,fe,de){ae=$n(this,ae),fe=fe?$n(this,fe):ae,gu(this,ie,ae,fe,de)},getRange:function(ie,ae,fe){var de=Sn(this,$n(this,ie),$n(this,ae));return fe===!1?de:de.join(fe||this.lineSeparator())},getLine:function(ie){var ae=this.getLineHandle(ie);return ae&&ae.text},getLineHandle:function(ie){if(ni(this,ie))return cn(this,ie)},getLineNumber:function(ie){return Rt(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=cn(this,ie)),Nr(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return $n(this,ie)},getCursor:function(ie){var ae=this.sel.primary(),fe;return ie==null||ie=="head"?fe=ae.head:ie=="anchor"?fe=ae.anchor:ie=="end"||ie=="to"||ie===!1?fe=ae.to():fe=ae.from(),fe},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:qn(function(ie,ae,fe){qa(this,$n(this,typeof ie=="number"?tn(ie,ae||0):ie),null,fe)}),setSelection:qn(function(ie,ae,fe){qa(this,$n(this,ie),$n(this,ae||ie),fe)}),extendSelection:qn(function(ie,ae,fe){Ia(this,$n(this,ie),ae&&$n(this,ae),fe)}),extendSelections:qn(function(ie,ae){$a(this,ii(this,ie),ae)}),extendSelectionsBy:qn(function(ie,ae){var fe=Cn(this.sel.ranges,ie);$a(this,ii(this,fe),ae)}),setSelections:qn(function(ie,ae,fe){if(ie.length){for(var de=[],Se=0;Se<ie.length;Se++)de[Se]=new Ur($n(this,ie[Se].anchor),$n(this,ie[Se].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),Xa(this,Yo(this.cm,de,ae),fe)}}),addSelection:qn(function(ie,ae,fe){var de=this.sel.ranges.slice(0);de.push(new Ur($n(this,ie),$n(this,ae||ie))),Xa(this,Yo(this.cm,de,de.length-1),fe)}),getSelection:function(ie){for(var ae=this.sel.ranges,fe,de=0;de<ae.length;de++){var Se=Sn(this,ae[de].from(),ae[de].to());fe=fe?fe.concat(Se):Se}return ie===!1?fe:fe.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],fe=this.sel.ranges,de=0;de<fe.length;de++){var Se=Sn(this,fe[de].from(),fe[de].to());ie!==!1&&(Se=Se.join(ie||this.lineSeparator())),ae[de]=Se}return ae},replaceSelection:function(ie,ae,fe){for(var de=[],Se=0;Se<this.sel.ranges.length;Se++)de[Se]=ie;this.replaceSelections(de,ae,fe||"+input")},replaceSelections:qn(function(ie,ae,fe){for(var de=[],Se=this.sel,Re=0;Re<Se.ranges.length;Re++){var Ue=Se.ranges[Re];de[Re]={from:Ue.from(),to:Ue.to(),text:this.splitLines(ie[Re]),origin:fe}}for(var dt=ae&&ae!="end"&&ta(this,de,ae),lt=de.length-1;lt>=0;lt--)es(this,de[lt]);dt?da(this,dt):this.cm&&ld(this.cm)}),undo:qn(function(){fu(this,"undo")}),redo:qn(function(){fu(this,"redo")}),undoSelection:qn(function(){fu(this,"undo",!0)}),redoSelection:qn(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,fe=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||++fe;return{undo:ae,redo:fe}},clearHistory:function(){var ie=this;this.history=new xo(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 xo(this.history.maxGeneration);ae.done=Ws(ie.done.slice(0),null,!0),ae.undone=Ws(ie.undone.slice(0),null,!0)},setGutterMarker:qn(function(ie,ae,fe){return Bs(this,ie,"gutter",function(de){var Se=de.gutterMarkers||(de.gutterMarkers={});return Se[ae]=fe,!fe&&ye(Se)&&(de.gutterMarkers=null),!0})}),clearGutter:qn(function(ie){var ae=this;this.iter(function(fe){fe.gutterMarkers&&fe.gutterMarkers[ie]&&Bs(ae,fe,"gutter",function(){return fe.gutterMarkers[ie]=null,ye(fe.gutterMarkers)&&(fe.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!ni(this,ie)||(ae=ie,ie=cn(this,ie),!ie))return null}else if(ae=Rt(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:qn(function(ie,ae,fe){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]=fe;else{if(Ae(fe).test(de[Se]))return!1;de[Se]+=" "+fe}return!0})}),removeLineClass:qn(function(ie,ae,fe){return Bs(this,ie,ae=="gutter"?"gutter":"class",function(de){var Se=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Re=de[Se];if(Re)if(fe==null)de[Se]=null;else{var Ue=Re.match(Ae(fe));if(!Ue)return!1;var dt=Ue.index+Ue[0].length;de[Se]=Re.slice(0,Ue.index)+(!Ue.index||dt==Re.length?"":" ")+Re.slice(dt)||null}else return!1;return!0})}),addLineWidget:qn(function(ie,ae,fe){return zu(this,ie,ae,fe)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,fe){return Rc(this,$n(this,ie),$n(this,ae),fe,fe&&fe.type||"range")},setBookmark:function(ie,ae){var fe={replacedWith:ae&&(ae.nodeType==null?ae.widget:ae),insertLeft:ae&&ae.insertLeft,clearWhenEmpty:!1,shared:ae&&ae.shared,handleMouseEvents:ae&&ae.handleMouseEvents};return ie=$n(this,ie),Rc(this,ie,ie,fe,"bookmark")},findMarksAt:function(ie){ie=$n(this,ie);var ae=[],fe=cn(this,ie.line).markedSpans;if(fe)for(var de=0;de<fe.length;++de){var Se=fe[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,fe){ie=$n(this,ie),ae=$n(this,ae);var de=[],Se=ie.line;return this.iter(ie.line,ae.line+1,function(Re){var Ue=Re.markedSpans;if(Ue)for(var dt=0;dt<Ue.length;dt++){var lt=Ue[dt];!(lt.to!=null&&Se==ie.line&&ie.ch>=lt.to||lt.from==null&&Se!=ie.line||lt.from!=null&&Se==ae.line&&lt.from>=ae.ch)&&(!fe||fe(lt.marker))&&de.push(lt.marker.parent||lt.marker)}++Se}),de},getAllMarks:function(){var ie=[];return this.iter(function(ae){var fe=ae.markedSpans;if(fe)for(var de=0;de<fe.length;++de)fe[de].from!=null&&ie.push(fe[de].marker)}),ie},posFromIndex:function(ie){var ae,fe=this.first,de=this.lineSeparator().length;return this.iter(function(Se){var Re=Se.text.length+de;if(Re>ie)return ae=ie,!0;ie-=Re,++fe}),$n(this,tn(fe,ae))},indexFromPos:function(ie){ie=$n(this,ie);var ae=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var fe=this.lineSeparator().length;return this.iter(this.first,ie.line,function(de){ae+=de.text.length+fe}),ae},copy:function(ie){var ae=new Gs(Un(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,fe=this.first+this.size;ie.from!=null&&ie.from>ae&&(ae=ie.from),ie.to!=null&&ie.to<fe&&(fe=ie.to);var de=new Gs(Un(this,ae,fe),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 fe=this.linked[ae];if(fe.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 xo(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):jn(ie)},lineSeparator:function(){return this.lineSep||`
`},setDirection:qn(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&Zo(this.cm))})}),Gs.prototype.eachLine=Gs.prototype.iter;var Qd=0;function Md(ie){var ae=this;if(Zf(ae),!(sn(ae,ie)||as(ae.display,ie))){li(ie),Ge&&(Qd=+new Date);var fe=yl(ae,ie,!0),de=ie.dataTransfer.files;if(!(!fe||ae.isReadOnly()))if(de&&de.length&&window.FileReader&&window.File)for(var Se=de.length,Re=Array(Se),Ue=0,dt=function(){++Ue==Se&&ai(ae,function(){fe=$n(ae.doc,fe);var oi={from:fe,to:fe,text:ae.doc.splitLines(Re.filter(function(Ji){return Ji!=null}).join(ae.doc.lineSeparator())),origin:"paste"};es(ae.doc,oi),da(ae.doc,na($n(ae.doc,fe),$n(ae.doc,Ta(oi))))})()},lt=function(oi,Ji){if(ae.options.allowDropFileTypes&&Wt(ae.options.allowDropFileTypes,oi.type)==-1){dt();return}var lr=new FileReader;lr.onerror=function(){return dt()},lr.onload=function(){var Pr=lr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Pr)){dt();return}Re[Ji]=Pr,dt()},lr.readAsText(oi)},Ht=0;Ht<de.length;Ht++)lt(de[Ht],Ht);else{if(ae.state.draggingText&&ae.doc.sel.contains(fe)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var Rn=ie.dataTransfer.getData("Text");if(Rn){var Qt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Qt=ae.listSelections()),_s(ae.doc,na(fe,fe)),Qt)for(var ci=0;ci<Qt.length;++ci)gu(ae.doc,"",Qt[ci].anchor,Qt[ci].head,"drag");ae.replaceSelection(Rn,"around","paste"),ae.display.input.focus()}}catch(oi){}}}}function qd(ie,ae){if(Ge&&(!ie.state.draggingText||+new Date-Qd<100)){Li(ae);return}if(!(sn(ie,ae)||as(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!Et)){var fe=qe("img",null,null,"position: fixed; left: 0; top: 0;");fe.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Xe&&(fe.width=fe.height=1,ie.display.wrapper.appendChild(fe),fe._top=fe.offsetTop),ae.dataTransfer.setDragImage(fe,0,0),Xe&&fe.parentNode.removeChild(fe)}}function sf(ie,ae){var fe=yl(ie,ae);if(fe){var de=document.createDocumentFragment();wa(ie,fe,de),ie.display.dragCursor||(ie.display.dragCursor=qe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),ot(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"),fe=[],de=0;de<ae.length;de++){var Se=ae[de].CodeMirror;Se&&fe.push(Se)}fe.length&&fe[0].operation(function(){for(var Re=0;Re<fe.length;Re++)ie(fe[Re])})}}var th=!1;function pu(){th||(Ld(),th=!0)}function Ld(){var ie;qt(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,eh(lf)},100))}),qt(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 fe,de,Se,Re,Ue=0;Ue<ae.length-1;Ue++){var dt=ae[Ue];if(/^(cmd|meta|m)$/i.test(dt))Re=!0;else if(/^a(lt)?$/i.test(dt))fe=!0;else if(/^(c|ctrl|control)$/i.test(dt))de=!0;else if(/^s(hift)?$/i.test(dt))Se=!0;else throw new Error("Unrecognized modifier name: "+dt)}return fe&&(ie="Alt-"+ie),de&&(ie="Ctrl-"+ie),Re&&(ie="Cmd-"+ie),Se&&(ie="Shift-"+ie),ie}function Bh(ie){var ae={};for(var fe in ie)if(ie.hasOwnProperty(fe)){var de=ie[fe];if(/^(name|fallthrough|(de|at)tach)$/.test(fe))continue;if(de=="..."){delete ie[fe];continue}for(var Se=Cn(fe.split(" "),dd),Re=0;Re<Se.length;Re++){var Ue=void 0,dt=void 0;Re==Se.length-1?(dt=Se.join(" "),Ue=de):(dt=Se.slice(0,Re+1).join(" "),Ue="...");var lt=ae[dt];if(!lt)ae[dt]=Ue;else if(lt!=Ue)throw new Error("Inconsistent bindings for "+dt)}delete ie[fe]}for(var Ht in ae)ie[Ht]=ae[Ht];return ie}function eu(ie,ae,fe,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&&fe(Se))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return eu(ie,ae.fallthrough,fe,de);for(var Re=0;Re<ae.fallthrough.length;Re++){var Ue=eu(ie,ae.fallthrough[Re],fe,de);if(Ue)return Ue}}}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,fe){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),!fe&&ae.shiftKey&&de!="Shift"&&(ie="Shift-"+ie),ie}function ih(ie,ae){if(Xe&&ie.keyCode==34&&ie.char)return!1;var fe=Yu[ie.keyCode];return fe==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(fe=ie.code),nh(fe,ie,ae))}function zc(ie){return typeof ie=="string"?jl[ie]:ie}function Cl(ie,ae){for(var fe=ie.doc.sel.ranges,de=[],Se=0;Se<fe.length;Se++){for(var Re=ae(fe[Se]);de.length&&Bn(Re.from,Ot(de).to)<=0;){var Ue=de.pop();if(Bn(Ue.from,Re.from)<0){Re.from=Ue.from;break}}de.push(Re)}bn(ie,function(){for(var dt=de.length-1;dt>=0;dt--)gu(ie.doc,"",de[dt].from,de[dt].to,"+delete");ld(ie)})}function Th(ie,ae,fe){var de=Ye(ie.text,ae+fe,fe);return de<0||de>ie.text.length?null:de}function $s(ie,ae,fe){var de=Th(ie,ae.ch,fe);return de==null?null:new tn(ae.line,de,fe<0?"after":"before")}function Pa(ie,ae,fe,de,Se){if(ie){ae.doc.direction=="rtl"&&(Se=-Se);var Re=dn(fe,ae.doc.direction);if(Re){var Ue=Se<0?Ot(Re):Re[0],dt=Se<0==(Ue.level==1),lt=dt?"after":"before",Ht;if(Ue.level>0||ae.doc.direction=="rtl"){var Rn=Js(ae,fe);Ht=Se<0?fe.text.length-1:0;var Qt=uu(ae,Rn,Ht).top;Ht=Je(function(ci){return uu(ae,Rn,ci).top==Qt},Se<0==(Ue.level==1)?Ue.from:Ue.to-1,Ht),lt=="before"&&(Ht=Th(fe,Ht,1))}else Ht=Se<0?Ue.to:Ue.from;return new tn(de,Ht,lt)}}return new tn(de,Se<0?fe.text.length:0,Se<0?"before":"after")}function ls(ie,ae,fe,de){var Se=dn(ae,ie.doc.direction);if(!Se)return $s(ae,fe,de);fe.ch>=ae.text.length?(fe.ch=ae.text.length,fe.sticky="before"):fe.ch<=0&&(fe.ch=0,fe.sticky="after");var Re=rt(Se,fe.ch,fe.sticky),Ue=Se[Re];if(ie.doc.direction=="ltr"&&Ue.level%2==0&&(de>0?Ue.to>fe.ch:Ue.from<fe.ch))return $s(ae,fe,de);var dt=function(_r,fo){return Th(ae,_r instanceof tn?_r.ch:_r,fo)},lt,Ht=function(_r){return ie.options.lineWrapping?(lt=lt||Js(ie,ae),rd(ie,ae,lt,_r)):{begin:0,end:ae.text.length}},Rn=Ht(fe.sticky=="before"?dt(fe,-1):fe.ch);if(ie.doc.direction=="rtl"||Ue.level==1){var Qt=Ue.level==1==de<0,ci=dt(fe,Qt?1:-1);if(ci!=null&&(Qt?ci<=Ue.to&&ci<=Rn.end:ci>=Ue.from&&ci>=Rn.begin)){var oi=Qt?"before":"after";return new tn(fe.line,ci,oi)}}var Ji=function(_r,fo,ao){for(var Co=function(ws,Pl){return Pl?new tn(fe.line,dt(ws,1),"before"):new tn(fe.line,ws,"after")};_r>=0&&_r<Se.length;_r+=fo){var Qo=Se[_r],so=fo>0==(Qo.level!=1),ha=so?ao.begin:dt(ao.end,-1);if(Qo.from<=ha&&ha<Qo.to||(ha=so?Qo.from:dt(Qo.to,-1),ao.begin<=ha&&ha<ao.end))return Co(ha,so)}},lr=Ji(Re+de,de,Rn);if(lr)return lr;var Pr=de>0?Rn.end:dt(Rn.begin,-1);return Pr!=null&&!(de>0&&Pr==ae.text.length)&&(lr=Ji(de>0?0:Se.length-1,de,Ht(Pr)),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 fe=cn(ie.doc,ae.head.line).text.length;return ae.head.ch==fe&&ae.head.line<ie.lastLine()?{from:ae.head,to:tn(ae.head.line+1,0)}:{from:ae.head,to:tn(ae.head.line,fe)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return Cl(ie,function(ae){return{from:tn(ae.from().line,0),to:$n(ie.doc,tn(ae.to().line+1,0))}})},delLineLeft:function(ie){return Cl(ie,function(ae){return{from:tn(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return Cl(ie,function(ae){var fe=ie.charCoords(ae.head,"div").top+5,de=ie.coordsChar({left:0,top:fe},"div");return{from:de,to:ae.from()}})},delWrappedLineRight:function(ie){return Cl(ie,function(ae){var fe=ie.charCoords(ae.head,"div").top+5,de=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:fe},"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(tn(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(tn(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 fe=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:fe},"div")},An)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var fe=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:fe},"div")},An)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var fe=ie.cursorCoords(ae.head,"div").top+5,de=ie.coordsChar({left:0,top:fe},"div");return de.ch<ie.getLine(de.line).search(/\S/)?Fd(ie,ae.head):de},An)},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=[],fe=ie.listSelections(),de=ie.options.tabSize,Se=0;Se<fe.length;Se++){var Re=fe[Se].from(),Ue=it(ie.getLine(Re.line),Re.ch,de);ae.push(Qn(de-Ue%de))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return bn(ie,function(){for(var ae=ie.listSelections(),fe=[],de=0;de<ae.length;de++)if(ae[de].empty()){var Se=ae[de].head,Re=cn(ie.doc,Se.line).text;if(Re){if(Se.ch==Re.length&&(Se=new tn(Se.line,Se.ch-1)),Se.ch>0)Se=new tn(Se.line,Se.ch+1),ie.replaceRange(Re.charAt(Se.ch-1)+Re.charAt(Se.ch-2),tn(Se.line,Se.ch-2),Se,"+transpose");else if(Se.line>ie.doc.first){var Ue=cn(ie.doc,Se.line-1).text;Ue&&(Se=new tn(Se.line,1),ie.replaceRange(Re.charAt(0)+ie.doc.lineSeparator()+Ue.charAt(Ue.length-1),tn(Se.line-1,Ue.length-1),Se,"+transpose"))}}fe.push(new Ur(Se,Se))}ie.setSelections(fe)})},newlineAndIndent:function(ie){return bn(ie,function(){for(var ae=ie.listSelections(),fe=ae.length-1;fe>=0;fe--)ie.replaceRange(ie.doc.lineSeparator(),ae[fe].anchor,ae[fe].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 fe=cn(ie.doc,ae),de=Nr(fe);return de!=fe&&(ae=Rt(de)),Pa(!0,ie,de,ae,1)}function Du(ie,ae){var fe=cn(ie.doc,ae),de=Eo(fe);return de!=fe&&(ae=Rt(de)),Pa(!0,ie,fe,ae,-1)}function Fd(ie,ae){var fe=Au(ie,ae.line),de=cn(ie.doc,fe.line),Se=dn(de,ie.doc.direction);if(!Se||Se[0].level==0){var Re=Math.max(fe.ch,de.text.search(/\S/)),Ue=ae.line==fe.line&&ae.ch<=Re&&ae.ch;return tn(fe.line,Ue?0:Re,fe.sticky)}return fe}function Hc(ie,ae,fe){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),fe&&(ie.display.shift=!1),Se=ae(ie)!=Nn}finally{ie.display.shift=de,ie.state.suppressEdits=!1}return Se}function rh(ie,ae,fe){for(var de=0;de<ie.state.keyMaps.length;de++){var Se=eu(ae,ie.state.keyMaps[de],fe,ie);if(Se)return Se}return ie.options.extraKeys&&eu(ae,ie.options.extraKeys,fe,ie)||eu(ae,ie.options.keyMap,fe,ie)}var Hu=new Ve;function Cc(ie,ae,fe,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,fe,de))return!0}return Wf(ie,ae,fe,de)}function Wf(ie,ae,fe,de){var Se=rh(ie,ae,de);return Se=="multi"&&(ie.state.keySeq=ae),Se=="handled"&&zi(ie,"keyHandled",ie,ae,fe),(Se=="handled"||Se=="multi")&&(li(fe),Va(ie)),!!Se}function Gf(ie,ae){var fe=ih(ae,!0);return fe?ae.shiftKey&&!ie.state.keySeq?Cc(ie,"Shift-"+fe,ae,function(de){return Hc(ie,de,!0)})||Cc(ie,fe,ae,function(de){if(typeof de=="string"?/^go[A-Z]/.test(de):de.motion)return Hc(ie,de)}):Cc(ie,fe,ae,function(de){return Hc(ie,de)}):!1}function $f(ie,ae,fe){return Cc(ie,"'"+fe+"'",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=nt(),!sn(ae,ie))){Ge&&_e<11&&ie.keyCode==27&&(ie.returnValue=!1);var fe=ie.keyCode;ae.display.shift=fe==16||ie.shiftKey;var de=Gf(ae,ie);Xe&&(Ad=de?fe:null,!de&&fe==88&&!Ei&&(ce?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),ge&&!ce&&!de&&fe==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),fe==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&fg(ae)}}function fg(ie){var ae=ie.display.lineDiv;Dt(ae,"CodeMirror-crosshair");function fe(de){(de.keyCode==18||!de.altKey)&&(ze(ae,"CodeMirror-crosshair"),Kn(document,"keyup",fe),Kn(document,"mouseover",fe))}qt(document,"keyup",fe),qt(document,"mouseover",fe)}function gg(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),sn(this,ie)}function bc(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(as(ae.display,ie)||sn(ae,ie)||ie.ctrlKey&&!ie.altKey||ce&&ie.metaKey)){var fe=ie.keyCode,de=ie.charCode;if(Xe&&fe==Ad){Ad=null,li(ie);return}if(!(Xe&&(!ie.which||ie.which<10)&&Gf(ae,ie))){var Se=String.fromCharCode(de==null?fe:de);Se!="\b"&&($f(ae,ie,Se)||ae.display.input.onKeyPress(ie))}}}var pg=400,mg=function(ie,ae,fe){this.time=ie,this.pos=ae,this.button=fe};mg.prototype.compare=function(ie,ae,fe){return this.time+pg>ie&&Bn(ae,this.pos)==0&&fe==this.button};var kh,oh;function vg(ie,ae){var fe=+new Date;return oh&&oh.compare(fe,ie,ae)?(kh=oh=null,"triple"):kh&&kh.compare(fe,ie,ae)?(oh=new mg(fe,ie,ae),kh=null,"double"):(kh=new mg(fe,ie,ae),oh=null,"single")}function Ec(ie){var ae=this,fe=ae.display;if(!(sn(ae,ie)||fe.activeTouch&&fe.input.supportsTouch())){if(fe.input.ensurePolled(),fe.shift=ie.shiftKey,as(fe,ie)){Le||(fe.scroller.draggable=!1,setTimeout(function(){return fe.scroller.draggable=!0},100));return}if(!Kf(ae,ie)){var de=yl(ae,ie),Se=ar(ie),Re=de?vg(de,Se):"single";window.focus(),Se==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(de&&yg(ae,Se,de,Re,ie))&&(Se==1?de?Sg(ae,de,Re,ie):Gi(ie)==fe.scroller&&li(ie):Se==2?(de&&Ia(ae.doc,de),setTimeout(function(){return fe.input.focus()},20)):Se==3&&(ke?ae.display.input.onContextMenu(ie):Ps(ae)))}}}function yg(ie,ae,fe,de,Se){var Re="Click";return de=="double"?Re="Double"+Re:de=="triple"&&(Re="Triple"+Re),Re=(ae==1?"Left":ae==2?"Middle":"Right")+Re,Cc(ie,nh(Re,Se),Se,function(Ue){if(typeof Ue=="string"&&(Ue=Sl[Ue]),!Ue)return!1;var dt=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),dt=Ue(ie,fe)!=Nn}finally{ie.state.suppressEdits=!1}return dt})}function ah(ie,ae,fe){var de=ie.getOption("configureMouse"),Se=de?de(ie,ae,fe):{};if(Se.unit==null){var Re=se?fe.shiftKey&&fe.metaKey:fe.altKey;Se.unit=Re?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(Se.extend==null||ie.doc.extend)&&(Se.extend=ie.doc.extend||fe.shiftKey),Se.addNew==null&&(Se.addNew=ce?fe.metaKey:fe.ctrlKey),Se.moveOnDrag==null&&(Se.moveOnDrag=!(ce?fe.altKey:fe.ctrlKey)),Se}function Sg(ie,ae,fe,de){Ge?setTimeout(Yt(cs,ie),0):ie.curOp.focus=nt();var Se=ah(ie,fe,de),Re=ie.doc.sel,Ue;ie.options.dragDrop&&Xi&&!ie.isReadOnly()&&fe=="single"&&(Ue=Re.contains(ae))>-1&&(Bn((Ue=Re.ranges[Ue]).from(),ae)<0||ae.xRel>0)&&(Bn(Ue.to(),ae)>0||ae.xRel<0)?xg(ie,de,ae,Se):Wp(ie,de,ae,Se)}function xg(ie,ae,fe,de){var Se=ie.display,Re=!1,Ue=ai(ie,function(Ht){Le&&(Se.scroller.draggable=!1),ie.state.draggingText=!1,Kn(Se.wrapper.ownerDocument,"mouseup",Ue),Kn(Se.wrapper.ownerDocument,"mousemove",dt),Kn(Se.scroller,"dragstart",lt),Kn(Se.scroller,"drop",Ue),Re||(li(Ht),de.addNew||Ia(ie.doc,fe,null,null,de.extend),Le&&!Et||Ge&&_e==9?setTimeout(function(){Se.wrapper.ownerDocument.body.focus({preventScroll:!0}),Se.input.focus()},20):Se.input.focus())}),dt=function(Ht){Re=Re||Math.abs(ae.clientX-Ht.clientX)+Math.abs(ae.clientY-Ht.clientY)>=10},lt=function(){return Re=!0};Le&&(Se.scroller.draggable=!0),ie.state.draggingText=Ue,Ue.copy=!de.moveOnDrag,Se.scroller.dragDrop&&Se.scroller.dragDrop(),qt(Se.wrapper.ownerDocument,"mouseup",Ue),qt(Se.wrapper.ownerDocument,"mousemove",dt),qt(Se.scroller,"dragstart",lt),qt(Se.scroller,"drop",Ue),Ps(ie),setTimeout(function(){return Se.input.focus()},20)}function Pg(ie,ae,fe){if(fe=="char")return new Ur(ae,ae);if(fe=="word")return ie.findWordAt(ae);if(fe=="line")return new Ur(tn(ae.line,0),$n(ie.doc,tn(ae.line+1,0)));var de=fe(ie,ae);return new Ur(de.from,de.to)}function Wp(ie,ae,fe,de){var Se=ie.display,Re=ie.doc;li(ae);var Ue,dt,lt=Re.sel,Ht=lt.ranges;if(de.addNew&&!de.extend?(dt=Re.sel.contains(fe),dt>-1?Ue=Ht[dt]:Ue=new Ur(fe,fe)):(Ue=Re.sel.primary(),dt=Re.sel.primIndex),de.unit=="rectangle")de.addNew||(Ue=new Ur(fe,fe)),fe=yl(ie,ae,!0,!0),dt=-1;else{var Rn=Pg(ie,fe,de.unit);de.extend?Ue=uc(Ue,Rn.anchor,Rn.head,de.extend):Ue=Rn}de.addNew?dt==-1?(dt=Ht.length,Xa(Re,Yo(ie,Ht.concat([Ue]),dt),{scroll:!1,origin:"*mouse"})):Ht.length>1&&Ht[dt].empty()&&de.unit=="char"&&!de.extend?(Xa(Re,Yo(ie,Ht.slice(0,dt).concat(Ht.slice(dt+1)),0),{scroll:!1,origin:"*mouse"}),lt=Re.sel):Oa(Re,dt,Ue,rn):(dt=0,Xa(Re,new Ho([Ue],0),rn),lt=Re.sel);var Qt=fe;function ci(ao){if(Bn(Qt,ao)!=0)if(Qt=ao,de.unit=="rectangle"){for(var Co=[],Qo=ie.options.tabSize,so=it(cn(Re,fe.line).text,fe.ch,Qo),ha=it(cn(Re,ao.line).text,ao.ch,Qo),ws=Math.min(so,ha),Pl=Math.max(so,ha),ks=Math.min(fe.line,ao.line),mu=Math.min(ie.lastLine(),Math.max(fe.line,ao.line));ks<=mu;ks++){var zl=cn(Re,ks).text,fl=ti(zl,ws,Qo);ws==Pl?Co.push(new Ur(tn(ks,fl),tn(ks,fl))):zl.length>fl&&Co.push(new Ur(tn(ks,fl),tn(ks,ti(zl,Pl,Qo))))}Co.length||Co.push(new Ur(fe,fe)),Xa(Re,Yo(ie,lt.ranges.slice(0,dt).concat(Co),dt),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(ao)}else{var vu=Ue,Nl=Pg(ie,ao,de.unit),gl=vu.anchor,Za;Bn(Nl.anchor,gl)>0?(Za=Nl.head,gl=yn(vu.from(),Nl.anchor)):(Za=Nl.anchor,gl=gn(vu.to(),Nl.head));var Is=lt.ranges.slice(0);Is[dt]=qg(ie,new Ur($n(Re,gl),Za)),Xa(Re,Yo(ie,Is,dt),rn)}}var oi=Se.wrapper.getBoundingClientRect(),Ji=0;function lr(ao){var Co=++Ji,Qo=yl(ie,ao,!0,de.unit=="rectangle");if(Qo)if(Bn(Qo,Qt)!=0){ie.curOp.focus=nt(),ci(Qo);var so=fa(Se,Re);(Qo.line>=so.to||Qo.line<so.from)&&setTimeout(ai(ie,function(){Ji==Co&&lr(ao)}),150)}else{var ha=ao.clientY<oi.top?-20:ao.clientY>oi.bottom?20:0;ha&&setTimeout(ai(ie,function(){Ji==Co&&(Se.scroller.scrollTop+=ha,lr(ao))}),50)}}function Pr(ao){ie.state.selectingText=!1,Ji=1/0,ao&&(li(ao),Se.input.focus()),Kn(Se.wrapper.ownerDocument,"mousemove",_r),Kn(Se.wrapper.ownerDocument,"mouseup",fo),Re.history.lastSelOrigin=null}var _r=ai(ie,function(ao){ao.buttons===0||!ar(ao)?Pr(ao):lr(ao)}),fo=ai(ie,Pr);ie.state.selectingText=fo,qt(Se.wrapper.ownerDocument,"mousemove",_r),qt(Se.wrapper.ownerDocument,"mouseup",fo)}function qg(ie,ae){var fe=ae.anchor,de=ae.head,Se=cn(ie.doc,fe.line);if(Bn(fe,de)==0&&fe.sticky==de.sticky)return ae;var Re=dn(Se);if(!Re)return ae;var Ue=rt(Re,fe.ch,fe.sticky),dt=Re[Ue];if(dt.from!=fe.ch&&dt.to!=fe.ch)return ae;var lt=Ue+(dt.from==fe.ch==(dt.level!=1)?0:1);if(lt==0||lt==Re.length)return ae;var Ht;if(de.line!=fe.line)Ht=(de.line-fe.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var Rn=rt(Re,de.ch,de.sticky),Qt=Rn-Ue||(de.ch-fe.ch)*(dt.level==1?-1:1);Rn==lt-1||Rn==lt?Ht=Qt<0:Ht=Qt>0}var ci=Re[lt+(Ht?-1:0)],oi=Ht==(ci.level==1),Ji=oi?ci.from:ci.to,lr=oi?"after":"before";return fe.ch==Ji&&fe.sticky==lr?ae:new Ur(new tn(fe.line,Ji,lr),de)}function Dd(ie,ae,fe,de){var Se,Re;if(ae.touches)Se=ae.touches[0].clientX,Re=ae.touches[0].clientY;else try{Se=ae.clientX,Re=ae.clientY}catch(ci){return!1}if(Se>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;de&&li(ae);var Ue=ie.display,dt=Ue.lineDiv.getBoundingClientRect();if(Re>dt.bottom||!hn(ie,fe))return mi(ae);Re-=dt.top-Ue.viewOffset;for(var lt=0;lt<ie.display.gutterSpecs.length;++lt){var Ht=Ue.gutters.childNodes[lt];if(Ht&&Ht.getBoundingClientRect().right>=Se){var Rn=zn(ie.doc,Re),Qt=ie.display.gutterSpecs[lt];return Nt(ie,fe,ie,Rn,Qt.className,ae),mi(ae)}}}function Kf(ie,ae){return Dd(ie,ae,"gutterClick",!0)}function uf(ie,ae){as(ie.display,ae)||ep(ie,ae)||sn(ie,ae,"contextmenu")||ke||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 fe(de,Se,Re,Ue){ie.defaults[de]=Se,Re&&(ae[de]=Ue?function(dt,lt,Ht){Ht!=sh&&Re(dt,lt,Ht)}:Re)}ie.defineOption=fe,ie.Init=sh,fe("value","",function(de,Se){return de.setValue(Se)},!0),fe("mode",null,function(de,Se){de.doc.modeOption=Se,Fo(de)},!0),fe("indentUnit",2,Fo,!0),fe("indentWithTabs",!1),fe("smartIndent",!0),fe("tabSize",4,function(de){xa(de),ms(de),_a(de)},!0),fe("lineSeparator",null,function(de,Se){if(de.doc.lineSep=Se,!!Se){var Re=[],Ue=de.doc.first;de.doc.iter(function(lt){for(var Ht=0;;){var Rn=lt.text.indexOf(Se,Ht);if(Rn==-1)break;Ht=Rn+Se.length,Re.push(tn(Ue,Rn))}Ue++});for(var dt=Re.length-1;dt>=0;dt--)gu(de.doc,Se,Re[dt],tn(Re[dt].line,Re[dt].ch+Se.length))}}),fe("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(de,Se,Re){de.state.specialChars=new RegExp(Se.source+(Se.test(" ")?"":"| "),"g"),Re!=sh&&de.refresh()}),fe("specialCharPlaceholder",Yi,function(de){return de.refresh()},!0),fe("electricChars",!0),fe("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),fe("spellcheck",!1,function(de,Se){return de.getInputField().spellcheck=Se},!0),fe("autocorrect",!1,function(de,Se){return de.getInputField().autocorrect=Se},!0),fe("autocapitalize",!1,function(de,Se){return de.getInputField().autocapitalize=Se},!0),fe("rtlMoveVisually",!he),fe("wholeLineUpdateBefore",!0),fe("theme","default",function(de){Vf(de),Jr(de)},!0),fe("keyMap","default",function(de,Se,Re){var Ue=zc(Se),dt=Re!=sh&&zc(Re);dt&&dt.detach&&dt.detach(de,Ue),Ue.attach&&Ue.attach(de,dt||null)}),fe("extraKeys",null),fe("configureMouse",null),fe("lineWrapping",!1,np,!0),fe("gutters",[],function(de,Se){de.display.gutterSpecs=po(Se,de.options.lineNumbers),Jr(de)},!0),fe("fixedGutter",!0,function(de,Se){de.display.gutters.style.left=Se?Pd(de.display)+"px":"0",de.refresh()},!0),fe("coverGutterNextToScrollbar",!1,function(de){return lc(de)},!0),fe("scrollbarStyle","native",function(de){Ah(de),lc(de),de.display.scrollbars.setScrollTop(de.doc.scrollTop),de.display.scrollbars.setScrollLeft(de.doc.scrollLeft)},!0),fe("lineNumbers",!1,function(de,Se){de.display.gutterSpecs=po(de.options.gutters,Se),Jr(de)},!0),fe("firstLineNumber",1,Jr,!0),fe("lineNumberFormatter",function(de){return de},Jr,!0),fe("showCursorWhenSelecting",!1,nl,!0),fe("resetSelectionOnContextMenu",!0),fe("lineWiseCopyCut",!0),fe("pasteLinesPerSelection",!0),fe("selectionsMayTouch",!1),fe("readOnly",!1,function(de,Se){Se=="nocursor"&&(ad(de),de.display.input.blur()),de.display.input.readOnlyChanged(Se)}),fe("screenReaderLabel",null,function(de,Se){Se=Se===""?null:Se,de.display.input.screenReaderLabelChanged(Se)}),fe("disableInput",!1,function(de,Se){Se||de.display.input.reset()},!0),fe("dragDrop",!0,Uf),fe("allowDropFileTypes",null),fe("cursorBlinkRate",530),fe("cursorScrollMargin",0),fe("cursorHeight",1,nl,!0),fe("singleCursorHeightPerLine",!0,nl,!0),fe("workTime",100),fe("workDelay",100),fe("flattenSpans",!0,xa,!0),fe("addModeClass",!1,xa,!0),fe("pollInterval",100),fe("undoDepth",200,function(de,Se){return de.doc.history.undoDepth=Se}),fe("historyEventDelay",1250),fe("viewportMargin",10,function(de){return de.refresh()},!0),fe("maxHighlightLength",1e4,xa,!0),fe("moveInputWithCursor",!0,function(de,Se){Se||de.display.input.resetPosition()}),fe("tabindex",null,function(de,Se){return de.display.input.getField().tabIndex=Se||""}),fe("autofocus",null),fe("direction","ltr",function(de,Se){return de.doc.setDirection(Se)},!0),fe("phrases",null)}function Uf(ie,ae,fe){var de=fe&&fe!=sh;if(!ae!=!de){var Se=ie.display.dragFunctions,Re=ae?qt:Kn;Re(ie.display.scroller,"dragstart",Se.start),Re(ie.display.scroller,"dragenter",Se.enter),Re(ie.display.scroller,"dragover",Se.over),Re(ie.display.scroller,"dragleave",Se.leave),Re(ie.display.scroller,"drop",Se.drop)}}function np(ie){ie.options.lineWrapping?(Dt(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(ze(ie.display.wrapper,"CodeMirror-wrap"),ko(ie)),Bo(ie),_a(ie),ms(ie),setTimeout(function(){return lc(ie)},100)}function Ha(ie,ae){var fe=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),Re=this.display=new lo(ie,de,Se,ae);Re.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 Ve,keySeq:null,specialChars:null},ae.autofocus&&!ee&&Re.input.focus(),Ge&&_e<11&&setTimeout(function(){return fe.display.input.reset(!0)},20),Ih(this),pu(),Ol(this),this.curOp.forceUpdate=!0,Wo(this,de),ae.autofocus&&!ee||this.hasFocus()?setTimeout(function(){fe.hasFocus()&&!fe.state.focused&&Na(fe)},20):ad(this);for(var Ue in lh)lh.hasOwnProperty(Ue)&&lh[Ue](this,ae[Ue],sh);Vr(this),ae.finishInit&&ae.finishInit(this);for(var dt=0;dt<Bd.length;++dt)Bd[dt](this);Oc(this),Le&&ae.lineWrapping&&getComputedStyle(Re.lineDiv).textRendering=="optimizelegibility"&&(Re.lineDiv.style.textRendering="auto")}Ha.defaults=wg,Ha.optionHandlers=lh;function Ih(ie){var ae=ie.display;qt(ae.scroller,"mousedown",ai(ie,Ec)),Ge&&_e<11?qt(ae.scroller,"dblclick",ai(ie,function(lt){if(!sn(ie,lt)){var Ht=yl(ie,lt);if(!(!Ht||Kf(ie,lt)||as(ie.display,lt))){li(lt);var Rn=ie.findWordAt(Ht);Ia(ie.doc,Rn.anchor,Rn.head)}}})):qt(ae.scroller,"dblclick",function(lt){return sn(ie,lt)||li(lt)}),qt(ae.scroller,"contextmenu",function(lt){return uf(ie,lt)}),qt(ae.input.getField(),"contextmenu",function(lt){ae.scroller.contains(lt.target)||uf(ie,lt)});var fe,de={end:0};function Se(){ae.activeTouch&&(fe=setTimeout(function(){return ae.activeTouch=null},1e3),de=ae.activeTouch,de.end=+new Date)}function Re(lt){if(lt.touches.length!=1)return!1;var Ht=lt.touches[0];return Ht.radiusX<=1&&Ht.radiusY<=1}function Ue(lt,Ht){if(Ht.left==null)return!0;var Rn=Ht.left-lt.left,Qt=Ht.top-lt.top;return Rn*Rn+Qt*Qt>20*20}qt(ae.scroller,"touchstart",function(lt){if(!sn(ie,lt)&&!Re(lt)&&!Kf(ie,lt)){ae.input.ensurePolled(),clearTimeout(fe);var Ht=+new Date;ae.activeTouch={start:Ht,moved:!1,prev:Ht-de.end<=300?de:null},lt.touches.length==1&&(ae.activeTouch.left=lt.touches[0].pageX,ae.activeTouch.top=lt.touches[0].pageY)}}),qt(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),qt(ae.scroller,"touchend",function(lt){var Ht=ae.activeTouch;if(Ht&&!as(ae,lt)&&Ht.left!=null&&!Ht.moved&&new Date-Ht.start<300){var Rn=ie.coordsChar(ae.activeTouch,"page"),Qt;!Ht.prev||Ue(Ht,Ht.prev)?Qt=new Ur(Rn,Rn):!Ht.prev.prev||Ue(Ht,Ht.prev.prev)?Qt=ie.findWordAt(Rn):Qt=new Ur(tn(Rn.line,0),$n(ie.doc,tn(Rn.line+1,0))),ie.setSelection(Qt.anchor,Qt.head),ie.focus(),li(lt)}Se()}),qt(ae.scroller,"touchcancel",Se),qt(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(_u(ie,ae.scroller.scrollTop),kl(ie,ae.scroller.scrollLeft,!0),Nt(ie,"scroll",ie))}),qt(ae.scroller,"mousewheel",function(lt){return zo(ie,lt)}),qt(ae.scroller,"DOMMouseScroll",function(lt){return zo(ie,lt)}),qt(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(lt){sn(ie,lt)||Li(lt)},over:function(lt){sn(ie,lt)||(sf(ie,lt),Li(lt))},start:function(lt){return qd(ie,lt)},drop:ai(ie,Md),leave:function(lt){sn(ie,lt)||Zf(ie)}};var dt=ae.input.getField();qt(dt,"keyup",function(lt){return gg.call(ie,lt)}),qt(dt,"keydown",ai(ie,hg)),qt(dt,"keypress",ai(ie,bc)),qt(dt,"focus",function(lt){return Na(ie,lt)}),qt(dt,"blur",function(lt){return ad(ie,lt)})}var Bd=[];Ha.defineInitHook=function(ie){return Bd.push(ie)};function xl(ie,ae,fe,de){var Se=ie.doc,Re;fe==null&&(fe="add"),fe=="smart"&&(Se.mode.indent?Re=Wi(ie,ae).state:fe="prev");var Ue=ie.options.tabSize,dt=cn(Se,ae),lt=it(dt.text,null,Ue);dt.stateAfter&&(dt.stateAfter=null);var Ht=dt.text.match(/^\s*/)[0],Rn;if(!de&&!/\S/.test(dt.text))Rn=0,fe="not";else if(fe=="smart"&&(Rn=Se.mode.indent(Re,dt.text.slice(Ht.length),dt.text),Rn==Nn||Rn>150)){if(!de)return;fe="prev"}fe=="prev"?ae>Se.first?Rn=it(cn(Se,ae-1).text,null,Ue):Rn=0:fe=="add"?Rn=lt+ie.options.indentUnit:fe=="subtract"?Rn=lt-ie.options.indentUnit:typeof fe=="number"&&(Rn=lt+fe),Rn=Math.max(0,Rn);var Qt="",ci=0;if(ie.options.indentWithTabs)for(var oi=Math.floor(Rn/Ue);oi;--oi)ci+=Ue,Qt+=" ";if(ci<Rn&&(Qt+=Qn(Rn-ci)),Qt!=Ht)return gu(Se,Qt,tn(ae,0),tn(ae,Ht.length),"+input"),dt.stateAfter=null,!0;for(var Ji=0;Ji<Se.sel.ranges.length;Ji++){var lr=Se.sel.ranges[Ji];if(lr.head.line==ae&&lr.head.ch<Ht.length){var Pr=tn(ae,Ht.length);Oa(Se,Ji,new Ur(Pr,Pr));break}}}var tu=null;function Oh(ie){tu=ie}function uh(ie,ae,fe,de,Se){var Re=ie.doc;ie.display.shift=!1,de||(de=Re.sel);var Ue=+new Date-200,dt=Se=="paste"||ie.state.pasteIncoming>Ue,lt=jn(ae),Ht=null;if(dt&&de.ranges.length>1)if(tu&&tu.text.join(`
`)==ae){if(de.ranges.length%tu.text.length==0){Ht=[];for(var Rn=0;Rn<tu.text.length;Rn++)Ht.push(Re.splitLines(tu.text[Rn]))}}else lt.length==de.ranges.length&&ie.options.pasteLinesPerSelection&&(Ht=Cn(lt,function(_r){return[_r]}));for(var Qt=ie.curOp.updateInput,ci=de.ranges.length-1;ci>=0;ci--){var oi=de.ranges[ci],Ji=oi.from(),lr=oi.to();oi.empty()&&(fe&&fe>0?Ji=tn(Ji.line,Ji.ch-fe):ie.state.overwrite&&!dt?lr=tn(lr.line,Math.min(cn(Re,lr.line).text.length,lr.ch+Ot(lt).length)):dt&&tu&&tu.lineWise&&tu.text.join(`
`)==lt.join(`
`)&&(Ji=lr=tn(Ji.line,0)));var Pr={from:Ji,to:lr,text:Ht?Ht[ci%Ht.length]:lt,origin:Se||(dt?"paste":ie.state.cutIncoming>Ue?"cut":"+input")};es(ie.doc,Pr),zi(ie,"inputRead",ie,Pr)}ae&&!dt&&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 fe=ie.clipboardData&&ie.clipboardData.getData("Text");if(fe)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&bn(ae,function(){return uh(ae,fe,0,null,"paste")}),!0}function bg(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var fe=ie.doc.sel,de=fe.ranges.length-1;de>=0;de--){var Se=fe.ranges[de];if(!(Se.head.ch>100||de&&fe.ranges[de-1].head.line==Se.head.line)){var Re=ie.getModeAt(Se.head),Ue=!1;if(Re.electricChars){for(var dt=0;dt<Re.electricChars.length;dt++)if(ae.indexOf(Re.electricChars.charAt(dt))>-1){Ue=xl(ie,Se.head.line,"smart");break}}else Re.electricInput&&Re.electricInput.test(cn(ie.doc,Se.head.line).text.slice(0,Se.head.ch))&&(Ue=xl(ie,Se.head.line,"smart"));Ue&&zi(ie,"electricInput",ie,Se.head.line)}}}function Eg(ie){for(var ae=[],fe=[],de=0;de<ie.doc.sel.ranges.length;de++){var Se=ie.doc.sel.ranges[de].head.line,Re={anchor:tn(Se,0),head:tn(Se+1,0)};fe.push(Re),ae.push(ie.getRange(Re.anchor,Re.head))}return{text:ae,ranges:fe}}function Mg(ie,ae,fe,de){ie.setAttribute("autocorrect",fe?"":"off"),ie.setAttribute("autocapitalize",de?"":"off"),ie.setAttribute("spellcheck",!!ae)}function Lg(){var ie=qe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=qe("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Le?ie.style.width="1000px":ie.setAttribute("wrap","off"),Be&&(ie.style.border="1px solid black"),Mg(ie),ae}function Td(ie){var ae=ie.optionHandlers,fe=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(de,Se){var Re=this.options,Ue=Re[de];Re[de]==Se&&de!="mode"||(Re[de]=Se,ae.hasOwnProperty(de)&&ai(this,ae[de])(this,Se,Ue),Nt(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,Re=0;Re<Se.length;++Re)if(Se[Re]==de||Se[Re].name==de)return Se.splice(Re,1),!0},addOverlay:si(function(de,Se){var Re=de.token?de:ie.getMode(this.options,de);if(Re.startState)throw new Error("Overlays may not be stateful.");Wn(this.state.overlays,{mode:Re,modeSpec:de,opaque:Se&&Se.opaque,priority:Se&&Se.priority||0},function(Ue){return Ue.priority}),this.state.modeGen++,_a(this)}),removeOverlay:si(function(de){for(var Se=this.state.overlays,Re=0;Re<Se.length;++Re){var Ue=Se[Re].modeSpec;if(Ue==de||typeof de=="string"&&Ue.name==de){Se.splice(Re,1),this.state.modeGen++,_a(this);return}}}),indentLine:si(function(de,Se,Re){typeof Se!="string"&&typeof Se!="number"&&(Se==null?Se=this.options.smartIndent?"smart":"prev":Se=Se?"add":"subtract"),ni(this.doc,de)&&xl(this,de,Se,Re)}),indentSelection:si(function(de){for(var Se=this.doc.sel.ranges,Re=-1,Ue=0;Ue<Se.length;Ue++){var dt=Se[Ue];if(dt.empty())dt.head.line>Re&&(xl(this,dt.head.line,de,!0),Re=dt.head.line,Ue==this.doc.sel.primIndex&&ld(this));else{var lt=dt.from(),Ht=dt.to(),Rn=Math.max(Re,lt.line);Re=Math.min(this.lastLine(),Ht.line-(Ht.ch?0:1))+1;for(var Qt=Rn;Qt<Re;++Qt)xl(this,Qt,de);var ci=this.doc.sel.ranges;lt.ch==0&&Se.length==ci.length&&ci[Ue].from().ch>0&&Oa(this.doc,Ue,new Ur(lt,ci[Ue].to()),$t)}}}),getTokenAt:function(de,Se){return cr(this,de,Se)},getLineTokens:function(de,Se){return cr(this,tn(de),Se,!0)},getTokenTypeAt:function(de){de=$n(this.doc,de);var Se=$i(this,cn(this.doc,de.line)),Re=0,Ue=(Se.length-1)/2,dt=de.ch,lt;if(dt==0)lt=Se[2];else for(;;){var Ht=Re+Ue>>1;if((Ht?Se[Ht*2-1]:0)>=dt)Ue=Ht;else if(Se[Ht*2+1]<dt)Re=Ht+1;else{lt=Se[Ht*2+2];break}}var Rn=lt?lt.indexOf("overlay "):-1;return Rn<0?lt:Rn==0?null:lt.slice(0,Rn-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 Re=[];if(!fe.hasOwnProperty(Se))return Re;var Ue=fe[Se],dt=this.getModeAt(de);if(typeof dt[Se]=="string")Ue[dt[Se]]&&Re.push(Ue[dt[Se]]);else if(dt[Se])for(var lt=0;lt<dt[Se].length;lt++){var Ht=Ue[dt[Se][lt]];Ht&&Re.push(Ht)}else dt.helperType&&Ue[dt.helperType]?Re.push(Ue[dt.helperType]):Ue[dt.name]&&Re.push(Ue[dt.name]);for(var Rn=0;Rn<Ue._global.length;Rn++){var Qt=Ue._global[Rn];Qt.pred(dt,this)&&Wt(Re,Qt.val)==-1&&Re.push(Qt.val)}return Re},getStateAfter:function(de,Se){var Re=this.doc;return de=On(Re,de==null?Re.first+Re.size-1:de),Wi(this,de+1,Se).state},cursorCoords:function(de,Se){var Re,Ue=this.doc.sel.primary();return de==null?Re=Ue.head:typeof de=="object"?Re=$n(this.doc,de):Re=de?Ue.from():Ue.to(),is(this,Re,Se||"page")},charCoords:function(de,Se){return _l(this,$n(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,zn(this.doc,de+this.display.viewOffset)},heightAtLine:function(de,Se,Re){var Ue=!1,dt;if(typeof de=="number"){var lt=this.doc.first+this.doc.size-1;de<this.doc.first?de=this.doc.first:de>lt&&(de=lt,Ue=!0),dt=cn(this.doc,de)}else dt=de;return vs(this,dt,{top:0,left:0},Se||"page",Re||Ue).top+(Ue?this.doc.height-Vo(dt):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,Re,Ue,dt){var lt=this.display;de=is(this,$n(this.doc,de));var Ht=de.bottom,Rn=de.left;if(Se.style.position="absolute",Se.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Se),lt.sizer.appendChild(Se),Ue=="over")Ht=de.top;else if(Ue=="above"||Ue=="near"){var Qt=Math.max(lt.wrapper.clientHeight,this.doc.height),ci=Math.max(lt.sizer.clientWidth,lt.lineSpace.clientWidth);(Ue=="above"||de.bottom+Se.offsetHeight>Qt)&&de.top>Se.offsetHeight?Ht=de.top-Se.offsetHeight:de.bottom+Se.offsetHeight<=Qt&&(Ht=de.bottom),Rn+Se.offsetWidth>ci&&(Rn=ci-Se.offsetWidth)}Se.style.top=Ht+"px",Se.style.left=Se.style.right="",dt=="right"?(Rn=lt.sizer.clientWidth-Se.offsetWidth,Se.style.right="0px"):(dt=="left"?Rn=0:dt=="middle"&&(Rn=(lt.sizer.clientWidth-Se.offsetWidth)/2),Se.style.left=Rn+"px"),Re&&wd(this,{left:Rn,top:Ht,right:Rn+Se.offsetWidth,bottom:Ht+Se.offsetHeight})},triggerOnKeyDown:si(hg),triggerOnKeyPress:si(bc),triggerOnKeyUp:gg,triggerOnMouseDown:si(Ec),execCommand:function(de){if(Sl.hasOwnProperty(de))return Sl[de].call(null,this)},triggerElectric:si(function(de){bg(this,de)}),findPosH:function(de,Se,Re,Ue){var dt=1;Se<0&&(dt=-1,Se=-Se);for(var lt=$n(this.doc,de),Ht=0;Ht<Se&&(lt=cf(this.doc,lt,dt,Re,Ue),!lt.hitSide);++Ht);return lt},moveH:si(function(de,Se){var Re=this;this.extendSelectionsBy(function(Ue){return Re.display.shift||Re.doc.extend||Ue.empty()?cf(Re.doc,Ue.head,de,Se,Re.options.rtlMoveVisually):de<0?Ue.from():Ue.to()},An)}),deleteH:si(function(de,Se){var Re=this.doc.sel,Ue=this.doc;Re.somethingSelected()?Ue.replaceSelection("",null,"+delete"):Cl(this,function(dt){var lt=cf(Ue,dt.head,de,Se,!1);return de<0?{from:lt,to:dt.head}:{from:dt.head,to:lt}})}),findPosV:function(de,Se,Re,Ue){var dt=1,lt=Ue;Se<0&&(dt=-1,Se=-Se);for(var Ht=$n(this.doc,de),Rn=0;Rn<Se;++Rn){var Qt=is(this,Ht,"div");if(lt==null?lt=Qt.left:Qt.left=lt,Ht=hd(this,Qt,dt,Re),Ht.hitSide)break}return Ht},moveV:si(function(de,Se){var Re=this,Ue=this.doc,dt=[],lt=!this.display.shift&&!Ue.extend&&Ue.sel.somethingSelected();if(Ue.extendSelectionsBy(function(Rn){if(lt)return de<0?Rn.from():Rn.to();var Qt=is(Re,Rn.head,"div");Rn.goalColumn!=null&&(Qt.left=Rn.goalColumn),dt.push(Qt.left);var ci=hd(Re,Qt,de,Se);return Se=="page"&&Rn==Ue.sel.primary()&&Xd(Re,_l(Re,ci,"div").top-Qt.top),ci},An),dt.length)for(var Ht=0;Ht<Ue.sel.ranges.length;Ht++)Ue.sel.ranges[Ht].goalColumn=dt[Ht]}),findWordAt:function(de){var Se=this.doc,Re=cn(Se,de.line).text,Ue=de.ch,dt=de.ch;if(Re){var lt=this.getHelper(de,"wordChars");(de.sticky=="before"||dt==Re.length)&&Ue?--Ue:++dt;for(var Ht=Re.charAt(Ue),Rn=Fe(Ht,lt)?function(Qt){return Fe(Qt,lt)}:/\s/.test(Ht)?function(Qt){return/\s/.test(Qt)}:function(Qt){return!/\s/.test(Qt)&&!Fe(Qt)};Ue>0&&Rn(Re.charAt(Ue-1));)--Ue;for(;dt<Re.length&&Rn(Re.charAt(dt));)++dt}return new Ur(tn(de.line,Ue),tn(de.line,dt))},toggleOverwrite:function(de){de!=null&&de==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Dt(this.display.cursorDiv,"CodeMirror-overwrite"):ze(this.display.cursorDiv,"CodeMirror-overwrite"),Nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==nt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:si(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:si(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:tn(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:si(function(de,Se){var Re=this,Ue=function(lt){return typeof lt=="number"||/^\d+$/.test(String(lt))?lt+"px":lt};de!=null&&(this.display.wrapper.style.width=Ue(de)),Se!=null&&(this.display.wrapper.style.height=Ue(Se)),this.options.lineWrapping&&Ss(this);var dt=this.display.viewFrom;this.doc.iter(dt,this.display.viewTo,function(lt){if(lt.widgets){for(var Ht=0;Ht<lt.widgets.length;Ht++)if(lt.widgets[Ht].noHScroll){ia(Re,dt,"widget");break}}++dt}),this.curOp.forceUpdate=!0,Nt(this,"refresh",this)}),operation:function(de){return bn(this,de)},startOperation:function(){return Ol(this)},endOperation:function(){return Oc(this)},refresh:si(function(){var de=this.display.cachedTextHeight;_a(this),this.curOp.forceUpdate=!0,ms(this),ud(this,this.doc.scrollLeft,this.doc.scrollTop),to(this.display),(de==null||Math.abs(de-cu(this.display))>.5||this.options.lineWrapping)&&Bo(this),Nt(this,"refresh",this)}),swapDoc:si(function(de){var Se=this.doc;return Se.cm=null,this.state.selectingText&&this.state.selectingText(),Wo(this,de),ms(this),this.display.input.reset(),ud(this,de.scrollLeft,de.scrollTop),this.curOp.forceScroll=!0,zi(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}},Mn(ie),ie.registerHelper=function(de,Se,Re){fe.hasOwnProperty(de)||(fe[de]=ie[de]={_global:[]}),fe[de][Se]=Re},ie.registerGlobalHelper=function(de,Se,Re,Ue){ie.registerHelper(de,Se,Ue),fe[de]._global.push({pred:Re,val:Ue})}}function cf(ie,ae,fe,de,Se){var Re=ae,Ue=fe,dt=cn(ie,ae.line),lt=Se&&ie.direction=="rtl"?-fe:fe;function Ht(){var fo=ae.line+lt;return fo<ie.first||fo>=ie.first+ie.size?!1:(ae=new tn(fo,ae.ch,ae.sticky),dt=cn(ie,fo))}function Rn(fo){var ao;if(de=="codepoint"){var Co=dt.text.charCodeAt(ae.ch+(de>0?0:-1));isNaN(Co)?ao=null:ao=new tn(ae.line,Math.max(0,Math.min(dt.text.length,ae.ch+fe*(Co>=55296&&Co<56320?2:1))),-fe)}else Se?ao=ls(ie.cm,dt,ae,fe):ao=$s(dt,ae,fe);if(ao==null)if(!fo&&Ht())ae=Pa(Se,ie.cm,dt,ae.line,lt);else return!1;else ae=ao;return!0}if(de=="char"||de=="codepoint")Rn();else if(de=="column")Rn(!0);else if(de=="word"||de=="group")for(var Qt=null,ci=de=="group",oi=ie.cm&&ie.cm.getHelper(ae,"wordChars"),Ji=!0;!(fe<0&&!Rn(!Ji));Ji=!1){var lr=dt.text.charAt(ae.ch)||`
`,Pr=Fe(lr,oi)?"w":ci&&lr==`
`?"n":!ci||/\s/.test(lr)?null:"p";if(ci&&!Ji&&!Pr&&(Pr="s"),Qt&&Qt!=Pr){fe<0&&(fe=1,Rn(),ae.sticky="after");break}if(Pr&&(Qt=Pr),fe>0&&!Rn(!Ji))break}var _r=Jl(ie,ae,Re,Ue,!0);return Ft(Re,_r)&&(_r.hitSide=!0),_r}function hd(ie,ae,fe,de){var Se=ie.doc,Re=ae.left,Ue;if(de=="page"){var dt=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),lt=Math.max(dt-.5*cu(ie.display),3);Ue=(fe>0?ae.bottom:ae.top)+fe*lt}else de=="line"&&(Ue=fe>0?ae.bottom+3:ae.top-3);for(var Ht;Ht=Uu(ie,Re,Ue),!!Ht.outside;){if(fe<0?Ue<=0:Ue>=Se.height){Ht.hitSide=!0;break}Ue+=fe*5}return Ht}var ts=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ve,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ts.prototype.init=function(ie){var ae=this,fe=this,de=fe.cm,Se=fe.div=ie.lineDiv;Mg(Se,de.options.spellcheck,de.options.autocorrect,de.options.autocapitalize);function Re(dt){for(var lt=dt.target;lt;lt=lt.parentNode){if(lt==Se)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(lt.className))break}return!1}qt(Se,"paste",function(dt){!Re(dt)||sn(de,dt)||Cg(dt,de)||_e<=11&&setTimeout(ai(de,function(){return ae.updateFromDOM()}),20)}),qt(Se,"compositionstart",function(dt){ae.composing={data:dt.data,done:!1}}),qt(Se,"compositionupdate",function(dt){ae.composing||(ae.composing={data:dt.data,done:!1})}),qt(Se,"compositionend",function(dt){ae.composing&&(dt.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),qt(Se,"touchstart",function(){return fe.forceCompositionEnd()}),qt(Se,"input",function(){ae.composing||ae.readFromDOMSoon()});function Ue(dt){if(!(!Re(dt)||sn(de,dt))){if(de.somethingSelected())Oh({lineWise:!1,text:de.getSelections()}),dt.type=="cut"&&de.replaceSelection("",null,"cut");else if(de.options.lineWiseCopyCut){var lt=Eg(de);Oh({lineWise:!0,text:lt.text}),dt.type=="cut"&&de.operation(function(){de.setSelections(lt.ranges,0,$t),de.replaceSelection("",null,"cut")})}else return;if(dt.clipboardData){dt.clipboardData.clearData();var Ht=tu.text.join(`
`);if(dt.clipboardData.setData("Text",Ht),dt.clipboardData.getData("Text")==Ht){dt.preventDefault();return}}var Rn=Lg(),Qt=Rn.firstChild;de.display.lineSpace.insertBefore(Rn,de.display.lineSpace.firstChild),Qt.value=tu.text.join(`
`);var ci=document.activeElement;zt(Qt),setTimeout(function(){de.display.lineSpace.removeChild(Rn),ci.focus(),ci==Se&&fe.showPrimarySelection()},50)}}qt(Se,"copy",Ue),qt(Se,"cut",Ue)},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,fe=ae.doc.sel.primary(),de=fe.from(),Se=fe.to();if(ae.display.viewTo==ae.display.viewFrom||de.line>=ae.display.viewTo||Se.line<ae.display.viewFrom){ie.removeAllRanges();return}var Re=df(ae,ie.anchorNode,ie.anchorOffset),Ue=df(ae,ie.focusNode,ie.focusOffset);if(!(Re&&!Re.bad&&Ue&&!Ue.bad&&Bn(yn(Re,Ue),de)==0&&Bn(gn(Re,Ue),Se)==0)){var dt=ae.display.view,lt=de.line>=ae.display.viewFrom&&ch(ae,de)||{node:dt[0].measure.map[2],offset:0},Ht=Se.line<ae.display.viewTo&&ch(ae,Se);if(!Ht){var Rn=dt[dt.length-1].measure,Qt=Rn.maps?Rn.maps[Rn.maps.length-1]:Rn.map;Ht={node:Qt[Qt.length-1],offset:Qt[Qt.length-2]-Qt[Qt.length-3]}}if(!lt||!Ht){ie.removeAllRanges();return}var ci=ie.rangeCount&&ie.getRangeAt(0),oi;try{oi=He(lt.node,lt.offset,Ht.offset,Ht.node)}catch(Ji){}oi&&(!ge&&ae.state.focused?(ie.collapse(lt.node,lt.offset),oi.collapsed||(ie.removeAllRanges(),ie.addRange(oi))):(ie.removeAllRanges(),ie.addRange(oi)),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){ot(this.cm.display.cursorDiv,ie.cursors),ot(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 wt(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():bn(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&&Pt&&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 fe=df(ae,ie.anchorNode,ie.anchorOffset),de=df(ae,ie.focusNode,ie.focusOffset);fe&&de&&bn(ae,function(){Xa(ae.doc,na(fe,de),$t),(fe.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,fe=ie.doc.sel.primary(),de=fe.from(),Se=fe.to();if(de.ch==0&&de.line>ie.firstLine()&&(de=tn(de.line-1,cn(ie.doc,de.line-1).length)),Se.ch==cn(ie.doc,Se.line).text.length&&Se.line<ie.lastLine()&&(Se=tn(Se.line+1,0)),de.line<ae.viewFrom||Se.line>ae.viewTo-1)return!1;var Re,Ue,dt;de.line==ae.viewFrom||(Re=ul(ie,de.line))==0?(Ue=Rt(ae.view[0].line),dt=ae.view[0].node):(Ue=Rt(ae.view[Re].line),dt=ae.view[Re-1].node.nextSibling);var lt=ul(ie,Se.line),Ht,Rn;if(lt==ae.view.length-1?(Ht=ae.viewTo-1,Rn=ae.lineDiv.lastChild):(Ht=Rt(ae.view[lt+1].line)-1,Rn=ae.view[lt+1].node.previousSibling),!dt)return!1;for(var Qt=ie.doc.splitLines(dh(ie,dt,Rn,Ue,Ht)),ci=Sn(ie.doc,tn(Ue,0),tn(Ht,cn(ie.doc,Ht).text.length));Qt.length>1&&ci.length>1;)if(Ot(Qt)==Ot(ci))Qt.pop(),ci.pop(),Ht--;else if(Qt[0]==ci[0])Qt.shift(),ci.shift(),Ue++;else break;for(var oi=0,Ji=0,lr=Qt[0],Pr=ci[0],_r=Math.min(lr.length,Pr.length);oi<_r&&lr.charCodeAt(oi)==Pr.charCodeAt(oi);)++oi;for(var fo=Ot(Qt),ao=Ot(ci),Co=Math.min(fo.length-(Qt.length==1?oi:0),ao.length-(ci.length==1?oi:0));Ji<Co&&fo.charCodeAt(fo.length-Ji-1)==ao.charCodeAt(ao.length-Ji-1);)++Ji;if(Qt.length==1&&ci.length==1&&Ue==de.line)for(;oi&&oi>de.ch&&fo.charCodeAt(fo.length-Ji-1)==ao.charCodeAt(ao.length-Ji-1);)oi--,Ji++;Qt[Qt.length-1]=fo.slice(0,fo.length-Ji).replace(/^\u200b+/,""),Qt[0]=Qt[0].slice(oi).replace(/\u200b+$/,"");var Qo=tn(Ue,oi),so=tn(Ht,ci.length?Ot(ci).length-Ji: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())&&bn(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()||ai(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 fe=Ic(ie,ae.line);if(!fe||fe.hidden)return null;var de=cn(ie.doc,ae.line),Se=kc(fe,de,ae.line),Re=dn(de,ie.doc.direction),Ue="left";if(Re){var dt=rt(Re,ae.ch);Ue=dt%2?"right":"left"}var lt=Eu(Se.map,ae.ch,Ue);return lt.offset=lt.collapse=="right"?lt.end:lt.start,lt}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,fe,de,Se){var Re="",Ue=!1,dt=ie.doc.lineSeparator(),lt=!1;function Ht(oi){return function(Ji){return Ji.id==oi}}function Rn(){Ue&&(Re+=dt,lt&&(Re+=dt),Ue=lt=!1)}function Qt(oi){oi&&(Rn(),Re+=oi)}function ci(oi){if(oi.nodeType==1){var Ji=oi.getAttribute("cm-text");if(Ji){Qt(Ji);return}var lr=oi.getAttribute("cm-marker"),Pr;if(lr){var _r=ie.findMarks(tn(de,0),tn(Se+1,0),Ht(+lr));_r.length&&(Pr=_r[0].find(0))&&Qt(Sn(ie.doc,Pr.from,Pr.to).join(dt));return}if(oi.getAttribute("contenteditable")=="false")return;var fo=/^(pre|div|p|li|table|br)$/i.test(oi.nodeName);if(!/^br$/i.test(oi.nodeName)&&oi.textContent.length==0)return;fo&&Rn();for(var ao=0;ao<oi.childNodes.length;ao++)ci(oi.childNodes[ao]);/^(pre|p)$/i.test(oi.nodeName)&&(lt=!0),fo&&(Ue=!0)}else oi.nodeType==3&&Qt(oi.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ci(ae),ae!=fe;)ae=ae.nextSibling,lt=!1;return Re}function df(ie,ae,fe){var de;if(ae==ie.display.lineDiv){if(de=ie.display.lineDiv.childNodes[fe],!de)return kd(ie.clipPos(tn(ie.display.viewTo-1)),!0);ae=null,fe=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 Re=ie.display.view[Se];if(Re.node==de)return ip(Re,ae,fe)}}function ip(ie,ae,fe){var de=ie.text.firstChild,Se=!1;if(!ae||!wt(de,ae))return kd(tn(Rt(ie.line),0),!0);if(ae==de&&(Se=!0,ae=de.childNodes[fe],fe=0,!ae)){var Re=ie.rest?Ot(ie.rest):ie.line;return kd(tn(Rt(Re),Re.text.length),Se)}var Ue=ae.nodeType==3?ae:null,dt=ae;for(!Ue&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(Ue=ae.firstChild,fe&&(fe=Ue.nodeValue.length));dt.parentNode!=de;)dt=dt.parentNode;var lt=ie.measure,Ht=lt.maps;function Rn(Pr,_r,fo){for(var ao=-1;ao<(Ht?Ht.length:0);ao++)for(var Co=ao<0?lt.map:Ht[ao],Qo=0;Qo<Co.length;Qo+=3){var so=Co[Qo+2];if(so==Pr||so==_r){var ha=Rt(ao<0?ie.line:ie.rest[ao]),ws=Co[Qo]+fo;return(fo<0||so!=Pr)&&(ws=Co[Qo+(fo?1:0)]),tn(ha,ws)}}}var Qt=Rn(Ue,dt,fe);if(Qt)return kd(Qt,Se);for(var ci=dt.nextSibling,oi=Ue?Ue.nodeValue.length-fe:0;ci;ci=ci.nextSibling){if(Qt=Rn(ci,ci.firstChild,0),Qt)return kd(tn(Qt.line,Qt.ch-oi),Se);oi+=ci.textContent.length}for(var Ji=dt.previousSibling,lr=fe;Ji;Ji=Ji.previousSibling){if(Qt=Rn(Ji,Ji.firstChild,-1),Qt)return kd(tn(Qt.line,Qt.ch+lr),Se);lr+=Ji.textContent.length}}var hl=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ve,this.hasSelection=!1,this.composing=null};hl.prototype.init=function(ie){var ae=this,fe=this,de=this.cm;this.createField(ie);var Se=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),Be&&(Se.style.width="0px"),qt(Se,"input",function(){Ge&&_e>=9&&ae.hasSelection&&(ae.hasSelection=null),fe.poll()}),qt(Se,"paste",function(Ue){sn(de,Ue)||Cg(Ue,de)||(de.state.pasteIncoming=+new Date,fe.fastPoll())});function Re(Ue){if(!sn(de,Ue)){if(de.somethingSelected())Oh({lineWise:!1,text:de.getSelections()});else if(de.options.lineWiseCopyCut){var dt=Eg(de);Oh({lineWise:!0,text:dt.text}),Ue.type=="cut"?de.setSelections(dt.ranges,null,$t):(fe.prevInput="",Se.value=dt.text.join(`
`),zt(Se))}else return;Ue.type=="cut"&&(de.state.cutIncoming=+new Date)}}qt(Se,"cut",Re),qt(Se,"copy",Re),qt(ie.scroller,"paste",function(Ue){if(!(as(ie,Ue)||sn(de,Ue))){if(!Se.dispatchEvent){de.state.pasteIncoming=+new Date,fe.focus();return}var dt=new Event("paste");dt.clipboardData=Ue.clipboardData,Se.dispatchEvent(dt)}}),qt(ie.lineSpace,"selectstart",function(Ue){as(ie,Ue)||li(Ue)}),qt(Se,"compositionstart",function(){var Ue=de.getCursor("from");fe.composing&&fe.composing.range.clear(),fe.composing={start:Ue,range:de.markText(Ue,de.getCursor("to"),{className:"CodeMirror-composing"})}}),qt(Se,"compositionend",function(){fe.composing&&(fe.poll(),fe.composing.range.clear(),fe.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,fe=ie.doc,de=od(ie);if(ie.options.moveInputWithCursor){var Se=is(ie,fe.sel.primary().head,"div"),Re=ae.wrapper.getBoundingClientRect(),Ue=ae.lineDiv.getBoundingClientRect();de.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,Se.top+Ue.top-Re.top)),de.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,Se.left+Ue.left-Re.left))}return de},hl.prototype.showSelection=function(ie){var ae=this.cm,fe=ae.display;ot(fe.cursorDiv,ie.cursors),ot(fe.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 fe=ae.getSelection();this.textarea.value=fe,ae.state.focused&&zt(this.textarea),Ge&&_e>=9&&(this.hasSelection=fe)}else ie||(this.prevInput=this.textarea.value="",Ge&&_e>=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||nt()!=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 fe(){var de=ae.poll();!de&&!ie?(ie=!0,ae.polling.set(60,fe)):(ae.pollingFast=!1,ae.slowPoll())}ae.polling.set(20,fe)},hl.prototype.poll=function(){var ie=this,ae=this.cm,fe=this.textarea,de=this.prevInput;if(this.contextMenuPending||!ae.state.focused||Ne(fe)&&!de&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var Se=fe.value;if(Se==de&&!ae.somethingSelected())return!1;if(Ge&&_e>=9&&this.hasSelection===Se||ce&&/[\uf700-\uf7ff]/.test(Se))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Re=Se.charCodeAt(0);if(Re==8203&&!de&&(de="\u200B"),Re==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ue=0,dt=Math.min(de.length,Se.length);Ue<dt&&de.charCodeAt(Ue)==Se.charCodeAt(Ue);)++Ue;return bn(ae,function(){uh(ae,Se.slice(Ue),de.length-Ue,null,ie.composing?"*compose":null),Se.length>1e3||Se.indexOf(`
`)>-1?fe.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(){Ge&&_e>=9&&(this.hasSelection=null),this.fastPoll()},hl.prototype.onContextMenu=function(ie){var ae=this,fe=ae.cm,de=fe.display,Se=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Re=yl(fe,ie),Ue=de.scroller.scrollTop;if(!Re||Xe)return;var dt=fe.options.resetSelectionOnContextMenu;dt&&fe.doc.sel.contains(Re)==-1&&ai(fe,Xa)(fe.doc,na(Re),$t);var lt=Se.style.cssText,Ht=ae.wrapper.style.cssText,Rn=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",Se.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(ie.clientY-Rn.top-5)+"px; left: "+(ie.clientX-Rn.left-5)+`px;
z-index: 1000; background: `+(Ge?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Qt;Le&&(Qt=window.scrollY),de.input.focus(),Le&&window.scrollTo(null,Qt),de.input.reset(),fe.somethingSelected()||(Se.value=ae.prevInput=" "),ae.contextMenuPending=oi,de.selForContextMenu=fe.doc.sel,clearTimeout(de.detectingSelectAll);function ci(){if(Se.selectionStart!=null){var lr=fe.somethingSelected(),Pr="\u200B"+(lr?Se.value:"");Se.value="\u21DA",Se.value=Pr,ae.prevInput=lr?"":"\u200B",Se.selectionStart=1,Se.selectionEnd=Pr.length,de.selForContextMenu=fe.doc.sel}}function oi(){if(ae.contextMenuPending==oi&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=Ht,Se.style.cssText=lt,Ge&&_e<9&&de.scrollbars.setScrollTop(de.scroller.scrollTop=Ue),Se.selectionStart!=null)){(!Ge||Ge&&_e<9)&&ci();var lr=0,Pr=function(){de.selForContextMenu==fe.doc.sel&&Se.selectionStart==0&&Se.selectionEnd>0&&ae.prevInput=="\u200B"?ai(fe,za)(fe):lr++<10?de.detectingSelectAll=setTimeout(Pr,500):(de.selForContextMenu=null,de.input.reset())};de.detectingSelectAll=setTimeout(Pr,200)}}if(Ge&&_e>=9&&ci(),ke){Li(ie);var Ji=function(){Kn(window,"mouseup",Ji),setTimeout(oi,20)};qt(window,"mouseup",Ji)}else setTimeout(oi,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 fe=nt();ae.autofocus=fe==ie||ie.getAttribute("autofocus")!=null&&fe==document.body}function de(){ie.value=dt.getValue()}var Se;if(ie.form&&(qt(ie.form,"submit",de),!ae.leaveSubmitMethodAlone)){var Re=ie.form;Se=Re.submit;try{var Ue=Re.submit=function(){de(),Re.submit=Se,Re.submit(),Re.submit=Ue}}catch(lt){}}ae.finishInit=function(lt){lt.save=de,lt.getTextArea=function(){return ie},lt.toTextArea=function(){lt.toTextArea=isNaN,de(),ie.parentNode.removeChild(lt.getWrapperElement()),ie.style.display="",ie.form&&(Kn(ie.form,"submit",de),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=Se))}},ie.style.display="none";var dt=Ha(function(lt){return ie.parentNode.insertBefore(lt,ie.nextSibling)},ae);return dt}function Id(ie){ie.off=Kn,ie.on=qt,ie.wheelEventPixels=Mo,ie.Doc=Gs,ie.splitLines=jn,ie.countColumn=it,ie.findColumn=ti,ie.isWordChar=De,ie.Pass=Nn,ie.signal=Nt,ie.Line=Io,ie.changeEnd=Ta,ie.scrollbarModel=of,ie.Pos=tn,ie.cmpPos=Bn,ie.modes=ui,ie.mimeModes=vi,ie.resolveMode=Gt,ie.getMode=Kt,ie.modeExtensions=jt,ie.extendMode=ft,ie.copyState=an,ie.startState=Bt,ie.innerMode=vn,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=fn,ie.LineWidget=Ts,ie.e_preventDefault=li,ie.e_stopPropagation=pi,ie.e_stop=Li,ie.addClass=Dt,ie.contains=wt,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 Mn(Gs),Ha.inputStyles={textarea:hl,contenteditable:ts},Ha.defineMode=function(ie){!Ha.defaults.mode&&ie!="null"&&(Ha.defaults.mode=ie),bi.apply(this,arguments)},Ha.defineMIME=In,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,Pn,pe){(function(ge){ge(pe(89780),pe(15525),pe(98101))})(function(ge){"use strict";ge.defineMode("markdown",function(Oe,Ke){var st=ge.getMode(Oe,"text/html"),Ge=st.name=="null";function _e(it){if(ge.findModeByName){var Ve=ge.findModeByName(it);Ve&&(it=Ve.mime||Ve.mimes[0])}var Wt=ge.getMode(Oe,it);return Wt.name=="null"?null:Wt}Ke.highlightFormatting===void 0&&(Ke.highlightFormatting=!1),Ke.maxBlockquoteDepth===void 0&&(Ke.maxBlockquoteDepth=0),Ke.taskLists===void 0&&(Ke.taskLists=!1),Ke.strikethrough===void 0&&(Ke.strikethrough=!1),Ke.emoji===void 0&&(Ke.emoji=!1),Ke.fencedCodeBlockHighlighting===void 0&&(Ke.fencedCodeBlockHighlighting=!0),Ke.fencedCodeBlockDefaultMode===void 0&&(Ke.fencedCodeBlockDefaultMode="text/plain"),Ke.xml===void 0&&(Ke.xml=!0),Ke.tokenTypeOverrides===void 0&&(Ke.tokenTypeOverrides={});var Le={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 Tt in Le)Le.hasOwnProperty(Tt)&&Ke.tokenTypeOverrides[Tt]&&(Le[Tt]=Ke.tokenTypeOverrides[Tt]);var Pt=/^([*\-_])(?:\s*\1){2,}\s*$/,Xe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Et=/^\[(x| )\](?=\s)/i,ct=Ke.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,It=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Be=/^[^#!\[\]*_\\<>` "'(~:]+/,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 he(it,Ve,Wt){return Ve.f=Ve.inline=Wt,Wt(it,Ve)}function ve(it,Ve,Wt){return Ve.f=Ve.block=Wt,Wt(it,Ve)}function be(it){return!it||!/\S/.test(it.string)}function ke(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 Ve=Ge;if(!Ve){var Wt=ge.innerMode(st,it.htmlState);Ve=Wt.mode.name=="xml"&&Wt.state.tagStart===null&&!Wt.state.context&&Wt.state.tokenize.isInText}Ve&&(it.f=bt,it.block=Ae,it.htmlState=null)}return it.trailingSpace=0,it.trailingSpaceNewLine=!1,it.prevLine=it.thisLine,it.thisLine={stream:null},null}function Ae(it,Ve){var Wt=it.column()===Ve.indentation,Ln=be(Ve.prevLine.stream),Nn=Ve.indentedCode,$t=Ve.prevLine.hr,rn=Ve.list!==!1,An=(Ve.listStack[Ve.listStack.length-1]||0)+3;Ve.indentedCode=!1;var ti=Ve.indentation;if(Ve.indentationDiff===null&&(Ve.indentationDiff=Ve.indentation,rn)){for(Ve.list=null;ti<Ve.listStack[Ve.listStack.length-1];)Ve.listStack.pop(),Ve.listStack.length?Ve.indentation=Ve.listStack[Ve.listStack.length-1]:Ve.list=!1;Ve.list!==!1&&(Ve.indentationDiff=ti-Ve.listStack[Ve.listStack.length-1])}var xn=!Ln&&!$t&&!Ve.prevLine.header&&(!rn||!Nn)&&!Ve.prevLine.fencedCodeEnd,Qn=(Ve.list===!1||$t||Ln)&&Ve.indentation<=An&&it.match(Pt),Ot=null;if(Ve.indentationDiff>=4&&(Nn||Ve.prevLine.fencedCodeEnd||Ve.prevLine.header||Ln))return it.skipToEnd(),Ve.indentedCode=!0,Le.code;if(it.eatSpace())return null;if(Wt&&Ve.indentation<=An&&(Ot=it.match(ct))&&Ot[1].length<=6)return Ve.quote=0,Ve.header=Ot[1].length,Ve.thisLine.header=!0,Ke.highlightFormatting&&(Ve.formatting="header"),Ve.f=Ve.inline,ot(Ve);if(Ve.indentation<=An&&it.eat(">"))return Ve.quote=Wt?1:Ve.quote+1,Ke.highlightFormatting&&(Ve.formatting="quote"),it.eatSpace(),ot(Ve);if(!Qn&&!Ve.setext&&Wt&&Ve.indentation<=An&&(Ot=it.match(Xe))){var Cn=Ot[1]?"ol":"ul";return Ve.indentation=ti+it.current().length,Ve.list=!0,Ve.quote=0,Ve.listStack.push(Ve.indentation),Ve.em=!1,Ve.strong=!1,Ve.code=!1,Ve.strikethrough=!1,Ke.taskLists&&it.match(Et,!1)&&(Ve.taskList=!0),Ve.f=Ve.inline,Ke.highlightFormatting&&(Ve.formatting=["list","list-"+Cn]),ot(Ve)}else{if(Wt&&Ve.indentation<=An&&(Ot=it.match(ne,!0)))return Ve.quote=0,Ve.fencedEndRE=new RegExp(Ot[1]+"+ *$"),Ve.localMode=Ke.fencedCodeBlockHighlighting&&_e(Ot[2]||Ke.fencedCodeBlockDefaultMode),Ve.localMode&&(Ve.localState=ge.startState(Ve.localMode)),Ve.f=Ve.block=Ze,Ke.highlightFormatting&&(Ve.formatting="code-block"),Ve.code=-1,ot(Ve);if(Ve.setext||(!xn||!rn)&&!Ve.quote&&Ve.list===!1&&!Ve.code&&!Qn&&!ee.test(it.string)&&(Ot=it.lookAhead(1))&&(Ot=Ot.match(It)))return Ve.setext?(Ve.header=Ve.setext,Ve.setext=0,it.skipToEnd(),Ke.highlightFormatting&&(Ve.formatting="header")):(Ve.header=Ot[0].charAt(0)=="="?1:2,Ve.setext=Ve.header),Ve.thisLine.header=!0,Ve.f=Ve.inline,ot(Ve);if(Qn)return it.skipToEnd(),Ve.hr=!0,Ve.thisLine.hr=!0,Le.hr;if(it.peek()==="[")return he(it,Ve,ht)}return he(it,Ve,Ve.inline)}function ze(it,Ve){var Wt=st.token(it,Ve.htmlState);if(!Ge){var Ln=ge.innerMode(st,Ve.htmlState);(Ln.mode.name=="xml"&&Ln.state.tagStart===null&&!Ln.state.context&&Ln.state.tokenize.isInText||Ve.md_inside&&it.current().indexOf(">")>-1)&&(Ve.f=bt,Ve.block=Ae,Ve.htmlState=null)}return Wt}function Ze(it,Ve){var Wt=Ve.listStack[Ve.listStack.length-1]||0,Ln=Ve.indentation<Wt,Nn=Wt+3;if(Ve.fencedEndRE&&Ve.indentation<=Nn&&(Ln||it.match(Ve.fencedEndRE))){Ke.highlightFormatting&&(Ve.formatting="code-block");var $t;return Ln||($t=ot(Ve)),Ve.localMode=Ve.localState=null,Ve.block=Ae,Ve.f=bt,Ve.fencedEndRE=null,Ve.code=0,Ve.thisLine.fencedCodeEnd=!0,Ln?ve(it,Ve,Ve.block):$t}else return Ve.localMode?Ve.localMode.token(it,Ve.localState):(it.skipToEnd(),Le.code)}function ot(it){var Ve=[];if(it.formatting){Ve.push(Le.formatting),typeof it.formatting=="string"&&(it.formatting=[it.formatting]);for(var Wt=0;Wt<it.formatting.length;Wt++)Ve.push(Le.formatting+"-"+it.formatting[Wt]),it.formatting[Wt]==="header"&&Ve.push(Le.formatting+"-"+it.formatting[Wt]+"-"+it.header),it.formatting[Wt]==="quote"&&(!Ke.maxBlockquoteDepth||Ke.maxBlockquoteDepth>=it.quote?Ve.push(Le.formatting+"-"+it.formatting[Wt]+"-"+it.quote):Ve.push("error"))}if(it.taskOpen)return Ve.push("meta"),Ve.length?Ve.join(" "):null;if(it.taskClosed)return Ve.push("property"),Ve.length?Ve.join(" "):null;if(it.linkHref?Ve.push(Le.linkHref,"url"):(it.strong&&Ve.push(Le.strong),it.em&&Ve.push(Le.em),it.strikethrough&&Ve.push(Le.strikethrough),it.emoji&&Ve.push(Le.emoji),it.linkText&&Ve.push(Le.linkText),it.code&&Ve.push(Le.code),it.image&&Ve.push(Le.image),it.imageAltText&&Ve.push(Le.imageAltText,"link"),it.imageMarker&&Ve.push(Le.imageMarker)),it.header&&Ve.push(Le.header,Le.header+"-"+it.header),it.quote&&(Ve.push(Le.quote),!Ke.maxBlockquoteDepth||Ke.maxBlockquoteDepth>=it.quote?Ve.push(Le.quote+"-"+it.quote):Ve.push(Le.quote+"-"+Ke.maxBlockquoteDepth)),it.list!==!1){var Ln=(it.listStack.length-1)%3;Ln?Ln===1?Ve.push(Le.list2):Ve.push(Le.list3):Ve.push(Le.list1)}return it.trailingSpaceNewLine?Ve.push("trailing-space-new-line"):it.trailingSpace&&Ve.push("trailing-space-"+(it.trailingSpace%2?"a":"b")),Ve.length?Ve.join(" "):null}function qe(it,Ve){if(it.match(Be,!0))return ot(Ve)}function bt(it,Ve){var Wt=Ve.text(it,Ve);if(typeof Wt!="undefined")return Wt;if(Ve.list)return Ve.list=null,ot(Ve);if(Ve.taskList){var Ln=it.match(Et,!0)[1]===" ";return Ln?Ve.taskOpen=!0:Ve.taskClosed=!0,Ke.highlightFormatting&&(Ve.formatting="task"),Ve.taskList=!1,ot(Ve)}if(Ve.taskOpen=!1,Ve.taskClosed=!1,Ve.header&&it.match(/^#+$/,!0))return Ke.highlightFormatting&&(Ve.formatting="header"),ot(Ve);var Nn=it.next();if(Ve.linkTitle){Ve.linkTitle=!1;var $t=Nn;Nn==="("&&($t=")"),$t=($t+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var rn="^\\s*(?:[^"+$t+"\\\\]+|\\\\\\\\|\\\\.)"+$t;if(it.match(new RegExp(rn),!0))return Le.linkHref}if(Nn==="`"){var An=Ve.formatting;Ke.highlightFormatting&&(Ve.formatting="code"),it.eatWhile("`");var ti=it.current().length;if(Ve.code==0&&(!Ve.quote||ti==1))return Ve.code=ti,ot(Ve);if(ti==Ve.code){var xn=ot(Ve);return Ve.code=0,xn}else return Ve.formatting=An,ot(Ve)}else if(Ve.code)return ot(Ve);if(Nn==="\\"&&(it.next(),Ke.highlightFormatting)){var Qn=ot(Ve),Ot=Le.formatting+"-escape";return Qn?Qn+" "+Ot:Ot}if(Nn==="!"&&it.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ve.imageMarker=!0,Ve.image=!0,Ke.highlightFormatting&&(Ve.formatting="image"),ot(Ve);if(Nn==="["&&Ve.imageMarker&&it.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ve.imageMarker=!1,Ve.imageAltText=!0,Ke.highlightFormatting&&(Ve.formatting="image"),ot(Ve);if(Nn==="]"&&Ve.imageAltText){Ke.highlightFormatting&&(Ve.formatting="image");var Qn=ot(Ve);return Ve.imageAltText=!1,Ve.image=!1,Ve.inline=Ve.f=wt,Qn}if(Nn==="["&&!Ve.image)return Ve.linkText&&it.match(/^.*?\]/)||(Ve.linkText=!0,Ke.highlightFormatting&&(Ve.formatting="link")),ot(Ve);if(Nn==="]"&&Ve.linkText){Ke.highlightFormatting&&(Ve.formatting="link");var Qn=ot(Ve);return Ve.linkText=!1,Ve.inline=Ve.f=it.match(/\(.*?\)| ?\[.*?\]/,!1)?wt:bt,Qn}if(Nn==="<"&&it.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ve.f=Ve.inline=He,Ke.highlightFormatting&&(Ve.formatting="link");var Qn=ot(Ve);return Qn?Qn+=" ":Qn="",Qn+Le.linkInline}if(Nn==="<"&&it.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ve.f=Ve.inline=He,Ke.highlightFormatting&&(Ve.formatting="link");var Qn=ot(Ve);return Qn?Qn+=" ":Qn="",Qn+Le.linkEmail}if(Ke.xml&&Nn==="<"&&it.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Cn=it.string.indexOf(">",it.pos);if(Cn!=-1){var Wn=it.string.substring(it.start,Cn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Wn)&&(Ve.md_inside=!0)}return it.backUp(1),Ve.htmlState=ge.startState(st),ve(it,Ve,ze)}if(Ke.xml&&Nn==="<"&&it.match(/^\/\w*?>/))return Ve.md_inside=!1,"tag";if(Nn==="*"||Nn==="_"){for(var We=1,Ee=it.pos==1?" ":it.string.charAt(it.pos-2);We<3&&it.eat(Nn);)We++;var Pe=it.peek()||" ",De=!/\s/.test(Pe)&&(!ce.test(Pe)||/\s/.test(Ee)||ce.test(Ee)),Fe=!/\s/.test(Ee)&&(!ce.test(Ee)||/\s/.test(Pe)||ce.test(Pe)),ye=null,Qe=null;if(We%2&&(!Ve.em&&De&&(Nn==="*"||!Fe||ce.test(Ee))?ye=!0:Ve.em==Nn&&Fe&&(Nn==="*"||!De||ce.test(Pe))&&(ye=!1)),We>1&&(!Ve.strong&&De&&(Nn==="*"||!Fe||ce.test(Ee))?Qe=!0:Ve.strong==Nn&&Fe&&(Nn==="*"||!De||ce.test(Pe))&&(Qe=!1)),Qe!=null||ye!=null){Ke.highlightFormatting&&(Ve.formatting=ye==null?"strong":Qe==null?"em":"strong em"),ye===!0&&(Ve.em=Nn),Qe===!0&&(Ve.strong=Nn);var xn=ot(Ve);return ye===!1&&(Ve.em=!1),Qe===!1&&(Ve.strong=!1),xn}}else if(Nn===" "&&(it.eat("*")||it.eat("_"))){if(it.peek()===" ")return ot(Ve);it.backUp(1)}if(Ke.strikethrough){if(Nn==="~"&&it.eatWhile(Nn)){if(Ve.strikethrough){Ke.highlightFormatting&&(Ve.formatting="strikethrough");var xn=ot(Ve);return Ve.strikethrough=!1,xn}else if(it.match(/^[^\s]/,!1))return Ve.strikethrough=!0,Ke.highlightFormatting&&(Ve.formatting="strikethrough"),ot(Ve)}else if(Nn===" "&&it.match(/^~~/,!0)){if(it.peek()===" ")return ot(Ve);it.backUp(2)}}if(Ke.emoji&&Nn===":"&&it.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ve.emoji=!0,Ke.highlightFormatting&&(Ve.formatting="emoji");var vt=ot(Ve);return Ve.emoji=!1,vt}return Nn===" "&&(it.match(/^ +$/,!1)?Ve.trailingSpace++:Ve.trailingSpace&&(Ve.trailingSpaceNewLine=!0)),ot(Ve)}function He(it,Ve){var Wt=it.next();if(Wt===">"){Ve.f=Ve.inline=bt,Ke.highlightFormatting&&(Ve.formatting="link");var Ln=ot(Ve);return Ln?Ln+=" ":Ln="",Ln+Le.linkInline}return it.match(/^[^>]+/,!0),Le.linkInline}function wt(it,Ve){if(it.eatSpace())return null;var Wt=it.next();return Wt==="("||Wt==="["?(Ve.f=Ve.inline=Dt(Wt==="("?")":"]"),Ke.highlightFormatting&&(Ve.formatting="link-string"),Ve.linkHref=!0,ot(Ve)):"error"}var nt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Dt(it){return function(Ve,Wt){var Ln=Ve.next();if(Ln===it){Wt.f=Wt.inline=bt,Ke.highlightFormatting&&(Wt.formatting="link-string");var Nn=ot(Wt);return Wt.linkHref=!1,Nn}return Ve.match(nt[it]),Wt.linkHref=!0,ot(Wt)}}function ht(it,Ve){return it.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ve.f=zt,it.next(),Ke.highlightFormatting&&(Ve.formatting="link"),Ve.linkText=!0,ot(Ve)):he(it,Ve,bt)}function zt(it,Ve){if(it.match(/^\]:/,!0)){Ve.f=Ve.inline=Yt,Ke.highlightFormatting&&(Ve.formatting="link");var Wt=ot(Ve);return Ve.linkText=!1,Wt}return it.match(/^([^\]\\]|\\.)+/,!0),Le.linkText}function Yt(it,Ve){return it.eatSpace()?null:(it.match(/^[^\s]+/,!0),it.peek()===void 0?Ve.linkTitle=!0:it.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ve.f=Ve.inline=bt,Le.linkHref+" url")}var Ut={startState:function(){return{f:Ae,prevLine:{stream:null},thisLine:{stream:null},block:Ae,htmlState:null,indentation:0,inline:bt,text:qe,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(st,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,Ve){if(Ve.formatting=!1,it!=Ve.thisLine.stream){if(Ve.header=0,Ve.hr=!1,it.match(/^\s*$/,!0))return ke(Ve),null;if(Ve.prevLine=Ve.thisLine,Ve.thisLine={stream:it},Ve.taskList=!1,Ve.trailingSpace=0,Ve.trailingSpaceNewLine=!1,!Ve.localState&&(Ve.f=Ve.block,Ve.f!=ze)){var Wt=it.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ve.indentation=Wt,Ve.indentationDiff=null,Wt>0)return null}}return Ve.f(it,Ve)},innerMode:function(it){return it.block==ze?{state:it.htmlState,mode:st}:it.localState?{state:it.localState,mode:it.localMode}:{state:it,mode:Ut}},indent:function(it,Ve,Wt){return it.block==ze&&st.indent?st.indent(it.htmlState,Ve,Wt):it.localState&&it.localMode.indent?it.localMode.indent(it.localState,Ve,Wt):ge.Pass},blankLine:ke,getType:ot,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ut},"xml"),ge.defineMIME("text/markdown","markdown"),ge.defineMIME("text/x-markdown","markdown")})},98101:function(Vn,Pn,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 Oe=0;Oe<ge.modeInfo.length;Oe++){var Ke=ge.modeInfo[Oe];Ke.mimes&&(Ke.mime=Ke.mimes[0])}ge.findModeByMIME=function(st){st=st.toLowerCase();for(var Ge=0;Ge<ge.modeInfo.length;Ge++){var _e=ge.modeInfo[Ge];if(_e.mime==st)return _e;if(_e.mimes){for(var Le=0;Le<_e.mimes.length;Le++)if(_e.mimes[Le]==st)return _e}}if(/\+xml$/.test(st))return ge.findModeByMIME("application/xml");if(/\+json$/.test(st))return ge.findModeByMIME("application/json")},ge.findModeByExtension=function(st){st=st.toLowerCase();for(var Ge=0;Ge<ge.modeInfo.length;Ge++){var _e=ge.modeInfo[Ge];if(_e.ext){for(var Le=0;Le<_e.ext.length;Le++)if(_e.ext[Le]==st)return _e}}},ge.findModeByFileName=function(st){for(var Ge=0;Ge<ge.modeInfo.length;Ge++){var _e=ge.modeInfo[Ge];if(_e.file&&_e.file.test(st))return _e}var Le=st.lastIndexOf("."),Tt=Le>-1&&st.substring(Le+1,st.length);if(Tt)return ge.findModeByExtension(Tt)},ge.findModeByName=function(st){st=st.toLowerCase();for(var Ge=0;Ge<ge.modeInfo.length;Ge++){var _e=ge.modeInfo[Ge];if(_e.name.toLowerCase()==st)return _e;if(_e.alias){for(var Le=0;Le<_e.alias.length;Le++)if(_e.alias[Le].toLowerCase()==st)return _e}}}})},67549:function(Vn,Pn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";ge.defineMode("stex",function(Oe,Ke){"use strict";function st(Be,ne){Be.cmdState.push(ne)}function Ge(Be){return Be.cmdState.length>0?Be.cmdState[Be.cmdState.length-1]:null}function _e(Be){var ne=Be.cmdState.pop();ne&&ne.closeBracket()}function Le(Be){for(var ne=Be.cmdState,ee=ne.length-1;ee>=0;ee--){var ce=ne[ee];if(ce.name!="DEFAULT")return ce}return{styleIdentifier:function(){return null}}}function Tt(Be,ne,ee){return function(){this.name=Be,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 Pt={};Pt.importmodule=Tt("importmodule","tag",["string","builtin"]),Pt.documentclass=Tt("documentclass","tag",["","atom"]),Pt.usepackage=Tt("usepackage","tag",["atom"]),Pt.begin=Tt("begin","tag",["atom"]),Pt.end=Tt("end","tag",["atom"]),Pt.label=Tt("label","tag",["atom"]),Pt.ref=Tt("ref","tag",["atom"]),Pt.eqref=Tt("eqref","tag",["atom"]),Pt.cite=Tt("cite","tag",["atom"]),Pt.bibitem=Tt("bibitem","tag",["atom"]),Pt.Bibitem=Tt("Bibitem","tag",["atom"]),Pt.RBibitem=Tt("RBibitem","tag",["atom"]),Pt.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Xe(Be,ne){Be.f=ne}function Et(Be,ne){var ee;if(Be.match(/^\\[a-zA-Z@]+/)){var ce=Be.current().slice(1);return ee=Pt.hasOwnProperty(ce)?Pt[ce]:Pt.DEFAULT,ee=new ee,st(ne,ee),Xe(ne,It),ee.style}if(Be.match(/^\\[$&%#{}_]/)||Be.match(/^\\[,;!\/\\]/))return"tag";if(Be.match("\\["))return Xe(ne,function(he,ve){return ct(he,ve,"\\]")}),"keyword";if(Be.match("\\("))return Xe(ne,function(he,ve){return ct(he,ve,"\\)")}),"keyword";if(Be.match("$$"))return Xe(ne,function(he,ve){return ct(he,ve,"$$")}),"keyword";if(Be.match("$"))return Xe(ne,function(he,ve){return ct(he,ve,"$")}),"keyword";var se=Be.next();if(se=="%")return Be.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=Ge(ne),ee)ee.closeBracket(se),Xe(ne,It);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=Pt.DEFAULT,ee=new ee,st(ne,ee),"bracket"):/\d/.test(se)?(Be.eatWhile(/[\w.%]/),"atom"):(Be.eatWhile(/[\w\-_]/),ee=Le(ne),ee.name=="begin"&&(ee.argument=Be.current()),ee.styleIdentifier())}function ct(Be,ne,ee){if(Be.eatSpace())return null;if(ee&&Be.match(ee))return Xe(ne,Et),"keyword";if(Be.match(/^\\[a-zA-Z@]+/))return"tag";if(Be.match(/^[a-zA-Z]+/))return"variable-2";if(Be.match(/^\\[$&%#{}_]/)||Be.match(/^\\[,;!\/]/)||Be.match(/^[\^_&]/))return"tag";if(Be.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Be.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ce=Be.next();return ce=="{"||ce=="}"||ce=="["||ce=="]"||ce=="("||ce==")"?"bracket":ce=="%"?(Be.skipToEnd(),"comment"):"error"}function It(Be,ne){var ee=Be.peek(),ce;return ee=="{"||ee=="["?(ce=Ge(ne),ce.openBracket(ee),Be.eat(ee),Xe(ne,Et),"bracket"):/[ \t\r]/.test(ee)?(Be.eat(ee),null):(Xe(ne,Et),_e(ne),Et(Be,ne))}return{startState:function(){var Be=Ke.inMathMode?function(ne,ee){return ct(ne,ee)}:Et;return{cmdState:[],f:Be}},copyState:function(Be){return{cmdState:Be.cmdState.slice(),f:Be.f}},token:function(Be,ne){return ne.f(Be,ne)},blankLine:function(Be){Be.f=Et,Be.cmdState.length=0},lineComment:"%"}}),ge.defineMIME("text/x-stex","stex"),ge.defineMIME("text/x-latex","stex")})},15525:function(Vn,Pn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";var Oe={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},Ke={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ge.defineMode("xml",function(st,Ge){var _e=st.indentUnit,Le={},Tt=Ge.htmlMode?Oe:Ke;for(var Pt in Tt)Le[Pt]=Tt[Pt];for(var Pt in Ge)Le[Pt]=Ge[Pt];var Xe,Et;function ct(He,wt){function nt(zt){return wt.tokenize=zt,zt(He,wt)}var Dt=He.next();if(Dt=="<")return He.eat("!")?He.eat("[")?He.match("CDATA[")?nt(ne("atom","]]>")):null:He.match("--")?nt(ne("comment","-->")):He.match("DOCTYPE",!0,!0)?(He.eatWhile(/[\w\._\-]/),nt(ee(1))):null:He.eat("?")?(He.eatWhile(/[\w\._\-]/),wt.tokenize=ne("meta","?>"),"meta"):(Xe=He.eat("/")?"closeTag":"openTag",wt.tokenize=It,"tag bracket");if(Dt=="&"){var ht;return He.eat("#")?He.eat("x")?ht=He.eatWhile(/[a-fA-F\d]/)&&He.eat(";"):ht=He.eatWhile(/[\d]/)&&He.eat(";"):ht=He.eatWhile(/[\w\.\-:]/)&&He.eat(";"),ht?"atom":"error"}else return He.eatWhile(/[^&<]/),null}ct.isInText=!0;function It(He,wt){var nt=He.next();if(nt==">"||nt=="/"&&He.eat(">"))return wt.tokenize=ct,Xe=nt==">"?"endTag":"selfcloseTag","tag bracket";if(nt=="=")return Xe="equals",null;if(nt=="<"){wt.tokenize=ct,wt.state=ve,wt.tagName=wt.tagStart=null;var Dt=wt.tokenize(He,wt);return Dt?Dt+" tag error":"tag error"}else return/[\'\"]/.test(nt)?(wt.tokenize=Be(nt),wt.stringStartCol=He.column(),wt.tokenize(He,wt)):(He.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Be(He){var wt=function(nt,Dt){for(;!nt.eol();)if(nt.next()==He){Dt.tokenize=It;break}return"string"};return wt.isInAttribute=!0,wt}function ne(He,wt){return function(nt,Dt){for(;!nt.eol();){if(nt.match(wt)){Dt.tokenize=ct;break}nt.next()}return He}}function ee(He){return function(wt,nt){for(var Dt;(Dt=wt.next())!=null;){if(Dt=="<")return nt.tokenize=ee(He+1),nt.tokenize(wt,nt);if(Dt==">")if(He==1){nt.tokenize=ct;break}else return nt.tokenize=ee(He-1),nt.tokenize(wt,nt)}return"meta"}}function ce(He,wt,nt){this.prev=He.context,this.tagName=wt,this.indent=He.indented,this.startOfLine=nt,(Le.doNotIndent.hasOwnProperty(wt)||He.context&&He.context.noIndent)&&(this.noIndent=!0)}function se(He){He.context&&(He.context=He.context.prev)}function he(He,wt){for(var nt;;){if(!He.context||(nt=He.context.tagName,!Le.contextGrabbers.hasOwnProperty(nt)||!Le.contextGrabbers[nt].hasOwnProperty(wt)))return;se(He)}}function ve(He,wt,nt){return He=="openTag"?(nt.tagStart=wt.column(),be):He=="closeTag"?ke:ve}function be(He,wt,nt){return He=="word"?(nt.tagName=wt.current(),Et="tag",Ze):Le.allowMissingTagName&&He=="endTag"?(Et="tag bracket",Ze(He,wt,nt)):(Et="error",be)}function ke(He,wt,nt){if(He=="word"){var Dt=wt.current();return nt.context&&nt.context.tagName!=Dt&&Le.implicitlyClosed.hasOwnProperty(nt.context.tagName)&&se(nt),nt.context&&nt.context.tagName==Dt||Le.matchClosing===!1?(Et="tag",Ae):(Et="tag error",ze)}else return Le.allowMissingTagName&&He=="endTag"?(Et="tag bracket",Ae(He,wt,nt)):(Et="error",ze)}function Ae(He,wt,nt){return He!="endTag"?(Et="error",Ae):(se(nt),ve)}function ze(He,wt,nt){return Et="error",Ae(He,wt,nt)}function Ze(He,wt,nt){if(He=="word")return Et="attribute",ot;if(He=="endTag"||He=="selfcloseTag"){var Dt=nt.tagName,ht=nt.tagStart;return nt.tagName=nt.tagStart=null,He=="selfcloseTag"||Le.autoSelfClosers.hasOwnProperty(Dt)?he(nt,Dt):(he(nt,Dt),nt.context=new ce(nt,Dt,ht==nt.indented)),ve}return Et="error",Ze}function ot(He,wt,nt){return He=="equals"?qe:(Le.allowMissing||(Et="error"),Ze(He,wt,nt))}function qe(He,wt,nt){return He=="string"?bt:He=="word"&&Le.allowUnquoted?(Et="string",Ze):(Et="error",Ze(He,wt,nt))}function bt(He,wt,nt){return He=="string"?bt:Ze(He,wt,nt)}return{startState:function(He){var wt={tokenize:ct,state:ve,indented:He||0,tagName:null,tagStart:null,context:null};return He!=null&&(wt.baseIndent=He),wt},token:function(He,wt){if(!wt.tagName&&He.sol()&&(wt.indented=He.indentation()),He.eatSpace())return null;Xe=null;var nt=wt.tokenize(He,wt);return(nt||Xe)&&nt!="comment"&&(Et=null,wt.state=wt.state(Xe||nt,He,wt),Et&&(nt=Et=="error"?nt+" error":Et)),nt},indent:function(He,wt,nt){var Dt=He.context;if(He.tokenize.isInAttribute)return He.tagStart==He.indented?He.stringStartCol+1:He.indented+_e;if(Dt&&Dt.noIndent)return ge.Pass;if(He.tokenize!=It&&He.tokenize!=ct)return nt?nt.match(/^(\s*)/)[0].length:0;if(He.tagName)return Le.multilineTagIndentPastTag!==!1?He.tagStart+He.tagName.length+2:He.tagStart+_e*(Le.multilineTagIndentFactor||1);if(Le.alignCDATA&&/<!\[CDATA\[/.test(wt))return 0;var ht=wt&&/^<(\/)?([\w_:\.-]*)/.exec(wt);if(ht&&ht[1])for(;Dt;)if(Dt.tagName==ht[2]){Dt=Dt.prev;break}else if(Le.implicitlyClosed.hasOwnProperty(Dt.tagName))Dt=Dt.prev;else break;else if(ht)for(;Dt;){var zt=Le.contextGrabbers[Dt.tagName];if(zt&&zt.hasOwnProperty(ht[2]))Dt=Dt.prev;else break}for(;Dt&&Dt.prev&&!Dt.startOfLine;)Dt=Dt.prev;return Dt?Dt.indent+_e:He.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Le.htmlMode?"html":"xml",helperType:Le.htmlMode?"html":"xml",skipAttribute:function(He){He.state==qe&&(He.state=Ze)},xmlCurrentTag:function(He){return He.tagName?{name:He.tagName,close:He.type=="closeTag"}:null},xmlCurrentContext:function(He){for(var wt=[],nt=He.context;nt;nt=nt.prev)nt.tagName&&wt.push(nt.tagName);return wt.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,Pn,pe){"use strict";pe.d(Pn,{$u:function(){return Pt},BD:function(){return We},E9:function(){return Tt},FF:function(){return wr},FJ:function(){return ve},Hn:function(){return he},KX:function(){return ke},NB:function(){return yt},S0:function(){return Ot},UL:function(){return Xe},Vk:function(){return se},Vm:function(){return rt},YI:function(){return Cn},ZA:function(){return Ke},Zt:function(){return Et},al:function(){return ye},bn:function(){return Fe},bx:function(){return Ee},g2:function(){return Wn},h1:function(){return qe},hD:function(){return Mn},l4:function(){return _e},rU:function(){return St},s_:function(){return Pe},uz:function(){return Je},z6:function(){return ct}}),Vn=pe.hmd(Vn),function(){var Ne;function Ei(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Oi(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Ei(a)}}function on(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var ui=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},vi;if(typeof Object.setPrototypeOf=="function")vi=Object.setPrototypeOf;else{var bi;e:{var In={a:!0},Gt={};try{Gt.__proto__=In,bi=Gt.a;break e}catch(a){}bi=!1}vi=bi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Kt=vi;function jt(a,y){if(a.prototype=ui(y.prototype),a.prototype.constructor=a,Kt)Kt(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 ft=typeof pe.g!="undefined"&&pe.g!=null?pe.g:self,an=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},vn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Bt(a,y){if(y){var x=ft;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&&vn(x,a,{writable:!0,value:y})}}Bt("Object.assign",function(a){return a||an}),Bt("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 Sn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&at.clearTimeout(x),x=Un(function(){x=-1,a.apply(b,E)},y)}}function Un(a,y){return at.setTimeout(a,y)}function un(a){return at.document.createElement(a)}function Rt(a){throw Error(a)}function zn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Rt(a)}function ni(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),Rt(x+" is not in the range "+y+": "+a)}function gi(a){at.console&&at.console.log(a)}function tn(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 wn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Rt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function gn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Rt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function yn(){var a=Wi.pop();return a===void 0?[]:a}function On(a){a.length=0,Wi.push(a)}function $n(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(tn(a)&&a.constructor)return $n(a.constructor);return typeof a}function Yn(a){var y=a;return tn(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 Xn(a,y,x){Object.defineProperty(fa.prototype,a,{get:y,set:x})}function di(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 Hi=at.navigator!==void 0&&0<at.navigator.userAgent.indexOf("Trident/7"),$i=at.navigator!==void 0&&at.navigator.platform!==void 0&&at.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Wi=[];Object.freeze([]),cn.className="Util",cn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",cn.adym="gojs.net",cn.vfo="28e645fdb266",cn.className="Util";function Xt(a,y,x){Ir(this),this.j=a,this.xa=y,this.o=x}Xt.prototype.toString=function(){return"EnumValue."+this.xa};function Si(a,y){return y==null||y===""?null:a[y]}ft.Object.defineProperties(Xt.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Xt.className="EnumValue";function Ki(){this.ew=[]}Ki.prototype.toString=function(){return this.ew.join("")},Ki.prototype.add=function(a){a!==""&&this.ew.push(a)},Ki.className="StringBuilder";function Ti(){}Ti.className="PropertyCollection";var cr={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"},ft.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 yr=null;Qi.className="EmptyIterator",yr=new Qi;function fr(a){this.key=-1,this.value=a}fr.prototype.reset=function(){this.key=-1},fr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},fr.prototype.Ad=function(){return this.next()},fr.prototype.first=function(){return this.key=0,this.value},fr.prototype.any=function(a){return this.key=-1,a(this.value)},fr.prototype.all=function(a){return this.key=-1,a(this.value)},fr.prototype.each=function(a){return this.key=-1,a(this.value),this},fr.prototype.map=function(a){return new fr(a(this.value))},fr.prototype.filter=function(a){return a(this.value)?new fr(this.value):yr},fr.prototype.de=function(){this.value=null},fr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},ft.Object.defineProperties(fr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),fr.prototype.first=fr.prototype.first,fr.prototype.hasNext=fr.prototype.Ad,fr.prototype.next=fr.prototype.next,fr.prototype.reset=fr.prototype.reset,fr.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 Dn,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 Dn,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},ft.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 Mr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Mr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Mr.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)},Mr.prototype.Ad=function(){return this.next()},Mr.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},Mr.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},Mr.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},Mr.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},Mr.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 Dn,a.s=x,a.xb(),a.iterator},Mr.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 Dn,a.s=x,a.xb(),a.iterator},Mr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Mr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},ft.Object.defineProperties(Mr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Mr.prototype.first=Mr.prototype.first,Mr.prototype.hasNext=Mr.prototype.Ad,Mr.prototype.next=Mr.prototype.next,Mr.prototype.reset=Mr.prototype.reset,Mr.className="ListIteratorBackwards";function Dn(a){Ir(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ne=Dn.prototype,Ne.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ne.freeze=function(){return this._isFrozen=!0,this},Ne.ka=function(){return this._isFrozen=!1,this},Ne.toString=function(){return"List()#"+xr(this)},Ne.add=function(a){return a===null?this:(this._isFrozen&&zn(this,a),this.s.push(a),this.xb(),this)},Ne.push=function(a){this.add(a)},Ne.addAll=function(a){if(a===null)return this;this._isFrozen&&zn(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},Ne.clear=function(){this._isFrozen&&zn(this),this.s.length=0,this.xb()},Ne.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Ne.has=function(a){return this.contains(a)},Ne.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Ne.M=function(a){var y=this.s;return(0>a||a>=y.length)&&ni(a,"0 <= i < length",Dn,"elt:i"),y[a]},Ne.get=function(a){return this.M(a)},Ne.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&ni(a,"0 <= i < length",Dn,"setElt:i"),this._isFrozen&&zn(this,a),x[a]=y},Ne.set=function(a,y){this.cd(a,y)},Ne.first=function(){var a=this.s;return a.length===0?null:a[0]},Ne.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Ne.pop=function(){this._isFrozen&&zn(this);var a=this.s;return 0<a.length?a.pop():null},Dn.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},Dn.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},Dn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Dn.prototype.map=function(a){for(var y=new Dn,x=[],b=this.s,E=b.length,z=0;z<E;z++)x.push(a(b[z]));return y.s=x,y.xb(),y},Dn.prototype.filter=function(a){for(var y=new Dn,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},Ne=Dn.prototype,Ne.Gb=function(a,y){0>a&&ni(a,">= 0",Dn,"insertAt:i"),this._isFrozen&&zn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Ne.remove=function(a){if(a===null)return!1;this._isFrozen&&zn(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)},Ne.delete=function(a){return this.remove(a)},Ne.mb=function(a){var y=this.s;(0>a||a>=y.length)&&ni(a,"0 <= i < length",Dn,"removeAt:i"),this._isFrozen&&zn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Ne.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&&zn(this);for(var E=a,z=y+1;z<b;)x[E++]=x[z++];return x.length=b-(y-a+1),this.xb(),this},Dn.prototype.copy=function(){var a=new Dn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Ne=Dn.prototype,Ne.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},Ne.Iv=function(){for(var a=new _n,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},Ne.sort=function(a){return this._isFrozen&&zn(this),this.s.sort(a),this.xb(),this},Ne.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&zn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=E-1)&&ni(y,"0 <= from < length",Dn,"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},Ne.reverse=function(){return this._isFrozen&&zn(this),this.s.reverse(),this.xb(),this},ft.Object.defineProperties(Dn.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 yr;var a=this.Sa;return a!==null?(a.reset(),a):new Vi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return yr;var a=this.Hg;return a!==null?(a.reset(),a):new Mr(this)}}}),Dn.prototype.reverse=Dn.prototype.reverse,Dn.prototype.sortRange=Dn.prototype.zi,Dn.prototype.sort=Dn.prototype.sort,Dn.prototype.toSet=Dn.prototype.Iv,Dn.prototype.toArray=Dn.prototype.Fa,Dn.prototype.removeRange=Dn.prototype.removeRange,Dn.prototype.removeAt=Dn.prototype.mb,Dn.prototype.delete=Dn.prototype.delete,Dn.prototype.remove=Dn.prototype.remove,Dn.prototype.insertAt=Dn.prototype.Gb,Dn.prototype.pop=Dn.prototype.pop,Dn.prototype.last=Dn.prototype.jc,Dn.prototype.first=Dn.prototype.first,Dn.prototype.set=Dn.prototype.set,Dn.prototype.setElt=Dn.prototype.cd,Dn.prototype.get=Dn.prototype.get,Dn.prototype.elt=Dn.prototype.M,Dn.prototype.indexOf=Dn.prototype.indexOf,Dn.prototype.has=Dn.prototype.has,Dn.prototype.contains=Dn.prototype.contains,Dn.prototype.clear=Dn.prototype.clear,Dn.prototype.addAll=Dn.prototype.addAll,Dn.prototype.push=Dn.prototype.push,Dn.prototype.add=Dn.prototype.add,Dn.prototype.thaw=Dn.prototype.ka,Dn.prototype.freeze=Dn.prototype.freeze,Dn.className="List";function Wr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Wr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Wr.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)},Wr.prototype.Ad=function(){return this.next()},Wr.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},Wr.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},Wr.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},Wr.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},Wr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Dn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Wr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Dn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Wr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Wr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},ft.Object.defineProperties(Wr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Wr.prototype.first=Wr.prototype.first,Wr.prototype.hasNext=Wr.prototype.Ad,Wr.prototype.next=Wr.prototype.next,Wr.prototype.reset=Wr.prototype.reset,Wr.className="SetIterator";function _n(a){Ir(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ne=_n.prototype,Ne.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ne.freeze=function(){return this._isFrozen=!0,this},Ne.ka=function(){return this._isFrozen=!1,this},Ne.toString=function(){return"Set()#"+xr(this)},Ne.add=function(a){if(a===null)return this;this._isFrozen&&zn(this,a);var y=a;return tn(a)&&(y=eo(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},Ne.addAll=function(a){if(a===null)return this;if(this._isFrozen&&zn(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},Ne.contains=function(a){if(a===null)return!1;var y=a;return tn(a)&&(y=xr(a),y===void 0)?!1:this.Tb[y]!==void 0},Ne.has=function(a){return this.contains(a)},Ne.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Ne.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Ne.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},Ne=_n.prototype,Ne.remove=function(a){if(a===null)return!1;this._isFrozen&&zn(this,a);var y=a;if(tn(a)&&(y=xr(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},Ne.delete=function(a){return this.remove(a)},Ne.hp=function(a){if(a===null)return this;if(this._isFrozen&&zn(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},Ne.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&zn(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},Ne.clear=function(){this._isFrozen&&zn(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 Dn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Ir(a){a.__gohashid=bo++}function eo(a){var y=a.__gohashid;return y===void 0&&(y=bo++,a.__gohashid=y),y}function xr(a){return a.__gohashid}ft.Object.defineProperties(_n.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return yr;var a=this.Sa;return a!==null?(a.reset(),a):new Wr(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 bo=1;_n.className="Set",_n.uniqueHash=Ir,_n.hashIdUnique=eo,_n.hashId=xr;function Yr(a){this.ma=a,this.qa=a.Ja,this.sa=null}Yr.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Yr.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)},Yr.prototype.Ad=function(){return this.next()},Yr.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},Yr.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},Yr.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},Yr.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},Yr.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Dn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Yr.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Dn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},Yr.prototype.de=function(){this.value=this.key=null,this.qa=-1},Yr.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},ft.Object.defineProperties(Yr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Yr.prototype.first=Yr.prototype.first,Yr.prototype.hasNext=Yr.prototype.Ad,Yr.prototype.next=Yr.prototype.next,Yr.prototype.reset=Yr.prototype.reset,Yr.className="MapKeySetIterator";function ur(a){_n.call(this),Ir(this),this._isFrozen=!0,this.ma=a}jt(ur,_n),Ne=ur.prototype,Ne.freeze=function(){return this},Ne.ka=function(){return this},Ne.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Ne.add=function(){Rt("This Set is read-only: "+this.toString())},Ne.contains=function(a){return this.ma.contains(a)},Ne.has=function(a){return this.contains(a)},Ne.remove=function(){Rt("This Set is read-only: "+this.toString())},Ne.delete=function(a){return this.remove(a)},Ne.clear=function(){Rt("This Set is read-only: "+this.toString())},Ne.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 Dn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},ft.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?yr:new Yr(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 ir(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}ir.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},ir.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)},ir.prototype.Ad=function(){return this.next()},ir.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},ir.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},ir.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},ir.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},ir.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Dn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},ir.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Dn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},ir.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},ir.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},ft.Object.defineProperties(ir.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ir.prototype.first=ir.prototype.first,ir.prototype.hasNext=ir.prototype.Ad,ir.prototype.next=ir.prototype.next,ir.prototype.reset=ir.prototype.reset,ir.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 Dr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Dr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Dr.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)},Dr.prototype.Ad=function(){return this.next()},Dr.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},Dr.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},Dr.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},Dr.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},Dr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Dn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Dr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Dn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Dr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Dr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},ft.Object.defineProperties(Dr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Dr.prototype.first=Dr.prototype.first,Dr.prototype.hasNext=Dr.prototype.Ad,Dr.prototype.next=Dr.prototype.next,Dr.prototype.reset=Dr.prototype.reset,Dr.className="MapIterator";function Ai(a){Ir(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"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ne=Ai.prototype,Ne.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ne.freeze=function(){return this._isFrozen=!0,this},Ne.ka=function(){return this._isFrozen=!1,this},Ne.toString=function(){return"Map()#"+xr(this)},Ne.add=function(a,y){this._isFrozen&&zn(this,a);var x=a;tn(a)&&(x=eo(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},Ne.set=function(a,y){return this.add(a,y)},Ne.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 Ai)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},Ne.first=function(){return this.ea},Ai.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Ai.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Ai.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Ai.prototype.map=function(a){for(var y=new Ai,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Ai.prototype.filter=function(a){for(var y=new Ai,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Ne=Ai.prototype,Ne.contains=function(a){var y=a;return tn(a)&&(y=xr(a),y===void 0)?!1:this.Tb[y]!==void 0},Ne.has=function(a){return this.contains(a)},Ne.I=function(a){var y=a;return tn(a)&&(y=xr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Ne.get=function(a){return this.I(a)},Ne.remove=function(a){if(a===null)return!1;this._isFrozen&&zn(this,a);var y=a;if(tn(a)&&(y=xr(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},Ne.delete=function(a){return this.remove(a)},Ne.clear=function(){this._isFrozen&&zn(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()},Ai.prototype.copy=function(){var a=new Ai,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Ai.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},Ai.prototype.Lf=function(){return new ur(this)},ft.Object.defineProperties(Ai.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return yr;var a=this.Sa;return a!==null?(a.reset(),a):new Dr(this)}},iteratorKeys:{get:function(){return 0>=this.count?yr:new Yr(this)}},iteratorValues:{get:function(){if(0>=this.count)return yr;var a=this.jf;return a!==null?(a.reset(),a):new ir(this)}}}),Ai.prototype.toKeySet=Ai.prototype.Lf,Ai.prototype.toArray=Ai.prototype.Fa,Ai.prototype.clear=Ai.prototype.clear,Ai.prototype.delete=Ai.prototype.delete,Ai.prototype.remove=Ai.prototype.remove,Ai.prototype.get=Ai.prototype.get,Ai.prototype.getValue=Ai.prototype.I,Ai.prototype.has=Ai.prototype.has,Ai.prototype.contains=Ai.prototype.contains,Ai.prototype.first=Ai.prototype.first,Ai.prototype.addAll=Ai.prototype.addAll,Ai.prototype.set=Ai.prototype.set,Ai.prototype.add=Ai.prototype.add,Ai.prototype.thaw=Ai.prototype.ka,Ai.prototype.freeze=Ai.prototype.freeze,Ai.className="Map";function et(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Rt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var jr,yo,Or,wo,co;et.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},et.prototype.h=function(a,y){return this.x=a,this.y=y,this},et.prototype.sg=function(a,y){return this.x=a,this.y=y,this},et.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},et.prototype.copy=function(){var a=new et;return a.x=this.x,a.y=this.y,a},Ne=et.prototype,Ne.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ne.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ne.freeze=function(){return this._isFrozen=!0,this},Ne.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function $o(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 et(x,E)}return new et}function Gr(a){return a.x.toString()+" "+a.y.toString()}Ne.toString=function(){return"Point("+this.x+","+this.y+")"},Ne.D=function(a){return a instanceof et?this.x===a.x&&this.y===a.y:!1},Ne.hi=function(a,y){return this.x===a&&this.y===y},Ne.Xa=function(a){return en.B(this.x,a.x)&&en.B(this.y,a.y)},Ne.add=function(a){return this.x+=a.x,this.y+=a.y,this},Ne.re=function(a){return this.x-=a.x,this.y-=a.y,this},Ne.offset=function(a,y){return this.x+=a,this.y+=y,this},et.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},Ne=et.prototype,Ne.scale=function(a,y){return this.x*=a,this.y*=y,this},Ne.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Ne.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Ne.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},Ne.ab=function(a){return zr(a.x-this.x,a.y-this.y)},Ne.direction=function(a,y){return zr(a-this.x,y-this.y)};function zr(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}Ne.Ry=function(a,y){return en.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Ne.fA=function(a,y,x,b){return en.qh(a,y,x,b,this.x,this.y,this),this},Ne.gA=function(a,y){return en.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Ne.uA=function(a,y,x,b){return en.No(this.x,this.y,a,y,x,b,this),this},Ne.vA=function(a,y){return en.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Ne.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},Ne.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},Ne.transform=function(a){return a.Ga(this),this};function Nr(a,y){return y.Cd(a),a}function Eo(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 or(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)}Ne.w=function(){return isFinite(this.x)&&isFinite(this.y)},et.alloc=function(){var a=$r.pop();return a===void 0?new et:a},et.allocAt=function(a,y){var x=$r.pop();return x===void 0?new et(a,y):(x.x=a,x.y=y,x)},et.free=function(a){$r.push(a)},et.prototype.isReal=et.prototype.w,et.prototype.setSpot=et.prototype.yi,et.prototype.setRectSpot=et.prototype.xi,et.prototype.snapToGridPoint=et.prototype.vA,et.prototype.snapToGrid=et.prototype.uA,et.prototype.projectOntoLineSegmentPoint=et.prototype.gA,et.prototype.projectOntoLineSegment=et.prototype.fA,et.intersectingLineSegments=function(a,y,x,b,E,z,te,re){return en.Rl(a,y,x,b,E,z,te,re)},et.prototype.compareWithLineSegmentPoint=et.prototype.Ry,et.compareWithLineSegment=function(a,y,x,b,E,z){return en.Fl(a,y,x,b,E,z)},et.prototype.direction=et.prototype.direction,et.prototype.directionPoint=et.prototype.ab,et.prototype.normalize=et.prototype.normalize,et.prototype.distanceSquared=et.prototype.zd,et.prototype.distanceSquaredPoint=et.prototype.Bf,et.prototype.scale=et.prototype.scale,et.prototype.rotate=et.prototype.rotate,et.prototype.offset=et.prototype.offset,et.prototype.subtract=et.prototype.re,et.prototype.add=et.prototype.add,et.prototype.equalsApprox=et.prototype.Xa,et.prototype.equalTo=et.prototype.hi,et.prototype.equals=et.prototype.D,et.prototype.set=et.prototype.set,et.prototype.setTo=et.prototype.sg;var $r=[];et.className="Point",et.parse=$o,et.stringify=Gr,et.distanceLineSegmentSquared=Eo,et.distanceSquared=or,et.direction=mr,et.Origin=jr=new et(0,0).ja(),et.InfiniteTopLeft=yo=new et(-1/0,-1/0).ja(),et.InfiniteBottomRight=Or=new et(1/0,1/0).ja(),et.SixPoint=wo=new et(6,6).ja(),et.NoPoint=co=new et(NaN,NaN).ja(),et.parse=$o,et.stringify=Gr,et.distanceLineSegmentSquared=Eo,et.distanceSquared=or,et.direction=mr;function hi(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):Rt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Ao,Vo,sa,ko,Io,_o,la;hi.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},hi.prototype.h=function(a,y){return this.width=a,this.height=y,this},hi.prototype.sg=function(a,y){return this.width=a,this.height=y,this},hi.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},hi.prototype.copy=function(){var a=new hi;return a.width=this.width,a.height=this.height,a},Ne=hi.prototype,Ne.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ne.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ne.freeze=function(){return this._isFrozen=!0,this},Ne.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function pa(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 hi(x,E)}return new hi}function Lt(a){return a.width.toString()+" "+a.height.toString()}Ne.toString=function(){return"Size("+this.width+","+this.height+")"},Ne.D=function(a){return a instanceof hi?this.width===a.width&&this.height===a.height:!1},Ne.hi=function(a,y){return this.width===a&&this.height===y},Ne.Xa=function(a){return en.B(this.width,a.width)&&en.B(this.height,a.height)},Ne.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},Ne.w=function(){return isFinite(this.width)&&isFinite(this.height)},hi.alloc=function(){var a=wi.pop();return a===void 0?new hi:a},hi.free=function(a){wi.push(a)},hi.prototype.isReal=hi.prototype.w,hi.prototype.inflate=hi.prototype.Bc,hi.prototype.equalsApprox=hi.prototype.Xa,hi.prototype.equalTo=hi.prototype.hi,hi.prototype.equals=hi.prototype.D,hi.prototype.set=hi.prototype.set,hi.prototype.setTo=hi.prototype.sg;var wi=[];hi.className="Size",hi.parse=pa,hi.stringify=Lt,hi.ZeroSize=Ao=new hi(0,0).ja(),hi.OneSize=Vo=new hi(1,1).ja(),hi.SixSize=sa=new hi(6,6).ja(),hi.EightSize=ko=new hi(8,8).ja(),hi.TenSize=Io=new hi(10,10).ja(),hi.InfiniteSize=_o=new hi(1/0,1/0).ja(),hi.NoSize=la=new hi(NaN,NaN).ja(),hi.parse=pa,hi.stringify=Lt;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 et?(x=a.x,a=a.y,y instanceof et?(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 hi?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Rt("Incorrect second argument supplied to Rect constructor "+y)):Rt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ne=_t.prototype,Ne.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ne.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Yi(a,y,x){a.width=y,a.height=x}Ne.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},Ne.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ne.dd=function(a){return this.x=a.x,this.y=a.y,this},Ne.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},Ne=_t.prototype,Ne.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ne.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ne.freeze=function(){return this._isFrozen=!0,this},Ne.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ci(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 Cr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Ne.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Ne.D=function(a){return a instanceof _t?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Ne.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},Ne.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 Ri(a,y){return en.$(a.x,y.x)&&en.$(a.y,y.y)&&en.$(a.width,y.width)&&en.$(a.height,y.height)}Ne.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Ne.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},Ne.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},Ne.offset=function(a,y){return this.x+=a,this.y+=y,this},Ne.Bc=function(a,y){return Ii(this,y,a,y,a)},Ne.Co=function(a){return Ii(this,a.top,a.right,a.bottom,a.left)},Ne.Fv=function(a){return Ii(this,-a.top,-a.right,-a.bottom,-a.left)},Ne.Hz=function(a,y,x,b){return Ii(this,a,y,x,b)};function Ii(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}Ne.Ex=function(a){return er(this,a.x,a.y,a.width,a.height)},Ne.Uu=function(a,y,x,b){return er(this,a,y,x,b)};function er(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}Ne.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Ne.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 tr(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))}Ne.Ye=function(a){return hr(this,a.x,a.y,0,0)},Ne.ed=function(a){return hr(this,a.x,a.y,a.width,a.height)},Ne.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),hr(this,a,y,x,b)};function hr(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}Ne.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 Sr(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 kr(a,y,x,b,E,z,te,re){return a>te+E||E>x+a?!1:!(y>re+z||z>b+y)}Ne.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ne.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)},ft.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 et(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new hi(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new et(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 Er=null,Br=null,Zr=[];_t.className="Rect",_t.parse=Ci,_t.stringify=Cr,_t.contains=Sr,_t.intersects=kr,_t.ZeroRect=Er=new _t(0,0,0,0).ja(),_t.NoRect=Br=new _t(NaN,NaN,NaN,NaN).ja(),_t.parse=Ci,_t.stringify=Cr,_t.contains=Sr,_t.intersects=kr;function zi(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):Rt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}zi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},zi.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},zi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},zi.prototype.copy=function(){var a=new zi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Ne=zi.prototype,Ne.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ne.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ne.freeze=function(){return this._isFrozen=!0,this},Ne.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function oa(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 zi;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new zi(x);for(var z=NaN;a[y]==="";)y++;if((b=a[y++])&&(z=parseFloat(b)),isNaN(z))return new zi(x,E);for(var te=NaN;a[y]==="";)y++;return(b=a[y++])&&(te=parseFloat(b)),isNaN(te)?new zi(x,E):new zi(x,E,z,te)}return new zi}function Ra(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Ne.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Ne.D=function(a){return a instanceof zi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Ne.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},Ne.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)},Ne.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},zi.alloc=function(){var a=tl.pop();return a===void 0?new zi:a},zi.free=function(a){tl.push(a)},zi.prototype.isReal=zi.prototype.w,zi.prototype.equalsApprox=zi.prototype.Xa,zi.prototype.equalTo=zi.prototype.hi,zi.prototype.equals=zi.prototype.D,zi.prototype.set=zi.prototype.set,zi.prototype.setTo=zi.prototype.sg;var Ls=null,Ys=null,tl=[];zi.className="Margin",zi.parse=oa,zi.stringify=Ra,zi.ZeroMargin=Ls=new zi(0,0,0,0).ja(),zi.TwoMargin=Ys=new zi(2,2,2,2).ja(),zi.parse=oa,zi.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,So,yc,Ml,as,vl,ju,rc,wl,sl,td,nd,kc,_d,id,Ic,Js,uu,xd,Eu,Sc,Ko,Sa,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},Ne=Ui.prototype,Ne.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ne.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ne.freeze=function(){return this._isFrozen=!0,this},Ne.ka=function(){return Object.isFrozen(this)&&Rt("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 So;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 Ko;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()}Ne.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(So)?"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(Ko)?"Default":"None"},Ne.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},Ne.gv=function(){return new Ui(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Ne.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Sa))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},Ne.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Ne.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Ne.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Ne.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Ne.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=Ko=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=So=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=Sa=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},Ne=ro.prototype,Ne.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Ne.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Ne.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)},Ne.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))},Ne.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))},Ne.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,Me=b*z+x*re+le,Te=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,Me),me=Math.max(me,Me),Me=Math.min(we,Te),we=Math.max(we,Te),E=Math.min(E,x),me=Math.max(me,x),Me=Math.min(Me,y),we=Math.max(we,y),E=Math.min(E,z),me=Math.max(me,z),Me=Math.min(Me,b),we=Math.max(we,b),a.h(E,Me,me-E,we-Me),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,Me=(y+b)/2,Te=(x+E)/2,je=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(we+Te)/2,x=(Me+je)/2,Te=(Te+E)/2,je=(je+z)/2;var ut=(b+Te)/2,tt=(x+je)/2;return en.cs(a,y,we,Me,b,x,ut,tt,oe,le,ue,me)||en.cs(ut,tt,Te,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))hr(le,a,y,0,0),hr(le,te,re,0,0);else{var ue=(a+x)/2,me=(y+b)/2,we=(x+E)/2,Me=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(ue+we)/2,x=(me+Me)/2,we=(we+E)/2,Me=(Me+z)/2;var Te=(b+we)/2,je=(x+Me)/2;en.Dl(a,y,ue,me,b,x,Te,je,oe,le),en.Dl(Te,je,we,Me,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,Me=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(ue+we)/2,x=(me+Me)/2,we=(we+E)/2,Me=(Me+z)/2;var Te=(b+we)/2,je=(x+Me)/2;en.Qe(a,y,ue,me,b,x,Te,je,oe,le),en.Qe(Te,je,we,Me,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,Me=(me+b)/2;return en.jv(a,y,ue,me,we,Me,te,re,oe,le)||en.jv(we,Me,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))hr(re,a,y,0,0),hr(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,Me){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:(Me.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 Te=(a+x)/2,je=(y+b)/2,ut=(x+E)/2,tt=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(Te+ut)/2,x=(je+tt)/2,ut=(ut+E)/2,tt=(tt+z)/2;var Ct=(b+ut)/2,Mt=(x+tt)/2,kt=1/0,Jt=!1,pn=0,Fi=0;return en.Eo(a,y,Te,je,b,x,Ct,Mt,oe,le,ue,me,we,Me)&&(a=(Me.x-oe)*(Me.x-oe)+(Me.y-le)*(Me.y-le),a<kt&&(kt=a,Jt=!0,pn=Me.x,Fi=Me.y)),en.Eo(Ct,Mt,ut,tt,E,z,te,re,oe,le,ue,me,we,Me)&&(Me.x-oe)*(Me.x-oe)+(Me.y-le)*(Me.y-le)<kt&&(Jt=!0,pn=Me.x,Fi=Me.y),Jt&&(Me.x=pn,Me.y=Fi),Jt},Fo:function(a,y,x,b,E,z,te,re,oe,le,ue,me,we){var Me=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 Me;var Te=((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(Te>=ue)return Me;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 Me}else if(a<te?(oe=a,a=te):oe=te,Te<oe||Te>a)return Me;0<we?Me++:0>we&&Me--}else{Te=(a+x)/2,je=(y+b)/2;var ut=(x+E)/2,tt=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(Te+ut)/2,x=(je+tt)/2,ut=(ut+E)/2,tt=(tt+z)/2;var Ct=(b+ut)/2,Mt=(x+tt)/2;Me+=en.Fo(a,y,Te,je,b,x,Ct,Mt,oe,le,ue,me,we),Me+=en.Fo(Ct,Mt,ut,tt,E,z,te,re,oe,le,ue,me,we)}return Me},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(ut,tt){var Ct=(ut-a)*(ut-a)+(tt-y)*(tt-y);Ct<me&&(me=Ct,oe.h(ut,tt))}var me=1/0;ue(oe.x,oe.y);var we=0,Me=0,Te=0,je=0;if(E<te?(we=E,Me=te):(we=te,Me=E),z<re?(Te=E,je=te):(Te=te,je=E),we=(Me-we)/2+le,le=(je-Te)/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):!!(Sr(a,y,x,b,E,z)||Sr(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 Ti,um:new Ti,Mf:new Ti,Nf:0,vm:100};en.za=en.AA;function Pi(a){Ir(this),this.l=2,a===void 0&&(a=Pi.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Pi.o?this.ee=new Dn:(Pi.V===null&&(Pi.V=new Dn().freeze()),this.ee=Pi.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}Pi.prototype.copy=function(){var a=new Pi;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===Pi.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},Pi.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Pi.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Pi.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},Pi.prototype.ka=function(){if(Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Pi.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},Pi.prototype.Xa=function(a){if(!(a instanceof Pi))return!1;if(this.type!==a.type)return this.type===Pi.j&&a.type===Pi.o?Mh(this,a):a.type===Pi.j&&this.type===Pi.o?Mh(a,this):!1;if(this.type===Pi.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!==Pi.j||y.type!==Pi.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===ia&&en.B(a.endX,y.endX)&&en.B(a.endY,y.endY))))}Pi.ia=function(a){return a.toString()},Pi.prototype.qb=function(a){a.classType===Pi&&(this.type=a)},Pi.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Pi.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 Pi.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 Pi.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 Pi.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()}},Pi.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},Pi.parse=function(a,y){function x(){return je>=kt-1?!0:le[je+1].match(Jt)!==null}function b(){return je++,le[je]}function E(Xr){var Ar=parseFloat(b()),Go=parseFloat(b());ut===ut.toLowerCase()&&(Ar=Mt.x+Ar,Go=Mt.y+Go),Xr.h(Ar,Go)}function z(){return E(Mt),Mt}function te(){return E(Ct),Ct}function re(){var Xr=tt.toLowerCase();return Xr!=="c"&&Xr!=="s"&&Xr!=="q"&&Xr!=="t"?Mt:new et(2*Mt.x-Ct.x,2*Mt.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=yn();for(var me="",we=!1,Me=0;Me<ue.length;Me++){var Te=ue[Me];Te!=="."||we?Te==="."?(oe.push(me),me="."):me+=Te:(we=!0,me+=Te)}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,On(oe)}}var je=-1,ut="",tt="";oe=new et(0,0);var Ct=new et(0,0),Mt=new et(0,0),kt=le.length;a=DS(null),we=me=ue=!1,Me=!0,Te=null;for(var Jt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(je>=kt-1);)if(tt=ut,ut=b(),ut!=="")switch(ut.toUpperCase()){case"X":Me=!0,me=ue=!1;break;case"M":for(Te=z(),a.mc===null||Me===!0?(pp(a,Te.x,Te.y,ue,!me,we),Me=!1):a.moveTo(Te.x,Te.y),oe.assign(Mt);!x();)Te=z(),a.lineTo(Te.x,Te.y);break;case"L":for(;!x();)Te=z(),a.lineTo(Te.x,Te.y);break;case"H":for(;!x();)Mt=new et((ut===ut.toLowerCase()?Mt.x:0)+parseFloat(b()),Mt.y),a.lineTo(Mt.x,Mt.y);break;case"V":for(;!x();)Mt=new et(Mt.x,(ut===ut.toLowerCase()?Mt.y:0)+parseFloat(b())),a.lineTo(Mt.x,Mt.y);break;case"C":for(;!x();){Te=new et,E(Te);var pn=te(),Fi=z();Hh(a,Te.x,Te.y,pn.x,pn.y,Fi.x,Fi.y)}break;case"S":for(;!x();)Te=re(),pn=te(),Fi=z(),Hh(a,Te.x,Te.y,pn.x,pn.y,Fi.x,Fi.y);break;case"Q":for(;!x();)Te=te(),pn=z(),u0(a,Te.x,Te.y,pn.x,pn.y);break;case"T":for(;!x();)Ct=Te=re(),pn=z(),u0(a,Te.x,Te.y,pn.x,pn.y);break;case"B":for(;!x();){Te=parseFloat(b()),pn=parseFloat(b()),Fi=parseFloat(b());var _i=parseFloat(b()),Zi=parseFloat(b()),yi=Zi,ei=!1;x()||(yi=parseFloat(b()),x()||(ei=parseFloat(b())!==0)),ut===ut.toLowerCase()&&(Fi+=Mt.x,_i+=Mt.y),a.arcTo(Te,pn,Fi,_i,Zi,yi,ei)}break;case"A":for(;!x();)Te=Math.abs(parseFloat(b())),pn=Math.abs(parseFloat(b())),Fi=parseFloat(b()),Zi=_i=!1,ei=yi=0,yi=b(),yi.length===1?(_i=!!parseFloat(yi),Zi=!!parseFloat(b()),yi=parseFloat(b())):yi.length===2?(_i=!!parseFloat(yi[0]),Zi=!!parseFloat(yi[1]),yi=parseFloat(b())):(_i=!!parseFloat(yi[0]),Zi=!!parseFloat(yi[1]),yi=parseFloat(yi.slice(2))),ei=parseFloat(b()),ut===ut.toLowerCase()&&(yi=Mt.x+yi,ei=Mt.y+ei),Mt.h(yi,ei),wx(a,Te,pn,Fi,_i,Zi,yi,ei);break;case"Z":Px(a),Mt.assign(oe);break;case"F":for(Te="",pn=1;le[je+pn];)if(le[je+pn]==="0")we=!0,pn++;else if(le[je+pn].match(/[Uu]/)!==null)pn++;else if(le[je+pn].match(Jt)===null)pn++;else{Te=le[je+pn];break}Te.match(/[Mm]/)?ue=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Te="",pn=1;le[je+pn];)if(le[je+pn].match(/[Ff]/)!==null)pn++;else if(le[je+pn].match(Jt)===null)pn++;else{Te=le[je+pn];break}Te.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},Pi.Ha=function(a,y){for(var x=a.length,b=et.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}et.free(b)},Pi.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Pi.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},Pi.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Pi.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),hr(a,0,0,0,0),a.freeze()},Pi.prototype.ix=function(){var a=new _t;return Lh(this,a,!0),a};function Lh(a,y,x){switch(a.type){case Pi.j:case Pi.u:case Pi.F:x?y.h(a.od,a.pd,0,0):hr(y,a.od,a.pd,0,0),hr(y,a.Dc,a.Ec,0,0);break;case Pi.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):hr(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 ia:case _a:oe=me.endX,le=me.endY,hr(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),Me=we.length;if(Me===0){oe=me.type===Ja?me.centerX:me.endX,le=me.type===Ja?me.centerY:me.endY,hr(y,oe,le,0,0);break}me=null;for(var Te=0;Te<Me;Te++)me=we[Te],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:Rt("Unknown Segment type: "+me.type)}}}break;default:Rt("Unknown Geometry type: "+a.type)}}Pi.prototype.normalize=function(){this._isFrozen&&zn(this);var a=this.ix();return this.offset(-a.x,-a.y),new et(-a.x,-a.y)},Pi.prototype.offset=function(a,y){return this._isFrozen&&zn(this),this.transform(1,0,0,1,a,y),this},Pi.prototype.scale=function(a,y){return this._isFrozen&&zn(this),this.transform(a,0,0,y,0,0),this},Pi.prototype.rotate=function(a,y,x){this._isFrozen&&zn(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},Ne=Pi.prototype,Ne.transform=function(a,y,x,b,E,z){switch(this.type){case Pi.j:case Pi.u:case Pi.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 Pi.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,Me=0;Me<we;Me++){var Te=me[Me];switch(Te.type){case ia:case _a:te=Te.endX,re=Te.endY,Te.endX=te*a+re*x+E,Te.endY=te*y+re*b+z;break;case Hs:te=Te.point1X,re=Te.point1Y,Te.point1X=te*a+re*x+E,Te.point1Y=te*y+re*b+z,te=Te.point2X,re=Te.point2Y,Te.point2X=te*a+re*x+E,Te.point2Y=te*y+re*b+z,te=Te.endX,re=Te.endY,Te.endX=te*a+re*x+E,Te.endY=te*y+re*b+z;break;case Xl:te=Te.point1X,re=Te.point1Y,Te.point1X=te*a+re*x+E,Te.point1Y=te*y+re*b+z,te=Te.endX,re=Te.endY,Te.endX=te*a+re*x+E,Te.endY=te*y+re*b+z;break;case Ja:te=Te.centerX,re=Te.centerY,Te.centerX=te*a+re*x+E,Te.centerY=te*y+re*b+z,y!==0&&(te=180*Math.atan2(y,a)/Math.PI,0>te&&(te+=360),Te.startAngle+=te),0>a&&(Te.startAngle=180-Te.startAngle,Te.sweepAngle=-Te.sweepAngle),0>b&&(Te.startAngle=-Te.startAngle,Te.sweepAngle=-Te.sweepAngle),Te.radiusX*=Math.sqrt(a*a+x*x),Te.radiusY!==void 0&&(Te.radiusY*=Math.sqrt(y*y+b*b));break;case du:if(te=Te.endX,re=Te.endY,Te.endX=te*a+re*x+E,Te.endY=te*y+re*b+z,Te.radiusX===0||Te.radiusY===0)break;y!==0&&(te=180*Math.atan2(y,a)/Math.PI,0>te&&(te+=360),Te.xAxisRotation+=te),0>a&&(Te.xAxisRotation=180-Te.xAxisRotation,Te.isClockwiseArc=!Te.isClockwiseArc),0>b&&(Te.xAxisRotation=-Te.xAxisRotation,Te.isClockwiseArc=!Te.isClockwiseArc),Te.radiusX*=Math.sqrt(a*a+x*x),Te.radiusY*=Math.sqrt(y*y+b*b);break;default:Rt("Unknown Segment type: "+Te.type)}}}}return this._isInvalidBounds=!0,this},Ne.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 Pi.j:return en.Yb(x,b,E,z,y,a.x,a.y);case Pi.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 Pi.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 Pi.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,Me=we.length,Te=0;Te<Me;Te++){var je=we[Te],ut=!je.isEvenOdd;if(je.isFilled){if(b&&je.ca(z,y,x))return!0;var tt=je.segments;oe=je.startX,le=je.startY;for(var Ct=oe,Mt=le,kt=tt.s,Jt=0;Jt<=tt.length;Jt++){var pn=void 0;if(Jt!==tt.length){pn=kt[Jt];var Fi=pn.type;a=pn.endX,me=pn.endY}else Fi=ia,a=Ct,me=Mt;switch(Fi){case _a:if(Ct=cu(z,y,te,y,oe,le,Ct,Mt),isNaN(Ct))return!0;re+=Ct,Ct=a,Mt=me;break;case ia: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,pn.point1X,pn.point1Y,pn.point2X,pn.point2Y,a,me,te,y,z,y,.5),re+=ue;break;case Xl:ue=en.Fo(oe,le,(oe+2*pn.point1X)/3,(le+2*pn.point1Y)/3,(2*pn.point1X+a)/3,(2*pn.point1Y+me)/3,a,me,te,y,z,y,.5),re+=ue;break;case Ja:case du:Fi=pn.type===Ja?yl(pn,je):ul(pn,je,oe,le);var _i=Fi.length;if(_i===0){if(oe=cu(z,y,te,y,oe,le,pn.type===Ja?pn.centerX:pn.endX,pn.type===Ja?pn.centerY:pn.endY),isNaN(oe))return!0;re+=oe;break}pn=null;for(var Zi=0;Zi<_i;Zi++){if(pn=Fi[Zi],Zi===0){if(ue=cu(z,y,te,y,oe,le,pn[0],pn[1]),isNaN(ue))return!0;re+=ue}ue=en.Fo(pn[0],pn[1],pn[2],pn[3],pn[4],pn[5],pn[6],pn[7],te,y,z,y,.5),re+=ue}pn!==null&&(a=pn[6],me=pn[7]);break;default:Rt("Unknown Segment type: "+pn.type)}oe=a,le=me}if(ut){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}Ne.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new et),this.type===Pi.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},Ne.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Pi.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},Ne.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Pi.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},Ne.xx=function(a){if(this.type===Pi.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=et.alloc();return en.qh(y,x,b,E,z,a,re),a=re.x,z=re.y,et.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/te)}}else if(this.type===Pi.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=et.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],Me=x[me],Te=we.length,je=0;je<Te;je+=2){var ut=we[je],tt=we[je+1];if(je!==0){en.qh(le,ue,ut,tt,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+=Me[(je-2)/2]}le=ut,ue=tt}return et.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===Pi.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===Pi.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===Pi.F){var z=new ys;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var te=new Bo(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 ia: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 Me=yl(we,E),Te=Me.length;if(Te===0){b.push(we.centerX),b.push(we.centerY),te=we.centerX,z=we.centerY;break}for(var je=0;je<Te;je++){var ut=Me[je];en.Qe(te,z,ut[2],ut[3],ut[4],ut[5],ut[6],ut[7],.5,b),te=ut[6],z=ut[7]}break;case du:if(Me=ul(we,E,te,z),Te=Me.length,je=we.endX,ut=we.endY,Te===0){b.push(je),b.push(ut),te=je,z=ut;break}for(je=0;je<Te;je++)ut=Me[je],en.Qe(te,z,ut[2],ut[3],ut[4],ut[5],ut[6],ut[7],.5,b),te=ut[6],z=ut[7];break;default:Rt("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(or(x,b,te,re))),x=te,b=re}return y}Ne.add=function(a){return this.ee.add(a),this},Ne.pm=function(a,y,x,b,E,z,te,re){return this._isFrozen&&zn(this),this.fg=new Ui(a,y,E,z).freeze(),this.gg=new Ui(x,b,te,re).freeze(),this},ft.Object.defineProperties(Pi.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===Pi.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===Pi.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&&zn(this,a),this.na=a,a===Pi.o?this.ee=new Dn:(Pi.V===null&&(Pi.V=new Dn().freeze()),this.ee=Pi.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&zn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&zn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&zn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&zn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&zn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&zn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&zn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&zn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Pi.prototype.setSpots=Pi.prototype.pm,Pi.prototype.add=Pi.prototype.add,Pi.prototype.getFractionForPoint=Pi.prototype.xx,Pi.prototype.getPointAndAngleAlongPath=Pi.prototype.Qu,Pi.prototype.getAngleAlongPath=Pi.prototype.wx,Pi.prototype.getPointAlongPath=Pi.prototype.Pu,Pi.prototype.containsPoint=Pi.prototype.ca,Pi.prototype.transform=Pi.prototype.transform,Pi.prototype.rotate=Pi.prototype.rotate,Pi.prototype.scale=Pi.prototype.scale,Pi.prototype.offset=Pi.prototype.offset,Pi.prototype.normalize=Pi.prototype.normalize,Pi.prototype.computeBoundsWithoutOrigin=Pi.prototype.ix,Pi.prototype.equalsApprox=Pi.prototype.Xa,Pi.className="Geometry",Pi.j=new Xt(Pi,"Line",0),Pi.u=new Xt(Pi,"Rectangle",1),Pi.F=new Xt(Pi,"Ellipse",2),Pi.o=new Xt(Pi,"Path",3),Pi.V=null,Pi.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Pi.className="Geometry",Pi.stringify=Pi.ia,Pi.fillPath=Pi.nb,Pi.parse=Pi.parse,Pi.Line=Pi.j,Pi.Rectangle=Pi.u,Pi.Ellipse=Pi.F,Pi.Path=Pi.o;function ys(a,y,x,b,E){Ir(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 Dn,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},Ne=ys.prototype,Ne.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},Ne.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},Ne.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},Ne.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},Ne.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},Ne.add=function(a){return this.pl.add(a),this},Ne.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 ia: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,Me=ue.type===Ja?ue.centerX:ue.endX,Te=ue.type===Ja?ue.centerY:ue.endY;if(we===0){if(en.Yb(b,E,Me,Te,x,a,y))return!0;b=Me,E=Te;break}for(Me=null,Te=0;Te<we;Te++)if(Me=me[Te],Te===0&&en.Yb(b,E,Me[0],Me[1],x,a,y)||en.cs(Me[0],Me[1],Me[2],Me[3],Me[4],Me[5],Me[6],Me[7],.5,a,y,x))return!0;Me!==null&&(b=Me[6],E=Me[7]);break;default:Rt("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},ft.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&&zn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&zn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&zn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&zn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&zn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&zn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),ys.prototype.add=ys.prototype.add,ys.prototype.equalsApprox=ys.prototype.Xa,ys.className="PathFigure";function Bo(a,y,x,b,E,z,te,re){Ir(this),a===void 0&&(a=ia),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}Bo.prototype.copy=function(){var a=new Bo;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},Ne=Bo.prototype,Ne.Xa=function(a){if(!(a instanceof Bo)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case _a:case ia: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}},Ne.qb=function(a){a.classType===Bo&&(this.type=a)},Ne.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 ia: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":"")},Ne.freeze=function(){return this._isFrozen=!0,this},Ne.ka=function(){return this._isFrozen=!1,this},Ne.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),Pi.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,ut,tt,Ct){return(je*Ct<ut*tt?-1:1)*Math.acos((je*tt+ut*Ct)/(Math.sqrt(je*je+ut*ut)*Math.sqrt(tt*tt+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),Me=me*(x-le)/2+we*(b-ue)/2;te=-we*(x-le)/2+me*(b-ue)/2;var Te=Me*Me/(y*y)+te*te/(z*z);return 1<Te&&(y*=Math.sqrt(Te),z*=Math.sqrt(Te)),Te=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*te*te-z*z*Me*Me)/(y*y*te*te+z*z*Me*Me)),isNaN(Te)&&(Te=0),re=Te*y*te/z,Te=Te*-z*Me/y,isNaN(re)&&(re=0),isNaN(Te)&&(Te=0),x=(x+le)/2+me*re-we*Te,b=(b+ue)/2+we*re+me*Te,ue=E(1,0,(Me-re)/y,(te-Te)/z),me=(Me-re)/y,le=(te-Te)/z,Me=(-Me-re)/y,re=(-te-Te)/z,te=E(me,le,Me,re),Me=(me*Me+le*re)/(Math.sqrt(me*me+le*le)*Math.sqrt(Me*Me+re*re)),-1>=Me?te=Math.PI:1<=Me&&(te=0),!oe&&0<te&&(te-=2*Math.PI),oe&&0>te&&(te+=2*Math.PI),oe=y>z?1:y/z,Me=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,Me),Pi.Ha(y,z),ro.free(z),a.ae=y,a.ae}ft.Object.defineProperties(Bo.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&&zn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&zn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&zn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&zn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&zn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&zn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&zn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&zn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&zn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&ni(a,">= zero",Bo,"radiusX"),this._isFrozen&&zn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&ni(a,">= zero",Bo,"radiusY"),this._isFrozen&&zn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&zn(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&&zn(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&&zn(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&&zn(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&&zn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Bo.prototype.equalsApprox=Bo.prototype.Xa;var _a=new Xt(Bo,"Move",0),ia=new Xt(Bo,"Line",1),Hs=new Xt(Bo,"Bezier",2),Xl=new Xt(Bo,"QuadraticBezier",3),Ja=new Xt(Bo,"Arc",4),du=new Xt(Bo,"SvgArc",4);Bo.className="PathSegment",Bo.Move=_a,Bo.Line=ia,Bo.Bezier=Hs,Bo.QuadraticBezier=Xl,Bo.Arc=Ja,Bo.SvgArc=du;function nl(){this.H=null,this.xu=new et(0,0).freeze(),this.mt=new et(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},ft.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},ft.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 wa(){this.Fm=Ca,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}wa.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},wa.prototype.copy=function(){var a=new wa;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=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=tn(y)&&typeof y.J=="function"?y.J():y,a},wa.prototype.qb=function(a){a.classType===wa&&(this.change=a)},wa.prototype.toString=function(){var a="";return a=this.change===Ll?a+"* ":this.change===Ca?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+=Yn(this.object)),this.oldValue!==null&&(a+=" old: "+Yn(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Yn(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},wa.prototype.I=function(a){return a?this.oldValue:this.newValue},wa.prototype.Dz=function(a){return a?this.oldParam:this.newParam},wa.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},wa.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},wa.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},wa.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},ft.Object.defineProperties(wa.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}}}),wa.prototype.redo=wa.prototype.redo,wa.prototype.canRedo=wa.prototype.canRedo,wa.prototype.undo=wa.prototype.undo,wa.prototype.canUndo=wa.prototype.canUndo,wa.prototype.getParam=wa.prototype.Dz,wa.prototype.getValue=wa.prototype.I,wa.prototype.clear=wa.prototype.clear;var Ll=new Xt(wa,"Transaction",-1),Ca=new Xt(wa,"Property",0),Va=new Xt(wa,"Insert",1),cs=new Xt(wa,"Remove",2);wa.className="ChangedEvent",wa.Transaction=Ll,wa.Property=Ca,wa.Insert=Va,wa.Remove=cs;function Ps(){this.o=new Dn().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 Ai,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Ca&&b.object){var E=y.get(b.object);E||(E=new Ai,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()}},ft.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 Dn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Dn().freeze(),this.hl=new Dn,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},Ne=Na.prototype,Ne.Xw=function(a){this.Pt.add(a)},Ne.Rx=function(a){this.Pt.remove(a)},Ne.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},Ne.eb=function(a){return a===void 0&&(a=""),ad(this,!0,a)},Ne.Kf=function(){return ad(this,!1,"")};function ad(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&gi("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}Ne.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){gi("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){gi("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 wa;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||gi("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},ft.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(){Ir(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":$n(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,et.allocAt(NaN,NaN)),b=y.So(1,et.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}et.free(x),et.free(b)},Do.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,et.allocAt(NaN,NaN)),b=y.So(1,et.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 et((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}et.free(x),et.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($i?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||($i?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=Un(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},ft.Object.defineProperties(Do.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof fn&&(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 Dn,this.ob=new Dn,this.Hb=new Dn,this.F=this.V=850,this.o=new hi(2,2).ja(),this.Ha=5e3,this.ia=sd,this.u=Xd,this.Mp=this.j=null,this.zj=-1}jt(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=Un(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)},ft.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 Xt(fa,"WheelScroll",0),wd=new Xt(fa,"WheelZoom",1),zf=new Xt(fa,"WheelNone",2),Xd=new Xt(fa,"GestureZoom",3),ld=new Xt(fa,"GestureCancel",4),ud=new Xt(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 et(NaN,NaN),this.Fr=new et,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;jt(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,($i?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),ln=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,ln=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 xi?(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 nr,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(jr):this.isGridSnapEnabled?new Zc(new et(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=""),ln=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=ln;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 Ai,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 xi&&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 xi&&(x.value.point=new et(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=et.alloc();z.assign(b.lastInput.documentPoint),a.moveParts(y,z.re(E),x),et.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 xi&&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&&ln===null)return;var re=b!==null?b.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof qr)){var oe=x.mouseDragOver;oe!==null&&(oe(E),te=!0)}if(!a.isActive&&ln===null||(a.doDragOver(y,b),!a.isActive&&ln===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&&ln===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 pr&&!(a instanceof qr)&&(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=et.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(So,a);oe=y.Bf(oe),oe<z&&(te=re,z=oe)}}return et.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)):Kr(E,te,z,oe,re):Kr(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||ln!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)z=E.key,z instanceof Bi&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||ln!==null){for(a=_t.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Bi&&pt(x,b,a);_t.free(a)}}}function dg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof qr||(x=a.mouseDrop,x!==null&&x(y))}function pt(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 xi},!0,function(E){return E instanceof xi},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&&xt(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(ln===null)return!1;var b=ln.diagram;x instanceof fn||(x=null);var E=Hn;return x!==E&&(E!==null&&E!==b&&(E.ug(),ln.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(ln===null)return!1;var b=Hn,E=ln.diagram;if(x===null)return ln.doCancel(),!0;if(x!==b){var z=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&z!==null)return b.ug(),ln.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 et),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=ln,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function xt(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Bi&&(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||($i?!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 ln},Fa.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ln;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=ln,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Fa.prototype.doSimulatedDragLeave=function(){var a=ln;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Fa.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ln;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;nn(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=ln;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"),nn(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 nn(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 Ai,re=et.alloc(),oe=y.iterator;oe.next();)le=oe.value,le instanceof xi&&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))));et.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 et},ft.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 ln=null,Hn=null;Fa.className="DraggingTool",sc=new Dn,Xn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),fa.prototype.doCancel=function(){ln!==null&&ln.doCancel(),Do.prototype.doCancel.call(this)};function bn(){Do.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new xi,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 Bi,y=new io,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Vo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Bi,y=new io,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Vo,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 Ai,this.Of=this.gj=this.Pf=null}jt(bn,Do),bn.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},bn.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var z=y.Df(),te=hi.alloc();te.width=y.naturalBounds.width*z,te.height=y.naturalBounds.height*z,b.desiredSize=te,hi.free(te),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=So,z=et.alloc(),x.location=y.ga(So,z),et.free(z),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},bn.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Vo,y.fromSpot=La,y.toSpot=La),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},bn.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},bn.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Bi){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)}},bn.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Bi))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Bi)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},bn.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 Bi){var oe=te.ga(So,et.alloc()),le=x.x-oe.x,ue=x.y-oe.y;et.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 Bi&&(x.layer===null||x.layer.allowLink))?y:null},bn.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},bn.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},bn.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},bn.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Bi))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Bi))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},bn.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)},bn.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),ai(this,x,y,b)};function ai(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),ai(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),ai(a,y.labeledLink,x,b))))}bn.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!si(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!si(this,a,y,x,!0)}if(b===Cg)return a===y?a=!0:(b=new _n,b.add(y),a=qn(this,b,a,y,x)),!a;if(b===bg)return!si(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 si(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&&si(a,te,x,b,E)))return!0}return!1}function qn(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&&qn(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}ft.Object.defineProperties(bn.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}}}),bn.className="LinkingBaseTool";function Di(){bn.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ni,this.Xd=null}jt(Di,bn),Di.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},Di.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 Bi)))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},Di.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 Bi&&(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 Bi&&(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)},Di.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()},Di.prototype.doStop=function(){bn.prototype.doStop.call(this),this.startObject=null},Di.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 Bi&&(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)}}},Di.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof xi)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)},Di.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Di.prototype.doNoLink=function(){},ft.Object.defineProperties(Di.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 Xt(Di,"Either",0),gr=new Xt(Di,"ForwardsOnly",0),dr=new Xt(Di,"BackwardsOnly",0);Di.className="LinkingTool",Di.Either=Ni,Di.ForwardsOnly=gr,Di.BackwardsOnly=dr;function nr(){bn.call(this),this.name="Relinking";var a=new io;a.figure="Diamond",a.desiredSize=ko,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new io,a.figure="Diamond",a.desiredSize=ko,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new _t}jt(nr,bn),nr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof xi){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)}},nr.prototype.makeAdornment=function(a,y){var x=new jo;return x.type=fi.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},nr.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},nr.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 xi))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=Ao),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Ao),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},nr.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}},nr.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()},nr.prototype.doStop=function(){bn.prototype.doStop.call(this),this.handle=null},nr.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 Bi&&(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()}}},nr.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},nr.prototype.doNoRelink=function(){};function Kr(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)}ft.Object.defineProperties(nr.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}}}),nr.className="RelinkingTool",Xn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Xn("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=sa,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new io,a.figure="Diamond",a.desiredSize=ko,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new et,this.Yq=new Dn}jt(sr,Do),sr.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Tr},sr.prototype.om=function(a,y){a.reshapingBehavior=y},sr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof xi){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=fi.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,mo),re.cursor="n-resize"):en.B(oe.y,le.y)&&(this.om(re,to),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,mo),re.cursor="n-resize"):en.B(oe.y,le.y)&&(this.om(re,to),re.cursor="w-resize")):te!==z&&(this.om(re,To),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 xi){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(So)},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&&(Rr(this,te,b,E,z,!0)||Rr(this,te,b,E,z,!1))){var re=y.points.copy();Rr(this,te,b,E,z,!0)?(re.cd(x-2,new et(te.x,(z.y+te.y)/2)),re.cd(x+1,new et(z.x,(z.y+te.y)/2))):(re.cd(x-2,new et((z.x+te.x)/2,te.y)),re.cd(x+1,new et((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&&(Rr(this,b,E,z,te,!0)||Rr(this,b,E,z,te,!1))&&(re=y.points.copy(),Rr(this,b,E,z,te,!0)?(re.cd(x-1,new et(b.x,(b.y+te.y)/2)),re.cd(x+2,new et(te.x,(b.y+te.y)/2))):(re.cd(x-1,new et((b.x+te.x)/2,b.y)),re.cd(x+2,new et((b.x+te.x)/2,te.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else te=et.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()),et.free(te)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Rr(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===mo?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===to&&(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===mo?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===to&&(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(So,et.alloc()),b=y.getLinkPointFromPoint(b,E,z,a,!0,et.alloc()),y.L(0,b.x,b.y),et.free(z),et.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(So,et.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,et.alloc()),y.L(y.pointsCount-1,a.x,a.y),et.free(x),et.free(a));y.zf()},sr.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case To:return a;case mo:return new et(y.i(x).x,a.y);case to:return new et(a.x,y.i(x).y);default:case Tr:return y.i(x)}},ft.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 Tr=new Xt(sr,"None",0),to=new Xt(sr,"Horizontal",1),mo=new Xt(sr,"Vertical",2),To=new Xt(sr,"All",3);sr.className="LinkReshapingTool",sr.None=Tr,sr.Horizontal=to,sr.Vertical=mo,sr.All=To,Xn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Vr(){Do.call(this),this.name="Resizing",this.o=new hi(1,1).freeze(),this.j=new hi(9999,9999).freeze(),this.yg=new hi(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new io;a.alignmentFocus=So,a.figure="Rectangle",a.desiredSize=sa,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new et,this.Dw=new hi,this.Tn=new et,this.rt=new hi(0,0),this.qt=new hi(1/0,1/0),this.pt=new hi(1,1)}jt(Vr,Do),Vr.prototype.updateAdornments=function(a){if(!(a===null||a instanceof xi)){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)}},Vr.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new jo,y.type=fi.Spot,y.locationSpot=So;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},Vr.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Vr.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=So),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 fi)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Vr.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},Vr.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))},Vr.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Vr.prototype.stopTransaction=function(){var a=this.diagram,y=Do.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Vr.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Vr.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,et.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),a.bd(),et.free(E)}},Vr.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,et.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),et.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Vr.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 qr){var b=new Dn;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()}},Vr.prototype.computeResize=function(a,y,x,b,E,z){y.Mc()&&(y=So);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=et.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))),et.free(we),a},Vr.prototype.computeReshape=function(){var a=oi;return this.adornedObject instanceof io&&(a=kv(this.adornedObject)),!(a===Ji||this.diagram.lastInput.shift)},Vr.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},Vr.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},Vr.prototype.computeCellSize=function(){var a=new hi(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},ft.Object.defineProperties(Vr.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}}}),Vr.className="ResizingTool",Xn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function po(){Do.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new et,this.ue=null;var a=new io;a.figure="Ellipse",a.desiredSize=ko,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new et(NaN,NaN),this.u=0,this.F=50}jt(po,Do),po.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)}},po.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new jo,y.type=fi.Position,y.locationSpot=So;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},po.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},po.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)},po.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(So)},po.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)},po.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new et(NaN,NaN),this.isActive=a.isMouseCaptured=!1},po.prototype.stopTransaction=function(){var a=this.diagram,y=Do.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},po.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},po.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},po.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()},po.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()}},po.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},ft.Object.defineProperties(po.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}}}),po.className="RotatingTool",Xn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Xo(){Do.call(this),this.name="ClickSelecting"}jt(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 Jr(){Do.call(this),this.name="Action",this.pk=null}jt(Jr,Do),Jr.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},Jr.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()},Jr.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))}},Jr.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()},Jr.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())},Jr.prototype.doStop=function(){this.pk=null},Jr.className="ActionTool";function lo(){Do.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new et(0,0)}jt(lo,Do),lo.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)},lo.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},lo.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 pr)x.Zc()&&(hc(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);tn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var z=et.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gf(this.diagram,b,a,z),b.location=z,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),et.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},ft.Object.defineProperties(lo.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}}}),lo.className="ClickCreatingTool";function Qr(){Do.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new pr;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}jt(Qr,Do),Qr.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))},Qr.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Qr.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Qr.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=hi.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),hi.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Qr.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()},Qr.prototype.computeBoxBounds=function(){var a=this.diagram;return new _t(a.firstInput.documentPoint,a.lastInput.documentPoint)},Qr.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),$i?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 Dn,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)}},ft.Object.defineProperties(Qr.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}}}),Qr.className="DragSelectingTool";function br(){Do.call(this),this.name="Panning",this.Xt=new et,this.xy=new et,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()}}jt(br,Do),br.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())},br.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},br.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},br.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},br.prototype.doMouseMove=function(){this.move()},br.prototype.doMouseUp=function(){this.move(),this.stopTool()},br.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)}},ft.Object.defineProperties(br.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),br.className="PanningTool",Xn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Xn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Xn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Xn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Xn("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}ft.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 et,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}jt(zo,Do);function Ho(a){var y=new oo;y.show=function(E,z,te){te.showDefaultContextMenu()},y.hide=function(E,z){z.hideDefaultContextMenu()},ma=y,a.tu=function(){a.stopTool()},y=un("div");var x=un("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=un("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",Ur,!1),b.addEventListener(y,"selectstart",Ur,!1),b.addEventListener(x,"contextmenu",Ur,!1)),y.className="goCXforeground",x.className="goCXbackground",at.document.body&&(at.document.body.appendChild(y),at.document.body.appendChild(x)),ta=y,ja=x,ds=!0}function Ur(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 fn||(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()&&(na(a,!0),a.isActive||a.stopTool())}zo.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function na(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=ma,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 Dn;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)),ta.innerHTML="",ja.addEventListener("pointerdown",this.tu,!1);var y=this,x=un("ul");x.className="goCXul",ta.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=un("li"),z.className="goCXli";var te=un("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)}}ta.style.display="block",ja.style.display="block"},zo.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===ma){ta.style.display="none",ja.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ja,"pointerdown",this.tu,!1),this.currentContextMenu=null}},ft.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&&ma===null&&Ha&&Ho(this),ma},set:function(a){a===null&&(ds=!0),ma=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var ma=null,ds=!1,ja=null,ta=null;zo.className="ContextMenuTool",Xn("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=xo,this.vj=null,this.qa=vo,this.u=1,this.F=!0,this.o=null,this.j=new oo,this.kt=null,xa(this,this.j)}jt(Fo,Do);function xa(a,y){if(Ha){var x=un("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(Oo)):E==="Tab"?(a.acceptText(Wo),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==vo){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!==vo){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(So),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===xo&&!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=va,hs(this));break;case Qa:case Oo:case Wo:(Oo!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Jo||this.qa===Us||this.qa===ga)&&(this.qa=va,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=vo,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},ft.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 Xt(Fo,"LostFocus",0),Ns=new Xt(Fo,"MouseDown",1),Wo=new Xt(Fo,"Tab",2),Oo=new Xt(Fo,"Enter",3),Zo=new Xt(Fo,"SingleClick",0),xo=new Xt(Fo,"SingleClickSelected",1),Aa=new Xt(Fo,"DoubleClick",2),vo=new Xt(Fo,"StateNone",0),Jo=new Xt(Fo,"StateActive",1),ga=new Xt(Fo,"StateEditing",2),va=new Xt(Fo,"StateValidating",3),Us=new Xt(Fo,"StateInvalid",4),Zs=new Xt(Fo,"StateValidated",5),cl=null;Fo.className="TextEditingTool",Fo.LostFocus=Qa,Fo.MouseDown=Ns,Fo.Tab=Wo,Fo.Enter=Oo,Fo.SingleClick=Zo,Fo.SingleClickSelected=xo,Fo.DoubleClick=Aa,Fo.StateNone=vo,Fo.StateActive=Jo,Fo.StateEditing=ga,Fo.StateValidating=va,Fo.StateInvalid=Us,Fo.StateValidated=Zs,Xn("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 xi&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Ne=ka.prototype,Ne.fv=function(a){return this.ce.fv(a)},Ne.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 fn){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}Ne.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)},Ne.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))},Ne.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Xa(this,a))},Ne.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 et(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re))}var y=new Ai;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 et(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 et(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 et(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 et(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}ft.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&&ni(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 Xt(ka,"Default",1),Jl=new Xt(ka,"AnimateLocations",2),Ql=new Xt(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=jr,this.vc=new Ai,this.Tt=new Ai,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}Ne=za.prototype,Ne.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 fn?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)},Ne.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Ne.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof fn?this.H=a:a instanceof Qt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof pr){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 fn&&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 et&&!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 et&&!te.w()&&te.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof pr?re.Ku.location=Ya(y.location):z&&(re.Ku[x]=Ya(b))}function Ya(a){return a instanceof et||a instanceof hi?a.copy():a}Ne.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Ne.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)}}}Ne.stop=function(){return this.bc?(this.Ml(!0),this):this},Ne.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 pr&&(te.location=ue.location),re.nv&&te instanceof pr&&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())}},Ne.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof qr&&(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 et(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof qr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Bi&&this.Cj(b,y)},Ne.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof qr&&(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 qr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Bi&&this.Aj(b,y)}},Ne.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},ft.Object.defineProperties(za.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&ni(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:Rt("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))}ft.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 Xt(ql,"Default",1),Bs=new Xt(ql,"Immediate",2),os=new Xt(ql,"Bundled",3);ql.className="AnimationTrigger",ql.Default=rs,ql.Immediate=Bs,ql.Bundled=os;function ba(a){Ir(this),this.H=null,this.Pa=new Dn,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)}Ne=ba.prototype,Ne.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},Ne.Xe=function(a){this.H=a},Ne.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 qr?E++:oe instanceof Bi?b++:oe instanceof xi?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&&xr(b)&&(re+=" #"+xr(b)),x instanceof Bi?re+=" "+Yn(b):x instanceof xi&&(re+=" "+Yn(x.fromNode)+" "+Yn(x.toNode));return y+" "+this.Pa.count+": "+re},Ne.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=et.alloc(),z=this.Pa.s,te=z.length;te--;){var re=z[te];if((b!==!0||vf(re)!==!1)&&re.isVisible()&&(E.assign(a),Nr(E,re.oe),re=re.ic(E,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return et.free(E),re}return et.free(E),null},Ne.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Dn||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=et.alloc(),te=this.Pa.s,re=te.length;re--;){var oe=te[re];if((E!==!0||vf(oe)!==!1)&&oe.isVisible()){z.assign(a),Nr(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 et.free(z),b},Ne.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 Dn||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},Ne.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},Ne.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 Dn||E instanceof _n)&&(z=E),E=!0),z instanceof Dn||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=et.alloc(),oe=et.alloc(),le=this.Pa.s,ue=le.length;ue--;){var me=le[ue];if((te!==!0||vf(me)!==!1)&&me.isVisible()){re.assign(a),Nr(re,me.oe),oe.h(a.x+y,a.y),Nr(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 et.free(re),et.free(oe),z},Ne.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=yn();for(var E=yn(),z=0;z<b;z++){var te=x[z];if(te.vw=z,te instanceof xi){if(te.fd===!1)continue}else if(te instanceof jo&&te.adornedPart!==null)continue;var re=te.actualBounds;te.isVisible()&&tr(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]);On(a),On(E)}}};function Ts(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Ne.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}}}Ne.Oj=function(a,y,x,b,E,z,te){if(te&&!vf(y))a.Hs(y);else{if(b!==null&&y instanceof xi&&(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))}},Ne.g=function(a,y,x,b,E){var z=this.diagram;z!==null&&z.cb(Ca,a,this,y,x,b,E)},Ne.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},Ne.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 qr&&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}ft.Object.defineProperties(ba.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===""&&Rt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Rt("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)&&ni(a,"0 <= value <= 1",ba,"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))}}}),ba.prototype.findObjectsNear=ba.prototype.og,ba.prototype.findObjectsIn=ba.prototype.Cf,ba.prototype.findObjectsAt=ba.prototype.ji,ba.prototype.findObjectAt=ba.prototype.ic,ba.className="Layer";function fn(a,y){if(ip||(hl(),ip=!0),Ir(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===Ca&&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 Dn,a.pj=new Ai,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new et(NaN,NaN).freeze(),a.du=new et(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new et(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new ro,a.zu=new et(NaN,NaN).freeze(),a.ut=new _t(NaN,NaN,NaN,NaN).freeze(),a.rj=new zi(0,0,0,0).freeze(),a.sj=Td,a.nu=!1,a.Zt=null,a.fu=null,a.yh=xl,a.zk=Ko,a.Fg=xl,a.pq=Ko,a.yt=Ba,a.Bt=Ba,a.Fc=!0,a.pn=!1,a.De=new _n,a.Eh=new Ai,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new zi(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 Ai,a.Xn=new Dn,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 zi(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 hi(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new et,bounds:new _t,Py:new hi,bA:new hi,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 hi(NaN,NaN).freeze(),a.Sp=new _t(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Ai;var y=new Bi,x=new ua;x.bind(new fs("text","",Yn)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Bi,x=new ua,x.stroke="brown",x.bind(new fs("text","",Yn)),y.add(x),a.Lg.add("Comment",y),y=new Bi,y.selectable=!1,y.avoidable=!1,x=new io,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new hi(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Ai,y=new qr,y.selectionObjectName="GROUPPANEL",y.type=fi.Vertical,x=new ua,x.font="bold 12pt sans-serif",x.bind(new fs("text","",Yn)),y.add(x),x=new fi(fi.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 zi(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Ai,y=new xi,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 xi,x=new io,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new jo,y.type=fi.Auto,x=new io,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Hl,x.margin=new zi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new jo,y.type=fi.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=co,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 et,a.zy=500,a.wp=new et,a.wq=!1}fn.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(),Wi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),z}function Ed(){return null}fn.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()},fn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=at.document.body);var y=un("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},fn.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=un("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Rc=un("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||$i||(y=11)}this.Db=y,this.Gw=!0},fn.prototype.qb=function(a){a.classType===fn&&(this.autoScale=a)},fn.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||Rt("Diagram setup requires an argument DIV."),a.Ka!==null&&Rt("Diagram has already completed setup."),typeof y=="string"?a.Ka=at.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Rt("No DIV or DIV id supplied: "+y),a.Ka===null&&Rt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Rt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&at.ResizeObserver){var x=Sn(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=un("div");var z=un("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=Sn(function(){a.Yh=null,a.N()},300),a.Ov=Sn(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 fn&&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)}}fn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},fn.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(),cr&&cr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}fn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:at.devicePixelRatio||1},fn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},fn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},fn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},fn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},fn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},fn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},fn.prototype.doFocus=function(){this.focus()},fn.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)}},fn.prototype.Oy=function(){this.H.R("GainedFocus")},fn.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 ba;y.name="Background",a.Al(y),y=new ba,y.name="",a.Al(y),y=new ba,y.name="Foreground",a.Al(y),y=new ba,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ba,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ba,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 fi(fi.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 pr,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)}fn.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,Me=E.height,Te=E.right,je=E.bottom;E=this.scale;var ut=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":ut=ut+a.scrollWidth-a.clientWidth;break;case"reverse":ut=a.scrollWidth-ut-a.clientWidth}var tt=ut;we<oe||Me<le?(ut=et.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==tt&&(ut.x=tt/E+te,this.ju=tt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(ut.y=a.scrollTop/E+re,this.lu=a.scrollTop),this.position=ut,et.free(ut),this.Ee=this.qr=!1):(ut=et.alloc(),a.uy&&this.allowHorizontalScroll&&(te<me&&(this.position=ut.h(tt+te,this.position.y)),ue>Te&&(this.position=ut.h(-(y.scrollWidth-this.Aa)+tt-this.Aa/E+ue,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<b&&(this.position=ut.h(this.position.x,a.scrollTop+re)),z>je&&(this.position=ut.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+z))),et.free(ut),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ue=b.right,Te=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<=Te&&(x.style.width="1px"),Me>=le&&re>=b&&z<=je&&(x.style.height="1px"))}},fn.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}fn.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 xi||(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 xi||(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=et.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=_t.allocAt(0,0,b.width,b.height);var E=et.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,_t.free(b),et.free(E),et.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()?So: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}fn.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},Ne=fn.prototype,Ne.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 et(a.x,a.y)}},Ne.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new et(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))},Ne.zz=function(a){if(a instanceof Qt){this.eq=a;var y=et.alloc();this.fq=this.op(a.ga(Ba,y)),et.free(y)}else this.eq=null,this.fq=co};function lf(a,y,x,b,E,z){var te=et.allocAt(a.pa.x,a.pa.y),re=te.x,oe=te.y;if(a.eq!==null){var le=et.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,et.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),et.free(te)}Ne.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 pr)return a}else if(a=Yu(this,a,function(x){return x.part}),a instanceof pr)return a;return null},Ne.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}Ne.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 pr&&b.canSelect()}:null,x)};function jc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Dn||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}Ne.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Dn||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},Ne.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 pr&&(!x||E.canSelect())},y,b)},Ne.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Dn||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},Ne.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 Dn||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}Ne.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 pr&&(!b||z.canSelect())},x,E)},Ne.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 Dn||E instanceof _n)&&(z=E),E=!0),z instanceof Dn||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 Dn||E instanceof _n)&&(z=E),E=!0),z instanceof Dn||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}fn.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),$i&&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,$i&&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)}fn.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)},fn.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)},fn.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)},fn.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)},fn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new et(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?Nr(new et(y,a),this.Ab):new et(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=et.allocAt(te,re),a.Ab.Cd(y),x.documentPoint.assign(y),et.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))}}fn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function ih(a){a.ld||$s(a),a.Va()}fn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Ne=fn.prototype,Ne.Pz=function(){return this.kg},Ne.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 et(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Un(function(){b.ld=!1,il(y,"Model"),a(b)},1)},Ne.$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()})}},Ne.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];gt(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 qr&&b.U&65536&&(b.U=b.U^65536)})}}Ne.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof qr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof qr&&x.isVisible()&&Pa(this,x);for(a.reset();a.next();)x=a.value,x instanceof xi&&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 Pa(a,y){for(var x=yn(),b=yn(),E=y.memberParts;E.next();){var z=E.value;z.isVisible()&&(z instanceof qr?(mt(z)||At(z)||mf(z))&&Pa(a,z):z instanceof xi?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(On(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();On(b)}Ne.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},Ne.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Rt("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,ya(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=cr&&cr.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&&Rt("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 Me=new _t(z.x,z.y,b.width/E,b.height/E),Te=Me.copy();Te.Co(x),bc(a,Te),$s(a),a.Fd(me,we,a,Me),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 ut=ro.alloc();ut.reset(),ut.translate(x.left,x.top),ut.scale(E),z.x===0&&z.y===0||ut.translate(-z.x,-z.y),y.setTransform(ut.m11,ut.m12,ut.m21,ut.m22,ut.dx,ut.dy),y.yc(),y instanceof Uo&&ya(y,ut.m11,ut.m12,ut.m21,ut.m22,ut.dx,ut.dy),ro.free(ut),Sl(a,y),y.globalAlpha=a.pb;var tt=a.Qj("Grid");if(te){var Ct=new _n,Mt=te.iterator;for(Mt.reset();Mt.next();){var kt=Mt.value;kt instanceof pr&&(le||kt.layer!==tt)&&(kt.Gj(),Ct.add(kt))}for(le=0;le<we;le++)Rl(me[le],y,a,Ct,oe);Ct.each(function(pn){return pn.Gj()})}else for(Ct=0;Ct<we;Ct++){var Jt=me[Ct];Jt===tt?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())}}}Ne.Gf=function(a){return this.Rg[a]},Ne.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Ne.Tx=function(){this.Rg=new Ti,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!($i||Hi),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))}Ne.Ql=function(a){return this.on[a]},Ne.sA=function(a,y){this.on[a]=y},Ne.Sx=function(){this.on=new Ti,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Ne.set=function(a){return Object.assign(this,a),this},Ne.Du=function(a){return this.nm(a)},Ne.nm=function(a){return Au(this,a),this};function Au(a,y){var x=a instanceof fi,b=a instanceof fn,E;for(E in y){E===""&&Rt("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])),tn(z)?te=E.substr(re+1):Rt("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 rr&&te==="Changed"){a.Pe(y[te]);continue}else Rt('Trying to set undefined property "'+te+'" on object: '+z.toString());z[te]=y[E],te[0]==="_"&&z instanceof Qt&&z.Vw(te)}}Ne.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Ai,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Ne.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")},fn.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 Po)))){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),Me=Math.floor(re-me);a.drawImage(b.Oa,ue,me,we,Me,0,0,we,Me),Id(this.Yf,this)&&a.clearRect(0,0,oe,le),b=yn(),a=yn(),Me=Math.abs(z),we=Math.abs(y);var Te=ue===0?0:E-Me;ue=et.allocAt(Te,0),Me=et.allocAt(Me+Te,re),a.push(new _t(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.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),Nr(ue,je),Nr(Me,je),b.push(new _t(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y))),Te=me===0?0:re-we,ue.h(0,Te),Me.h(E,we+Te),a.push(new _t(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y))),Nr(ue,je),Nr(Me,je),b.push(new _t(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y))),Id(this.Yf,this)&&(E=0<z?0:-z,re=0<y?0:-y,ue.h(E,re),Me.h(oe+E,le+re),a.push(new _t(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y))),Nr(ue,je),Nr(Me,je),b.push(new _t(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y)))),et.free(ue),et.free(Me),zc(this,!1,!0),this.Ka===null&&Rt("No div specified"),this.ta===null&&Rt("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(),Me=te.Pa.s,je=Me.length,Te=oe.length;for(var ut=0;ut<je;ut++){var tt=Me[ut],Ct=qf(tt,tt.actualBounds);e:{for(var Mt=2/ue,kt=4/ue,Jt=0;Jt<Te;Jt++){var pn=oe[Jt];if(pn.width!==0&&pn.height!==0&&Ct.Vu(pn.x-Mt,pn.y-Mt,pn.width+kt,pn.height+kt)){Ct=!0;break e}}Ct=!1}Ct&&te.Oj(E,tt,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()}On(b),On(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,Me=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 Te=a.ku,je=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var ut=a.documentBounds,tt=0,Ct=0,Mt=0,kt=0,Jt=ue.width,pn=ue.height,Fi=a.rj;a.contentAlignment.sb()?(ut.width>Jt&&(tt=Fi.left,Ct=Fi.right),ut.height>pn&&(Mt=Fi.top,kt=Fi.bottom)):(tt=Fi.left,Ct=Fi.right,Mt=Fi.top,kt=Fi.bottom);var _i=ut.width+tt+Ct,Zi=ut.height+Mt+kt;Fi=a.scale;var yi=_i>oe/Fi,ei=Zi>le/Fi;if(!(z||a.gf||a.Be||yi||ei))return!0;tt=ut.x-tt,oe=ue.x,Ct=ut.right+Ct,le=ue.right+te,Mt=ut.y-Mt;var Xr=ue.y;ut=ut.bottom+kt,ue=ue.bottom+re;var Ar="1px";if(kt="1px",a.scrollMode===Td&&(yi||ei)&&(yi&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(yi=1,tt+1<oe&&(yi=Math.max((oe-tt)*Fi+a.Aa,yi)),Ct>le+1&&(yi=Math.max((Ct-le)*Fi+a.Aa,yi)),Jt+te+1<_i&&(yi=Math.max((_i-Jt)*Fi+a.Aa,yi)),Ar=yi.toString()+"px"),ei&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(yi=1,Mt+1<Xr&&(yi=Math.max((Xr-Mt)*Fi+a.ya,yi)),ut>ue+1&&(yi=Math.max((ut-ue)*Fi+a.ya,yi)),pn+re+1<Zi&&(yi=Math.max((Zi-pn)*Fi+a.ya,yi)),kt=yi.toString()+"px")),yi=Ar!=="1px",ei=kt!=="1px",yi&&ei||!yi&&!ei||(ei&&(le-=a.Db),yi&&(ue-=a.Db),_i<Jt+te||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(te=1,tt+1<oe&&(te=Math.max((oe-tt)*Fi+a.Aa,te)),Ct>le+1&&(te=Math.max((Ct-le)*Fi+a.Aa,te)),Jt+1<_i&&(te=Math.max((_i-Jt)*Fi+a.Aa,te)),Ar=te.toString()+"px"),yi=Ar!=="1px",te=a.ya,yi!==a.Be&&(te=yi?a.ya-a.Db:a.ya+a.Db),Zi<pn+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,Mt+1<Xr&&(re=Math.max((Xr-Mt)*Fi+te,re)),ut>ue+1&&(re=Math.max((ut-ue)*Fi+te,re)),pn+1<Zi&&(re=Math.max((Zi-pn)*Fi+te,re)),kt=re.toString()+"px"),ei=kt!=="1px"),a.qr&&yi===a.Be&&ei===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(yi!==a.Be&&(Ar==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=yi,je.style.width=Ar,ei!==a.gf&&(kt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=et.alloc(),ei?(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)),et.free(re))),z&&Ec(a),a.gf=ei,je.style.height=kt,a.gu=!0,z&&(a.pn=!0),y=Te.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Jt+1<_i?y=(a.position.x-tt)*Fi:tt+1<oe?y=Te.scrollWidth-Te.clientWidth:Ct>le+1&&(y=a.position.x*Fi)),a.tn)switch(a.bu){case"negative":y=-(Te.scrollWidth-y-Te.clientWidth);break;case"reverse":y=Te.scrollWidth-y-Te.clientWidth}return Te.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(pn+1<Zi?Te.scrollTop=(a.position.y-Mt)*Fi:Mt+1<Xr?Te.scrollTop=Te.scrollHeight-Te.clientHeight:ut>ue+1&&(Te.scrollTop=a.position.y*Fi)),oe=a.Aa,le=a.ya,Te.style.width=oe+(a.gf?a.Db:0)+"px",Te.style.height=le+(a.Be?a.Db:0)+"px",x!==oe||b!==le||a.animationManager.zb?(x=_t.allocAt(E,me,we,Me),a.onViewportBoundsChanged(x,a.viewportBounds,Fi,z),_t.free(x),!1):!0}Ne=fn.prototype,Ne.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Rt("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&&Rt('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)}},Ne.oi=function(a){this.partManager.oi(a);var y=this;Yf(a,function(x){kh(y,x)}),(a instanceof jo||a instanceof qr&&a.placeholder!==null)&&a.v(),a.data!==null&&Yf(a,function(x){vy(y.partManager,x)}),At(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()},Ne.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()},Ne.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))}Ne.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)},Ne.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},fn.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 Ai;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 Bi){if(y.add(x,a.Pd(E,x,x.location)),x instanceof qr&&(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 xi)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=et.alloc(),te=et.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=yn(),oe=yn(),le=y.iterator,ue=et.alloc();le.next();){var me=le.key,we=le.value;if(me.Zc()){var Me=hg(a,me,y);Me!==null?re.push(new ie(me,we,Me)):(!E||me.canMove())&&(Me=we.point,z.assign(Me),a.computeMove(me,z.add(te),b,ue),me.location=ue,we.shifted===void 0&&(we.shifted=new et),we.shifted.assign(ue.re(Me)))}else le.key instanceof xi&&oe.push(le.sa)}for(et.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 et),me.node.location=z.add(me.Su.shifted);for(E=et.alloc(),le=et.alloc(),me=oe.length,we=0;we<me;we++){var Te=oe[we];if(Me=Te.key,Me instanceof xi)if(Me.suspendsRouting){Me.Tg=null,ue=Me.fromNode;var je=Me.toNode;if(a.draggedLink!==null&&b.dragsLink)if(je=Te.value.point,Me.dragComputation===null)y.add(Me,a.Pd(b,Me,te)),Gh(Me,te.x-je.x,te.y-je.y);else{Te=et.allocAt(0,0),(ue=Me.i(0))&&ue.w()&&Te.assign(ue);var ut=ue=et.alloc().assign(Te).add(te);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(ut=et.alloc(),Gf(a,Me,ue,ut,b)),ue.assign(Me.dragComputation(Me,ue,ut)).re(Te),y.add(Me,a.Pd(b,Me,ue)),Gh(Me,ue.x-je.x,ue.y-je.y),et.free(Te),et.free(ue),ut!==ue&&et.free(ut)}else ue!==null&&(E.assign(ue.location),ut=y.I(ue),ut!==null&&E.re(ut.point)),je!==null&&(le.assign(je.location),ut=y.I(je),ut!==null&&le.re(ut.point)),ue!==null&&je!==null?E.Xa(le)?(ue=Te.value.point,je=z,je.assign(E),je.re(ue),y.add(Me,a.Pd(b,Me,E)),Gh(Me,je.x,je.y)):(Me.suspendsRouting=!1,Me.bb()):(Te=Te.value.point,ue=ue!==null?E:je!==null?le:te,y.add(Me,a.Pd(b,Me,ue)),Gh(Me,ue.x-Te.x,ue.y-Te.y))}else(Me.fromNode===null||Me.toNode===null)&&(ue=Te.value.point,y.add(Me,a.Pd(b,Me,te)),Gh(Me,te.x-ue.x,te.y-ue.y))}et.free(z),et.free(te),et.free(E),et.free(le),On(re),On(oe),x||($s(a),Ad(a,y))}}fn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new et),b.assign(y),a===null)return b;var E=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=et.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&&et.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=et.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),et.free(z)}}function $f(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof xi&&(y.suspendsRouting=!0)}function Ad(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof xi&&(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}Ne=fn.prototype,Ne.Pd=function(a,y,x){if(x===void 0)return new Zc(jr);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Zc(new et(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&&Rt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Rt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Rt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Rt("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&&Rt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Ne.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},Ne.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},Ne.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},Ne.kA=function(a){if(a.diagram!==this&&Rt("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()}}},Ne.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Ne.Yw=function(a){return this.pf===null&&(this.pf=new Dn),this.pf.add(a),this.model.Pe(a),this},Ne.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Ne.Pe=function(a){return this.zg===null&&(this.zg=new Dn),this.zg.add(a),this},Ne.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Ne.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)},Ne.cb=function(a,y,x,b,E,z,te){z===void 0&&(z=null),te===void 0&&(te=null);var re=new wa;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)},Ne.g=function(a,y,x,b,E){this.cb(Ca,a,this,y,x,b,E)},fn.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===Ca){var E=a.object;if(Ea(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 fi)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 ba){var ue=a.oldParam===!0;typeof re=="number"&&oe instanceof pr&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),te.pc(ue?re:-1,oe,ue)):te.oi(re,oe,ue))}else te instanceof fn?typeof re=="number"&&oe instanceof ba&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):Rt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===cs){var me=a.object,we=a.oldParam,Me=a.oldValue;if(me instanceof fi)typeof we=="number"&&Me instanceof Qt?y?me.Gb(we,Me):me.pc(we):typeof we=="number"&&Me instanceof Cs&&(Me.isRow?dS(me,we,y?Me:void 0):hS(me,we,y?Me:void 0));else if(me instanceof ba){var Te=a.newParam===!0;typeof we=="number"&&Me instanceof pr&&(y?0>me.Pa.indexOf(Me)&&me.oi(we,Me,Te):(Me.isSelected=!1,Me.isHighlighted=!1,Me.Wb(),me.pc(Te?we:-1,Me,Te)))}else me instanceof fn?typeof we=="number"&&Me instanceof ba&&(y?(Me.Xe(this),this.Wa.Gb(we,Me)):this.Wa.mb(we)):Rt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ll&&Rt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},fn.prototype.Ea=function(a){return this.undoManager.Ea(a)},fn.prototype.eb=function(a){return this.undoManager.eb(a)},fn.prototype.Kf=function(){return this.undoManager.Kf()},fn.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}},fn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},fn.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=et.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,et.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))}}fn.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=hi.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=et.alloc(),en.No(a,te,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),hi.free(b),x.part.location=y,et.free(y)}}fn.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)}},fn.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))},fn.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 pr||Rt("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 pr||Rt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},fn.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()}},Ne=fn.prototype,Ne.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Ne.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 pr||Rt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Ne.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,z=et.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)),et.free(z);return}Rt("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):Rt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),et.free(z)},Ne.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)},Ne.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Ne.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)},Ne.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 Me=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,Me),we=Math.max(we,Me),Me=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,b),we=Math.max(we,b),Me=Math.min(Me,x),y=Math.max(y,x),z=Math.min(z,te),we=Math.max(we,te),Me=Math.min(Me,E),y=Math.max(y,E),new _t(z,Me,we-z,y-Me)},Ne.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),Nr(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}fn.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;Un(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}}}}}fn.prototype.Wd=function(){this.partManager.Wd()},fn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},fn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},fn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},fn.prototype.Vb=function(a){return this.partManager.Vb(a)},fn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Ne=fn.prototype,Ne.Lc=function(a){return this.partManager.Lc(a)},Ne.ii=function(a){return this.partManager.ii(a)},Ne.Kc=function(a){return this.partManager.Kc(a)},Ne.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:on(Oi(y)))},Ne.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:on(Oi(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())}Ne.Va=function(){if(this.Zi){var a=_t.alloc();yg(this,this.computeBounds(a)),_t.free(a)}},Ne.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},Ne.qz=function(){return this.ai.iterator},Ne.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),Pa(a,y),E.isValidLayout=!0):a.xh=!0)}}Ne.yz=function(){for(var a=new Dn,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 Dn;x.add(E,te),x.add(z,te),b.add(E,E),b.add(z,E)}var x=new Ai,b=new Ai;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;Rt("Unknown DiagramEvent name: "+y)}Ne.Bj=function(a,y){return a=Dd(this,a),a!==null&&a.add(y),this},Ne.am=function(a,y){a=Dd(this,a),a!==null&&a.remove(y)},Ne.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}Ne.Yj=function(a,y){return uf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},fn.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 Bi&&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 qr)for(y=y.memberParts;y.next();)E=y.value,E instanceof Bi&&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)}fn.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=Un(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))}fn.prototype.ug=function(){this.vk!==-1&&(at.clearTimeout(this.vk),this.vk=-1)},fn.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=et.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(jr)||(y=new et(y.x+z.x/E,y.y+z.y/E)),_t.free(b),et.free(z),y},Ne=fn.prototype,Ne.Cs=function(){return null},Ne.av=function(){return null},Ne.bs=function(a,y){this.pj.add(a,y)},Ne.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof qr&&(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}Ne.Wz=function(a){return Ha?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Ne.Jx=function(a){return a===void 0&&(a={}),lh(this,this.Xz,a)},Ne.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"&&Rt('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"&&Rt("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 hi(1/0,1/0):new hi(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,Me=y.elementFinished||null,Te=y.showTemporary;Te===void 0&&(Te=!me),y=y.showGrid,y===void 0&&(y=Te),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof le=="number"?le=new zi(le):le instanceof zi||Rt("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=Me,ls(a,b.context,le,new hi(me.width,me.height),a.Ca,a.pa,oe,ue,Te,y),b.context):(a.Xm=!1,ls(a,je,le,new hi(me.width,me.height),a.Ca,a.pa,oe,ue,Te,y),a.Xm=!0,me.context);var ut=a.Pp,tt=a.documentBounds.copy();if(tt.Fv(a.yb),Te)for(var Ct=a.Wa.s,Mt=Ct.length,kt=0;kt<Mt;kt++){var Jt=Ct[kt];if(Jt.visible&&Jt.isTemporary){Jt=Jt.Pa.s;for(var pn=Jt.length,Fi=0;Fi<pn;Fi++){var _i=Jt[Fi];_i.isInDocumentBounds&&_i.isVisible()&&(_i=_i.actualBounds,_i.w()&&tt.ed(_i))}}}if(Ct=new et(tt.x,tt.y),oe!==null){for(Mt=new _t(0,0,0,0),kt=!0,Jt=oe.iterator,Jt.reset();Jt.next();)pn=Jt.value,pn instanceof pr&&(Fi=pn.layer,Fi!==null&&!Fi.visible||Fi!==null&&!Te&&Fi.isTemporary||!pn.isVisible()||(pn=pn.actualBounds,pn.w()&&(kt?(kt=!1,Mt.assign(pn)):Mt.ed(pn))));tt.width=Mt.width,tt.height=Mt.height,Ct.x=Mt.x,Ct.y=Mt.y}return re!==null&&re.w()&&(Ct=re,z||(z=ut)),Mt=re=0,le!==null&&(re=le.left+le.right,Mt=le.top+le.bottom),kt=Jt=0,E!==null&&(Jt=E.width,kt=E.height,isFinite(Jt)&&(Jt=Math.max(0,Jt-re)),isFinite(kt)&&(kt=Math.max(0,kt-Mt))),E!==null&&z!==null?(z==="NaN"&&(z=ut),E.w()?(E=Jt,tt=kt):isNaN(kt)?(E=Jt,tt=tt.height*z):(E=tt.width*z,tt=kt)):E!==null?E.w()?(z=Math.min(Jt/tt.width,kt/tt.height),E=Jt,tt=kt):isNaN(kt)?(z=Jt/tt.width,E=Jt,tt=tt.height*z):(z=kt/tt.height,E=tt.width*z,tt=kt):z!==null?z==="NaN"&&te.w()?(z=Math.min((te.width-re)/tt.width,(te.height-Mt)/tt.height),z>ut?(z=ut,E=tt.width,tt=tt.height):(E=te.width,tt=te.height)):(E=tt.width*z,tt=tt.height*z):(z=ut,E=tt.width,tt=tt.height),le!==null?(E+=re,tt+=Mt):le=new zi(0),te!==null&&(ut=te.width,te=te.height,isNaN(ut)&&(ut=2e3),isNaN(te)&&(te=2e3),isFinite(ut)&&(E=Math.min(E,ut)),isFinite(te)&&(tt=Math.min(tt,te))),me.width=Math.ceil(E),me.height=Math.ceil(tt),x==="SVG"?b===null?null:(b.resize(me.width,me.height,me.width,me.height),b.ownerDocument=we,b.hs=Me,ls(a,b.context,le,new hi(Math.ceil(E),Math.ceil(tt)),z,Ct,oe,ue,Te,y),b.context):(a.Xm=!1,ls(a,je,le,new hi(Math.ceil(E),Math.ceil(tt)),z,Ct,oe,ue,Te,y),a.Xm=!0,me.context)}ft.Object.defineProperties(fn.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 Po(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 Po(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)&&ni(a,"0 <= value <= 1",fn,"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&&ni(a,">= 0",fn,"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&&ni(a,">= 0",fn,"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 ni(a,">= 0",fn,"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&&Rt("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=et.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)}et.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!==fi.Grid&&Rt("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||Rt("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 zi(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()||Rt("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()||Rt("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)):ni(a,"> 0",fn,"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)):ni(a,"> 0",fn,"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 zi(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&&Rt("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&&Rt("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 hi(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 zi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),ft.Object.defineProperties(fn,{licenseKey:{get:function(){return Ng.jc()},set:function(a){Ng.add(a.replace(/\s/g,""))}},version:{get:function(){return kd}}}),fn.prototype.makeImageData=fn.prototype.Jx,fn.prototype.makeImage=fn.prototype.Wz,fn.prototype.cacheGroupExternalLinks=fn.prototype.Fu,fn.prototype.addRenderer=fn.prototype.bs,fn.prototype.makeSVG=fn.prototype.av,fn.prototype.makeSvg=fn.prototype.Cs,fn.prototype.stopAutoScroll=fn.prototype.ug,fn.prototype.doAutoScroll=fn.prototype.gs,fn.prototype.isUnoccupied=fn.prototype.Yj,fn.prototype.raiseDiagramEvent=fn.prototype.R,fn.prototype.removeDiagramListener=fn.prototype.am,fn.prototype.addDiagramListener=fn.prototype.Bj,fn.prototype.findTreeRoots=fn.prototype.yz,fn.prototype.layoutDiagram=fn.prototype.Uz,fn.prototype.findTopLevelGroups=fn.prototype.qz,fn.prototype.findTopLevelNodesAndLinks=fn.prototype.rz,fn.prototype.ensureBounds=fn.prototype.Va,fn.prototype.findLinksByExample=fn.prototype.ls,fn.prototype.findNodesByExample=fn.prototype.ms,fn.prototype.findLinkForData=fn.prototype.Kc,fn.prototype.findNodeForData=fn.prototype.ii,fn.prototype.findPartForData=fn.prototype.Lc,fn.prototype.findLinkForKey=fn.prototype.findLinkForKey,fn.prototype.findNodeForKey=fn.prototype.Vb,fn.prototype.findPartForKey=fn.prototype.findPartForKey,fn.prototype.rebuildParts=fn.prototype.Wd,fn.prototype.transformViewToDoc=fn.prototype.Ps,fn.prototype.transformRectDocToView=fn.prototype.zA,fn.prototype.transformDocToView=fn.prototype.op,fn.prototype.centerRect=fn.prototype.es,fn.prototype.scrollToRect=fn.prototype.tv,fn.prototype.scroll=fn.prototype.scroll,fn.prototype.highlightCollection=fn.prototype.Jz,fn.prototype.highlight=fn.prototype.Iz,fn.prototype.selectCollection=fn.prototype.rA,fn.prototype.select=fn.prototype.select,fn.prototype.updateAllRelationshipsFromData=fn.prototype.rp,fn.prototype.updateAllTargetBindings=fn.prototype.updateAllTargetBindings,fn.prototype.commit=fn.prototype.commit,fn.prototype.rollbackTransaction=fn.prototype.Kf,fn.prototype.commitTransaction=fn.prototype.eb,fn.prototype.startTransaction=fn.prototype.Ea,fn.prototype.raiseChanged=fn.prototype.g,fn.prototype.raiseChangedEvent=fn.prototype.cb,fn.prototype.removeChangedListener=fn.prototype.ik,fn.prototype.addChangedListener=fn.prototype.Pe,fn.prototype.removeModelChangedListener=fn.prototype.mA,fn.prototype.addModelChangedListener=fn.prototype.Yw,fn.prototype.findLayer=fn.prototype.Qj,fn.prototype.removeLayer=fn.prototype.kA,fn.prototype.addLayerAfter=fn.prototype.Cy,fn.prototype.addLayerBefore=fn.prototype.Ww,fn.prototype.addLayer=fn.prototype.Al,fn.prototype.moveParts=fn.prototype.moveParts,fn.prototype.copyParts=fn.prototype.Kj,fn.prototype.removeParts=fn.prototype.Is,fn.prototype.remove=fn.prototype.remove,fn.prototype.add=fn.prototype.add,fn.prototype.clearDelayedGeometries=fn.prototype.bx,fn.prototype.setProperties=fn.prototype.nm,fn.prototype.attach=fn.prototype.Du,fn.prototype.set=fn.prototype.set,fn.prototype.resetInputOptions=fn.prototype.Sx,fn.prototype.setInputOption=fn.prototype.sA,fn.prototype.getInputOption=fn.prototype.Ql,fn.prototype.resetRenderingHints=fn.prototype.Tx,fn.prototype.setRenderingHint=fn.prototype.Xx,fn.prototype.getRenderingHint=fn.prototype.Gf,fn.prototype.maybeUpdate=fn.prototype.bd,fn.prototype.requestUpdate=fn.prototype.$b,fn.prototype.delayInitialization=fn.prototype.Xy,fn.prototype.isUpdateRequested=fn.prototype.Pz,fn.prototype.invalidateDocumentBounds=fn.prototype.Ya,fn.prototype.findObjectsNear=fn.prototype.og,fn.prototype.findPartsNear=fn.prototype.mz,fn.prototype.findObjectsIn=fn.prototype.Cf,fn.prototype.findPartsIn=fn.prototype.ux,fn.prototype.findObjectsAt=fn.prototype.ji,fn.prototype.findPartsAt=fn.prototype.lz,fn.prototype.findObjectAt=fn.prototype.ic,fn.prototype.findPartAt=fn.prototype.Ol,fn.prototype.focusObject=fn.prototype.zz,fn.prototype.alignDocument=fn.prototype.Jy,fn.prototype.zoomToRect=fn.prototype.BA,fn.prototype.zoomToFit=fn.prototype.zoomToFit,fn.prototype.diagramScroll=fn.prototype.kx,fn.prototype.focus=fn.prototype.focus;var Uf=new Ai,np=null,Ha=at.document!==void 0,Ih=null,Bd="",xl=new Xt(fn,"None",0),tu=new Xt(fn,"Uniform",1),Oh=new Xt(fn,"UniformToFill",2),uh=new Xt(fn,"CycleAll",10),Cg=new Xt(fn,"CycleNotDirected",11),bg=new Xt(fn,"CycleNotDirectedFast",12),Eg=new Xt(fn,"CycleNotUndirected",13),Mg=new Xt(fn,"CycleDestinationTree",14),Lg=new Xt(fn,"CycleSourceTree",15),Td=new Xt(fn,"DocumentScroll",1),cf=new Xt(fn,"InfiniteScroll",2),hd=new Xt(fn,"TreeParentCollapsed",21),ts=new Xt(fn,"AllParentsCollapsed",22),ch=new Xt(fn,"AnyParentsCollapsed",23),Ng=new Dn,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=di("7ca11abfd022028846");y[x]=di("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",cn.Dx+"4ae6247590da4bb21c324ba3a84e385776",ro.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",en.za],E=1;5>E;E++)y[di("7ca11abfd7330390")](di(b[E-1]),10,15*E);for(y[x]=di("39f046ebb36e4b"),x=1;5>x;x++)y[di("7ca11abfd7330390")](di(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}}fn.className="Diagram",fn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=at.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof fn?y.H:null},fn.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},fn.useDOM=function(a){Ha=a?at.document!==void 0:!1},fn.isUsingDOM=function(){return Ha},fn.None=xl,fn.Uniform=tu,fn.UniformToFill=Oh,fn.CycleAll=uh,fn.CycleNotDirected=Cg,fn.CycleNotDirectedFast=bg,fn.CycleNotUndirected=Eg,fn.CycleDestinationTree=Mg,fn.CycleSourceTree=Lg,fn.DocumentScroll=Td,fn.InfiniteScroll=cf,fn.TreeParentCollapsed=hd,fn.AllParentsCollapsed=ts,fn.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[di("76a715b2f73f148a")][di("72ba13b5")]||"";if(a.Rc=!0,Ha){var b=fn[di("76a115b6ed251eaf4692")];if(b)for(var E=Ng.iterator;E.next()&&(b=E.value,b=di(b).split(di("39e9")),!(6>b.length));){var z=di(b[1]).split(".");if(b[4]!=="7da71ca0")break;var te=di(cn[di("6cae19")]).split(".");if(z[0]>te[0]||z[0]===te[0]&&z[1]>=te[1]){var re=at[di("74a900bae4370f8b51")][di("6fbb13a1c2311e8a57")].toLowerCase();if(te=re[di("73a612b6fb191d")](di("3aad1ab6e022098b4dc4")),z=di(b[2]),-1<te&&(re=re[di("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<te),!a.Rc))break;for(te=x[di("76ad18b4f73e")],re=x[di("73a612b6fb191d")](di("35e7"))+2;re<te;re++)y+=x[re];if(te=y[di("73a612b6fb191d")](z),0>te&&z!==di("7da71ca0ad381e90")&&(te=y[di("73a612b6fb191d")](di("76a715b2ef3e149757"))),0>te&&(te=y[di("73a612b6fb191d")](di("76a715b2ef3e149757"))),0>te&&(te=y[di("73a612b6fb191d")](di("2bfa41fdb3784bca12"))),0>te&&(te=x[di("73a612b6fb191d")](di("7baa19a6f76c1988428554"))),a.Rc=!(0<=te&&te<y[di("73a612b6fb191d")](di("35"))||y[di("73a612b6fb191d")](di("35"))===-1),!a.Rc||x[di("73a612b6fb191d")](di("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[di("73a612b6fb191d")](z)),!a.Rc)||(te=at[di("76a715b2f73f148a")][di("69ad17a1e03e")],re=te[di("73a612b6fb191d")](di("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(te[di("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[di("79a417a0f0181a8946")]=b,at.document[di("78a712aa")]){at.document[di("78a712aa")][di("7bb806b6ed32388c4a875b")](te),oe=at.getComputedStyle(te).getPropertyValue(di("78a704b7e62456904c9b12701b6532a8"));var le=at.getComputedStyle(te).getPropertyValue(di("75b817b0ea2202"));if(at.document[di("78a712aa")][di("68ad1bbcf533388c4a875b")](te),oe){if(te=at[di("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(di("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[di("76ad18b4f73e")],E=x[di("73a612b6fb191d")](di("35e7"))+2;E<ue;E++)y+=x[E];x=y[di("73a612b6fb191d")](di("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[di("73a612b6fb191d")](di("35")))}}}return 0<a.Rc&&a!==a.wy}rp.className="DiagramHelper";function Zc(a){this.j=a===void 0?new et:a,this.o=new et}ft.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 hi(NaN,NaN).freeze(),this.gridSnapCellSpot=Ba,this.gridSnapOrigin=new et(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function fe(a,y){if(typeof a=="string"||at.Element&&a instanceof Element)var x=fn.call(this,a)||this;else x=fn.call(this)||this,y=a;return de(x),y&&x.nm(y),x}jt(fe,fn);function de(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=zs,a.layout=new qs}fe.prototype.reset=function(){fn.prototype.reset.call(this),de(this)},fe.className="Palette";function Se(a,y){if(typeof a=="string"||at.Element&&a instanceof Element)var x=fn.call(this,a)||this;else x=fn.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 pr;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 zi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new dt,x.toolManager.mouseMoveTools),x.click=function(){var z=b.observed;if(z!==null){var te=z.viewportBounds,re=b.lastInput.documentPoint;z.position=new et(re.x-te.width/2,re.y-te.height/2)}},x.Pf=function(){b.Ya(),Ue(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&&Ue(b)},x.autoScale=tu,x.vb=!1,y&&Object.assign(x,y),x}jt(Se,fn),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),Re(this)}finally{this.ta=a,this.ib=y}}}fn.prototype.redraw.call(this)},Se.prototype.gc=function(){if(this.Ka===null&&Rt("No div specified"),this.ta===null&&Rt("No canvas specified"),!(this.ta instanceof Po)&&(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?Re(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 Re(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(),Me=re.Pa.s,Te=Me.length,je=0;je<Te;je++){var ut=Me[je];(b||ut!==le)&&re.Oj(E,ut,oe,null,me,we,!1)}_t.free(we),E.globalAlpha=ue}}}}}function Ue(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=hi.alloc();E.h(x.width,x.height),b.desiredSize=E,hi.free(E),a=2/a.scale,b instanceof io&&(b.strokeWidth=a),y.location=new et(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Se.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Er;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(),Ue(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))},ft.Object.defineProperties(Se.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Se&&Rt("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),Ue(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),Ue(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 dt(){Fa.call(this),this.j=null}jt(dt,Fa),dt.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 et(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new et(a.x-this.j.x,a.y-this.j.y)),!0)},dt.prototype.doActivate=function(){this.j=null,Fa.prototype.doActivate.call(this)},dt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},dt.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 et(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new et(a.x-this.j.x,a.y-this.j.y)}}},dt.className="OverviewDraggingTool";function lt(){Ir(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=Er,this.hb=!0,this.cg=null,this.ob=200}lt.prototype.toString=function(){return"CommandHandler"},lt.prototype.Xe=function(a){this.H=a},lt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=$i?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()},lt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},lt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof fa&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},lt.prototype.canStopCommand=function(){return!0},lt.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=""}},lt.prototype.canSelectAll=function(){return this.diagram.allowSelect},lt.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=""}},lt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},lt.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)},lt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},lt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},lt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},lt.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 Dn,x.addAll(z),Ih=x,Bd=y.model.dataFormat}}y.R("ClipboardChanged",x)},lt.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},lt.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 et(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=""}},lt.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)},lt.prototype.undo=function(){this.diagram.undoManager.undo()},lt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},lt.prototype.redo=function(){this.diagram.undoManager.redo()},lt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},lt.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))},lt.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)},lt.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))},lt.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)},lt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},lt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},lt.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=Er):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Fs(y)},lt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},lt.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=Ht(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 Bi&&oe.isTreeExpanded&&(!(oe instanceof qr)||oe.isSubGraphExpanded);)oe=E.pop();0<E.length?(oe instanceof pr&&y.tv(oe.actualBounds),oe instanceof Bi&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof qr&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof pr&&y.es(oe.actualBounds),y.am("LayoutCompleted",te)),y.eb("Scroll To Part")},te=function(){Un(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 Ht(a,y,x){if(y.isVisible())return x;if(y instanceof jo)Ht(a,y.adornedPart,x);else if(y instanceof xi){var b=y.fromNode;b!==null&&Ht(a,b,x),y=y.toNode,y!==null&&Ht(a,y,x)}else y instanceof Bi&&(b=y.labeledLink,b!==null&&Ht(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Ht(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Ht(a,y,x));return x}lt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof pr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},lt.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 Dn;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 Bi&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},lt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Bi&&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 Bi&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},lt.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 Dn;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 Bi&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},lt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Bi)||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 Bi&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},lt.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 Dn,z=a.selection.iterator;z.next();){var te=z.value;te.Zc()&&te.canGroup()&&E.add(te)}for(var re=new Dn,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 qr)hc(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Me=y.copyNodeData(x);tn(Me)&&(y.xf(Me),b=a.ii(Me))}if(b!==null){me!==null&&this.isValidMember(me,b)&&(b.containingGroup=me);for(var Te=re.iterator;Te.next();){var je=Te.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=""}}}},lt.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 Rn(a){var y=yn();for(a=a.iterator;a.next();){var x=a.value;x instanceof xi||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 On(y),a}lt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof xi)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},lt.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 Dn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var z=E.value;z instanceof qr&&z.canUngroup()&&b.add(z)}var te=new Dn;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 xi)){var Me=we.data;Me!==null?x.mp(Me,ue):we.containingGroup=le}}y.remove(oe)}}y.R("SelectionUngrouped",b,te)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},lt.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 qr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof qr&&y.canUngroup())return!0;return!1},lt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Rn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},lt.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 Dn;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 qr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},lt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof qr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof qr&&y.isSubGraphExpanded)return!0;return!1},lt.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 Dn;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 qr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},lt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof qr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof qr&&!y.isSubGraphExpanded)return!0;return!1},lt.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)}},lt.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},lt.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(So):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new et(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,na(x,!1,a)}},lt.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)},lt.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 Ai,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 xi&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},ft.Object.defineProperties(lt.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||Rt("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}}}),lt.className="CommandHandler",Ed=function(){return new lt};function Qt(){Ir(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new et(NaN,NaN).freeze(),this.jd=la,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=Ko,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,oi,Ji,lr,Pr,_r,fo,ao,Co,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()},Ne=Qt.prototype,Ne.qb=function(a){a.classType===xi?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Rt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Qt&&(this.stretch=a)},Ne.toString=function(){return $n(this.constructor)+"#"+xr(this)},Ne.th=function(){this.A!==null&&(this.A.nc=!0)};function so(a){a.A===null?a.A=new Fr:a.A.nc&&(a.A=a.A.copy())}Ne.Xc=function(){if(this.ba===null){var a=new no;a.Xi=La,a.yj=La,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Ne.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===Ca&&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 Ai),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 fi&&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 fi&&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))}}Ne.ks=function(a){return this.bindingId===a?this:null},Ne.g=function(a,y,x){this.cb(Ca,a,this,y,x)},Ne.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))}Ne.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Eo(a.x,a.y,0,0,0,b.height)<=y||Eo(a.x,a.y,0,b.height,b.width,b.height)<=y||Eo(a.x,a.y,b.width,b.height,b.width,0)<=y||Eo(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},Ne.se=function(){return!0},Ne.ca=function(a){var y=et.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return et.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=Sr(x.x-te*oe,x.y-te*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),et.free(y),a}return E=!1,(this instanceof jo||this instanceof io?Sr(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)),et.free(y),E},Ne.gh=function(a){var y=this.naturalBounds;return Sr(0,0,y.width,y.height,a.x,a.y)},Ne.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=et.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)))),et.free(E),_t.free(y),b},Ne.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=et.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)))),et.free(E),b},Ne.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=et.allocAt(0,0),E=et.allocAt(0,x.height),z=et.allocAt(x.width,x.height),te=et.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=et.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)))),et.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 et.free(b),et.free(E),et.free(z),et.free(te),re},Ne.ga=function(a,y){if(y===void 0&&(y=new et),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},Ne.mi=function(a){a===void 0&&(a=new _t);var y=this.naturalBounds,x=this.oe,b=et.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),hr(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),hr(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),hr(a,b.x,b.y,0,0),et.free(b),a},Ne.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},Ne.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Ne.qs=function(a,y){return y===void 0&&(y=new et),y.assign(a),this.oe.Cd(y),y},Ne.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ne.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(mt(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 fi;switch(Fl(this,!0)){case oi: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 Pr: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()||Rt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),gt(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(),At(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()||Rt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Vt(this,!1),_t.free(z)},Ne=Qt.prototype,Ne.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=oi),y){case oi:(x>b||z>E)&&(gt(a,!0),a.measure(x>b?b:x,z>E?E:z,0,0));break;case ci:gt(a,!0),a.measure(b,E,0,0);break;case lr:gt(a,!0),a.measure(b,z,0,0);break;case Pr:gt(a,!0),a.measure(x,E,0,0)}}}Ne.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(),Ri(a,y)||(x.oh(),this.Pn(x)))},Ne.Pn=function(a){this.portId!==null&&(_v(a,!0),a instanceof Bi&&$S(a,this))},Ne.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 fi&&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 Ro&&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 Ro&&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 Me=this.naturalBounds;we=this.wh;var Te=we.m11,je=we.m21,ut=we.dx,tt=we.m12,Ct=we.m22,Mt=we.dy,kt,Jt=kt=0;we=kt*Te+Jt*je+ut;var pn=kt*tt+Jt*Ct+Mt;kt=Me.width+me,Jt=0;var Fi=kt*Te+Jt*je+ut;kt=kt*tt+Jt*Ct+Mt,Jt=Math.min(we,Fi);var _i=Math.min(pn,kt),Zi=Math.max(we+0,Fi)-Jt,yi=Math.max(pn+0,kt)-_i;we=Jt,pn=_i,kt=Me.width+me,Jt=Me.height+me,Fi=kt*Te+Jt*je+ut,kt=kt*tt+Jt*Ct+Mt,Jt=Math.min(we,Fi),_i=Math.min(pn,kt),Zi=Math.max(we+Zi,Fi)-Jt,yi=Math.max(pn+yi,kt)-_i,we=Jt,pn=_i,kt=0,Jt=Me.height+me,Fi=kt*Te+Jt*je+ut,kt=kt*tt+Jt*Ct+Mt,Jt=Math.min(we,Fi),_i=Math.min(pn,kt),Zi=Math.max(we+Zi,Fi)-Jt,yi=Math.max(pn+yi,kt)-_i,we=Jt,pn=_i,me=y.viewportBounds,Me=me.x,Te=me.y,we=!(we>me.width+Me||Me>Zi+we||pn>me.height+Te||Te>yi+pn)}if(we){if(we=(this.l&256)!==0,a.clipInsteadOfFill&&(we=!1),this instanceof ua&&(a.font=this.font),we){if(pn=re.se()?re.naturalBounds:re.actualBounds,Zi=Math.max(te.x,pn.x),yi=Math.max(te.y,pn.y),me=Math.min(te.right,pn.right)-Zi,Me=Math.min(te.bottom,pn.bottom)-yi,Te=this.tb,Te!==null&&(Zi=Te.x,yi=Te.y,me=Te.width,Me=Te.height),Zi>te.width+te.x||te.x>pn.width+pn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Zi,yi,me,Me),a.clip()}if(ue){if(!le.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}oe&&(pn=le.shadowOffset,a.Ev(pn.x*y.scale*this.scale*y.Mb,pn.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 fi)),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===fi.Auto||y.type===fi.Spot)&&y.Pb()!==a)}Ne.Dv=function(){};function mu(a,y,x,b){Za(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Ro&&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 Ro&&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===fi.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 fi;var re=a instanceof fi?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)}Ne.$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"+bo++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:E,width:te,height:x}),this instanceof fi&&(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=Oi(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()}}Ne.hh=function(){},Ne.lv=function(){this.Uc=!0},Ne.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 fi?zh(this):!1;if(!(this instanceof fi&&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 fi)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 fi))&&(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},Ne.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,Me=0,Te=0,je=0,ut=0;if(ut=je=0,E?(je=te.x,ut=te.y):b||(je-=le/2,ut-=le/2),me=x.start.x*re+x.start.offsetX,we=x.start.y*oe+x.start.offsetY,Me=x.end.x*re+x.end.offsetX,Te=x.end.y*oe+x.end.offsetY,me+=je,Me+=je,we+=ut,Te+=ut,x.type===gh)ue=y.createLinearGradient(me,we,Me,Te);else if(x.type===Qu)ut=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(je=0,ut=Math.max(re,oe)/2):je=x.startRadius,ue=y.createRadialGradient(me,we,je,Me,Te,ut);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 tt=a.diagram;tt!==null&&x.yk===-1&&Un(function(){tt.redraw()},600)}}b?y.fillStyle=ue:y.strokeStyle=ue}}}Ne.rg=function(a){if(a instanceof fi)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},Ne.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Ne.If=function(){for(var a=this instanceof fi?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()){Ie(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)}Ie(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)))}Ne.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=et.alloc();z.yi(y,x,b,E,So),a.rotate(this.Kb,z.x,z.y),et.free(z)}},Ne.v=function(a){if(!mt(this)){a===void 0&&(a=!1),gt(this,!0),Vt(this,!0);var y=this.panel;y===null||a||y.v()}},Ne.Uj=function(){mt(this)||(gt(this,!0),Vt(this,!0))};function bl(a){if(!At(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Bi&&a.Bd(),y.$b())),Vt(a,!0)}}Ne.Uk=function(){!(this.l&2048)&&(Ie(this,!0),$e(this,!0))},Ne.Wu=function(){$e(this,!0)},Ne.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===fi.Table?cc(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===fi.Auto&&b.Pb()===a?Os(a,ci,y):x===_r?b!==null?b.type===fi.Spot&&b.Pb()===a?Os(a,ci,y):(x=b.defaultStretch,x===_r?Os(a,oi,y):Os(a,x,y)):Os(a,oi,y):Os(a,x,y)}function cc(a,y,x,b){var E=a.stretch;if(E!==_r)return Os(a,E,b);var z=E=null;switch(y.stretch){case Pr: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===Pr||y===ci),E===!0&&z===!0?Os(a,ci,b):E===!0?Os(a,lr,b):z===!0?Os(a,Pr,b):Os(a,oi,b)}function Os(a,y,x){if(x)return y;if(y===oi||(x=a.desiredSize,x.w()))return oi;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===lr)return oi;if(y===ci)return Pr}else{if(y===Pr)return oi;if(y===ci)return lr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Pr)return oi;if(y===ci)return lr}else{if(y===lr)return oi;if(y===ci)return Pr}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 Ie(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 mt(a){return(a.l&8192)!==0}function gt(a,y){a.l=y?a.l|8192:a.l&-8193}function At(a){return(a.l&16384)!==0}function Vt(a,y){a.l=y?a.l|16384:a.l&-16385}Ne.Gj=function(){this.svg=null},Ne.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Ne.Av=function(){},Ne.zv=function(a){return this.pa=a,bl(this),!0},Ne.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Ne.kq=function(){return 0};function En(a){var y=a.part;if(y instanceof Bi&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||$S(y,a)}}function Jn(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof fi?a instanceof Bi?a.Bd():a.qm(a,function(x){En(x)}):En(a))}Ne.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)&&Rt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Dn),this.localBindings.add(E),this},Ne.set=function(a){return Object.assign(this,a),this},Ne.Du=function(a){return kn(this,a),this},Ne.apply=function(a){return a(this),this},Ne.nm=function(a){return Au(this,a),this},Ne.pz=function(){return this.ih()},Ne.ih=function(){for(var a=this instanceof fi?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Ne.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Ai),this.animationTriggers.add(a.propertyName,a),this};function Zn(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),tn(b)||Rt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=at.go[a]}if(b===null&&(E!=null&&E.constructor||Rt("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 fn&&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?Rt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):kn(b,z);return b}function kn(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 fi)y=Mc.I(y),y!==null&&(a.type=y);else if(a instanceof Ro){var x=Si(Ro,y);x!==null?a.type=x:Rt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Pi?(y=Si(Pi,y),y!==null&&(a.type=y)):a instanceof Bo&&(y=Si(Bo,y),y!==null&&(a.type=y));else if(y instanceof Qt)a instanceof fi||Rt("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):Rt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Xt)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):Rt("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):Rt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof ys)a instanceof Pi&&a.type===Pi.o?a.figures.add(y):Rt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Bo)a instanceof ys?a.segments.add(y):Rt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Ma)a instanceof fn||a instanceof qr?a.layout=y:Rt("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++)kn(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ro){x=new Ti;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)&&Rt("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)&&Rt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new Ti;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Au(a,E)}else Au(a,y);else Rt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Tn(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}ft.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 Fr),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 Fr),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 Fr),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:jr},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:_r},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)&&ni(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(),Jn(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 Ro&&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 Ro&&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 pr)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 et(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&&Rt("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,Jn(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 hi(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 hi(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:Ao},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 zi(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:oi},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()&&Rt("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&&ni(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&&ni(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&&ni(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&&ni(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 Bi||Rt("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),En(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&ni(a,">= 0",Qt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),En(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),En(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&&ni(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),En(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&ni(a,">= 0",Qt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),En(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),En(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&&ni(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 Ai,Tn("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=Zn(fi,fi.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof fi){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"},Zn(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 fi&&(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 fi&&(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 fi&&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 fi&&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 fi&&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 fi&&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}),Tn("TreeExpanderButton",function(){var a=Zn("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Zn(io,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ko},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 Bi){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}),Tn("SubGraphExpanderButton",function(){var a=Zn("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Zn(io,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ko},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 qr){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}),Tn("ToolTip",function(){return Zn(jo,fi.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new et(0,3),shadowBlur:5},Zn(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)}))}),Tn("ContextMenu",function(){return Zn(jo,fi.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new et(0,3),shadowBlur:5},new fs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Tn("ContextMenuButton",function(){var a=Zn("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}),Tn("PanelExpanderButton",function(a){var y=ri(a,"COLLAPSIBLE"),x=Zn("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},Zn(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}),Tn("CheckBoxButton",function(a){var y=ri(a);return a=Zn("Button",{desiredSize:new hi(14,14)},Zn(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:Ji,visible:!1},y!==""?new fs("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof fi){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}),Tn("CheckBox",function(a){a=ri(a),a=Zn("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new zi(0,1,0,0)});var y=Zn(fi,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new zi(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=oi=new Xt(Qt,"None",0),Qt.Default=_r=new Xt(Qt,"Default",0),Qt.Vertical=Pr=new Xt(Qt,"Vertical",4),Qt.Horizontal=lr=new Xt(Qt,"Horizontal",5),Qt.Fill=ci=new Xt(Qt,"Fill",3),Qt.Uniform=Ji=new Xt(Qt,"Uniform",1),Qt.UniformToFill=fo=new Xt(Qt,"UniformToFill",2),Qt.FlipVertical=ao=new Xt(Qt,"FlipVertical",1),Qt.FlipHorizontal=Co=new Xt(Qt,"FlipHorizontal",2),Qt.FlipBoth=Qo=new Xt(Qt,"FlipBoth",3),Qt.make=Zn,Qt.getBuilders=function(){var a=new Ai,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=Tn,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;Rt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Qt.takeBuilderArgument=ri;function Fr(){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=Ao,this.o=_o,this.hg=_r,this.ob=this.Bi=1,this.Pf=oi,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Fr.prototype.copy=function(){var a=new Fr;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=jr,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 no(){this.yj=this.Xi=Ko,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}no.prototype.copy=function(){var a=new no;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},no.className="LinkSettings";function uo(){this.ha=[1,0,0,1,0,0]}uo.prototype.copy=function(){var a=new uo;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},uo.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},uo.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},uo.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)}},uo.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 Po(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)}Po.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},Po.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),tn(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},Po.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Po.prototype.focus=function(){this.Oa.focus()},Po.prototype.mx=function(){this.ownerDocument=null},ft.Object.defineProperties(Po.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}}}),Po.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 uo,this.j=Wu(this),this.Nj=Wu(this,"gojs-diagram"),this.Hl=this.ti=null;var x=bo++,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 ya(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+")")}Ne=Uo.prototype,Ne.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,Me=y+me,Te=z?0:1;b=z?b-E:E-b,(1e-6<Math.abs(te-we)||1e-6<Math.abs(re-Me))&&this.path.push(["L",we,+Me]),0>b&&(b=b%oe+oe),b>le?(this.path.push(["A",x,x,0,1,Te,a-ue,y-me]),this.path.push(["A",x,x,0,1,Te,we,Me])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Te,a+x*Math.cos(E),y+x*Math.sin(E)])},Ne.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Ne.Se=function(a){this.addPath(this.path,this.rb,a||0)},Ne.bezierCurveTo=function(a,y,x,b,E,z){this.path.push(["C",a,y,x,b,E,z])},Ne.clearRect=function(){},Ne.clip=function(){this.Yl.clipPath=!0},Ne.closePath=function(){this.path.push(["z"])},Ne.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},Ne.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"+bo++,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+")"},Ne.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)}Ne.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)},Ne.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),ol(this,this.Yl)},Ne.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Ne.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)},Ne.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))},Ne.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])},Ne.lineTo=function(a,y){this.path.push(["L",a,y])},Ne.moveTo=function(a,y){this.path.push(["M",a,y])},Ne.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},Ne.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"])},Ne.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},Ne.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())},Ne.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]+")"}Ne.scale=function(a,y){this.rb.scale(a,y)},Ne.translate=function(a,y){this.rb.translate(a,y)},Ne.transform=function(){},Ne.yc=function(){},Ne.stroke=function(){yu(this,this.Yl)},Ne.jk=function(){this.clipInsteadOfFill||this.stroke()},Ne.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Ne.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"+bo++,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+")"}Ne.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 uo;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}Ne.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}Ne.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Ne.fs=function(){this.Ct=!1},Ne.Vc=function(){},Ne.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",fn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Po(this,at.document));var y=new Po(this,at.document,!0);a===void 0&&(a=new Ti);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)},fn.prototype.makeSvg=fn.prototype.Cs,fn.prototype.av=function(a){return this.Cs(a)},fn.prototype.makeSVG=fn.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},ft.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&&Rt("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}Ne=Gc.prototype,Ne.Wx=function(a){this.Z.imageSmoothingEnabled=a},Ne.arc=function(a,y,x,b,E,z){this.Z.arc(a,y,x,b,E,z)},Ne.beginPath=function(){this.Z.beginPath()},Ne.Se=function(){},Ne.bezierCurveTo=function(a,y,x,b,E,z){this.Z.bezierCurveTo(a,y,x,b,E,z)},Ne.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},Ne.clip=function(){this.Z.clip()},Ne.closePath=function(){this.Z.closePath()},Ne.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},Ne.createPattern=function(a,y){return this.Z.createPattern(a,y)},Ne.createRadialGradient=function(a,y,x,b,E,z){return this.Z.createRadialGradient(a,y,x,b,E,z)},Ne.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)},Ne.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Ne.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Ne.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Ne.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Ne.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},Ne.lineTo=function(a,y){this.Z.lineTo(a,y)},Ne.measureText=function(a){return this.Z.measureText(a)},Ne.moveTo=function(a,y){this.Z.moveTo(a,y)},Ne.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},Ne.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},Ne.restore=function(){this.Z.restore()},Ne.save=function(){this.yc(),this.Z.save()},Gc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Ne=Gc.prototype,Ne.setTransform=function(a,y,x,b,E,z){this.El.setTransform(a,y,x,b,E,z)},Ne.scale=function(a,y){this.El.scale(a,y)},Ne.translate=function(a,y){this.El.translate(a,y)},Ne.stroke=function(){this.Z.stroke()},Ne.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}},Ne.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Ne.ng=function(a,y){if(a instanceof Ro&&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)},Ne.jk=function(){this.Hm||this.stroke()},Ne.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Ne.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Ne.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(hf),a.lineDashOffset=0)},Ne.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Ne.Hs=function(){},ft.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 Ro(a,y){sp||(ap(),sp=!0),Ir(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=So: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)}Ro.prototype.copy=function(){var a=new Ro;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},Ne=Ro.prototype,Ne.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Ne.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Ne.qb=function(a){a.classType===Ro&&(this.type=a)},Ne.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+")"},Ne.addColorStop=function(a,y){return this._isFrozen&&zn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&ni(a,"0 <= loc <= 1",Ro,"addColorStop:loc"),this.we===null&&(this.we=new Ai),this.we.add(a,y),this.na===jh&&(this.type=gh),this.xe=null,this},Ne.Vz=function(a,y){if(this._isFrozen&&zn(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)}Ne.Wy=function(a,y){if(this._isFrozen&&zn(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=ra.j;var b=ra.u,E=ra.o,z=ra.F;return Gu(y),x===void 0&&(x=.5),"rgba("+Math.round((ra.j-a)*x+a)+", "+Math.round((ra.u-b)*x+b)+", "+Math.round((ra.o-E)*x+E)+", "+Math.round((ra.F-z)*x+z)+")"}Ne.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 Ro?a.Gx():(Gu(a),128>(299*ra.j+587*ra.u+114*ra.o)/1e3):!1}function fh(a,y){switch(y){case up:y=100*Xf(ra.j);var x=100*Xf(ra.u),b=100*Xf(ra.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=ra.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,ra.j=255*op((3.2404542*Qs.j+-1.5371385*Qs.u+-.4985314*Qs.o)/100),ra.u=255*op(a/100),ra.o=255*op(y/100),ra.F=Qs.F,ra.j=Math.round(ra.j),255<ra.j?ra.j=255:0>ra.j&&(ra.j=0),ra.u=Math.round(ra.u),255<ra.u?ra.u=255:0>ra.u&&(ra.u=0),ra.o=Math.round(ra.o),255<ra.o?ra.o=255:0>ra.o&&(ra.o=0),"rgba("+ra.j+", "+ra.u+", "+ra.o+", "+ra.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:Rt("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,ra.j=a[0],ra.u=a[1],ra.o=a[2],ra.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,ra.j=0,ra.u=0,ra.o=0,ra.F=1)}}function _f(){var a=ra.j/255,y=ra.u/255,x=ra.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=ra.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 Ro||Rt("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}ft.Object.defineProperties(Ro.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&zn(this,a),this.na=a,this.start.Mc()&&(a===gh?this.start=zs:a===Qu&&(this.start=So)),this.end.Mc()&&(a===gh?this.end=as:a===Qu&&(this.end=So)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&zn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&zn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&zn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&zn(this,a),0>a&&ni(a,">= zero",Ro,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&zn(this,a),0>a&&ni(a,">= zero",Ro,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&zn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&zn(this,a),this.cr=a,this.xe=null}}}),Ro.prototype.isDark=Ro.prototype.Gx,Ro.prototype.darkenBy=Ro.prototype.Wy,Ro.prototype.lightenBy=Ro.prototype.Vz,Ro.prototype.addColorStop=Ro.prototype.addColorStop;var Dg=216/24389,gf=24389/27,pf=[95.047,100,108.883],Bg=null,ra=new $c,Su=new $c,Qs=new $c,dc=new $c,sp=!1;Ro.className="Brush";var jh;Ro.Solid=jh=new Xt(Ro,"Solid",0);var gh;Ro.Linear=gh=new Xt(Ro,"Linear",1);var Qu;Ro.Radial=Qu=new Xt(Ro,"Radial",2);var lp;Ro.Pattern=lp=new Xt(Ro,"Pattern",4);var up;Ro.Lab=up=new Xt(Ro,"Lab",5);var iS;Ro.HSL=iS=new Xt(Ro,"HSL",6),Ro.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},Ro.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)},Ro.lighten=function(a){return Rh(a)},Ro.lightenBy=Rh,Ro.darken=function(a){return Fg(a)},Ro.darkenBy=Fg,Ro.mix=Kc,Ro.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(){},ft.Object.defineProperties(Es.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return fi}}}),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"}jt(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 Me=le.position.y;isFinite(we)||(we=0),isFinite(Me)||(Me=0),le instanceof io&&le.isGeometryPositioned&&(le=le.strokeWidth/2,we-=le,Me-=le),hr(E,we,Me,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"}jt(zm,Es),zm.prototype.measure=function(a,y,x,b,E,z,te){var re=b.length;y=yn(),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!==oi&&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));On(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,Me=we.top+we.bottom,Te=z+E.bottom,je=me.height,ut=Fl(ue,!1);(isNaN(ue.desiredSize.height)&&ut===ci||ut===Pr)&&(je=Math.max(x.height-Me-Te,0)),Me=je+Me+Te,Te=ue.alignment,Te.Xb()&&(Te=a.defaultAlignment),Te.sb()||(Te=So),te&&(re-=me.width+we.left+we.right),ue.arrange(re+Te.offsetX+we.left,le+Te.offsetY+we.top+(x.height*Te.y-Me*Te.y),me.width,je),te||(re+=me.width+we.left+we.right)}}};function Hm(){this.xa="Base"}jt(Hm,Es),Hm.prototype.measure=function(a,y,x,b,E,z){var te=b.length;x=yn();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!==oi&&ue!==Pr)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,Yi(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);On(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,Me=we.left+we.right,Te=z+E.right,je=me.width,ut=Fl(ue,!1);(isNaN(ue.desiredSize.width)&&ut===ci||ut===lr)&&(je=Math.max(x.width-Me-Te,0)),Me=je+Me+Te,Te=ue.alignment,Te.Xb()&&(Te=a.defaultAlignment),Te.sb()||(Te=So),te&&(re-=me.height+we.bottom+we.top),ue.arrange(le+Te.offsetX+we.left+(x.width*Te.x-Me*Te.x),re+Te.offsetY+we.top,je,me.height),te||(re+=me.height+we.bottom+we.top)}}};function Zm(){this.xa="Base"}jt(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 Me=Math.max(z+ue,0),Te=Math.max(te+me,0),je=a.isClipping,ut=_t.allocAt(-le.left,-le.top,Me,Te),tt=_t.allocAt(0,0,z,te);Cv(oe,tt,!0),z=tt.width,te=tt.height;for(var Ct=!0,Mt=ph(a),kt=0;kt<re;kt++){var Jt=b[kt];we=y;var pn=x;if(Jt!==oe&&(Jt.visible||Jt===Mt)){le=Jt.margin;var Fi=le.left,_i=le.top;switch(Me=le.right+le.left,Te=le.top+le.bottom,le=Fl(Jt,!1),le){case ci:we=z,pn=te,_i=Fi=Te=Me=0;break;case lr:we=z,Fi=Me=0;break;case Pr:pn=te,_i=Te=0}Jt.measure(we,pn,0,0),we=Jt.measuredBounds,Me=Math.max(we.width+Me,0),Te=Math.max(we.height+Te,0),le=Jt.alignment,le.Xb()&&(le=a.defaultAlignment),le.sb()||(le=So);var Zi=Jt.alignmentFocus;if(Zi.Xb()&&(Zi=So),pn=null,Jt instanceof fi&&Jt.$e!==""&&(pn=Jt.fb(Jt.$e),pn===Jt&&(pn=null)),Fi=tt.x-Fi,_i=tt.y-_i,pn!==null){for(Jt.arrange(0,0,we.width,we.height),we=pn.actualBounds,we=et.allocAt(we.x+(Zi.x*we.width-Zi.offsetX),we.y+(Zi.y*we.height-Zi.offsetY)),pn=pn.panel;pn!==Jt;)pn.transform.Ga(we),pn=pn.panel;Fi+=le.x*z+le.offsetX-we.x,_i+=le.y*te+le.offsetY-we.y,et.free(we)}else Fi+=le.x*z+le.offsetX-(Zi.x*we.width+Zi.offsetX),_i+=le.y*te+le.offsetY-(Zi.y*we.height+Zi.offsetY);Ct?(Ct=!1,E.h(Fi,_i,Me,Te)):hr(E,Fi,_i,Me,Te)}}switch(Ct?E.assign(ut):je?E.Uu(tt.x,tt.y,tt.width,tt.height):hr(E,ut.x,ut.y,ut.width,ut.height),_t.free(ut),_t.free(tt),le=oe.stretch,le===_r&&(le=Fl(oe,!1)),le){case oi:return;case ci:if(!isFinite(y)&&!isFinite(x))return;break;case lr:if(!isFinite(y))return;break;case Pr:if(!isFinite(x))return}for(we=oe.measuredBounds,z=we.width,te=we.height,Me=Math.max(z+ue,0),Te=Math.max(te+me,0),le=oe.margin,tt=_t.allocAt(-le.left,-le.top,Me,Te),Cv(oe,tt,!0),z=tt.width,te=tt.height,y=0;y<re;y++)x=b[y],x===oe||!x.visible&&x!==Mt||(le=x.margin,Me=le.right+le.left,Te=le.top+le.bottom,we=x.measuredBounds,Me=Math.max(we.width+Me,0),Te=Math.max(we.height+Te,0),ue=x.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=So),x=x.alignmentFocus,x.Xb()&&(x=So),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,Me,Te)):hr(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,Me,Te));Ct?E.assign(ut):je?E.Uu(tt.x,tt.y,tt.width,tt.height):hr(E,ut.x,ut.y,ut.width,ut.height),_t.free(tt)},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,Me=le.height;ue=me.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=So);var Te=me.alignmentFocus;if(Te.Xb()&&(Te=So),le=null,me instanceof fi&&me.$e!==""&&(le=me.fb(me.$e),le===me&&(le=null)),le!==null){var je=le.actualBounds;for(Te=et.allocAt(je.x+(Te.x*je.width-Te.offsetX),je.y+(Te.y*je.height-Te.offsetY)),le=le.panel;le!==me;)le.transform.Ga(Te),le=le.panel;le=ue.x*te.width+ue.offsetX-Te.x,ue=ue.y*te.height+ue.offsetY-Te.y,et.free(Te)}else le=ue.x*te.width+ue.offsetX-(Te.x*we+Te.offsetX),ue=ue.y*te.height+ue.offsetY-(Te.y*Me+Te.offsetY);le+=te.x-x.x,ue+=te.y-x.y,me.visible&&me.arrange(z+le,oe+ue,we,Me)}}_t.free(te)};function Cv(a,y,x){var b=null;if(a instanceof fi&&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"}jt(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,Me=le.top+le.bottom;oe.measure(y,x,z,te),le=oe.measuredBounds;var Te=0,je=null;oe instanceof io&&(je=oe,Te=je.strokeWidth*je.scale);var ut=Math.max(le.width+we,0);le=Math.max(le.height+Me,0);var tt=Lv(oe),Ct=tt.x*ut+tt.offsetX;tt=tt.y*le+tt.offsetY;var Mt=Nv(oe),kt=Mt.x*ut+Mt.offsetX;for(Mt=Mt.y*le+Mt.offsetY,isFinite(y)&&(ue=Math.max(Math.abs(Ct-kt)-Te,0)),isFinite(x)&&(me=Math.max(Math.abs(tt-Mt)-Te,0)),Te=hi.alloc(),Te.h(0,0),a=ph(a),Mt=0;Mt<re;Mt++)tt=b[Mt],tt===oe||!tt.visible&&tt!==a||(le=tt.margin,ut=le.right+le.left,Ct=le.top+le.bottom,tt.measure(ue,me,0,0),le=tt.measuredBounds,ut=Math.max(le.width+ut,0),le=Math.max(le.height+Ct,0),Te.h(Math.max(ut,Te.width),Math.max(le,Te.height)));if(re===1)E.width=ut,E.height=le,hi.free(Te);else{switch(tt=Lv(oe),Mt=Nv(oe),re=b=0,Mt.x!==tt.x&&Mt.y!==tt.y&&(b=Te.width/Math.abs(Mt.x-tt.x),re=Te.height/Math.abs(Mt.y-tt.y)),hi.free(Te),Te=0,je!==null&&(Te=je.strokeWidth*je.scale,kv(je)===Ji&&(b=re=Math.max(b,re))),b+=Math.abs(tt.offsetX)+Math.abs(Mt.offsetX)+Te,re+=Math.abs(tt.offsetY)+Math.abs(Mt.offsetY)+Te,je=oe.stretch,je===_r&&(je=Fl(oe,!1)),je){case oi: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 Pr: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+Me}},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,Me=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,hr(z,Me,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=So),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&&(Sr(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"}jt(Gm,Es),Gm.prototype.measure=function(a,y,x,b,E){for(var z=b.length,te=yn(),re=yn(),oe=0;oe<z;oe++){var le=b[oe],ue=le instanceof fi?le:null;if(ue!==null&&zh(ue)&&le.visible){re.push(ue);for(var me=ue.O.s,we=me.length,Me=0;Me<we;Me++){var Te=me[Me];ue.type===fi.TableRow?Te.row=le.row:ue.type===fi.TableColumn&&(Te.column=le.column),te.push(Te)}}else te.push(le)}z=te.length,z===0&&(a.Fb(0),a.Eb(0));for(var je=[],ut=0;ut<z;ut++){var tt=te[ut];tt.visible&&(gt(tt,!0),Vt(tt,!0),je[tt.row]||(je[tt.row]=[]),je[tt.row][tt.column]||(je[tt.row][tt.column]=[]),je[tt.row][tt.column].push(tt))}On(te);var Ct=yn(),Mt=yn(),kt=yn(),Jt={count:0},pn={count:0},Fi=y,_i=x,Zi=a.rowDefs,yi=a.colDefs,ei=null;z=Zi.length;for(var Xr=0;Xr<z;Xr++)ei=Zi[Xr],ei!==void 0&&(ei.actual=0);z=yi.length;for(var Ar=0;Ar<z;Ar++)ei=yi[Ar],ei!==void 0&&(ei.actual=0);for(var Go=je.length,aa=0,Rs=0;Rs<Go;Rs++)je[Rs]&&(aa=Math.max(aa,je[Rs].length));var Vs=Math.min(a.topIndex,Go-1),Dl=Math.min(a.leftIndex,aa-1),js=0;Go=je.length;for(var Xh=ph(a),gs=0;gs<Go;gs++)if(je[gs]){aa=je[gs].length;var Yc=a.Fb(gs);Yc.actual=0;for(var Bl=Yc.oc=0;Bl<aa;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||Mt.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===oi||md||gs<Vs||Bl<Dl||(Jt[Bl]!==void 0||Tl!==ci&&Tl!==lr||(Jt[Bl]=-1,Jt.count++),pn[gs]!==void 0||Tl!==ci&&Tl!==Pr||(pn[gs]=-1,pn.count++),kt.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===oi||Tl===lr)){ei=a.Fb(gs);var Af=ei.Wc();js=Math.max(Ou-ei.actual,0),js+Af>_i&&(js=Math.max(_i-Af,0));var hv=ei.oa===0;ei.oc=ei.oc+js,ei.actual=ei.oa+js,_i=Math.max(_i-(js+(hv?Af:0)),0)}if(Pu.columnSpan===1&&(Tl===oi||Tl===Pr)){ei=a.Eb(Bl);var Dm=ei.Wc();js=Math.max(rg-ei.actual,0),js+Dm>Fi&&(js=Math.max(Fi-Dm,0));var Yy=ei.oa===0;ei.oc=ei.oc+js,ei.actual=ei.oa+js,Fi=Math.max(Fi-(js+(Yy?Dm:0)),0)}Ff&&Pu.Uj()}}}}}On(Ct);var Kd=0,yh=0;z=a.columnCount;for(var Kg=0;Kg<z;Kg++){var Df=yi[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=Zi[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=_i=Math.max(x-yh,0),Jh=Fi;z=kt.length;for(var Cu=0;Cu<z;Cu++){var vd=kt[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,pn[vd.row]=fv.oc===0&&pn[vd.row]!==void 0?Math.max(kp.height+yd,pn[vd.row]):null}var Vg=0,Ip=0,Bc;for(Bc in pn)Bc!=="count"&&(Vg+=pn[Bc]);for(Bc in Jt)Bc!=="count"&&(Ip+=Jt[Bc]);for(var el=hi.alloc(),Bm=0;Bm<z;Bm++){var Vl=kt[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(_i)&&pn[Vl.row]!==null?Vg===0?Qh=ps.actual+_i:Qh=pn[Vl.row]/Vg*Vd:pn[Vl.row]!==null?Qh=_i:Qh=ps.actual||_i,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+_i);break;case Pr: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(_i)&&(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,_i=Math.max(_i-js,0),pn[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))}}On(kt);var Ph=hi.alloc(),qc=yn(),ic=yn();if(z=Mt.length,z!==0){for(var Tf=0;Tf<Go;Tf++)if(je[Tf]){aa=je[Tf].length;var Rp=a.Fb(Tf);qc[Tf]=Rp.actual;for(var kf=0;kf<aa;kf++)if(je[Tf][kf]){var pv=a.Eb(kf);ic[kf]=pv.actual}}}for(var jp=0;jp<z;jp++){var ns=Mt[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 Pr: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++)ei=a.Fb(ns.row+qh),js=0,js=Tl===ci||Tl===Pr?Math.max(ei.minimum,qc[ns.row+qh]===0?ei.maximum:Math.min(qc[ns.row+qh],ei.maximum)):Math.max(ei.minimum,isNaN(ei.Hc)?ei.maximum:Math.min(ei.Hc,ei.maximum)),Ph.height+=js,Ru+=ei.minimum;for(var vc=1;vc<ns.columnSpan&&!(ns.column+vc>=a.columnCount);vc++)ei=a.Eb(ns.column+vc),js=0,js=Tl===ci||Tl===lr?Math.max(ei.minimum,ic[ns.column+vc]===0?ei.maximum:Math.min(ic[ns.column+vc],ei.maximum)):Math.max(ei.minimum,isNaN(ei.Hc)?ei.maximum:Math.min(ei.Hc,ei.maximum)),Ph.width+=js,mv+=ei.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++)ei=a.Fb(ns.row+Zp),Of+=ei.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++){ei=a.Fb(ns.row+wh);var nf=ei.oa||0,ug=tf(ns,ei,Ud);ei.actual=Math.min(ei.maximum,nf+ug),ei.oa!==nf&&(ef-=ei.oa-nf)}for(;0<ef;){var ed=ei.oa||0;if(isNaN(ei.height)&&ei.maximum>ed&&(ei.actual=Math.min(ei.maximum,ed+ef),ei.oa!==ed&&(ef-=ei.oa-ed)),ei.index===0)break;ei=a.Fb(ei.index-1)}}for(var _g=0,rf=0;rf<ns.columnSpan&&!(ns.column+rf>=a.columnCount);rf++)ei=a.Eb(ns.column+rf),_g+=ei.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++){ei=a.Eb(ns.column+cg);var km=ei.oa||0,qy=Ch(ns,ei,Qy);ei.actual=Math.min(ei.maximum,km+qy),ei.oa!==km&&(Xg-=ei.oa-km)}for(;0<Xg;){var vv=ei.oa||0;if(isNaN(ei.width)&&ei.maximum>vv&&(ei.actual=Math.min(ei.maximum,vv+Xg),ei.oa!==vv&&(Xg-=ei.oa-vv)),ei.index===0)break;ei=a.Eb(ei.index-1)}}}}On(Mt),hi.free(Ph),hi.free(el),qc!==void 0&&On(qc),ic!==void 0&&On(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++)yi[Sv]!==void 0&&(ei=a.Eb(Sv),isFinite(ei.width)?(Im+=ei.width,Im+=ei.Wc()):qm(ei)===Up?(Im+=ei.oa,Im+=ei.Wc()):ei.oa!==0&&(Kd+=ei.oa,Kd+=ei.Wc()));isFinite(yv.width)?Yg=Math.min(yv.width,px.width):Yg=Tl!==oi&&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++)yi[xv]!==void 0&&(ei=a.Eb(xv),isFinite(ei.width)||qm(ei)===Up||(ei.actual=ei.oa*Jx),ei.position=E.width,ei.oa!==0&&(E.width+=ei.oa,E.width+=ei.Wc()));z=a.rowCount;for(var Pv=0;Pv<z;Pv++)Zi[Pv]!==void 0&&(ei=a.Fb(Pv),isFinite(ei.height)?(Om+=ei.height,Om+=ei.Wc()):qm(ei)===Up?(Om+=ei.oa,Om+=ei.Wc()):ei.oa!==0&&(yh+=ei.oa,yh+=ei.Wc()));isFinite(yv.height)?Jg=Math.min(yv.height,px.height):Jg=Tl!==oi&&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++)Zi[wv]!==void 0&&(ei=a.Fb(wv),isFinite(ei.height)||qm(ei)===Up||(ei.actual=ei.oa*Qx),ei.position=E.height,ei.oa!==0&&(E.height+=ei.oa,E.height+=ei.Wc()));z=re.length;for(var eS=0;eS<z;eS++){var Rm=re[eS],tS=0,nS=0;Rm.type===fi.TableRow?(tS=E.width,ei=a.Fb(Rm.row),nS=ei.actual):(ei=a.Eb(Rm.column),tS=ei.actual,nS=E.height),Rm.measuredBounds.h(0,0,tS,nS),gt(Rm,!1)}On(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,Me=Math.min(a.topIndex,le-1);if(0<oe.length){for(;Me!==le&&(oe[Me]===void 0||oe[Me].oa===0);)Me++;Me=Math.max(Math.min(Me,le-1),0),me=-oe[Me].position}var Te=Math.min(a.leftIndex,ue-1);if(0<re.length){for(;Te!==ue&&(re[Te]===void 0||re[Te].oa===0);)Te++;Te=Math.max(Math.min(Te,ue-1),0),we=-re[Te].position}for(var je=0,ut=0;je!==le&&oe[je]===void 0;)je++;for(;ut!==le&&re[ut]===void 0;)ut++;ue=a.part,a.Fb(je),a.Eb(ut);for(var tt=0;tt<y.length;tt++){var Ct=y[tt];if(Ct instanceof fi&&Ct.visible&&zh(Ct)){if(Ct.type===fi.TableRow){re=a.Fb(Ct.row);var Mt=a.Eb(ut)}else re=a.Fb(je),Mt=a.Eb(Ct.column);oe=re.position+me+E,re.oa!==0&&(oe+=re.Io(Math.max(je,Me))),re=Mt.position+we+z,Mt.oa!==0&&(re+=Mt.Io(Math.max(ut,Te))),Mt=Ct.measuredBounds,Ct.Uk(),Ct.actualBounds.ka();var kt=Ct.actualBounds,Jt=_t.allocAt(kt.x,kt.y,kt.width,kt.height);kt.x=Ct.type===fi.TableRow?z:re,kt.y=Ct.type===fi.TableColumn?E:oe,kt.width=Mt.width,kt.height=Mt.height,Ct.actualBounds.freeze(),Vt(Ct,!1),Ri(Jt,kt)||ue===null||(ue.oh(),Ct.Pn(ue)),_t.free(Jt)}}for(tt=hi.alloc(),Ct=0;Ct<le;Ct++)if(te[Ct]){for(ue=te[Ct].length,Mt=a.Fb(Ct),oe=Mt.position+me+E,Mt.oa!==0&&(oe+=Mt.Io(Math.max(je,Me))),kt=0;kt<ue;kt++)if(te[Ct][kt]){Jt=a.Eb(kt),re=Jt.position+we+z,Jt.oa!==0&&(re+=Jt.Io(Math.max(ut,Te)));for(var pn=te[Ct][kt],Fi=pn.length,_i=0;_i<Fi;_i++){var Zi=pn[_i],yi=Zi.measuredBounds;tt.h(0,0);for(var ei=1;ei<Zi.rowSpan&&!(Ct+ei>=a.rowCount);ei++){var Xr=a.Fb(Ct+ei);Xr.oa!==0&&(tt.height+=Xr.total)}for(ei=1;ei<Zi.columnSpan&&!(kt+ei>=a.columnCount);ei++)Xr=a.Eb(kt+ei),Xr.oa!==0&&(tt.width+=Xr.total);var Ar=Jt.oa+tt.width,Go=Mt.oa+tt.height;ei=re,Xr=oe;var aa=Ar,Rs=Go,Vs=re,Dl=oe,js=Ar,Xh=Go;re+Ar>x.width&&(js=Math.max(x.width-re,0)),oe+Go>x.height&&(Xh=Math.max(x.height-oe,0));var gs=Zi.alignment;if(gs.Xb()){gs=a.defaultAlignment,gs.sb()||(gs=So);var Yc=gs.x,Bl=gs.y,Yh=gs.offsetX;gs=gs.offsetY;var Vu=Jt.alignment,pc=Mt.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=yi.width,pc=yi.height;var ku=Zi.margin,Pu=ku.left+ku.right,Ff=ku.top+ku.bottom,Jc=cc(Zi,Mt,Jt,!1);!isNaN(Zi.desiredSize.width)||Jc!==ci&&Jc!==lr||(Vu=Math.max(Ar-Pu,0)),!isNaN(Zi.desiredSize.height)||Jc!==ci&&Jc!==Pr||(pc=Math.max(Go-Ff,0)),Ar=Zi.maxSize,Go=Zi.minSize,Vu=Math.min(Ar.width,Vu),pc=Math.min(Ar.height,pc),Vu=Math.max(Go.width,Vu),pc=Math.max(Go.height,pc),Ar=pc+Ff,ei+=aa*Yc-(Vu+Pu)*Yc+Yh+ku.left,Xr+=Rs*Bl-Ar*Bl+gs+ku.top,Zi.visible&&(Sr(Vs,Dl,js,Xh,ei,Xr,yi.width,yi.height)?Zi.arrange(ei,Xr,Vu,pc):Zi.arrange(ei,Xr,Vu,pc,new _t(Vs,Dl,js,Xh)))}}}for(hi.free(tt),a=0;a<b;a++)x=y[a],z=x instanceof fi?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"}jt($m,Es),$m.prototype.measure=function(){},$m.prototype.arrange=function(){};function Km(){this.xa="Base"}jt(Km,Es),Km.prototype.measure=function(){},Km.prototype.arrange=function(){};function Vm(){this.xa="Base"}jt(Vm,Es),Vm.prototype.measure=function(a,y,x,b,E,z,te){1<b.length&&Rt("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),Me=Math.max(x-oe,0),Te=1;a.viewboxStretch===Ji?me!==0&&re!==0&&(Te=Math.min(we/me,Me/re)):me!==0&&re!==0&&(Te=Math.max(we/me,Me/re)),Te===0&&(Te=1e-4),b.Ca*=Te,ue!==b.scale&&(gt(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=So),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"}jt($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 Me=[],Te=a.O.s,je=Te.length,ut=0;ut<je;ut++){var tt=Te[ut],Ct=[];if(Me.push(Ct),tt.visible){var Mt=tt.interval;if(!(0>Mt)){tt=Ev(tt.figure);for(var kt=0;kt<je;kt++)if(kt!==ut){var Jt=Te[kt];Jt.visible&&Ev(Jt.figure)===tt&&(Jt=Jt.interval,Jt>Mt&&Ct.push(Jt))}}}}for(Te=a.O.s,je=Te.length,ut=0;ut<je;ut++){var pn=Te[ut];if(pn.visible&&(Ct=pn.interval||1,tt=Math.abs(Ct),!(2>E*tt*x))){if(Mt=pn.segmentIndex,(!isFinite(Mt)||isNaN(Mt))&&(Mt=0),0>Mt&&(Mt=tt-Math.min(-Mt,tt)),Mt=Math.round(Mt%tt),tt=pn.opacity,kt=1,tt!==1){if(tt===0)continue;kt=y.globalAlpha,y.globalAlpha=kt*tt}Jt=Me[ut];var Fi=!1,_i=pn.strokeDashArray;if(_i!==null&&(Fi=!0,y.js(_i,pn.strokeDashOffset)),pn.figure==="LineV"&&pn.stroke!==null&&0<pn.strokeWidth){for(y.lineWidth=pn.strokeWidth,Za(a,y,pn.stroke,!1,!1,z,te),y.beginPath(),_i=pn=Math.floor((we-E)/E);_i<=pn+le;_i++){var Zi=_i*E+we;0<=Zi&&Zi<=re&&Um(_i,Ct,Mt,Jt)&&(y.moveTo(Zi,0),y.lineTo(Zi,oe))}y.stroke(),y.Se()}else if(pn.figure==="LineH"&&pn.stroke!==null&&0<pn.strokeWidth){for(y.lineWidth=pn.strokeWidth,Za(a,y,pn.stroke,!1,!1,z,te),y.beginPath(),_i=pn=Math.floor((me-b)/b);_i<=pn+ue;_i++)Zi=_i*b+me,0<=Zi&&Zi<=oe&&Um(_i,Ct,Mt,Jt)&&(y.moveTo(0,Zi),y.lineTo(re,Zi));y.stroke(),y.Se()}else if(pn.figure==="BarV"&&pn.fill!==null)for(Za(a,y,pn.fill,!0,!1,z,te),pn=pn.width,isNaN(pn)&&(pn=E),Zi=_i=Math.floor((we-E)/E);Zi<=_i+le;Zi++){var yi=Zi*E+we;0<=yi+pn&&yi<=re&&Um(Zi,Ct,Mt,Jt)&&y.fillRect(yi,0,pn,oe)}else if(pn.figure==="BarH"&&pn.fill!==null)for(Za(a,y,pn.fill,!0,!1,z,te),pn=pn.height,isNaN(pn)&&(pn=b),Zi=_i=Math.floor((me-b)/b);Zi<=_i+ue;Zi++)yi=Zi*b+me,0<=yi+pn&&yi<=oe&&Um(Zi,Ct,Mt,Jt)&&y.fillRect(0,yi,re,pn);Fi&&y.fs(),tt!==1&&(y.globalAlpha=kt)}}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"}jt(_m,Es),_m.prototype.measure=function(a,y,x,b,E){var z=b.length;if(a instanceof jo||a instanceof xi){var te=null,re=null;if(a instanceof xi&&(te=a),a instanceof jo&&(re=a,te=re.adornedPart,a.j===null&&(a.j=[])),te instanceof xi){var oe=te;if(z===0)Yi(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,Me=a.j;if(Me.length=0,le!==null){rS(a,re,we,le);var Te=le.measuredBounds;x.ed(Te),Me.push(Te)}Te=ro.alloc();for(var je=et.alloc(),ut=et.alloc(),tt=0;tt<z;tt++){var Ct=b[tt];if(Ct!==le)if(Ct.isPanelMain&&Ct instanceof io){rS(a,re,we,Ct);var Mt=Ct.measuredBounds;x.ed(Mt),Me.push(Mt)}else if(2>me)Ct.measure(1/0,1/0,0,0),Mt=Ct.measuredBounds,x.ed(Mt),Me.push(Mt);else{var kt=Ct.segmentIndex,Jt=Ct.segmentFraction,pn=Ct.alignmentFocus;pn.Mc()&&(pn=So);var Fi=Ct.segmentOrientation,_i=Ct.segmentOffset;if(isNaN(kt)){var Zi=oe.ua;Mt=yn(),Zi.Qu(Jt,Mt);var yi=et.allocAt(Mt[0],Mt[1]);if(yi.add(oe.i(0)),Zi.type===Pi.j?yi.offset(-Zi.startX,-Zi.startY):(Zi=Zi.figures.first(),Zi!==null&&yi.offset(-Zi.startX,-Zi.startY)),Zi=Mt[2],Fi!==Zl){var ei=oe.computeAngle(Ct,Fi,Zi);Ct.Kb=ei}ei=yi.x-y.x;var Xr=yi.y-y.y;et.free(yi),On(Mt)}else if(kt<-me||kt>=me)Mt=et.alloc(),oe.vg(),oe.computeMidPoint(Mt),Zi=oe.midAngle,Fi!==Zl&&(ei=oe.computeAngle(Ct,Fi,Zi),Ct.Kb=ei),ei=Mt.x-y.x,Xr=Mt.y-y.y,et.free(Mt);else{if(ei=0,0<=kt?(Xr=ue.M(kt),Mt=kt<me-1?ue.M(kt+1):Xr):(ei=me+kt,Xr=ue.M(ei),Mt=0<ei?ue.M(ei-1):Xr),Xr.Xa(Mt)){0<=kt?(Zi=0<kt?ue.M(kt-1):Xr,ei=kt<me-2?ue.M(kt+2):Mt):(Zi=ei<me-1?ue.M(ei+1):Xr,ei=1<ei?ue.M(ei-2):Mt),yi=Zi.Bf(Xr);var Ar=Mt.Bf(ei);Zi=yi>Ar+10?0<=kt?Zi.ab(Xr):Xr.ab(Zi):Ar>yi+10?0<=kt?Mt.ab(ei):ei.ab(Mt):0<=kt?Zi.ab(ei):ei.ab(Zi)}else Zi=0<=kt?Xr.ab(Mt):Mt.ab(Xr);Fi!==Zl&&(ei=oe.computeAngle(Ct,Fi,Zi),Ct.Kb=ei),ei=Xr.x+(Mt.x-Xr.x)*Jt-y.x,Xr=Xr.y+(Mt.y-Xr.y)*Jt-y.y}Ct.measure(1/0,1/0,0,0),Mt=Ct.measuredBounds,yi=Ct.naturalBounds;var Go=0;Ct instanceof io&&(Go=Ct.strokeWidth),Ar=yi.width+Go;var aa=yi.height+Go;Te.reset(),Te.translate(-Mt.x,-Mt.y),Te.scale(Ct.scale,Ct.scale),Te.rotate(Fi===Zl?Ct.angle:Zi,Ar/2,aa/2),Fi!==im&&Fi!==om||Te.rotate(90,Ar/2,aa/2),Fi!==rm&&Fi!==am||Te.rotate(-90,Ar/2,aa/2),Fi===b0&&(45<Zi&&135>Zi||225<Zi&&315>Zi)&&Te.rotate(-Zi,Ar/2,aa/2),yi=new _t(0,0,Ar,aa),je.xi(yi,pn),Te.Ga(je),pn=-je.x+Go/2*Ct.scale,Ct=-je.y+Go/2*Ct.scale,ut.assign(_i),Go=isNaN(_i.x);var Rs=isNaN(_i.y);if(Go||Rs){Ar=Ar/2+3,aa=aa/2+3;var Vs=45<=Zi&&135>=Zi,Dl=225<=Zi&&315>=Zi;Fi===Zl&&(Vs||Dl)?(ut.x=Rs?Ar:_i.y,ut.y=Go?aa:_i.x,Vs?0<=kt||isNaN(kt)&&.5>Jt||!Go||(ut.y=-aa):Dl&&((0<=kt||isNaN(kt)&&.5>Jt)&&Go&&(ut.y=-aa),Rs&&(ut.x=-Ar))):(Go&&(ut.x=0<=kt||isNaN(kt)&&.5>Jt?Ar:-Ar),Rs&&(ut.y=-aa),ut.rotate(Zi))}else ut.rotate(Zi);ei+=ut.x,Xr+=ut.y,yi.set(Mt),yi.h(ei+pn,Xr+Ct,Mt.width,Mt.height),Me.push(yi),x.ed(yi)}}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),Yi(E,x.width||0,x.height||0),ro.free(Te),et.free(je),et.free(ut)}}}},_m.prototype.arrange=function(a,y){var x=y.length;if(a instanceof jo||a instanceof xi){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 xi)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 Me=me.ua,Te=yn();Me.Qu(oe,Te);var je=et.allocAt(Te[0],Te[1]);je.add(me.i(0)),Me.type===Pi.j||(Me=Me.figures.first()),je.offset(-Me.startX,-Me.startY),Me=Te[2],le!==Zl&&(me=me.computeAngle(te,le,Me),te.angle=me),me=je.x;var ut=je.y;et.free(je),On(Te)}else if(re<-x||re>=x)Te=et.alloc(),Me=me,ut=Te,Me.vg(),Me.computeMidPoint(ut),Me=me.midAngle,le!==Zl&&(me=me.computeAngle(te,le,Me),te.angle=me),me=Te.x,ut=Te.y,et.free(Te);else{if(je=0,0<=re?(Te=y.s[re],ut=re<x-1?y.s[re+1]:Te):(je=x+re,Te=y.s[je],ut=0<je?y.s[je-1]:Te),Te.Xa(ut)){0<=re?(Me=0<re?y.s[re-1]:Te,je=re<x-2?y.s[re+2]:ut):(Me=je<x-1?y.s[je+1]:Te,je=1<je?y.s[je-2]:ut);var tt=Me.Bf(Te),Ct=ut.Bf(je);Me=tt>Ct+10?0<=re?Me.ab(Te):Te.ab(Me):Ct>tt+10?0<=re?ut.ab(je):je.ab(ut):0<=re?Me.ab(je):je.ab(Me)}else Me=0<=re?Te.ab(ut):ut.ab(Te);le!==Zl&&(me=me.computeAngle(te,le,Me),te.angle=me),me=Te.x+(ut.x-Te.x)*oe,ut=Te.y+(ut.y-Te.y)*oe}if(we.ys())te.location=new et(me,ut);else{we.Mc()&&(we=So),Te=ro.alloc(),Te.reset(),Te.scale(te.scale,te.scale),Te.rotate(te.angle,0,0);var Mt=te.naturalBounds;je=_t.allocAt(0,0,Mt.width,Mt.height),tt=et.alloc(),tt.xi(je,we),Te.Ga(tt),we=-tt.x,Ct=-tt.y;var kt=Mt.width,Jt=Mt.height;Mt=et.alloc(),Mt.assign(ue);var pn=isNaN(ue.x),Fi=isNaN(ue.y);if(pn||Fi){kt=kt/2+3,Jt=Jt/2+3;var _i=45<=Me&&135>=Me,Zi=225<=Me&&315>=Me;le===Zl&&(_i||Zi)?(Mt.x=Fi?kt:ue.y,Mt.y=pn?Jt:ue.x,_i?0<=re||isNaN(re)&&.5>oe||!pn||(Mt.y=-Jt):Zi&&((0<=re||isNaN(re)&&.5>oe)&&pn&&(Mt.y=-Jt),Fi&&(Mt.x=-kt))):(pn&&(Mt.x=0<=re||isNaN(re)&&.5>oe?kt:-kt),Fi&&(Mt.y=-Jt),Mt.rotate(Me))}else Mt.rotate(Me);me+=Mt.x,ut+=Mt.y,Te.pp(je),we+=je.x,Ct+=je.y,re=et.allocAt(me+we,ut+Ct),te.move(re),et.free(re),et.free(Mt),et.free(tt),_t.free(je),ro.free(Te)}}E!==null?E.Ul(!1):b.Ul(!1),b=TS(a),a.location.h(a.position.x+b.x,a.position.y+b.y),et.free(b)}};function rS(a,y,x,b){if(mt(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof jo&&a.type===fi.Link&&a.adornedObject instanceof io&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof xi&&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),gt(b,!1)}}function Kp(){this.xa="Base"}jt(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 Me=re.geometry,Te=re.strokeWidth,je=Me.flattenedSegments,ut=Me.flattenedLengths,tt=Me.flattenedTotalLength,Ct=je.length,Mt=0,kt=0,Jt=yn(),pn=0;pn<Ct;pn++){var Fi=je[pn],_i=[];kt=Mt=0;for(var Zi=Fi.length,yi=0;yi<Zi;yi+=2){var ei=Fi[yi],Xr=Fi[yi+1];if(yi!==0){var Ar=180*Math.atan2(Xr-kt,ei-Mt)/Math.PI;0>Ar&&(Ar+=360),_i.push(Ar)}Mt=ei,kt=Xr}Jt.push(_i)}if(a.graduatedIntervals===null){for(var Go=[],aa=a.O.s,Rs=aa.length,Vs=0;Vs<Rs;Vs++){var Dl=aa[Vs],js=[];if(Go.push(js),Dl.visible){var Xh=Dl.interval;if(!(0>Xh)){for(var gs=0;gs<Rs;gs++)if(gs!==Vs){var Yc=aa[gs];if(Yc.visible&&Dl.constructor===Yc.constructor){var Bl=Yc.interval;Bl>Xh&&js.push(Bl)}}}}}a.graduatedIntervals=Go}var Yh=a.graduatedIntervals,Vu=a.O.s,pc=Vu.length,ku=0,Pu=0,Ff=tt;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*tt/a.graduatedRange&&Iu.graduatedSkip===null)){var $g=ut[0][0],md=0,wu=0;Pu=tt*Iu.graduatedStart-1e-4,Ff=tt*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)*tt/a.graduatedRange,ku>tt&&(ku=tt),Pu<=ku&&ku<=Ff)){for(var Vd=Jt[md][wu],Jh=ut[md][wu];md<ut.length;){for(;ku>$g&&wu<ut[md].length-1;)wu++,Vd=Jt[md][wu],Jh=ut[md][wu],$g+=Jh;if(ku<=$g)break;md++,wu=0,Vd=Jt[md][wu],Jh=ut[md][wu],$g+=Jh}var Cu=je[md],vd=Cu[2*wu],fv=Cu[2*wu+1],Sh=(ku-($g-Jh))/Jh,kp=new et(vd+(Cu[2*wu+2]-vd)*Sh+Te/2-Me.bounds.x,fv+(Cu[2*wu+3]-fv)*Sh+Te/2-Me.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)}On(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=et.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)}et.free(bu),xh.graduatedBounds!==null&&xh.graduatedBounds.push(ic),hr(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=xi.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=et.alloc();rf.xi(_g,qh),ed.Ga(rf);var Xg=-rf.x,Qy=-rf.y,Ch=et.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),et.free(Ch),et.free(rf),_t.free(_g),ro.free(ed)}mc.graduatedBounds!==null&&mc.graduatedBounds.push(If),hr(mv,If.x,If.y,If.width,If.height)}gt(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],Me=le[me],Te=Me.length;if(we.visible&&we!==z&&Me.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,ut=we.strokeWidth*we.scale,tt=we.alignmentFocus;tt.Mc()&&(tt=zs);for(var Ct=0;Ct<Te;Ct++){var Mt=Me[Ct].$l,kt=Me[Ct].angle,Jt=tt,pn=we.Ab;pn.reset(),pn.translate(Mt.x+re.x,Mt.y+re.y),pn.rotate(kt+we.angle,0,0),pn.translate(-je.width*Jt.x+Jt.offsetX+ut/2,-je.height*Jt.y+Jt.offsetY+ut/2),pn.scale(we.scale,we.scale),Ie(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),ut=0;ut<Te;ut++)tt=Me[ut],tt.actualBounds&&tt.measuredBounds&&tt.naturalBounds&&(je.ec=tt.text||"",je.Kb=tt.Sz||0,je.Gc=tt.lineCount||0,Ct=tt.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]),tt.naturalBounds&&(je.dc=tt.naturalBounds),tt.actualBounds&&(Ct=tt.actualBounds,je.arrange(Ct.x,Ct.y,Ct.width,Ct.height)),Ct=tt.actualBounds,je.arrange(Ct.x,Ct.y,Ct.width,Ct.height),Mt=tt.measuredBounds,tt=tt.naturalBounds,kt=je.Ab,kt.reset(),kt.translate(Ct.x+re.x,Ct.y+re.y),kt.translate(-Mt.x,-Mt.y),je.no(kt,tt.x,tt.y,tt.width,tt.height),Ie(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 fi(a,y){if(Qt.call(this),this.na=null,a===void 0)this.na=fi.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=fi.Position,y=a);this.na===null&&Rt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===fi.Grid?1048576:0),this.O=new Dn,this.yb=Ls,this.Tm=Ko,this.Uf=_r,this.$g=null,this.$e="",this.jg=new _t(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Ji,this.jn=Io,this.kn=jr,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}jt(fi,Qt),fi.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},fi.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},fi.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 Bi&&(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},Ne=fi.prototype,Ne.toString=function(){return"Panel("+this.type.name+")#"+xr(this)},Ne.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)},Ne.hh=function(a,y){if(this.na===fi.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===fi.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===fi.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===fi.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 Me=me.Wc(),Te=me.separatorStrokeWidth;isNaN(Te)&&(Te=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var je=me.separatorStroke;je===null&&(je=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(je===null||me.index===(x?oe:le))&&(Te=0),Me-=Te,Te=me.position+Te,Me+=me.actual,Te+Me>we&&(Me=we-Te),0>=Me||(we=a.yb,Za(a,y,me.background,!0,!1,re,te),x?y.fillRect(we.left,Te+we.top,te.width-(we.left+we.right),Me):y.fillRect(Te+we.left,we.top,Me,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"}Ne.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Ne.kk=function(a,y,x){if(!Qt.prototype.kk.call(this,a,y,x))return!1;if(this.type===fi.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===fi.Grid||this.na===fi.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},Ne.nk=function(){return!0},Ne.$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)},Ne.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),Me=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+Me,a=x*oe+b*ue+we,oe=x*le+b*me+Me,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,Me=we=0),re=a*oe+y*ue+we,a=a*le+y*me+Me,oe=x*oe+b*ue+we,x=x*le+b*me+Me,E.h(oe,x),b=(oe-re)*(oe-re)+(x-a)*(x-a),le=!1,me=this.O.s,Me=me.length,ue=et.alloc(),we=null,y=1/0;var Te=null,je=this.isClipping&&this.na===fi.Spot;je&&(Te=et.alloc(),we=this.Pb(),(le=we.Sj(re,a,oe,x,Te))&&(y=(re-Te.x)*(re-Te.x)+(a-Te.y)*(a-Te.y)));for(var ut=0;ut<Me;ut++){var tt=me[ut];tt.visible&&tt!==we&&tt.Sj(re,a,oe,x,ue)&&(le=!0,tt=(re-ue.x)*(re-ue.x)+(a-ue.y)*(a-ue.y),tt<b&&(b=tt,E.set(ue)))}return je&&(y>b&&E.set(Te),et.free(Te)),et.free(ue),z&&E.transform(te),le},Ne.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Qt.prototype.Gj.call(this)},Ne.v=function(a){if(!mt(this)){Qt.prototype.v.call(this,a),a=null,(this.na===fi.Auto||this.na===fi.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 fi||E instanceof ua||z!==oi)&&E.v(!0)}}}},Ne.Uj=function(){if(!mt(this)){gt(this,!0),Vt(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Ne.Uk=function(){if(!(this.l&2048)){Ie(this,!0),$e(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Ne.Wu=function(){$e(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Ne.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),Yi(E,a,oe),Yi(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},Ne.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}Ne.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=oi),a){case oi:(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 Pr:this.v(!0),this.measure(y+re,b+te,0,0)}}this.na.arrange(this,E,this.jg)}},Ne.gh=function(a){var y=this.naturalBounds,x=ph(this);if(Sr(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=et.allocAt(0,0);b--;){var z=y[b];if((z.visible||z===x)&&(Nr(E.set(a),z.transform),z.ca(E)))return et.free(E),!0}return et.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},Ne.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},Ne.qm=function(a,y){if(y(this,a),a instanceof fi){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 fi&&sS(a,z,x)}}function vx(a,y){lS(a,a,y)}function lS(a,y,x){if(x(y),y instanceof fi){y=y.O.s;for(var b=y.length,E=0;E<b;E++)lS(a,y[E],x)}}Ne.Nl=function(a){return uS(this,this,a)};function uS(a,y,x){if(x(y))return y;if(y instanceof fi){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}Ne.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 fi){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 fi?x=Math.max(x,cS(E)):E instanceof io&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}Ne.se=function(){return!(this.type===fi.TableRow||this.type===fi.TableColumn)};function zh(a){return a.type===fi.TableRow||a.type===fi.TableColumn}Ne.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),At(this)))return null;var b=this.naturalBounds,E=1/this.Df(),z=this.se(),te=z?a:Nr(et.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,le=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),le=oe/2),Sr(-(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=et.alloc(),le=(oe=this.isClipping&&this.na===fi.Spot)?this.Pb():null,oe&&(le.se()?Nr(re.set(a),le.transform):re.set(a),!le.ca(re)))return et.free(re),z||et.free(te),null;for(var me=ph(this);ue--;){var we=E[ue];if((we.visible||we===me)&&(we.se()?Nr(re.set(a),we.transform):re.set(a),!oe||we!==le)){var Me=null;if(we instanceof fi?Me=we.ic(re,y,x):we.pickable===!0&&we.ca(re)&&(Me=we),Me!==null&&(y!==null&&(Me=y(Me)),Me!==null&&(x===null||x(Me))))return et.free(re),z||et.free(te),Me}}et.free(re)}return this.background===null&&this.areaBackground===null?(z||et.free(te),null):(a=Sr(0,0,b.width,b.height,te.x,te.y)?this:null,z||et.free(te),a)}return z||et.free(te),null},Ne.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:Nr(et.allocAt(a.x,a.y),this.transform);if(E=Sr(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=et.alloc(),ue=ph(this);oe--;){var me=re[oe];if(me.visible||me===ue){me.se()?Nr(le.set(a),me.transform):le.set(a);var we=me;me=me instanceof fi?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))}}et.free(le)}return z||et.free(te),E&&(this.background!==null||this.areaBackground!==null)}return z||et.free(te),!1},Ne.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 fi?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 fi&&Mv(te,y,x,b),y!==null&&(te=y(te)),te===null||x!==null&&!x(te)||b.add(te))}}}Ne.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:Nr(et.allocAt(a.x,a.y),this.transform),le=re?y:Nr(et.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||Eo(oe.x,oe.y,0,0,0,te.height)<=ue||Eo(oe.x,oe.y,0,te.height,te.width,te.height)<=ue||Eo(oe.x,oe.y,te.width,te.height,te.width,0)<=ue||Eo(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||(et.free(oe),et.free(le)),me){if(!this.isAtomic){oe=et.alloc(),le=et.alloc(),ue=ph(this);for(var we=this.O.s,Me=we.length;Me--;){var Te=we[Me];if(Te.visible||Te===ue){var je=Te.actualBounds,ut=this.naturalBounds;(!re||!(je.x>ut.width||je.y>ut.height||0>je.x+je.width||0>je.y+je.height))&&(Te.se()?(je=Te.transform,Nr(oe.set(a),je),Nr(le.set(y),je)):(oe.set(a),le.set(y)),je=Te,Te=Te instanceof fi?Te:null,(Te!==null?Te.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)))}}et.free(oe),et.free(le)}return E?me:te}return!1};function Lv(a){var y=null;return a instanceof io&&(y=a.spot1,y===Ko&&(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===Ko&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=vl),y}Ne.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},Ne.M=function(a){return this.O.M(a)},Ne.Gb=function(a,y){y instanceof pr&&Rt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Rt("Cannot make a Panel contain itself: "+this.toString()),Rt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Rt("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!==fi.Grid||y instanceof io||Rt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==fi.Graduated||y instanceof io||y instanceof ua||Rt("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 Ai),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 Rt("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),mt(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof fi&&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 Bi&&(x.Te=!0),x.Te&&x instanceof Bi&&(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}Ne.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)},Ne.mb=function(a){0<=a&&this.pc(a,!0)},Ne.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),gt(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 Bi&&(b instanceof fi?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))},Ne.Fb=function(a){0>a&&ni(a,">= 0",fi,"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]},Ne.oA=function(a){if(0>a&&ni(a,">= 0",fi,"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()}}Ne.Eb=function(a){0>a&&ni(a,">= 0",fi,"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]},Ne.jA=function(a){if(0>a&&ni(a,">= 0",fi,"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()}}Ne.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},Ne.Hy=function(a,y){return(a=this.Fb(a))&&Qm(a,new Cs(y)),this},Ne.By=function(a,y){return(a=this.Eb(a))&&Qm(a,new Cs(y)),this},Ne.nz=function(a){if(0>a||this.type!==fi.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},Ne.fz=function(a){if(0>a||this.type!==fi.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},Ne.Fz=function(a,y){if(y===void 0&&(y=new et(NaN,NaN)),this.type!==fi.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)},Ne.Gz=function(a){if(this.type!==fi.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&&Rt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Dn;else if(y._isFrozen)return;var x=new Dn;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 Me=we.sourceName;Me!==null&&(Me==="/"&&Fv(le,!0),Me=L1(we,le,ue),Me!==null&&(x.add(Me),Me.srcBindings===null&&(Me.srcBindings=new Dn),Me.srcBindings.add(we))),y.add(we)}if(ue instanceof fi&&ue.type===fi.Table){if(0<ue.rowCount){for(le=ue.rowDefs,me=le.length,we=0;we<me;we++)if(Me=le[we],Me!==void 0&&Me.be!==null)for(var Te=Me.be.iterator;Te.next();){var je=Te.value;je.xd=Me,je.to=2,je.wl=Me.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(Me=we.be.iterator;Me.next();)Te=Me.value,Te.xd=we,Te.to=1,Te.wl=we.index,y.add(Te)}}});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 Dn),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 fi&&(te=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(te),oe!==null?(z=oe,E.targetProperty=re):gi('Warning: unable to find GraphObject named "'+te+'" for Binding: '+E.toString())),z instanceof Cs?(te=xr(z.panel),E.Ai=te===void 0?-1:te,z.panel.bindingId=E.Ai):z instanceof Qt?(te=xr(z),E.Ai=te===void 0?-1:te,z.bindingId=E.Ai):Rt("Unknown type of binding target: "+z)}y.freeze(),a instanceof pr&&a.Zc()&&a.Va()}Ne.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof fi&&(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},Ne.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 fi))continue;E===1?z=z.Eb(x.wl):E===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,b)}}},Ne.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 fi&&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 fi)||z.data!==y[te])return!0;E++,te++}return!1}function Vp(a){if(a.type===fi.Spot||a.type===fi.Auto)return Math.min(a.O.length,1);if(a.type===fi.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===fi.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof fi&&zh(a))?1:0}Ne.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 fi){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),mt(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 Bi&&(y.Te=!0),y.Te&&y instanceof Bi&&(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 Ai),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 fi){var E=y,z=x;b.type===fi.TableRow?b.row=E:b.type===fi.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;Rt("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,gi('No item template Panel found for category "'+y+'" on '+a),gi(" Using default item template."),a=new fi,y=new ua,y.bind(new fs("text","",Yn)),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 fi){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var z=y[E];x&&z instanceof fi&&!z.isEnabled||Jm(a,z,x)}}}function gd(a,y){y.name=a,Mc.add(a,y)}ft.Object.defineProperties(fi.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===fi.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&&ni(a,">= 0",fi,"padding"),a=new zi(a)):(0>a.left&&ni(a.left,">= 0",fi,"padding:value.left"),0>a.right&&ni(a.right,">= 0",fi,"padding:value.right"),0>a.top&&ni(a.top,">= 0",fi,"padding:value.top"),0>a.bottom&&ni(a.bottom,">= 0",fi,"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 zi(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 Ro)&&(a instanceof Ro&&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)||Rt("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 Ro)&&(a instanceof Ro&&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)||Rt("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||Rt("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()||Rt("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)&&Rt("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)&&Rt("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 pr&&!(this instanceof jo);hc(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof xi?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof pr&&(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 Fr),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 Ai}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof pr||a.isPanelMain)&&Rt("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 qr&&(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))}}}),ft.Object.defineProperties(fi,{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")}}}),fi.prototype.rebuildItemElements=fi.prototype.mv,fi.prototype.findItemPanelForData=fi.prototype.sx,fi.prototype.updateTargetBindings=fi.prototype.La,fi.prototype.copyTemplate=fi.prototype.Uy,fi.prototype.graduatedValueForPoint=fi.prototype.Gz,fi.prototype.graduatedPointForValue=fi.prototype.Fz,fi.prototype.findColumnForLocalX=fi.prototype.fz,fi.prototype.findRowForLocalY=fi.prototype.nz,fi.prototype.addColumnDefinition=fi.prototype.By,fi.prototype.addRowDefinition=fi.prototype.Hy,fi.prototype.addRowColumnDefinition=fi.prototype.Gy,fi.prototype.removeColumnDefinition=fi.prototype.jA,fi.prototype.getColumnDefinition=fi.prototype.Eb,fi.prototype.removeRowDefinition=fi.prototype.oA,fi.prototype.getRowDefinition=fi.prototype.Fb,fi.prototype.removeAt=fi.prototype.mb,fi.prototype.remove=fi.prototype.remove,fi.prototype.insertAt=fi.prototype.Gb,fi.prototype.elt=fi.prototype.M,fi.prototype.add=fi.prototype.add,fi.prototype.findObject=fi.prototype.fb,fi.prototype.findInVisualTree=fi.prototype.Nl,fi.prototype.walkVisualTreeFrom=fi.prototype.qm,fi.prototype.findMainElement=fi.prototype.Pb;var pS=!1,mS=null,Mc=new Ai;fi.className="Panel",fi.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){Ir(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Ko,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Tv,this.hg=_r,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}Ne=Cs.prototype,Ne.qb=function(a){a.classType===Cs&&(this.sizing=a)},Ne.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+xr(this)},Ne.wi=function(a){this.Me=a},Ne.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)},Ne.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===fi.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)},Ne.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Ca,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}Ne.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)&&Rt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Dn),this.be.add(E),this},ft.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&&ni(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&&ni(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))&&ni(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&&ni(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 zi(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 Ro&&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)||Rt("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 Ro&&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 Xt(Cs,"Default",0),Up=new Xt(Cs,"None",1),e0=new Xt(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)}jt(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())}Ne=io.prototype,Ne.th=function(){Qt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Ne.qb=function(a){a===oi||a===Ji||a===fo||a===_r?this.geometryStretch=a:Qt.prototype.qb.call(this,a)},Ne.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+xr(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,Me,Te,je=0,ut=yn(),tt=2;tt<E;tt+=2)le=x[tt],ue=x[tt+1],me=le-re,re=ue-oe,me===0&&(me=.001),we=re/me,Me=Math.atan2(re,me),Te=Math.sqrt(me*me+re*re),ut.push([me,Me,we,Te]),je+=Te,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,tt=0,Te=ut[tt],me=Te[0],Me=Te[1],we=Te[2],Te=Te[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){On(ut);return}E>Te?(Ct=E-Te,E=Te):Ct=0;var Mt=Math.sqrt(E*E/(1+we*we));if(0>me&&(Mt=-Mt),re+=Mt,oe+=we*Mt,a.translate(re,oe),a.rotate(Me),a.translate(-(te/2),-(z/2)),Ct===0&&b.hh(a,y),a.translate(te/2,z/2),a.rotate(-Me),a.translate(-re,-oe),je-=E,Te-=E,Ct!==0){if(tt++,tt===ut.length){On(ut);return}Te=ut[tt],me=Te[0],Me=Te[1],we=Te[2],Te=Te[3],E=Ct}}On(ut)}}Ne.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===fi.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===Pi.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===Pi.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===Pi.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===Pi.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 Me=null,Te=0;Te<me;Te++){var je=ue[Te];switch(je.type){case _a:a.moveTo(je.endX,je.endY);break;case ia: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 ut=Math.PI/180;a.arc(je.point1X,je.point1Y,je.radiusX,je.startAngle*ut,(je.startAngle+je.sweepAngle)*ut,0>je.sweepAngle,Me!==null?Me.endX:le.startX,Me!==null?Me.endY:le.startY)}else if(Me=yl(je,le),ut=Me.length,ut===0)a.lineTo(je.centerX,je.centerY);else for(var tt=0;tt<ut;tt++){var Ct=Me[tt];tt===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(tt=ut=0,Me!==null&&Me.type===Ja){if(Me=yl(Me,le),Ct=Me.length,Ct===0){a.lineTo(je.endX,je.endY);break}Me=Me[Ct-1]||null,Me!==null&&(ut=Me[6],tt=Me[7])}else ut=Me!==null?Me.endX:le.startX,tt=Me!==null?Me.endY:le.startY;if(Me=ul(je,le,ut,tt),ut=Me.length,ut===0){a.lineTo(je.endX,je.endY);break}for(tt=0;tt<ut;tt++)Ct=Me[tt],a.bezierCurveTo(Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7]);break;default:Rt("Segment not of valid type: "+je.type)}je.isClosed&&a.closePath(),Me=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=yn(),z.type===Pi.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===Pi.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(Te=le[me],Te.type){case _a:cp(a,y,b,x),b.length=0,b.push(Te.endX),b.push(Te.endY),te=Te.endX,E=Te.endY,oe=te,we=E;break;case ia:b.push(Te.endX),b.push(Te.endY),te=Te.endX,E=Te.endY;break;case Hs:en.Qe(te,E,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.5,b),te=Te.endX,E=Te.endY;break;case Xl:en.ep(te,E,Te.point1X,Te.point1Y,Te.endX,Te.endY,.5,b),te=Te.endX,E=Te.endY;break;case Ja:if(je=yl(Te,re),Me=je.length,Me===0){b.push(Te.centerX),b.push(Te.centerY),te=Te.centerX,E=Te.centerY;break}for(ut=0;ut<Me;ut++)tt=je[ut],en.Qe(te,E,tt[2],tt[3],tt[4],tt[5],tt[6],tt[7],.5,b),te=tt[6],E=tt[7];break;case du:if(je=ul(Te,re,te,E),Me=je.length,Me===0){b.push(Te.endX),b.push(Te.endY),te=Te.endX,E=Te.endY;break}for(ut=0;ut<Me;ut++)tt=je[ut],en.Qe(te,E,tt[2],tt[3],tt[4],tt[5],tt[6],tt[7],.5,b),te=tt[6],E=tt[7];break;default:Rt("Segment not of valid type: "+Te.type)}Te.isClosed&&(b.push(oe),b.push(we),cp(a,y,b,x))}cp(a,y,b,x)}else if(z.type===Pi.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===Pi.F){if(E=new ys,E.startX=z.endX,E.startY=(z.startY+z.endY)/2,te=new Bo(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)}On(b),a.restore(),a.Vc(!1)}}}},Ne.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)},Ne.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Qt.prototype.nk.call(this,a)},Ne.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)}},Ne.ga=function(a,y){if(y===void 0&&(y=new et),a instanceof Ui){a.Mc()&&Rt("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},Ne.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=et.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),hr(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),hr(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),hr(a,b.x,b.y,0,0),_t.free(y),et.free(b),a},Ne.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!==Pi.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===Pi.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===Pi.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===Pi.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===Pi.o)return _t.free(z),this.fill===null?Mu(x,a.x,a.y,E):ac(x,a,E,1<this.strokeWidth,y);Rt("Unknown Geometry type: "+x.type)},Ne.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):Rt("Unsupported Figure: "+re)}te=oe.bounds}re=te.width,oe=te.height,le=te.width;var ue=te.height;switch(Fl(this,!0)){case oi: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 Pr: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 oi:break;case ci:re=le,oe=ue;break;case Ji:x=Math.min(le/re,ue/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:Rt(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===_r?ci:y:y===_r?Iv[a.figure].defaultStretch:y}Ne.eh=function(a,y,x,b){Pl(this,a,y,x,b)},Ne.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ne.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 Me=le.bounds;if(ue=!1,le.type===Pi.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=yn(),a=new et,en.Ve(le.startX+b,le.startY+ue,le.endX+b,le.endY+ue,z,te,re,oe,a)&&y.push(a),a=new et,en.Ve(le.startX-b,le.startY-ue,le.endX-b,le.endY-ue,z,te,re,oe,a)&&y.push(a),a=new et,en.Ve(le.startX+b,le.startY+ue,le.startX-b,le.startY-ue,z,te,re,oe,a)&&y.push(a),a=new et,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 On(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);On(y)}else if(le.type===Pi.u)ue=en.Ff(Me.x-me,Me.y-me,Me.x+Me.width+me,Me.y+Me.height+me,z,te,re,oe,E);else if(le.type===Pi.F){y=_t.allocAt(Me.x,Me.y,Me.width,Me.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===Pi.o){we=et.alloc();var Te=re-z,je=oe-te,ut=Te*Te+je*je,tt=z,Ct=te;if(0<ut&&Me.contains(tt,Ct)&&(we.x=tt,we.y=Ct,this.ca(we)))for(Te!==0&&.5>Math.abs(Te)?(je*=.5/Te,Te=.5):je!==0&&.5>Math.abs(je)&&(Te*=.5/je,je=.5),tt-=Te,Ct-=je;Me.contains(tt,Ct);)tt-=Te,Ct-=je;for(E.x=re,E.y=oe,je=0;je<le.figures.count;je++){var Mt=le.figures.s[je],kt=Mt.isFilled?tt:z,Jt=Mt.isFilled?Ct:te,pn=Mt.segments;Me=Mt.startX,Te=Mt.startY;for(var Fi=Me,_i=Te,Zi=0;Zi<pn.count;Zi++){var yi=pn.s[Zi],ei=yi.type,Xr=yi.endX,Ar=yi.endY,Go=!1;switch(ei){case _a:Fi=Xr,_i=Ar;break;case ia:Go=n0(Me,Te,Xr,Ar,kt,Jt,re,oe,we);break;case Hs:Go=en.Eo(Me,Te,yi.point1X,yi.point1Y,yi.point2X,yi.point2Y,Xr,Ar,kt,Jt,re,oe,.6,we);break;case Xl:Go=en.Eo(Me,Te,Me+2/3*(yi.point1X-Me),Te+2/3*(yi.point1Y-Te),Xr+2/3*(yi.point1X-Xr),Ar+2/3*(yi.point1Y-Ar),Xr,Ar,kt,Jt,re,oe,.6,we);break;case Ja:case du:ei=yi.type===Ja?yl(yi,Mt):ul(yi,Mt,Me,Te);var aa=ei.length;if(aa===0){Go=n0(Me,Te,yi.type===Ja?yi.centerX:yi.endX,yi.type===Ja?yi.centerY:yi.endY,kt,Jt,re,oe,we);break}for(Ar=null,Xr=0;Xr<aa;Xr++){if(Ar=ei[Xr],Xr===0&&n0(Me,Te,Ar[0],Ar[1],kt,Jt,re,oe,we)){var Rs=t0(kt,Jt,we,ut,E);Rs<ut&&(ut=Rs,ue=!0)}en.Eo(Ar[0],Ar[1],Ar[2],Ar[3],Ar[4],Ar[5],Ar[6],Ar[7],kt,Jt,re,oe,.6,we)&&(Rs=t0(kt,Jt,we,ut,E),Rs<ut&&(ut=Rs,ue=!0))}Xr=Ar[6],Ar=Ar[7];break;default:Rt("Unknown Segment type: "+ei)}Me=Xr,Te=Ar,Go&&(Go=t0(kt,Jt,we,ut,E),Go<ut&&(ut=Go,ue=!0)),yi.isClosed&&(Xr=Fi,Ar=_i,n0(Me,Te,Xr,Ar,kt,Jt,re,oe,we)&&(yi=t0(kt,Jt,we,ut,E),yi<ut&&(ut=yi,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,et.free(we)}else Rt("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)}Ne.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=et.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)))),et.free(z),E},Ne.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=et.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 et.free(te),!0;var re=et.alloc(),oe=et.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)))),et.free(te),ro.free(x),et.free(re),et.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)}Ne.tx=function(a,y,x){function b(ut,tt){for(var Ct=ut.length,Mt=0;Mt<Ct;Mt+=2)if(tt.zd(ut[Mt],ut[Mt+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,or(a.x,a.y,re,oe)<=E&&or(a.x,a.y,le,oe)<=E&&or(a.x,a.y,re,te)<=E&&or(a.x,a.y,le,te)<=E)return!0}if(re=y.startX,oe=y.startY,le=y.endX,te=y.endY,y.type===Pi.j){if(x=(re-le)*(a.x-le)+(oe-te)*(a.y-te),Eo(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===Pi.u)return y=!1,x&&(y=Eo(a.x,a.y,re,oe,re,te)<=E||Eo(a.x,a.y,re,oe,le,oe)<=E||Eo(a.x,a.y,le,oe,le,te)<=E||Eo(a.x,a.y,re,te,le,te)<=E),y;if(y.type===Pi.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 Eo(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!(or(y,z,-ue,0)>=E||or(y,z,0,-me)>=E||or(y,z,0,me)>=E||or(y,z,ue,0)>=E)}else if(y.type===Pi.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&&Eo(a.x,a.y,z,re,z,le)>E&&Eo(a.x,a.y,z,re,oe,re)>E&&Eo(a.x,a.y,oe,le,z,le)>E&&Eo(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 ia:if(te=me.endX,ue=me.endY,a.zd(te,ue)>E)return!1;break;case Hs:var we=yn();if(en.Qe(te,ue,me.point1X,me.point1Y,me.point2X,me.point2Y,me.endX,me.endY,.8,we),te=b(we,a),On(we),te||(te=me.endX,ue=me.endY,a.zd(te,ue)>E))return!1;break;case Xl:if(we=yn(),en.ep(te,ue,me.point1X,me.point1Y,me.endX,me.endY,.8,we),te=b(we,a),On(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 Me=we.length;if(Me===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 Te=yn(),je=0;je<Me;je++)if(me=we[je],Te.length=0,en.Qe(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],.8,Te),b(Te,a))return On(Te),!1;On(Te),me!==null&&(te=me[6],ue=me[7]);break;default:Rt("Unknown Segment type: "+me.type)}}return!0}}}return!1},Ne.qc=function(){this.ua=null},Ne.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&&Rt("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=Pi.parse(en.um[b],!1),Rd[b]=a,x!==b&&(Rd[x]=b),b}}return typeof y=="string"?y:y instanceof Pi?a:null}ft.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=Pi.parse(a);var y=a.normalize();this.geometry=a,this.position=a=et.allocAt(-y.x,-y.y),et.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 Ro&&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 Ro&&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 ni(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"?ni(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"?ni(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)||Rt("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()])||Rt("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?Rt("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?Rt("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:Ko},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:Ko},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:_r},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 Ti,Iv=new Ti;io.className="Shape",io.getFigureGenerators=function(){var a=new Ai,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 Ai;for(b in en.um)if(Rd[b]===void 0){var y=Pi.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 Pi&&a.add(x,b)}return a.freeze(),a},io.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Pi.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Rt("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=_r,this.gg=this.fg=Ko}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}jt(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())}Ne=ua.prototype,Ne.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}Ne.qb=function(a){a.classType===ua?this.wrap=a:Qt.prototype.qb.call(this,a)},Ne.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Ne.v=function(){Qt.prototype.v.call(this)},Ne.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 Co: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 Me=this.Qc[we];Me>E&&(Me=E),b+=y,this.Oj(this.Qb[we],a,0,b,E,te,Me,x,re,oe,le),b+=te+me}switch(this.flip){case Co: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)}}},Ne.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"))}},Ne.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},Ne.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Qt.prototype.nk.call(this,a)},Ne.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)}},Ne.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),Yi(this.dc,z,te),this.Ge(0,0,z,te),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},Ne.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=hi.alloc();Rv(a,z,y,oe),E+=oe.height,hi.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}ft.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:oi},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=hi.alloc();Rv(this,this.ec,999999,a);var y=a.width;hi.free(a),a=PS(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Yi(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 Ro&&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&&ni(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 Xt(ua,"None",0),wS=new Xt(ua,"WrapFit",1),zv=new Xt(ua,"WrapDesiredSize",2),CS=new Xt(ua,"WrapBreakAll",3),Hv=new Xt(ua,"OverflowClip",0),o0=new Xt(ua,"OverflowEllipsis",1),Yp=new Xt(ua,"FormatTrim",0),bS=new Xt(ua,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Zv=new Ti,ES=0,a0=new Ti,Wv=0,Jp="...",MS="",iu=null,s0=!1;ua.className="TextBlock";function Gv(){this.nc=!1,this.Hd=null,this.Xf=oi,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 Ti,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=Br,this.Nk=ci,this.Zg=this.Hd=null,this.Mk=So,this.Xf=oi,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;jt(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===oi||a===Ji||a===fo?this.imageStretch=a:Qt.prototype.qb.call(this,a)},ru.prototype.toString=function(){return"Picture("+this.source+")#"+xr(this)};function fp(a){a===void 0&&(a=""),a!==""?hp[a]&&(delete hp[a],l0--):(hp=new Ti,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()||(gt(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=yn();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);On(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,Me=this.Nk,Te=this.Mk;switch(Me){case oi:if(this.sourceRect.w())break;me>=b.width&&(z=z+Te.offsetX+(me*Te.x-b.width*Te.x)),we>=b.height&&(te=te+Te.offsetY+(we*Te.y-b.height*Te.y)),oe=Math.min(b.width,me),re=Math.min(b.height,we);break;case ci:me=b.width,we=b.height;break;case Ji:case fo:Me===Ji?(Me=Math.min(b.height/we,b.width/me),me*=Me,we*=Me):Me===fo&&(Me=Math.max(b.height/we,b.width/me),me*=Me,we*=Me,me>=b.width&&(z=(z+Te.offsetX+(me*Te.x-b.width*Te.x)/me)*oe),we>=b.height&&(te=(te+Te.offsetY+(we*Te.y-b.height*Te.y)/we)*re),oe*=1/(me/b.width),re*=1/(we/b.height),me=b.width,we=b.height)}Me=this.Df()*y.scale;var je=me*Me*we*Me,ut=oe*re/je,tt=x.__goCache;Me=null;var Ct=xx;if(!E){if(x.sq&&tt!==void 0&&4<je&&ut>Ct*Ct)for(tt.gi===null&&(FS(tt,4,le,ue,x),FS(tt,16,le,ue,x)),E=tt.gi,le=E.length,ue=0;ue<le&&E[ue].ratio*E[ue].ratio<ut;ue++)Me=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(Mt){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Mt){this.vl=!0}}if(this.vl)return}}switch(E=me<b.width?Te.offsetX+(b.width*Te.x-me*Te.x):0,Te=we<b.height?Te.offsetY+(b.height*Te.y-we*Te.y):0,this.flip){case Co: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&&tt!==void 0&&Me!==null&&Me.ratio!==1){a.save(),y=Me.ratio;try{a.drawImage(Me.source,z/y,te/y,Math.min(Me.source.width,oe/y),Math.min(Me.source.height,re/y),E,Te,Math.min(b.width,me),Math.min(b.height,we)),a instanceof Uo&&(this.bt=[z/y,te/y,Math.min(Me.source.width,oe/y),Math.min(Me.source.height,re/y),E,Te,Math.min(b.width,me),Math.min(b.height,we)])}catch(Mt){this.en=!1}a.restore()}else try{a.drawImage(x,z,te,oe,re,E,Te,Math.min(b.width,me),Math.min(b.height,we)),a instanceof Uo&&(this.bt=[z,te,oe,re,E,Te,Math.min(b.width,me),Math.min(b.height,we)])}catch(Mt){this.en=!1}switch(this.flip){case Co: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===Pr?(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)),Yi(this.dc,a,y),this.Ge(0,0,a,y)},ru.prototype.eh=function(a,y,x,b){Pl(this,a,y,x,b)},ft.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||Rt("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()||(gt(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=un("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 Ti,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 Pi,this.mc=null}gp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Pi,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 Bo(_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 Bo(ia);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 Bo(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 Bo(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 Bo(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 Bo(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 Pi(Pi.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 Pi(Pi.u),b.endX=y,b.endY=x,b.defaultStretch=Ji,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 Pi().add(new ys(a,0,!0).add(new Bo(ia,y-a,0)).add(new Bo(Hs,y,a,y-z,0,y,z)).add(new Bo(ia,y,x-a)).add(new Bo(Hs,y-a,x,y,x-z,y-z,x)).add(new Bo(ia,a,x)).add(new Bo(Hs,0,x-a,z,x,0,x-z)).add(new Bo(ia,0,a)).add(new Bo(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 Pi(Pi.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 Pi(Pi.F),b.endX=y,b.endY=x,b.spot1=oc,b.spot2=_l,b.defaultStretch=Ji,en.Nf<en.vm&&(en.Mf[a]=b,en.Nf++)),b}),El("TriangleRight",function(a,y,x){return new Pi().add(new ys(0,0).add(new Bo(ia,y,.5*x)).add(new Bo(ia,0,x).close())).pm(0,.25,.5,.75)}),El("TriangleDown",function(a,y,x){return new Pi().add(new ys(0,0).add(new Bo(ia,y,0)).add(new Bo(ia,.5*y,x).close())).pm(.25,0,.75,.5)}),El("TriangleLeft",function(a,y,x){return new Pi().add(new ys(y,x).add(new Bo(ia,0,.5*x)).add(new Bo(ia,y,0).close())).pm(.5,.25,1,.75)}),El("TriangleUp",function(a,y,x){return new Pi().add(new ys(y,x).add(new Bo(ia,0,x)).add(new Bo(ia,.5*y,0).close())).pm(.25,.5,.75,1)}),El("Triangle","TriangleUp"),El("Diamond",function(a,y,x){return new Pi().add(new ys(.5*y,0).add(new Bo(ia,0,.5*x)).add(new Bo(ia,.5*y,x)).add(new Bo(ia,y,.5*x).close())).pm(.25,.25,.75,.75)}),El("LineH",function(a,y,x){return a=new Pi(Pi.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 Pi(Pi.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 Pi().add(new ys(0,x/2,!1).add(new Bo(ia,y,x/2)).add(new Bo(_a,y/2,0)).add(new Bo(ia,y/2,x)))}),El("XLine",function(a,y,x){return new Pi().add(new ys(0,x,!1).add(new Bo(ia,y,0)).add(new Bo(_a,0,0)).add(new Bo(ia,y,x)))}),El("LineRight",function(a,y,x){return new Pi().add(new ys(.25*y,0,!1).add(new Bo(ia,.75*y,.5*x)).add(new Bo(ia,.25*y,x)))}),El("LineDown",function(a,y,x){return new Pi().add(new ys(0,.25*x,!1).add(new Bo(ia,.5*y,.75*x)).add(new Bo(ia,y,.25*x)))}),El("LineLeft",function(a,y,x){return new Pi().add(new ys(.75*y,0,!1).add(new Bo(ia,.25*y,.5*x)).add(new Bo(ia,.75*y,x)))}),El("LineUp",function(a,y,x){return new Pi().add(new ys(0,.75*x,!1).add(new Bo(ia,.5*y,.25*x)).add(new Bo(ia,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=la,this.ir=null,this.jr="",this.lr=Ko,this.Gq="",this.Hq=Ba,this.Pq=yo,this.Kq=Or,this.Up=null,this.Cq=127,this.zr=wo,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 pr(a,y){a===void 0||a instanceof Es||typeof a=="string"?fi.call(this,a):(fi.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 et(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)}jt(pr,fi),pr.prototype.cloneProtected=function(a){fi.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},Ne=pr.prototype,Ne.Af=function(a){fi.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Ne.toString=function(){var a=$n(this.constructor)+"#"+xr(this);return this.data!==null&&(a+="("+Yn(this.data)+")"),a};function ou(a){a.P===null?a.P=new $v:a.P.nc&&(a.P=a.P.copy())}Ne.th=function(){fi.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Ne.gk=function(a,y,x,b,E,z,te){var re=this.diagram;re!==null&&(a===Va&&y==="elements"?E instanceof fi?Yf(E,function(oe){vy(re.partManager,oe),kh(re,oe)}):oh(re,E):a===cs&&y==="elements"&&(E instanceof fi?Yf(E,function(oe){yy(re.partManager,oe,re)}):vg(re,E)),re.cb(a,y,x,b,E,z,te))},Ne.La=function(a){if(fi.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 fi&&Yf(E,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},pr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},pr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},pr.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 Ai),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)))}}},pr.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)}},pr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=yn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);On(y)}},pr.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 qr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof jo))break e;hc(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=fi.Link),x.adornedObject=y)}if(x!==null){x.type===fi.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},pr.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)}}pr.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)},pr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=So;this.locationSpot.sb()&&(z=this.locationSpot);var te=et.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),et.free(te)}},pr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},pr.prototype.moveTo=function(a,y,x){a=et.allocAt(a,y),this.move(a,x),et.free(a)},pr.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())},pr.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())},pr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Ai),y.I(a)!==null)return y.I(a);var x=fi.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 et),x=x.Mc()?So: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}pr.prototype.mi=function(a){return a===void 0&&(a=new _t),a.assign(this.actualBounds)},pr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function TS(a){var y=et.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}pr.prototype.arrange=function(){if(At(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)}},Ne=pr.prototype,Ne.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()||Ri(a,y)||(this instanceof Bi&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Ne.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 et(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),mf(this)===!1&&At(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 et(b,E),x))}Ne.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;mf(this)||At(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)},Ne.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,et.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 et(z,te),y),b||y.x===z&&y.y===te||a.g("position",new et(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 Bi&&sh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?vf(a)?(tr(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Ne.si=function(){return!0},Ne.Zc=function(){return!0},Ne.ph=function(){return!1},Ne.Dd=function(){return!0};function Vv(a,y,x,b){y.constructor===a.constructor||ZS||(ZS=!0,gi('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),gi(" Old class: "+$n(a.constructor)+", new class: "+$n(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 Bi&&(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 Bi&&(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)}pr.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},pr.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},pr.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},pr.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},pr.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},pr.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},pr.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},pr.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},pr.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}Ne=pr.prototype,Ne.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}Ne.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Ne.N=function(){var a=this.diagram;a!==null&&!At(this)&&!mf(this)&&this.isVisible()&&this.Ib.w()&&a.N(qf(this,this.Ib))},Ne.v=function(){fi.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Bi&&this.labeledLink!==null&&bl(this.labeledLink),a.$b(!0))},Ne.Vo=function(a){a||(a=this.Ah,a!==null&&ey(a,this))},Ne.Wo=function(a){a||(a=this.Ah,a!==null&&ty(a,this))},Ne.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Ne.oz=function(){return Xv(this,this)};function Xv(a,y){var x=y.containingGroup;return x!==null?1+Xv(a,x):y instanceof Bi&&(y=y.labeledLink,y!==null)?Xv(a,y):0}Ne.sz=function(){return zS(this,this)};function zS(a,y){var x=y.containingGroup;return x!==null||y instanceof Bi&&(x=y.labeledLink,x!==null)?zS(a,x):y}Ne.Td=function(a){return a instanceof qr?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 Bi&&(y=y.labeledLink,y!==null)?Yv(a,y,x):!1:!0}Ne.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof qr&&h0(y,!0),y instanceof Bi){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 Bi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof qr&&h0(y,!1),y instanceof Bi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},pr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Bi&&this.isLinkLabel)},pr.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 Bi&&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 Bi){if(x&&y instanceof qr)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 xi)for(y=y.labelNodes;y.next();)yf(a,y.value,x,b,E,z)}}ft.Object.defineProperties(pr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?yr: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!==fi.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:yo},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:Or},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,At(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 xi||(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 xi?(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:la},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:Ko},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&&Rt("Cannot make a Group a member of itself: "+this.toString()),Rt("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 qr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ey(a,this):this instanceof qr&&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 qr){for(x=new _n,yf(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Bi)for(b=b.linksConnected;b.next();)mp(b.value)}if(this instanceof Bi){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 Rt("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 Bi&&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:wo},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))}}}),pr.prototype.invalidateLayout=pr.prototype.C,pr.prototype.findCommonContainingGroup=pr.prototype.px,pr.prototype.isMemberOf=pr.prototype.Td,pr.prototype.findTopLevelPart=pr.prototype.sz,pr.prototype.findSubGraphLevel=pr.prototype.oz,pr.prototype.ensureBounds=pr.prototype.Va,pr.prototype.getDocumentBounds=pr.prototype.mi,pr.prototype.findObject=pr.prototype.fb,pr.prototype.moveTo=pr.prototype.moveTo,pr.prototype.invalidateAdornments=pr.prototype.Wb,pr.prototype.clearAdornments=pr.prototype.Ej,pr.prototype.removeAdornment=pr.prototype.Jf,pr.prototype.addAdornment=pr.prototype.bh,pr.prototype.findAdornment=pr.prototype.Pj,pr.prototype.updateTargetBindings=pr.prototype.La;var ZS=!1;pr.className="Part",pr.LayoutNone=0,pr.LayoutAdded=1,pr.LayoutRemoved=2,pr.LayoutShown=4,pr.LayoutHidden=8,pr.LayoutNodeSized=16,pr.LayoutGroupLayout=32,pr.LayoutNodeReplaced=64,pr.LayoutStandard=127,pr.LayoutAll=16777215;function jo(a,y){a===void 0||a instanceof Es||typeof a=="string"?pr.call(this,a):(pr.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)}jt(jo,pr),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 xi&&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||!At(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 fi){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 fi&&this.$a.rg(b)&&(this.$a=null));pr.prototype.gk.call(this,a,y,x,b,E,z,te)},jo.prototype.updateAdornments=function(){},jo.prototype.Lj=function(){},ft.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 Bi(a,y){a===void 0||a instanceof Es||typeof a=="string"?pr.call(this,a):(pr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Dn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}jt(Bi,pr),Bi.prototype.cloneProtected=function(a){pr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Ne=Bi.prototype,Ne.Af=function(a){pr.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())}Ne.th=function(){pr.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}Ne.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=GS(this,a,y,x),a!==null&&a.Sl()},Ne.gk=function(a,y,x,b,E,z,te){a===Va&&y==="elements"?this.wc=null:a===cs&&y==="elements"&&(this.wc=null),pr.prototype.gk.call(this,a,y,x,b,E,z,te)},Ne.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)}}Ne.si=function(){return!0},Bi.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Bi.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Bi.prototype.isVisible=function(){if(!pr.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},Bi.prototype.Zb=function(a){pr.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)}},Bi.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)})}}Bi.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},Ne=Bi.prototype,Ne.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},Ne.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},Ne.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 fr(x):yr},Ne.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 fr(x):yr},Ne.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 fr(x):yr},Ne.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},Ne.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}}}Bi.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Ne=Bi.prototype,Ne.Vo=function(a){pr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&e1(a,this))},Ne.Wo=function(a){pr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Ne.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,pr.prototype.Lj.call(this)},Ne.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 Ai: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=yn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);On(x)}}}Ne.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},Ne.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}},Ne.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},Ne.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},Ne.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Bi)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},Ne.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},Ne.uz=function(){return _S(this,this)};function _S(a,y){return y=y.pg(),y===null?0:1+_S(a,y)}Ne.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},Ne.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 Dn,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 Dn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new fr(x):yr},Ne.wz=function(a){a===void 0&&(a=1/0);var y=new _n;return yf(y,this,!1,a,!0),y},Bi.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(Me){return Me===we.uv||!Me.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}Bi.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(Me){return Me===we.vv||!Me.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}ft.Object.defineProperties(Bi.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 zi(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))}}}),Bi.prototype.expandTree=Bi.prototype.expandTree,Bi.prototype.collapseTree=Bi.prototype.collapseTree,Bi.prototype.findTreeParts=Bi.prototype.wz,Bi.prototype.findTreeChildrenNodes=Bi.prototype.Ou,Bi.prototype.findTreeChildrenLinks=Bi.prototype.Qo,Bi.prototype.findTreeLevel=Bi.prototype.uz,Bi.prototype.findTreeParentChain=Bi.prototype.vz,Bi.prototype.findTreeParentNode=Bi.prototype.pg,Bi.prototype.findTreeParentLink=Bi.prototype.kh,Bi.prototype.findCommonTreeParent=Bi.prototype.gz,Bi.prototype.findTreeRoot=Bi.prototype.xz,Bi.prototype.isInTreeOf=Bi.prototype.Nz,Bi.prototype.findPort=Bi.prototype.ns,Bi.prototype.findLinksTo=Bi.prototype.kz,Bi.prototype.findLinksBetween=Bi.prototype.jz,Bi.prototype.findNodesInto=Bi.prototype.Oo,Bi.prototype.findNodesOutOf=Bi.prototype.Po,Bi.prototype.findNodesConnected=Bi.prototype.Mu,Bi.prototype.findLinksInto=Bi.prototype.Sd,Bi.prototype.findLinksOutOf=Bi.prototype.Mo,Bi.prototype.findExternalTreeLinksConnected=Bi.prototype.qx,Bi.prototype.invalidateConnectedLinks=Bi.prototype.Bd,Bi.prototype.invalidateLinkBundle=Bi.prototype.Lz;var bx=new Xt(Bi,"SpreadingNone",10),p0=new Xt(Bi,"SpreadingEvenly",11),qv=new Xt(Bi,"SpreadingPacked",12);Bi.className="Node",Bi.SpreadingNone=bx,Bi.SpreadingEvenly=p0,Bi.SpreadingPacked=qv;function qr(a,y){a===void 0||a instanceof Es||typeof a=="string"?Bi.call(this,a):(Bi.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)}jt(qr,Bi),qr.prototype.cloneProtected=function(a){Bi.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())},Ne=qr.prototype,Ne.Af=function(a){Bi.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 Bi)x.Bd(y);else if(x instanceof xi)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Ne.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&&Rt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof fi){var re=E.Nl(function(oe){return oe instanceof Hl});re instanceof Hl&&(this.$a===null?this.$a=re:this.$a!==re&&Rt("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 fi&&this.$a.rg(b)&&(this.$a=null));Bi.prototype.gk.call(this,a,y,x,b,E,z,te)},Ne.Xl=function(a,y){Bi.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==fi.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof fi&&(a=a.Pb()),this.tb===null&&(this.tb=new _t),a.mi(this.tb),a instanceof io&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Ne.eh=function(a,y,x,b){this.nf=this.$a,Bi.prototype.eh.call(this,a,y,x,b)},Ne.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof xi||y.Va()}),Bi.prototype.Va.call(this)},Ne.si=function(){if(!Bi.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Bi){if(y.isVisible()&&At(y))return!1}else if(y instanceof xi&&y.isVisible()&&At(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ey(a,y){if(a.Gn.add(y)){y instanceof qr&&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 xi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function ty(a,y){if(a.Gn.remove(y)){y instanceof qr&&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 xi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Ne.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)}Bi.prototype.Lj.call(this)},qr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Rn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},qr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=Rn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},qr.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))},Ne=qr.prototype,Ne.Bd=function(a){var y=(this.U&65536)!==0;if(Bi.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()))}}},Ne.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 Bi)for(E=E.linksConnected;E.next();){var z=E.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Ne.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 Bi)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},Ne.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new _n;return a(this,y),y},Ne.Rj=function(){var a=new _n;return yf(a,this,!0,0,!0),a.remove(this),a},Ne.Zb=function(a){Bi.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},qr.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 qr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,QS(z,y,x,b)),z instanceof Bi)z.Bd(y),x.Aj(z,b);else if(z instanceof xi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}qr.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 qr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,qS(z,y,x,b)),z instanceof Bi)z.Bd(y),x.Cj(z,b);else if(z instanceof xi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}qr.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=et.alloc(),Bi.prototype.move.call(this,a,y),a=new _n,y=this.Rj().iterator;y.next();)E=y.value,E instanceof xi&&(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 Bi&&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 xi&&(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());et.free(z)}},ft.Object.defineProperties(qr.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&&Rt("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)}}}),qr.prototype.expandSubGraph=qr.prototype.expandSubGraph,qr.prototype.collapseSubGraph=qr.prototype.collapseSubGraph,qr.prototype.findSubGraphParts=qr.prototype.Rj,qr.prototype.findContainingGroupChain=qr.prototype.hz,qr.prototype.findExternalNodesConnected=qr.prototype.iz,qr.prototype.findExternalLinksConnected=qr.prototype.Lu,qr.prototype.ensureBounds=qr.prototype.Va,qr.className="Group";function Hl(a){Qt.call(this),this.yb=Ls,this.ko=new _t(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}jt(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 Sr(0,0,y.width,y.height,a.x,a.y)},Hl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof qr||a instanceof jo)||Rt("Placeholder is not inside a Group or Adornment."),a instanceof qr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Yi(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=et.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),et.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!==fi.Link&&(re=z.ga(a.category==="Selection"?Ba:a.locationSpot,et.alloc()),a.location=re,et.free(re)),isNaN(le)||isNaN(te)?(a=z.ga(Ba,et.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)),Yi(y,le.width+b||0,le.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),et.free(a),_t.free(le)):(Yi(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 qr&&!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 qr&&!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 qr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Hl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof qr))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 xi&&(!y.computesBoundsIncludingLinks||mt(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},ft.Object.defineProperties(Hl.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new zi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Hl.className="Placeholder";function xi(a){pr.call(this,fi.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 Dn().freeze(),this.Tg=this.Mg=null,this.ml=new _t,this.ua=new Pi,this.u=this.o=this.Sf=this.Wf=null,this.su=new et,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}jt(xi,pr),xi.prototype.cloneProtected=function(a){pr.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())},Ne=xi.prototype,Ne.Af=function(a){pr.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)},Ne.qb=function(a){a.classType===xi?(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&&Rt("Unknown Link enum value for a Link property: "+a):pr.prototype.qb.call(this,a)},Ne.Xc=function(){this.ba===null&&(this.ba=new no)},Ne.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),At(a)||mf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),At(a)||mf(a)))},Ne.zv=function(){return!1},Ne.Av=function(){},Ne.Zc=function(){return!1},xi.prototype.computeAngle=function(a,y,x){return xi.computeAngle(y,x)},xi.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}Ne=xi.prototype,Ne.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&pr.prototype.oh.call(this)},Ne.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Ne.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()}Ne.Vo=function(a){if(pr.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)}},Ne.Wo=function(a){if(pr.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)}},Ne.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))},xi.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},xi.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?pr.prototype.move.call(this,a,!1):(a=et.allocAt(x.x+b,x.y+E),pr.prototype.move.call(this,a,!1),et.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)},xi.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},xi.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},xi.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(co),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},xi.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)},Ne=xi.prototype,Ne.i=function(a){return this.Nb.s[a]},Ne.dd=function(a,y){this.Nb.cd(a,y)},Ne.L=function(a,y,x){this.Nb.cd(a,new et(y,x))},Ne.Kz=function(a,y){this.Nb.Gb(a,y)},Ne.m=function(a,y,x){this.Nb.Gb(a,new et(y,x))},Ne.ne=function(a){this.Nb.add(a)},Ne.yf=function(a,y){this.Nb.add(new et(a,y))},Ne.pv=function(a){this.Nb.mb(a)},Ne.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 Dn,z=a.Nb.iterator;z.next();){var te=z.value;E.add(new et(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)}}Ne.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Ne.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)}},Ne.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))}Ne.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())}},Ne.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()}}},xi.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Ig||(Ig=new Bi,Ig.desiredSize=Ao,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 Bi,Og.desiredSize=Ao,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 Me=z.x+re/3,Te=z.y+oe/3,je=Me,ut=Te;en.B(oe,0)?ut=0<re?ut-le:ut+le:(ue=-re/oe,me=Math.sqrt(le*le/(ue*ue+1)),0>le&&(me=-me),je=(0>oe?-1:1)*me+Me,ut=ue*(je-Me)+Te),Me=z.x+2*re/3,Te=z.y+2*oe/3;var tt=Me,Ct=Te;en.B(oe,0)?Ct=0<re?Ct-le:Ct+le:(tt=(0>oe?-1:1)*me+Me,Ct=ue*(tt-Me)+Te),this.Fj(),this.ne(z),this.yf(je,ut),this.yf(tt,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 et),this.dd(0,this.getLinkPointFromPoint(a,y,te,E,!0,te)),x=we.ga(y0(x),new et),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 Mt=le?this.computeCurviness():0;me=this.getLinkPoint(a,y,te,!0,ue,b,E),Me=je=Te=0,(ue||!re||le)&&(ut=this.computeEndSegmentLength(a,y,te,!0),Me=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)&&(Me-=ue?90:30,0>Mt&&(Me-=180)),0>Me?Me+=360:360<=Me&&(Me-=360),le&&(ut+=Math.abs(Mt)*(ue?1:2)),Me===0?Te=ut:Me===90?je=ut:Me===180?Te=-ut:Me===270?je=-ut:(Te=ut*Math.cos(Me*Math.PI/180),je=ut*Math.sin(Me*Math.PI/180)),te.Mc()&&le&&(ut=y.ga(So,et.alloc()),tt=et.allocAt(ut.x+1e3*Te,ut.y+1e3*je),this.getLinkPointFromPoint(a,y,ut,tt,!0,me),et.free(ut),et.free(tt))),ut=this.getLinkPoint(b,E,x,!1,ue,a,y);var kt=Ct=tt=0;if(ue||!oe||le){var Jt=this.computeEndSegmentLength(b,E,x,!1);kt=this.getLinkDirection(b,E,ut,x,!1,ue,a,y),le&&(oe||te.D(x)||!ue&&te.x+x.x===1&&te.y+x.y===1)&&(kt+=ue?0:30,0>Mt&&(kt+=180)),0>kt?kt+=360:360<=kt&&(kt-=360),le&&(Jt+=Math.abs(Mt)*(ue?1:2)),kt===0?tt=Jt:kt===90?Ct=Jt:kt===180?tt=-Jt:kt===270?Ct=-Jt:(tt=Jt*Math.cos(kt*Math.PI/180),Ct=Jt*Math.sin(kt*Math.PI/180)),x.Mc()&&le&&(x=E.ga(So,et.alloc()),te=et.allocAt(x.x+1e3*tt,x.y+1e3*Ct),this.getLinkPointFromPoint(b,E,x,te,!1,ut),et.free(x),et.free(te))}x=me,(ue||!re||le)&&(x=new et(me.x+Te,me.y+je)),te=ut,(ue||!oe||le)&&(te=new et(ut.x+tt,ut.y+Ct)),!we&&!ue&&re&&3<z&&this.adjustPoints(0,me,z-2,te)?this.dd(z-1,ut):!we&&!ue&&oe&&3<z&&this.adjustPoints(1,x,z-1,ut)?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,ut)):(this.Fj(),this.ne(me),(ue||!re||le)&&this.ne(x),ue&&this.addOrthoPoints(x,Me,te,kt,a,b),(ue||!oe||le)&&this.ne(te),this.ne(ut))}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}xi.prototype.getLinkPointFromPoint=function(a,y,x,b,E,z){if(z===void 0&&(z=new et),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)}xi.prototype.getLinkPoint=function(a,y,x,b,E,z,te,re){if(re===void 0&&(re=new et),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=et.alloc(),le=et.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),et.free(oe),et.free(le)}}return re}}return x=y.ga(y0(x),et.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=et.alloc(),te=te.ga(y0(oe),z),E&&(te=ny(x,te)),et.free(z)),this.getLinkPointFromPoint(a,y,x,te,b,re),et.free(x),re},xi.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(So,et.alloc()),this.pointsCount>(z?6:2)?(re=E?this.i(1):this.i(this.pointsCount-2),re=z?ny(oe,re.copy()):x):(x=et.alloc(),re=re.ga(So,x),et.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,et.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},xi.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)},xi.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=So:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Ko?La:y)):(a=y||this.toPort,a===null?a=So:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Ko?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:So}xi.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Zl&&4<this.pointsCount?this.computeMidPoint(new et):(a=y.Zn,a=a!==null?l1(a,this):null,a!==null?a.Zo:y.ga(So))},xi.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},xi.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 fi)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 Me=re,Te=me;if(ue.fh(Me,Te))re=!0;else{if(Te===void 0&&(Te=ue.transform,Me.Re(ue.actualBounds))){re=!0;break e}re=Me.left,we=Me.right;var je=Me.top;Me=Me.bottom;var ut=et.alloc(),tt=et.alloc(),Ct=et.alloc(),Mt=ro.alloc();Mt.set(Te),Mt.bv(ue.transform),Mt.Vj(),tt.x=we,tt.y=je,tt.transform(Mt),ut.x=re,ut.y=je,ut.transform(Mt),Te=!1,Qf(ue,ut,tt,Ct)?Te=!0:(ut.x=we,ut.y=Me,ut.transform(Mt),Qf(ue,ut,tt,Ct)?Te=!0:(tt.x=re,tt.y=Me,tt.transform(Mt),Qf(ue,ut,tt,Ct)?Te=!0:(ut.x=re,ut.y=je,ut.transform(Mt),Qf(ue,ut,tt,Ct)&&(Te=!0)))),ro.free(Mt),et.free(ut),et.free(tt),et.free(Ct),re=Te}}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},xi.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},xi.prototype.computeCorner=function(){if(this.curve===$u)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},xi.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},xi.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(So).ab(x.ga(So))/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},xi.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Zl&&x.bb()}},xi.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=i1;var y=this.Sf;if(y!==null){for(var x=yn(),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),On(x)}}return a},xi.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},xi.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},xi.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 Me=1;if(oe-re!==0){var Te=(we-ue)/(oe-re);Me=Math.sqrt(1+1/(Te*Te))}else Te=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var je=y.x,ut=y.y,tt=.5;le!==0&&(tt=((E-je)*(E-te)+(z-ut)*(z-me))/le);var Ct=E+tt*(te-E),Mt=z+tt*(me-z);y=Math.sqrt((je-Ct)*(je-Ct)+(ut-Mt)*(ut-Mt)),ut<Te*(je-Ct)+Mt&&(y=-y),0<Te&&(y=-y),je=re+tt*(oe-re),tt=ue+tt*(we-ue),Te!==0?(y=je+y/Me,this.L(a,y,tt-(y-je)/Te)):this.L(a,je,tt+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}},xi.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=et.alloc(),ue=et.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 Me=uf(we,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Me.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))&&Me.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))&&Me.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 Te=x=null;if(we.isVirtualized){we=Me.bounds.copy(),we.Bc(-Me.Ho,-Me.Go);var je=et.alloc();Sp(Me,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(Me,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)?(Te=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)?(Te=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)&&(Te=me=je.copy(),b=a.ab(je))),et.free(je)}re=re.copy().ed(oe),re.Bc(Me.Ho*Me.Os,Me.Go*Me.Os),a1(Me,a,y,me,b,re,!0),oe=zd(Me,me.x,me.y),!Me.abort&&oe>=xp&&(o1(Me),re.Bc(Me.Ho*Me.Hx,Me.Go*Me.Ix),a1(Me,a,y,me,b,re,!1),oe=zd(Me,me.x,me.y)),!Me.abort&&oe<xp&&zd(Me,me.x,me.y)!==Kh?(ry(this,Me,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)<=Me.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)<=Me.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)),Te!==null&&(b===0||b===180?this.yf(z.x,Te.y):this.yf(Te.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(le.copy()),this.ne(ue.copy())),et.free(le),et.free(ue)}},xi.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)}xi.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Eo(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=Eo(y,a,b.x,b.y,x.x,x.y);b=x,re<E&&(z=te,E=re)}return z},xi.prototype.qc=function(){this.lk=!1,this.v()},xi.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)}}},xi.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=Pi.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=et.allocAt(b,oe),x=et.alloc(),x.assign(this.i(1)),z=et.allocAt(b,oe),E=et.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,Me=le,Te=this.i(oy(this,le,me,!1));if((!en.$(we.x,Me.x)||!en.$(Me.x,Te.x))&&(!en.$(we.y,Me.y)||!en.$(Me.y,Te.y))){var je=ue;isNaN(je)&&(je=this.smoothness/3);var ut=we.x;we=we.y;var tt=Me.x;Me=Me.y;var Ct=Te.x;Te=Te.y;var Mt=je*S0(ut,we,tt,Me);je*=S0(tt,Me,Ct,Te),en.$(we,Me)&&en.$(tt,Ct)&&(tt>ut?Te>Me?(z.x=tt-Mt,z.y=Me-Mt,E.x=tt+je,E.y=Me+je):(z.x=tt-Mt,z.y=Me+Mt,E.x=tt+je,E.y=Me-je):Te>Me?(z.x=tt+Mt,z.y=Me-Mt,E.x=tt-je,E.y=Me+je):(z.x=tt+Mt,z.y=Me+Mt,E.x=tt-je,E.y=Me-je)),en.$(ut,tt)&&en.$(Me,Te)&&(Me>we?(Ct>tt?(z.x=tt-Mt,z.y=Me-Mt,E.x=tt+je):(z.x=tt+Mt,z.y=Me-Mt,E.x=tt-je),E.y=Me+je):(Ct>tt?(z.x=tt-Mt,z.y=Me+Mt,E.x=tt+je):(z.x=tt+Mt,z.y=Me+Mt,E.x=tt-je),E.y=Me-je)),(en.$(ut,tt)&&en.$(tt,Ct)||en.$(we,Me)&&en.$(Me,Te))&&(ut=.5*(ut+Ct),we=.5*(we+Te),z.x=ut,z.y=we,E.x=ut,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,jr)),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),et.free(y),et.free(x),et.free(z),et.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,jr)),Hh(re,z.x-b,z.y-oe,E.x-b,E.y-oe,te.x-b,te.y-oe);else{for(z=et.alloc(),z.assign(this.i(0)),E=et.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,jr)),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,ut=-oe,we=ue,tt=this.i(le),je=x,en.B(z.y,we.y)&&en.B(we.x,tt.x))if(Te=Math.min(te,Math.abs(we.x-E.x)/2),Te=Mt=Math.min(Te,Math.abs(tt.y-we.y)/2),en.B(Te,0))kg(this,re,me,ut,z,we,je),z.assign(we);else{var kt=we.x,Jt=we.y;Me=kt,Ct=Jt,we.x>z.x?kt=we.x-Te:kt=we.x+Te,tt.y>we.y?Ct=we.y+Mt:Ct=we.y-Mt,tt=et.allocAt(kt,Jt),kg(this,re,me,ut,z,tt,je),et.free(tt),u0(re,we.x+me,we.y+ut,Me+me,Ct+ut),z.h(Me,Ct)}else en.B(z.x,we.x)&&en.B(we.y,tt.y)?(Te=Math.min(te,Math.abs(we.y-E.y)/2),Te=Mt=Math.min(Te,Math.abs(tt.x-we.x)/2),en.B(Mt,0)?(kg(this,re,me,ut,z,we,je),z.assign(we)):(kt=we.x,Jt=we.y,Me=kt,Ct=Jt,we.y>z.y?Jt=we.y-Te:Jt=we.y+Te,tt.x>we.x?Me=we.x+Mt:Me=we.x-Mt,tt=et.allocAt(kt,Jt),kg(this,re,me,ut,z,tt,je),et.free(tt),u0(re,we.x+me,we.y+ut,Me+me,Ct+ut),z.h(Me,Ct))):(kg(this,re,me,ut,z,we,je),z.assign(we));E.assign(ue),me=le}et.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=Pi.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}xi.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,Me=Math.min(me+te,z.x);ue<le&&(me=oe[ue],me<Me+te);)ue++,Me=Math.min(me+re,z.x);me=z.y-te+b,Me+=x;var Te=z.y+b;a.curve===$h?pp(y,Me,Te,!1):Hh(y,we,me,Me,me,Me,Te)}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,Me=z.y+b,a.curve===$h?pp(y,me,Me,!1):Hh(y,we,ue,me,ue,me,Me)}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&&(Me=oe[ue],Me<me+te);)ue++,me=Math.min(Me+re,z.y);Me=z.x-te+x,Te=z.x+x,me+=b,a.curve===$h?pp(y,Te,me,!1):Hh(y,Me,we,Me,me,Te,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,Me=z.x+x,ue+=b,a.curve===$h?pp(y,Me,ue,!1):Hh(y,me,we,me,ue,Me,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 xi){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=et.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,Me=y.y,Te=te.x;te=te.y;var je=le.x,ut=le.y;if(en.B(ue,we)){if(!en.B(me,Me)&&en.B(te,ut)&&Math.min(me,Me)<te&&Math.max(me,Me)>te&&Math.min(Te,je)<ue&&Math.max(Te,je)>ue&&!en.B(Te,je)){re.x=ue,re.y=te,ue=!0;break e}}else if(en.B(me,Me)&&en.B(Te,je)&&Math.min(ue,we)<Te&&Math.max(ue,we)>Te&&Math.min(te,ut)<me&&Math.max(te,ut)>me&&!en.B(te,ut)){re.x=Te,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}et.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()))}xi.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 xi&&(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 xi&&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())}}xi.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},xi.prototype.isVisible=function(){if(!pr.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},xi.prototype.Zb=function(a){if(pr.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)},xi.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&&(gn(y.links,a),y.Sl()))}xi.prototype.ph=function(){return!0},ft.Object.defineProperties(xi.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:Ko},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&&ni(a,">= 0",xi,"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:Ko},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&&ni(a,">= 0",xi,"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?yr: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 et)}},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 Dn,b=0;b<a.length/2;b++)E=new et(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(!tn(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){b=!1;break}}if(b)for(x=new Dn,b=0;b<a.length;b++)E=a[b],x.add(new et(E.x,E.y).freeze())}}else if(a instanceof Dn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Rt("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)}}}),xi.prototype.invalidateOtherJumpOvers=xi.prototype.Xo,xi.prototype.findClosestSegment=xi.prototype.ez,xi.prototype.updateRoute=xi.prototype.vg,xi.prototype.invalidateRoute=xi.prototype.bb,xi.prototype.rollbackRoute=xi.prototype.rv,xi.prototype.commitRoute=xi.prototype.zf,xi.prototype.startRoute=xi.prototype.uh,xi.prototype.clearPoints=xi.prototype.Fj,xi.prototype.removePoint=xi.prototype.pv,xi.prototype.addPointAt=xi.prototype.yf,xi.prototype.addPoint=xi.prototype.ne,xi.prototype.insertPointAt=xi.prototype.m,xi.prototype.insertPoint=xi.prototype.Kz,xi.prototype.setPointAt=xi.prototype.L,xi.prototype.setPoint=xi.prototype.dd,xi.prototype.getPoint=xi.prototype.i,xi.prototype.getOtherPort=xi.prototype.Cz,xi.prototype.getOtherNode=xi.prototype.To;var Ig=null,Og=null,ay=new Xt(xi,"Normal",1),Lx=new Xt(xi,"Orthogonal",2),Nx=new Xt(xi,"AvoidsNodes",6),n1=new Xt(xi,"AvoidsNodesStraight",7),Zl=new Xt(xi,"None",0),$u=new Xt(xi,"Bezier",9),$h=new Xt(xi,"JumpGap",10),yp=new Xt(xi,"JumpOver",11),tm=new Xt(xi,"End",17),P0=new Xt(xi,"Scale",18),w0=new Xt(xi,"Stretch",19),nm=new Xt(xi,"OrientAlong",21),im=new Xt(xi,"OrientPlus90",22),rm=new Xt(xi,"OrientMinus90",23),sy=new Xt(xi,"OrientOpposite",24),C0=new Xt(xi,"OrientUpright",25),om=new Xt(xi,"OrientPlus90Upright",26),am=new Xt(xi,"OrientMinus90Upright",27),b0=new Xt(xi,"OrientUpright45",28),i1=16,r1=14,sm=8;xi.className="Link",xi.Normal=ay,xi.Orthogonal=Lx,xi.AvoidsNodes=Nx,xi.AvoidsNodesStraight=n1,xi.None=Zl,xi.Bezier=$u,xi.JumpGap=$h,xi.JumpOver=yp,xi.End=tm,xi.Scale=P0,xi.Stretch=w0,xi.OrientAlong=nm,xi.OrientPlus90=im,xi.OrientMinus90=rm,xi.OrientOpposite=sy,xi.OrientUpright=C0,xi.OrientPlus90Upright=om,xi.OrientMinus90Upright=am,xi.OrientUpright45=b0,xi.EndSegmentStep=8,xi.CurvinessStart=i1,xi.SpacingMin=r1,xi.OrthoShortCut=sm;function E0(a,y,x,b){Ir(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){Ir(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 Me=x===0||x===90?1:-1;if(x=x===90||x===270,b[re][oe]===Kh?(M0(a,re,oe,Me,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,Me,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,Me,x,le,ue,le,ue),x=yn(),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);On(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++}}}ft.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(){Ir(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 qr?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,et.alloc()),oe=a.port.ga(vl,et.alloc());for(E=_t.allocAt(re.x,re.y,0,0),E.Ye(oe),et.free(re),et.free(oe),re=et.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 Me=we.findVisibleNode();Me!==null&&Me!==we&&(we=Me,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)),Me=a.pe[z],Me===void 0?(Me=new cy(le,we,me),a.pe[z]=Me):(Me.link=le,Me.angle=we,Me.Nc=me),Me.hv.set(ue),z++}}}}for(et.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=et.alloc(),oe=et.alloc(),te=et.alloc(),le=et.alloc(),me.ga(Ba,re),me.ga(su,oe),me.ga(vl,te),me.ga(Ml,le),Me=we=ue=me=0,b===qv)for(var Te=0;Te<z.length;Te++){var je=z[Te];if(je!==null){var ut=je.link.computeThickness();switch(je.Nc){case 8:we+=ut;break;case 2:Me+=ut;break;case 1:me+=ut;break;default:case 4:ue+=ut}}}var tt=Te=0,Ct=1,Mt=je=0;for(ut=0;ut<z.length;ut++){var kt=z[ut];if(kt!==null){if(Te!==kt.Nc){switch(Te=kt.Nc,Te){case 8:var Jt=te;tt=le;break;case 2:Jt=le,tt=re;break;case 1:Jt=re,tt=oe;break;default:case 4:Jt=oe,tt=te}switch(je=tt.x-Jt.x,Mt=tt.y-Jt.y,Te){case 8:we>Math.abs(je)?(Ct=Math.abs(je)/we,we=Math.abs(je)):Ct=1;break;case 2:Me>Math.abs(Mt)?(Ct=Math.abs(Mt)/Me,Me=Math.abs(Mt)):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(Mt)?(Ct=Math.abs(Mt)/ue,ue=Math.abs(Mt)):Ct=1}tt=0}var pn=kt.Zo;if(b===qv){switch(kt=kt.link.computeThickness(),kt*=Ct,pn.set(Jt),Te){case 8:pn.x=Jt.x+je/2+we/2-tt-kt/2;break;case 2:pn.y=Jt.y+Mt/2+Me/2-tt-kt/2;break;case 1:pn.x=Jt.x+je/2-me/2+tt+kt/2;break;default:case 4:pn.y=Jt.y+Mt/2-ue/2+tt+kt/2}tt+=kt}else{var Fi=.5;b===p0&&(Fi=(kt.Uo+1)/(kt.Gl+1)),pn.x=Jt.x+je*Fi,pn.y=Jt.y+Mt*Fi}}}for(et.free(re),et.free(oe),et.free(te),et.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 et,this.Gl=this.Uo=0,this.Zo=new et,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){Ir(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new et(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=$n(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 fn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof qr?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 fn?(Sf(this,y,a.nodes,!0,this.rh,!0,!1,!0),Sf(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof qr?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 qr&&(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 xi)&&(um(re),this.rh(re))){var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(x,b),re instanceof qr&&(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 qr&&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 Bi?oe.isLinkLabel||(oe instanceof qr&&oe.layout===null?Sf(a,y,oe.memberParts,!1,E,z,te,re):(um(oe),y.add(oe))):te&&oe instanceof xi?y.add(oe):!re||!oe.Zc()||oe instanceof Bi||(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 fn?(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 qr?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},ft.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){Ir(this),this.Sc=a,this.wf=new _n,this.ye=new _n,this.Es=new Ai,this.zs=new Ai}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 Ai,this.zs=new Ai},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 Bi)return!te.isLinkLabel;if(te instanceof xi){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 Bi&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof qr&&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 xi&&(!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},Ne=ca.prototype,Ne.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Ne.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},Ne.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}Ne.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Ne.ki=function(a){return a===null?null:this.Es.I(a)},Ne.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}}Ne.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},Ne.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))}Ne.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Ne.Lo=function(a){return a===null?null:this.zs.I(a)},Ne.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},Ne.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))}},Ne.Ko=function(){for(var a=yn(),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]);On(a)},ca.prototype.deleteArtificialVertexes=function(){for(var a=yn(),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=yn(),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]);On(a),On(y)};function Ax(a){for(var y=yn(),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]);On(y)}ca.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new Dn;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},ft.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){Ir(this),this.ob=a,this.j=new _t(0,0,10,10).freeze(),this.o=new et(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Dn,this.mg=new Dn}Ms.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Dn,this.mg=new Dn},Ms.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+xr(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;tn(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 qr)){x=_t.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(So);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}ft.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 qr)&&(a=a.locationObject.ga(So),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 Dn,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){Ir(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#"+xr(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},ft.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 hi(NaN,NaN).freeze(),this.tf=new hi(10,10).freeze(),this.Jb=cm,this.Rb=F0,this.nd=dm,this.hd=c1,a&&Object.assign(this,a)}jt(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:Rt("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 qr)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 Me=this.ni(E[we],le);me=Math.max(me,Me.height)}me=Math.max(me+oe,1),we=this.arrangement;for(var Te=Me=this.arrangementOrigin.x,je=this.arrangementOrigin.y,ut=0,tt=0,Ct=0;Ct<E.length;Ct++){var Mt=E[Ct],kt=this.ni(Mt,le),Jt=Math.ceil((kt.width+re)/ue)*ue,pn=Math.ceil((kt.height+oe)/me)*me;switch(we){case Vc:var Fi=Math.abs(Te-kt.width);break;default:Fi=Te+kt.width}switch((0<z&&ut>z-1||0<te&&0<ut&&Fi-Me>te)&&(b.push(new _t(0,je,te+re,tt)),ut=0,Te=Me,je+=tt,tt=0),tt=Math.max(tt,pn),we){case Vc:kt=-kt.width;break;default:kt=0}switch(Mt.moveTo(Te+kt,je),we){case Vc:Te-=Jt;break;default:Te+=Jt}ut++}b.push(new _t(0,je,te+re,tt)),_t.free(le);break;case cm:for(oe=te,ue=z,me=y,we=x,te=_t.alloc(),Me=Math.max(this.cellSize.width,1),z=je=le=0,re=et.alloc(),Te=0;Te<E.length;Te++)tt=E[Te],ut=this.ni(tt,te),tt=Zh(tt,tt.locationObject,tt.locationSpot,re),le=Math.max(le,tt.x),je=Math.max(je,ut.width-tt.x),z=Math.max(z,tt.y);switch(Te=this.arrangement,Te){case Vc:le+=me;break;default:je+=me}Me=isFinite(Me)?Math.max(Me+me,1):Math.max(le+je,1);var _i=tt=this.arrangementOrigin.x;for(Ct=this.arrangementOrigin.y,je=0,oe>=le&&(oe-=le),le=Mt=0,Jt=Math.max(this.cellSize.height,1),kt=z=0,pn=!0,ut=et.alloc(),Fi=0;Fi<E.length;Fi++){var Zi=E[Fi],yi=this.ni(Zi,te),ei=Zh(Zi,Zi.locationObject,Zi.locationSpot,re);if(0<je)switch(Te){case Vc:_i=(_i-tt-(yi.width-ei.x))/Me,_i=en.$(Math.round(_i),_i)?Math.round(_i):Math.floor(_i),_i=_i*Me+tt;break;default:_i=(_i-tt+ei.x)/Me,_i=en.$(Math.round(_i),_i)?Math.round(_i):Math.ceil(_i),_i=_i*Me+tt}else switch(Te){case Vc:Mt=_i+ei.x+yi.width;break;default:Mt=_i-ei.x}switch(Te){case Vc:var Xr=-(_i+ei.x)+Mt;break;default:Xr=_i+yi.width-ei.x-Mt}if(0<ue&&je>ue-1||0<oe&&0<je&&Xr>oe){for(b.push(new _t(0,pn?Ct-z:Ct,oe+me,kt+z+we)),_i=0;_i<je&&Fi!==je;_i++){Xr=E[Fi-je+_i];var Ar=Zh(Xr,Xr.locationObject,Xr.locationSpot,ut);Xr.moveTo(Xr.position.x,Xr.position.y+z-Ar.y)}kt+=we,Ct=pn?Ct+kt:Ct+(kt+z),je=kt=z=0,_i=tt,pn=!1}switch(_i===tt&&(le=Te===Vc?Math.max(le,yi.width-ei.x):Math.min(le,-ei.x)),z=Math.max(z,ei.y),kt=Math.max(kt,yi.height-ei.y),isFinite(Jt)&&(kt=Math.max(kt,Math.max(yi.height,Jt)-ei.y)),pn?Zi.moveTo(_i-ei.x,Ct-ei.y):Zi.moveTo(_i-ei.x,Ct),Te){case Vc:_i-=ei.x+me;break;default:_i+=yi.width-ei.x+me}je++}if(b.push(new _t(0,Ct,oe+me,(pn?kt:kt+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(et.free(re),et.free(ut),Te===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 et(E+y/2-(z+E),te-x/2)):this.commitLayers(b,new et(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}ft.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 Xt(qs,"Position",0),cm=new Xt(qs,"Location",1),F0=new Xt(qs,"LeftToRight",2),Vc=new Xt(qs,"RightToLeft",3),py=new Xt(qs,"Forward",4),A0=new Xt(qs,"Reverse",5),dm=new Xt(qs,"Ascending",6),D0=new Xt(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 Ai,this.bf=new Ai,this.aj=new Ai,this.H=null,this.tp=!1}Ne=qo.prototype,Ne.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Ne.Xe=function(a){this.H=a},Ne.oi=function(a){if(a instanceof Bi){if(this.On.add(a),a instanceof qr){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 xi?this.Dn.add(a):a instanceof jo||this.Pa.add(a);y=a.data,y===null||a instanceof jo||(a instanceof xi?this.bf.add(y,a):this.cf.add(y,a))},Ne.pc=function(a){if(a.Ej(),a instanceof Bi){if(this.On.remove(a),a instanceof qr){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 xi?this.Dn.remove(a):a instanceof jo||this.Pa.remove(a);y=a.data,y===null||a instanceof jo||(a instanceof xi?this.bf.remove(y):this.cf.remove(y))},Ne.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 qr)&&Rt('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 qr||Rt('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 xi||Rt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=yn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=yn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=yn(),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]);On(y),On(x),On(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,gi('No Group template found for category "'+x+'"'),gi(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(g1||(g1=!0,gi('No Node template found for category "'+x+'"'),gi(" 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,gi('No Link template found for category "'+a+'"'),gi(" 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 Bi?a:null)},qo.prototype.findLinkForKey=function(){return null},Ne=qo.prototype,Ne.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Ne.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Bi?a:null)},Ne.Kc=function(a){return a===null?null:this.bf.I(a)},Ne.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(tn(te)&&my(this,E,te)){y.add(b);break}}}return y.iterator},Ne.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(tn(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(tn(y)&&tn(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===Ca){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"&&tn(te)&&d1(this,te),y.isModified=!0}else if(x===cs){var re=a.oldValue;b==="nodeDataArray"&&tn(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===Ca){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,Me=this.aj.I(a.object);if(Array.isArray(Me))for(a=0;a<Me.length;a++){var Te=Me[a];if(ue)Ym(Te,we,me,!0);else if(!(0>me)){var je=me+Vp(Te);Te.pc(je,!0),Av(Te,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=yn()),x.push(te))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);On(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 Ai;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 Ai,te=b.iterator;te.next();){var re=te.value;if(re instanceof xi)a||re.fromNode!==null&&re.toNode!==null||E.add(re);else if(re instanceof Bi&&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 Ai;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 pr))return null;if(z.isSelected=!1,z.isHighlighted=!1,b.add(y,z),y instanceof Bi){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 qr&&z instanceof qr)for(y=y.memberParts;y.next();)te=B0(a,y.value,x,b,E),te instanceof xi||te===null||(te.containingGroup=z)}else if(y instanceof xi&&z instanceof xi)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 Bi&&(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 xi||(b=E.copyNodeData(b),tn(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 xi||(E=y.copyNodeData(b)),tn(E)&&(x.data=E)));return x},ft.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)}jt(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 Bi&&(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 Bi&&(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===Ca){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 Me=this.Lc(a.object);if(Me!==null){var Te=a.newValue;if(Te!==void 0){var je=this.Vb(Te);je instanceof qr?Me.containingGroup=je:Me.containingGroup=null}else Me.containingGroup=null}}else if(E==="linkLabelKeys"){var ut=this.Kc(a.object);if(ut!==null){var tt=a.oldValue,Ct=a.newValue;Array.isArray(tt)&&tt.forEach(function(ei){0<=Ct.indexOf(ei)||(ei=y.Vb(ei),ei!==null&&(ei.labeledLink=null))}),Array.isArray(Ct)&&Ct.forEach(function(ei){ei=y.Vb(ei),ei!==null&&(ei.labeledLink=ut)})}}else if(E==="linkCategory"){var Mt=this.Kc(a.object),kt=a.newValue;Mt!==null&&typeof kt=="string"&&(Mt.category=kt)}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 pn=this.Kc(a.object),Fi=this.Vb(Jt);pn!==null&&Fi!==null&&(Fi.labeledLink=pn)}x.isModified=!0}else if(b===cs){var _i=a.oldValue;if(E==="linkDataArray"&&typeof _i=="object"&&_i!==null)this.ip(_i);else if(E==="linkLabelKeys"&&Pf(_i)){var Zi=this.Vb(_i);Zi!==null&&(Zi.labeledLink=null)}x.isModified=!0}}else if(b===Ca){var yi=a.propertyName;a.object!==x.model||yi!=="linkFromKeyProperty"&&yi!=="linkToKeyProperty"&&yi!=="linkFromPortIdProperty"&&yi!=="linkToPortIdProperty"&&yi!=="linkLabelKeysProperty"&&yi!=="nodeIsGroupProperty"&&yi!=="nodeGroupKeyProperty"&&yi!=="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 xi){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 qr)&&(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 qr&&y.lh(te)===x&&(te=this.Lc(te),te!==null&&(te.containingGroup=E)):(z.link=this.Kc(te),z.link!==null&&E instanceof Bi&&(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 qr&&(E.containingGroup=a))}},Ks.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Bi){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 qr)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 xi)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 xi){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 Bi&&(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 Bi||(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}jt(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||!si(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===Ca){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===Ca){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 Bi&&(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 Bi&&y.mh(z)===x&&T0(this,E,this.ii(z))}_c(y,x)}a=y.mh(a),a!==void 0&&E instanceof Bi&&(a=this.Vb(a),T0(this,a,E))}},ec.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Bi){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 rr(a,y){this.kl=new _n,this.il=new _n,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,Ir(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Ai,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 Ai,this.Lt=new Dn,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))}rr.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},rr.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},rr.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},rr.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)+":"+Yn(E)}}return y},rr.prototype.xA=function(a){a.change!==Ll&&Rt("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},rr.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!==Ca||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 rr||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},rr.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=bo++,b.set(me,we),E.set(me,y))}if(!tn(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(b||(b=new Ai),re){var oe=b.get(y);if(oe)return oe}else for(E||(E=new Ai),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 et||y instanceof hi||y instanceof _t||y instanceof zi||y instanceof Ui)oe=y.copy(),te(y,oe);else{if(y instanceof Ro||y instanceof Pi||y instanceof Xt)return y;if(y instanceof Dn)oe=new Dn().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 Ai)oe=new Ai().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}Ne=rr.prototype,Ne.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Ne.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},Ne.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,tn(y)&&(a.dm(y),a.modelData=y)}Ne.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)},Ne.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 Ai,y.changes.each(function(E){if(E.diagram!==null){var z=E.change;z===Ca?(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(tn(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}Ne.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!==Ca||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 rr||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},Ne.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)&&Rt("applyIncrementalJson cannot change Model properties"),x1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Ai;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)},Ne.$x=function(a,y){a.change!==Ll&&Rt("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 }'},Ne.yA=function(a,y){return this.$x(a,y)},Ne.np=function(a){return a===void 0&&(a=fm(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Ne.toJSON=function(a){return this.np(a)},Ne.Zw=function(a){var y=null;if(typeof a=="string")try{y=at.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Rt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Rt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Ne.Ky=function(a){return this.Zw(a)},rr.constructGraphLinksModel=function(){return new rr},Ne=rr.prototype,Ne.dm=function(a){if(Bn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(tn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Rt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(tn(a)){for(y in a)if(x=a[y],tn(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 Dn,b=0;b<x.length/2;b++)E.add(new et(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Dx(a)}return a},Ne.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):tn(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 Ki;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 et)y={class:"go.Point",x:Wl(x.x),y:Wl(x.y)};else if(x instanceof hi)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 zi)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 Ro){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 Pi?(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===Pi.o&&(y.path=Pi.ia(x))):x instanceof Xt&&(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 Dn){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 et(Gl(a.x),Gl(a.y));else if(y==="Size")x=new hi(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 zi(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 Ro,x.type=Si(Ro,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,tn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Pi.parse(a.path):x=new Pi,x.type=Si(Pi,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=Si(b,a.name)));return x}Ne.Pe=function(a){return this.Lt.add(a),this},Ne.ik=function(a){this.Lt.remove(a)},Ne.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)},Ne.cb=function(a,y,x,b,E,z,te){bs(this,"",a,y,x,b,E,z,te)},Ne.g=function(a,y,x,b,E){bs(this,"",Ca,a,this,y,x,b,E)},Ne.Fs=function(a,y,x,b,E,z){bs(this,"",Ca,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 wa;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)}rr.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Ca){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)),Ea(x,b,E)}else a.change===Va?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,tn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&gn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&wn(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?gn(b,x):wn(b,x,a))):Rt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===cs?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,tn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&wn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&gn(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?wn(b,x,a):gn(b,x))):Rt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ll&&Rt("unknown ChangedEvent: "+a.toString())},rr.prototype.Ea=function(a){return this.undoManager.Ea(a)},rr.prototype.eb=function(a){return this.undoManager.eb(a)},rr.prototype.Kf=function(){return this.undoManager.Kf()},rr.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}},Ne=rr.prototype,Ne.La=function(a,y){y===void 0&&(y=""),bs(this,"SourceChanged",Ll,y,a,null,null)},Ne.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;Rt("Key value for node data "+a+" is not a number or a string: "+y)}}},Ne.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&&(Ea(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),bs(this,"nodeKey",Ca,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else Ea(a,x,y)}};function Pf(a){return typeof a=="number"||typeof a=="string"}Ne.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Ne.hc=function(a){return a===null&&Rt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Pf(a)?this.kb.I(a):null},Ne.$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))){Ea(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;Ea(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Ea(a,y,x)}}}}},Ne.xf=function(a){a!==null&&(eo(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&&Rt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,wn(a.Tc,b,y)),bs(a,"nodeDataArray",Va,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}Ne.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)},Ne.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;gn(a.Tc,b)}bs(a,"nodeDataArray",cs,"nodeDataArray",a,y,null,b,null),a.qp(y)}Ne.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)},Ne.$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()}},Ne.jp=function(a,y){y!==void 0&&(a=hm(this,a),a instanceof _n&&this.Vf.add(y,a))},Ne.Lv=function(){},Ne.fm=function(){},Ne.em=function(){},Ne.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)}Ne.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},rr.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):I0(this,a,!0),tn(a)&&Ir(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 Ir(b),b}if(x&&tn(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 rr||z instanceof Na||z instanceof Ps||z instanceof wa||(z=I0(a,z,!1)),Ea(x,b,z)}return Ir(x),x}return y instanceof et||y instanceof hi||y instanceof _t||y instanceof Ui||y instanceof zi?y.copy():y}rr.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,gi('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),gi(" Is that really your intent?"));var b=us(a,y);b!==x&&(Ea(a,y,x),this.Fs(a,y,b,x))},Ne=rr.prototype,Ne.set=function(a,y,x){this.setDataProperty(a,y,x)},Ne.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])}},Ne.Ay=function(a,y){this.ts(a,-1,y)},Ne.ts=function(a,y,x){0>y&&(y=a.length),wn(a,y,x),bs(this,"",Va,"",a,null,x,null,y)},Ne.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Rt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];gn(a,y),bs(this,"",cs,"",a,x,null,y,null)},Ne.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;Rt("getCategoryForNodeData found a non-string category for "+a+": "+y)},Ne.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&&(Ea(a,x,y),bs(this,"nodeCategory",Ca,x,a,b,y))}else Ea(a,x,y)}},Ne.lm=function(a,y){this.jm(y,this.Ro(a))},Ne.Tl=function(){return!1},Ne.Wj=function(){return!1},Ne.ri=function(){return!1},Ne.xs=function(){return!1},Ne.Xj=function(){return!1};function xy(){return new rr}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 Ea(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){}}ft.Object.defineProperties(rr.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===""&&Rt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Rt("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];tn(E)||Rt("Model.nodeDataArray must only contain Objects, not: "+E),eo(E)}for(this.Tc=a,b=new Dn,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",Ca,"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"}}}),rr.prototype.setCategoryForNodeData=rr.prototype.jm,rr.prototype.getCategoryForNodeData=rr.prototype.Ro,rr.prototype.removeArrayItem=rr.prototype.ov,rr.prototype.insertArrayItem=rr.prototype.ts,rr.prototype.addArrayItem=rr.prototype.Ay,rr.prototype.assignAllDataProperties=rr.prototype.Do,rr.prototype.set=rr.prototype.set,rr.prototype.clearUnresolvedReferences=rr.prototype.Qy,rr.prototype.mergeNodeDataArray=rr.prototype.$z,rr.prototype.removeNodeDataCollection=rr.prototype.nA,rr.prototype.removeNodeData=rr.prototype.cm,rr.prototype.addNodeDataCollection=rr.prototype.Fy,rr.prototype.addNodeData=rr.prototype.xf,rr.prototype.makeNodeDataKeyUnique=rr.prototype.$u,rr.prototype.findNodeDataForKey=rr.prototype.hc,rr.prototype.containsNodeData=rr.prototype.lb,rr.prototype.setKeyForNodeData=rr.prototype.km,rr.prototype.getKeyForNodeData=rr.prototype.wa,rr.prototype.updateTargetBindings=rr.prototype.La,rr.prototype.commit=rr.prototype.commit,rr.prototype.rollbackTransaction=rr.prototype.Kf,rr.prototype.commitTransaction=rr.prototype.eb,rr.prototype.startTransaction=rr.prototype.Ea,rr.prototype.raiseDataChanged=rr.prototype.Fs,rr.prototype.raiseChanged=rr.prototype.g,rr.prototype.raiseChangedEvent=rr.prototype.cb,rr.prototype.removeChangedListener=rr.prototype.ik,rr.prototype.addChangedListener=rr.prototype.Pe,rr.prototype.writeJsonValue=rr.prototype.sm,rr.prototype.replaceJsonObjects=rr.prototype.dm,rr.prototype.applyIncrementalJSON=rr.prototype.Ky,rr.prototype.applyIncrementalJson=rr.prototype.Zw,rr.prototype.toJSON=rr.prototype.toJSON,rr.prototype.toJson=rr.prototype.np,rr.prototype.toIncrementalJSON=rr.prototype.yA,rr.prototype.toIncrementalJson=rr.prototype.$x,rr.prototype.toIncrementalData=rr.prototype.xA,rr.prototype.clear=rr.prototype.clear;var M1=!1,Nc={};rr.className="Model",rr.fromJSON=rr.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:Rt("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 rr?y=a:Rt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=rr.constructGraphLinksModel()),y.gp(x),y.kv(x),y},rr.safePropertyValue=us,rr.safePropertySet=Ea,Nc.Brush=Ro,Nc.ChangedEvent=wa,Nc.Geometry=Pi,Nc.Margin=zi,Nc.Panel=fi,Nc.Point=et,Nc.Rect=_t,Nc.Size=hi,Nc.Spot=Ui,Nc.Transaction=Ps,Nc.UndoManager=Na;function fs(a,y,x,b){Ir(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},Ne=fs.prototype,Ne.qb=function(a){a.classType===fs&&(this.mode=a)},Ne.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Ne.freeze=function(){return this._isFrozen=!0,this},Ne.ka=function(){return this._isFrozen=!1,this},Ne.Kx=function(a){return a===void 0&&(a=null),this.mode=gm,this.backConverter=a,this},Ne.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Ne.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)}Ne.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==="")gi("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!==""&&Ea(a,x,z);else try{if(x!==""){var te=E(z,a);Ea(a,x,te)}else E(z,a)}catch(re){}}}},Ne.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):Ea(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):Ea(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 Me=b.itemIndex,Te=b.panel.itemArray;oe.ov(Te,Me),oe.ts(Te,Me,we)}}}catch(je){}}finally{this.st.remove(a)}}}},ft.Object.defineProperties(fs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&zn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&zn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&zn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&zn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&zn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&zn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&zn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&zn(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 Xt(fs,"OneWay",1),gm=new Xt(fs,"TwoWay",2);fs.className="Binding",fs.parseEnum=function(a,y){return function(x){return x=Si(a,x),x===null?y:x}},fs.toString=Yn,fs.OneWay=N1,fs.TwoWay=gm;function No(a,y,x){rr.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new _n,this.wb=new Ai,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))}jt(No,rr),No.constructGraphLinksModel=rr.constructGraphLinksModel,No.prototype.cloneProtected=function(a){rr.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},Ne=No.prototype,Ne.clear=function(){rr.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Ne.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)+":"+Yn(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},Ne.Qv=function(a,y){this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=rr.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 rr||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},Ne.rm=function(){var a=rr.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},Ne.gp=function(a){rr.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)},Ne.Rv=function(){var a=rr.prototype.Rv.call(this),y=`,
"linkDataArray": `+xf(this,this.linkDataArray,!0);return a+y},Ne.kv=function(a){rr.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}Ne.Pv=function(a,y){this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=rr.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 rr||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},Ne.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)&&Rt("applyIncrementalJson cannot change Model properties"),rr.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===Ca){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),Ea(x,b,E);return}}else if(a.change===Va){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,tn(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,tn(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}}rr.prototype.changeState.call(this,a,y)}},Ne=No.prototype,Ne.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),Ea(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Ne.yx=function(a){return Ku(this,a,!0)},Ne.wv=function(a,y){wp(this,a,y,!0)},Ne.Bx=function(a){return Ku(this,a,!1)},Ne.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;Rt((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),Ea(y,E,x),a.hc(x)===null&&Uc(a,x,y),bs(a,b?"linkFromKey":"linkToKey",Ca,E,y,z,x),typeof E=="string"&&a.La(y,E))}else Ea(y,E,x)}}Ne.zx=function(a){return O0(this,a,!0)},Ne.xv=function(a,y){Cp(this,a,y,!0)},Ne.Cx=function(a){return O0(this,a,!1)},Ne.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&&(Ea(y,E,x),bs(a,b?"linkFromPortId":"linkToPortId",Ca,E,y,z,x),typeof E=="string"&&a.La(y,E))}else Ea(y,E,x)}}Ne.Ef=function(a){if(a===null)return R0;var y=this.je;return y===""?R0:(a=us(a,y),a===void 0?R0:a)},Ne.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(Ea(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",Ca,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Ea(a,x,y)}},Ne.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 Rt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Ne.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&&Rt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Ne.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;Rt("Key value for link data "+a+" is not a number or a string: "+y)}}},Ne.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&&(Ea(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),bs(this,"linkKey",Ca,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ea(a,x,y)}},Ne.jh=function(a){return a===null&&Rt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Pf(a)?this.wb.I(a):null},Ne.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))){Ea(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Ea(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Ea(a,y,x)}}}}},Ne.Jc=function(a){return a===null?!1:this.$f.contains(a)},Ne.fi=function(a){a!==null&&(eo(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&&Rt("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)}Ne.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)},Ne.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)}Ne.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)},Ne.Zz=function(a){if(this.linkKeyProperty===""&&Rt("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)}Ne.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):I0(this,a,!0),tn(a)&&(Ir(a),this.lf!==""&&Ea(a,this.lf,void 0),this.mf!==""&&Ea(a,this.mf,void 0),this.je!==""&&Ea(a,this.je,[])),a},Ne.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!us(a,y)},Ne.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;Rt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Ne.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),Ea(a,x,y),this.hc(y)===null&&Uc(this,y,a),bs(this,"nodeGroupKey",Ca,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ea(a,x,y)}},No.prototype.copyNodeData=function(a){return a===null?null:(a=rr.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||us(a,this.Je)===void 0||Ea(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&&(Ea(a,y,x),this.Fs(a,y,b,x))},Ne=No.prototype,Ne.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])}},Ne.jp=function(a,y){rr.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;Ea(b,te,z),bs(this,"linkFromKey",Ca,te,b,E,z),typeof te=="string"&&this.La(b,te)}if(Ku(this,b,!1)===E&&(te=this.mf,Ea(b,te,z),bs(this,"linkToKey",Ca,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))}},Ne.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Ea(a,b,x),bs(this,"nodeGroupKey",Ca,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Ne.Lv=function(){rr.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)wy(this,a[x])},Ne.fm=function(a){rr.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=yn();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",Ca,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",Ca,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",Ca,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]);On(x)}},Ne.em=function(a){rr.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Uc(this,y,a)},Ne.qp=function(a){rr.prototype.qp.call(this,a);var y=this.lh(a);_c(this,y,a)},Ne.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;Rt("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&&(Ea(a,x,y),bs(this,"linkCategory",Ca,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ea(a,x,y)}},No.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Ne=No.prototype,Ne.lm=function(a,y){rr.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))}Ne.Wj=function(){return!0},Ne.ri=function(){return!0},Ne.xs=function(){return!0},Ne.Xj=function(){return!0},ft.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];tn(E)||Rt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),eo(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Dn,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",Ca,"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,rr.constructGraphLinksModel=rr.constructGraphLinksModel=function(){return new No},rr.initDiagramModel=xy=function(){return new No};function $l(a,y){rr.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))}jt($l,rr),$l.constructGraphLinksModel=rr.constructGraphLinksModel,$l.prototype.cloneProtected=function(a){rr.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Ne=$l.prototype,Ne.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)+":"+Yn(E)}}return y},Ne.rm=function(){var a=rr.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Ne.gp=function(a){rr.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Ne.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Rt("applyIncrementalJson cannot change Model properties"),rr.prototype.fp.call(this,a)},Ne.Vl=function(a){return a},Ne.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;Rt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Ne.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),Ea(a,x,y),this.hc(y)===null&&Uc(this,y,a),bs(this,"nodeParentKey",Ca,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ea(a,x,y)}},Ne.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=us(a,y),y===void 0)?"":typeof y=="string"?y:(Rt("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&&(Ea(a,x,y),bs(this,"parentLinkCategory",Ca,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ea(a,x,y)}},$l.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},$l.prototype.copyNodeData=function(a){return a===null?null:(a=rr.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||us(a,this.Ke)===void 0||Ea(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&&(Ea(a,y,x),this.Fs(a,y,b,x))},Ne=$l.prototype,Ne.jp=function(a,y){rr.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Ne.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Ea(a,b,x),bs(this,"nodeParentKey",Ca,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Ne.fm=function(a){rr.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=yn();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",Ca,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]);On(x)}},Ne.em=function(a){rr.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Uc(this,y,a)},Ne.qp=function(a){rr.prototype.qp.call(this,a);var y=this.mh(a);_c(this,y,a)},Ne.lm=function(a,y){rr.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Ne.Tl=function(){return!0},Ne.xs=function(){return!0},ft.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 et,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)}jt(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 Dn;y.addAll(a.iterator),a=new Dn;var x=new Dn,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 Dn,b.addAll(a),b.addAll(x)):(this.arrangement===Ac&&x.reverse(),b=new Dn,b.addAll(x),b.addAll(a))}oe=b.length;for(var Me=z=E=0;Me<b.length;Me++){var Te=me+we*z*(this.direction===Kl?1:-1)/oe,je=b.M(Me).diameter;isNaN(je)&&(je=bf(b.M(Me),Te)),360>we&&(Me===0||Me===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++)Me=b.M(te),E=b.M(te===oe-1?0:te+1),isNaN(Me.diameter)&&bf(Me,0),isNaN(E.diameter)&&bf(E,0),z=Math.max(z,(Me.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,Me=Cy(this,le,z,me*Math.PI/180,we*Math.PI/180),isNaN(y))(re===Fc||re===Ac)&&(y=(Me-E)/(360<=we?oe:oe-1));else if(re===Fc||re===Ac)Me=(Me-E)/(360<=we?oe:oe-1),Me<y?(le=j0(this,E+y*(360<=we?oe:oe-1),ue,me*Math.PI/180,we*Math.PI/180),z=le*ue):y=Me;else{for(te=-1/0,E=0;E<oe;E++)Te=b.M(E),je=b.M(E===oe-1?0:E+1),isNaN(Te.diameter)&&bf(Te,0),isNaN(je.diameter)&&bf(je,0),te=Math.max(te,(Te.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=Me/(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=et.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(et.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),Me=Math.abs(le-me)-((ue[0].height+ue[ue.length-1].height)/2+te);te=0,1>Math.abs(Me)?Math.abs(oe-z)<(ue[0].width+ue[ue.length-1].width)/2&&(te=0):te=0<Me?Me: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=et.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(et.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 et(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:Rt("Invalid sorting type.")}return a};function Tx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Dn;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 Dn;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,Me=[],Te=0;Te<x.length;Te++)0>y[x[Te]].indexOf(x[Te===x.length-1?0:Te+1])&&Me.push(Te===x.length-1?0:Te+1);if(Me.length===0)for(Te=0;Te<x.length;Te++)Me.push(Te);for(Te=0;Te<Me.length;Te++){for(var je=Me[Te],ut=y[le],tt=0,Ct=0;Ct<te.length;Ct++){var Mt=z[te[Ct]],kt=z[re[Ct]];if(Mt<kt){var Jt=Mt;Mt=kt}else Jt=kt;if(Jt<je&&je<=Mt)for(kt=0;kt<ut.length;kt++){var pn=ut[kt];0>x.indexOf(pn)||Jt<z[pn]&&z[pn]<Mt||Jt===z[pn]||Mt===z[pn]||tt++}else for(kt=0;kt<ut.length;kt++)pn=ut[kt],0>x.indexOf(pn)||Jt<z[pn]&&z[pn]<Mt&&Jt!==z[pn]&&Mt!==z[pn]&&tt++}for(ut=tt,Ct=tt=0;Ct<y[le].length;Ct++)Jt=x.indexOf(y[le][Ct]),0<=Jt&&(Jt=Math.abs(je-(Jt>=je?Jt+1:Jt)),tt+=Jt<x.length+1-Jt?Jt:x.length+1-Jt);for(Ct=0;Ct<te.length;Ct++)Jt=z[te[Ct]],Mt=z[re[Ct]],Jt>=je&&Jt++,Mt>=je&&Mt++,Jt>Mt&&(kt=Mt,Mt=Jt,Jt=kt),Mt-Jt<(x.length+2)/2==(Jt<je&&je<=Mt)&&tt++;(ut<ue||ut===ue&&tt<me)&&(ue=ut,me=tt,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++)Me=x.indexOf(y[le][we]),0>Me||Me===ue||(Te=Me>ue?Me-ue:ue-Me,me+=Me<ue!=Te>te-Te?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},ft.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 Xt(Ga,"ConstantSpacing",0),wf=new Xt(Ga,"ConstantDistance",1),Vh=new Xt(Ga,"ConstantAngle",2),Ac=new Xt(Ga,"Packed",3),Kl=new Xt(Ga,"Clockwise",4),Cf=new Xt(Ga,"Counterclockwise",5),ng=new Xt(Ga,"BidirectionalLeft",6),bp=new Xt(Ga,"BidirectionalRight",7),H0=new Xt(Ga,"Forwards",8),Z0=new Xt(Ga,"Reverse",9),W0=new Xt(Ga,"Ascending",10),G0=new Xt(Ga,"Descending",11),Ep=new Xt(Ga,"Optimized",12),$0=new Xt(Ga,"Pythagorean",13),jg=new Xt(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)}jt(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}jt(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}ft.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)}jt(K0,Tu),K0.className="CircularEdge";function ml(a){Ma.call(this),this.ah=null,this.An=0,this.$d=new hi(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)}jt(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=yn(),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 et(me.x+me.width+b.width,me.y),le[1]=new et(me.x,me.y+me.height+b.height),re=2;else{var we=z1(le,re,E,z,me.width,me.height,b),Me=le[we],Te=new et(Me.x+me.width+b.width,Me.y),je=new et(Me.x,Me.y+me.height+b.height);for(we+1<re&&le.splice(we+1,0,null),le[we]=Te,le[we+1]=je,re++,we=Me.x-me.x,Me=Me.y-me.y,ue=ue.vertexes.iterator;ue.next();)Te=ue.value,Te.centerX+=we,Te.centerY+=Me}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 et(we.x+we.width+b.width,we.y),le[1]=new et(we.x,we.y+we.height+b.height),re=2):(oe=z1(le,re,E,z,we.width,we.height,b),me=le[oe],Me=new et(me.x+we.width+b.width,me.y),we=new et(me.x,me.y+we.height+b.height),oe+1<re&&le.splice(oe+1,0,null),le[oe]=Me,le[oe+1]=we,re++,te.centerX=me.x+te.width/2,te.centerY=me.y+te.height/2);for(On(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 Dn),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 Dn,E.Hj=re),re.add(te),E.Vd--,E.sh+=te.sh):te.network===b&&(re=te.Hj,re===null&&(re=new Dn,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 Me=z.value;if(Me.Ax(me)===E){we=Me;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,Me=ue*me,1>Me&&(Me=1),re=en.sqrt((re+Me+le*le*4/(te*te))/Me),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 et(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 et(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(Me,Te){return Me===null||Te===null||Me===Te?0:Te.width*Te.height-Me.width*Me.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,ut){return je===null||ut===null||je===ut?0:je.centerX-ut.centerX}):y.sort(function(je,ut){return je===null||ut===null||je===ut?0:je.centerY-ut.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 Me=b.y+re.y;if(oe-le>x||le-oe>x){if(E)break}else if(ue-Me>x||Me-ue>x){if(!E)break}else{var Te=H1(te,we);1>Te?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new V0),Te=b.random(),re=b.random(),oe>le?(b=Math.abs(we.bounds.right-te.bounds.x),b=(1+b)*Te):oe<le?(b=Math.abs(we.bounds.x-te.bounds.right),b=-(1+b)*Te):(b=Math.max(we.width,te.width),b=(1+b)*Te-b/2),ue>Me?(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)/(Te*Te),b=(le-oe)/Te*re,le=(Me-ue)/Te*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=Ko,y.toSpot=Ko)}},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},ft.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"&&Rt('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)}jt(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}jt(xm,Ms),ft.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}jt(Pm,Tu),ft.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 et,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}jt(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:Rt("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 Me=we;me=oe,we=re,oe=le,re=Me}var Te=E.focus;le=z.focus;var je=b.rev?z.bounds:E.bounds;Me=et.alloc(),ue!==me?je.w()&&me.isVisible()?me.actualBounds.w()?(Zh(me,we,So,Me),Me.x+=me.actualBounds.x-je.x,Me.y+=me.actualBounds.y-je.y):(Zh(me,we,So,Me),Me.w()||Me.assign(Te)):Me.assign(Te):je.w()?(Zh(me,we,So,Me),Me.w()||Me.assign(Te)):Me.assign(Te),me=b.rev?E.bounds:z.bounds,ue=et.alloc(),te!==oe?me.w()&&oe.isVisible()?oe.actualBounds.w()?(Zh(oe,re,So,ue),ue.x+=oe.actualBounds.x-me.x,ue.y+=oe.actualBounds.y-me.y):(Zh(oe,re,So,ue),ue.w()||ue.assign(le)):ue.assign(le):me.w()?(Zh(oe,re,So,ue),ue.w()||ue.assign(le)):ue.assign(le),this.K===90||this.K===270?(te=Math.round((Me.x-Te.x)/this.kc),oe=Me.x,re=Math.round((ue.x-le.x)/this.kc),le=ue.x):(te=Math.round((Me.y-Te.y)/this.kc),oe=Me.y,re=Math.round((ue.y-le.y)/this.kc),le=ue.y),et.free(Me),et.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(Me=E.layer,ue=z.layer,me=0,je=b.link,je!==null){var ut=je.fromPort,tt=je.toPort;if(ut!==null&&tt!==null){var Ct=je.fromNode;if(we=je.toNode,Ct!==null&&we!==null){var Mt=Y0(this,!0),kt=Y0(this,!1),Jt=this.setsPortSpots?Mt:je.computeSpot(!0,ut);Te=this.setsPortSpots?kt:je.computeSpot(!1,tt);var pn=je.isOrthogonal;Jt.$c()&&Jt.Hf(kt)&&Te.$c()&&Te.Hf(Mt)?me=0:(Mt=je.getLinkPoint(Ct,ut,Jt,!0,pn,we,tt,et.alloc()),kt=je.getLinkDirection(Ct,ut,Mt,Jt,!0,pn,we,tt),et.free(Mt),Jt.ys()||kt!==J1(this,b,!0)?this.setsPortSpots&&Ct!==null&&Ct.ports.count===1&&b.rev&&(me+=1):me+=1,Jt=je.getLinkPoint(we,tt,Te,!1,pn,Ct,ut,et.alloc()),je=je.getLinkDirection(we,tt,Jt,Te,!1,pn,Ct,ut),et.free(Jt),Te.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)&&(Te=a.createVertex(),Te.node=null,Te.Dj=1,Te.layer=Me,Te.near=E,a.dh(Te),E=a.Zj(E,Te,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=te,E.portToColOffset=0,E.portFromPos=oe,E.portToPos=0,E=Te),je=1,me&&je--,Me-ue>je&&0<Me){for(b.valid=!1,Te=a.createVertex(),Te.node=null,Te.Dj=2,Te.layer=Me-1,a.dh(Te),E=a.Zj(E,Te,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=Te,Me--;Me-ue>je&&0<Me;)Te=a.createVertex(),Te.node=null,Te.Dj=3,Te.layer=Me-1,a.dh(Te),E=a.Zj(E,Te,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Te,Me--;E=a.Zj(Te,z,b.link),E.valid=!me,me&&(Te.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 Me=oe[le];if(Me.valid&&Me.fromVertex.layer!==y)for(me=Me.fromVertex.index,ue=Me.portToPos,Me=Me.portFromPos,we=le+1;we<oe.length;we++){var Te=oe[we];if(Te.valid&&Te.fromVertex.layer!==y){var je=Te.fromVertex.index,ut=Te.portToPos;Te=Te.portFromPos,ue<ut&&(me>je||me===je&&Me>Te)&&re++,ut<ue&&(je>me||je===me&&Te>Me)&&re++}}}if(0>=x){for(oe=b[te].destinationEdgesArrayAccess,le=0;le<oe.length;le++)if(Me=oe[le],Me.valid&&Me.toVertex.layer!==y)for(me=Me.toVertex.index,ue=Me.portToPos,Me=Me.portFromPos,we=le+1;we<oe.length;we++)Te=oe[we],Te.valid&&Te.toVertex.layer!==y&&(je=Te.toVertex.index,ut=Te.portToPos,Te=Te.portFromPos,Me<Te&&(me>je||me===je&&ue>ut)&&re++,Te<Me&&(je>me||je===me&&ut>ue)&&re++)}for(z[te*E+te]=re,oe=te+1;oe<E;oe++){var tt=0,Ct=0;if(0<=x){re=b[te].sourceEdgesArrayAccess;var Mt=b[oe].sourceEdgesArrayAccess;for(le=0;le<re.length;le++)if(Me=re[le],Me.valid&&Me.fromVertex.layer!==y)for(me=Me.fromVertex.index,Me=Me.portFromPos,we=0;we<Mt.length;we++)Te=Mt[we],Te.valid&&Te.fromVertex.layer!==y&&(je=Te.fromVertex.index,Te=Te.portFromPos,(me<je||me===je&&Me<Te)&&Ct++,(je<me||je===me&&Te<Me)&&tt++)}if(0>=x){for(re=b[te].destinationEdgesArrayAccess,Mt=b[oe].destinationEdgesArrayAccess,le=0;le<re.length;le++)if(Me=re[le],Me.valid&&Me.toVertex.layer!==y)for(me=Me.toVertex.index,ue=Me.portToPos,we=0;we<Mt.length;we++)Te=Mt[we],Te.valid&&Te.toVertex.layer!==y&&(je=Te.toVertex.index,ut=Te.portToPos,(me<je||me===je&&ue<ut)&&Ct++,(je<me||je===me&&ut<ue)&&tt++)}z[te*E+oe]=tt,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,Me=me.toVertex.column+me.portToColOffset;re+=(Math.abs(we-Me)+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 Me=re.fromVertex;re.valid&&!re.rev&&Me.layer!==y&&(ue+=Me.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 Me=re.fromVertex;re.valid&&!re.rev&&Me.layer!==y&&(me[ue]=Me.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(Te,je){return Te-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 Me=0;Me<E;Me++){var Te=we[Me],je=Te.fromVertex;ue+=1,je.component!==1&&(z+=1,je=je.layer-le.layer,Te=a.linkMinLength(Te),b=Math.min(b,je-Te))}for(we=le.destinationEdgesArrayAccess,E=we.length,Me=0;Me<E;Me++)Te=we[Me].toVertex,--ue,Te.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,Me=0;Me<me;Me++)Te=we[Me].fromVertex,le+=1,Te.component!==1?b+=1:ue=!0;for(we=te.destinationEdgesArrayAccess,me=we.length,Me=0;Me<me;Me++)Te=we[Me],je=Te.toVertex,--le,je.component!==1&&(--b,je=te.layer-je.layer,Te=a.linkMinLength(Te),E=Math.min(E,je-Te));(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,Me=0,Te=b[z].column,je=b[z+1].column,ut=a.nodeMinColumnSpace(b[z],!0),tt=a.nodeMinColumnSpace(b[z],!1),Ct=a.nodeMinColumnSpace(b[z+1],!0),Mt=a.nodeMinColumnSpace(b[z+1],!1);ut=Te-ut+Ct,tt=je-tt+Mt;var kt=b[z].sourceEdges.iterator;for(kt.reset();kt.next();)if(Ct=kt.value,Mt=Ct.fromVertex,Ct.valid&&Mt.layer===y){for(Ct=0;b[Ct]!==Mt;)Ct++;Ct<z&&(we+=2*(z-Ct),Me+=2*(z+1-Ct)),Ct===z+1&&(we+=1),Ct>z+1&&(we+=4*(Ct-z),Me+=4*(Ct-(z+1)))}for(kt=b[z].destinationEdges.iterator,kt.reset();kt.next();)if(Ct=kt.value,Mt=Ct.toVertex,Ct.valid&&Mt.layer===y){for(Ct=0;b[Ct]!==Mt;)Ct++;Ct===z+1&&(Me+=1)}for(kt=b[z+1].sourceEdges.iterator,kt.reset();kt.next();)if(Ct=kt.value,Mt=Ct.fromVertex,Ct.valid&&Mt.layer===y){for(Ct=0;b[Ct]!==Mt;)Ct++;Ct<z&&(we+=2*(z+1-Ct),Me+=2*(z-Ct)),Ct===z&&(Me+=1),Ct>z+1&&(we+=4*(Ct-(z+1)),Me+=4*(Ct-z))}for(kt=b[z+1].destinationEdges.iterator,kt.reset();kt.next();)if(Ct=kt.value,Mt=Ct.toVertex,Ct.valid&&Mt.layer===y){for(Ct=0;b[Ct]!==Mt;)Ct++;Ct===z&&(we+=1)}Ct=Mt=0,kt=te[b[z].index];var Jt=re[b[z].index],pn=te[b[z+1].index],Fi=re[b[z+1].index];kt!==-1&&(Mt+=Math.abs(kt-Te),Ct+=Math.abs(kt-tt)),Jt!==-1&&(Mt+=Math.abs(Jt-Te),Ct+=Math.abs(Jt-tt)),pn!==-1&&(Mt+=Math.abs(pn-je),Ct+=Math.abs(pn-ut)),Fi!==-1&&(Mt+=Math.abs(Fi-je),Ct+=Math.abs(Fi-ut)),(Me<we-.5||Me===we&&me<ue-.5||Me===we&&me===ue&&Ct<Mt-.5)&&(le=oe=!0,b[z].column=tt,b[z+1].column=ut,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),Me=0;0>b-1||ue-E[b-1].column-1>me+a.nodeMinColumnSpace(E[b-1],!1)?Me=ue-1:Me=ue,me=b+1>=z||E[b+1].column-ue-1>we+a.nodeMinColumnSpace(E[b+1],!0)?ue+1:ue;var Te=we=0,je=0;if(0>=x)for(var ut=E[b].sourceEdges.iterator;ut.next();){var tt=ut.value,Ct=tt.fromVertex;if(tt.valid&&Ct.layer!==y){var Mt=by(tt),kt=tt.portFromColOffset;tt=tt.portToColOffset,Ct=Ct.column,we+=(Math.abs(ue+tt-(Ct+kt))+1)*Mt,Te+=(Math.abs(Me+tt-(Ct+kt))+1)*Mt,je+=(Math.abs(me+tt-(Ct+kt))+1)*Mt}}if(0<=x)for(ut=E[b].destinationEdges.iterator;ut.next();)tt=ut.value,Ct=tt.toVertex,tt.valid&&Ct.layer!==y&&(Mt=by(tt),kt=tt.portFromColOffset,tt=tt.portToColOffset,Ct=Ct.column,we+=(Math.abs(ue+kt-(Ct+tt))+1)*Mt,Te+=(Math.abs(Me+kt-(Ct+tt))+1)*Mt,je+=(Math.abs(me+kt-(Ct+tt))+1)*Mt);tt=kt=Mt=0,ut=te[E[b].index],Ct=re[E[b].index],ut!==-1&&(Mt+=Math.abs(ut-ue),kt+=Math.abs(ut-Me),tt+=Math.abs(ut-me)),Ct!==-1&&(Mt+=Math.abs(Ct-ue),kt+=Math.abs(Ct-Me),tt+=Math.abs(Ct-me)),Te<we||Te===we&&kt<Mt?(le=oe=!0,E[b].column=Me):(je<we||je===we&&tt<Mt)&&(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=yn(),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=Oi(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)),On(y),a.u(z,te,re,oe),a.network.vertexes.each(function(Me){var Te=yn();le&&Te.push(z.get(Me)),ue&&Te.push(te.get(Me)),me&&Te.push(re.get(Me)),we&&Te.push(oe.get(Me)),Te.sort(function(ut,tt){return ut-tt});var je=Te.length;je=(Te[Math.floor((je-1)/2)]+Te[Math.ceil((je-1)/2)])/2,On(Te),Me.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=Oi(le.sourceEdgesArrayAccess),Me=we.next();!Me.done;Me=we.next())Me=Me.value,Me.valid&&me.push(Me);le.bo=me}for(le=Oi(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=Oi(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Oi(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=Oi(y),te=z.next();!te.done;te=z.next()){var re=Oi(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=Oi(y),re=z.next();!re.done;re=z.next()){re=Oi(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,Me=te?me.width:me.height;if(x){var Te=tv(ue,me),je=Te.portFromPos,ut=Te.portToPos;Te.link!==null&&(ue.node&&ue.node!==Te.link.fromNode&&(je=te?ue.focusX:ue.focusY),me.node&&me.node!==Te.link.toNode&&(ut=te?me.focusX:me.focusY))}else Te=tv(me,ue),je=Te.portToPos,ut=Te.portFromPos,Te.link!==null&&(ue.node&&ue.node!==Te.link.toNode&&(je=te?ue.focusX:ue.focusY),me.node&&me.node!==Te.link.fromNode&&(ut=te?me.focusX:me.focusY));we=b?ue.qg+(we-je)-(Me-ut):ue.qg+je-ut,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=Oi(y),te=x.next();!te.done;te=x.next())for(z=Oi(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 Ai,y=Oi(y),te=y.next();!te.done;te=y.next())for(x=Oi(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&&Rt("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=yn(),E=yn(),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)));On(b),On(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 et(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(So),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(So),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,Me=!1,Te=this.ie,je=y.firstPickIndex+1;if(y.isOrthogonal){Me=!0;var ut=y.pointsCount;4<ut&&y.points.removeRange(2,ut-3)}else if(y.curve===$u)we=!0,ut=y.pointsCount,4<ut&&y.points.removeRange(2,ut-3),ut===4&&(je=2);else{ut=y.pointsCount;var tt=le===La,Ct=oe===La;2<ut&&tt&&Ct?y.points.removeRange(1,ut-2):3<ut&&tt&&!Ct?y.points.removeRange(1,ut-3):3<ut&&!tt&&Ct?y.points.removeRange(2,ut-2):4<ut&&!tt&&!Ct&&y.points.removeRange(2,ut-3)}if(x.rev){for(;me!==null&&ue!==me;){var Mt=ut=null;for(tt=me.sourceEdges.iterator;tt.next()&&(Ct=tt.value,Ct.link!==x.link||(ut=Ct.fromVertex,Mt=Ct.toVertex,ut.node!==null)););if(ut===null)break;if(ut!==ue){tt=y.i(je-1).x,Ct=y.i(je-1).y;var kt=ut.centerX,Jt=ut.centerY;if(Me)this.K===180||this.K===0?je===y.firstPickIndex+1?(y.m(je++,tt,Ct),y.m(je++,tt,Jt)):(Mt!==null?Mt.centerY:Ct)!==Jt&&(Mt=this.Ta[ut.layer-1]+this.Rf.x,y.m(je++,Mt,Ct),y.m(je++,Mt,Jt)):je===y.firstPickIndex+1?(y.m(je++,tt,Ct),y.m(je++,kt,Ct)):(Mt!==null?Mt.centerX:tt)!==kt&&(Mt=this.Ta[ut.layer-1]+this.Rf.y,y.m(je++,tt,Mt),y.m(je++,kt,Mt));else if(je===y.firstPickIndex+1){Mt=Math.max(10,this.he[me.layer]);var pn=Math.max(10,this.Ld[me.layer]);if(we)this.K===180?kt<=me.bounds.x?(me=me.bounds.x,y.m(je++,me-Mt,Jt),y.m(je++,me,Jt),y.m(je++,me+pn,Jt)):(y.m(je++,kt-Mt,Jt),y.m(je++,kt,Jt),y.m(je++,kt+pn,Jt)):this.K===90?Jt>=me.bounds.bottom?(me=me.bounds.y+me.bounds.height,y.m(je++,kt,me+pn),y.m(je++,kt,me),y.m(je++,kt,me-Mt)):(y.m(je++,kt,Jt+pn),y.m(je++,kt,Jt),y.m(je++,kt,Jt-Mt)):this.K===270?Jt<=me.bounds.y?(me=me.bounds.y,y.m(je++,kt,me-Mt),y.m(je++,kt,me),y.m(je++,kt,me+pn)):(y.m(je++,kt,Jt-Mt),y.m(je++,kt,Jt),y.m(je++,kt,Jt+pn)):this.K===0&&(kt>=me.bounds.right?(me=me.bounds.x+me.bounds.width,y.m(je++,me+pn,Jt),y.m(je++,me,Jt),y.m(je++,me-Mt,Jt)):(y.m(je++,kt+pn,Jt),y.m(je++,kt,Jt),y.m(je++,kt-Mt,Jt)));else{y.m(je++,tt,Ct);var Fi=0;this.K===180||this.K===0?((this.K===180?kt>=me.bounds.right:kt<=me.bounds.x)&&(Fi=(this.K===0?-Mt:pn)/2),y.m(je++,tt+Fi,Jt)):((this.K===270?Jt>=me.bounds.bottom:Jt<=me.bounds.y)&&(Fi=(this.K===90?-Mt:pn)/2),y.m(je++,kt,Ct+Fi)),y.m(je++,kt,Jt)}}else Mt=Math.max(10,this.he[ut.layer]),pn=Math.max(10,this.Ld[ut.layer]),we?this.K===180?(y.m(je++,kt-Mt-Te,Jt),y.m(je++,Math.min(kt-Mt+Te/2,kt),Jt),y.m(je++,kt,Jt),y.m(je++,kt,Jt),y.m(je++,Math.max(kt+pn-Te/2,kt),Jt),y.m(je++,kt+pn+Te,Jt)):this.K===90?(y.m(je++,kt,Jt+pn+Te),y.m(je++,kt,Math.max(Jt+pn-Te/2,Jt)),y.m(je++,kt,Jt),y.m(je++,kt,Jt),y.m(je++,kt,Math.min(Jt-Mt+Te/2,Jt)),y.m(je++,kt,Jt-Mt-Te)):this.K===270?(y.m(je++,kt,Jt-Mt-Te),y.m(je++,kt,Math.min(Jt-Mt+Te/2,Jt)),y.m(je++,kt,Jt),y.m(je++,kt,Jt),y.m(je++,kt,Math.max(Jt+pn-Te/2,Jt)),y.m(je++,kt,Jt+pn+Te)):(y.m(je++,kt+pn+Te,Jt),y.m(je++,Math.max(kt+pn-Te/2,kt),Jt),y.m(je++,kt,Jt),y.m(je++,kt,Jt),y.m(je++,Math.min(kt-Mt+Te/2,kt),Jt),y.m(je++,kt-Mt-Te,Jt)):y.m(je++,kt,Jt)}me=ut}(re===null||le!==La||Me)&&(tt=y.i(je-1).x,Ct=y.i(je-1).y,kt=y.i(je).x,Jt=y.i(je).y,Me?(Te=this.Ld[ue.layer],this.K===180||this.K===0?(Me=Ct,Me>=ue.bounds.y&&Me<=ue.bounds.bottom&&(this.K===180?kt>=ue.bounds.x:kt<=ue.bounds.right)&&(me=ue.centerX+(this.K===180?-Te:Te),Me<ue.bounds.y+ue.bounds.height/2?Me=ue.bounds.y-this.kc/2:Me=ue.bounds.bottom+this.kc/2,y.m(je++,me,Ct),y.m(je++,me,Me)),y.m(je++,kt,Me)):(Me=tt,Me>=ue.bounds.x&&Me<=ue.bounds.right&&(this.K===270?Jt>=ue.bounds.y:Jt<=ue.bounds.bottom)&&(me=ue.centerY+(this.K===270?-Te:Te),Me<ue.bounds.x+ue.bounds.width/2?Me=ue.bounds.x-this.kc/2:Me=ue.bounds.right+this.kc/2,y.m(je++,tt,me),y.m(je++,Me,me)),y.m(je++,Me,Jt)),y.m(je++,kt,Jt)):we?(Mt=Math.max(10,this.he[ue.layer]),pn=Math.max(10,this.Ld[ue.layer]),this.K===180&&kt>=ue.bounds.x?(me=ue.bounds.x+ue.bounds.width,y.L(je-2,me,Ct),y.L(je-1,me+pn,Ct)):this.K===90&&Jt<=ue.bounds.bottom?(me=ue.bounds.y,y.L(je-2,tt,me),y.L(je-1,tt,me-Mt)):this.K===270&&Jt>=ue.bounds.y?(me=ue.bounds.y+ue.bounds.height,y.L(je-2,tt,me),y.L(je-1,tt,me+pn)):this.K===0&&kt<=ue.bounds.right&&(me=ue.bounds.x,y.L(je-2,me,Ct),y.L(je-1,me-Mt,Ct))):(Mt=Math.max(10,this.he[ue.layer]),pn=Math.max(10,this.Ld[ue.layer]),Me=0,this.K===180||this.K===0?((this.K===180?kt<=ue.bounds.x:kt>=ue.bounds.right)&&(Me=(this.K===0?pn:-Mt)/2),y.m(je++,kt+Me,Ct)):((this.K===270?Jt<=ue.bounds.y:Jt>=ue.bounds.bottom)&&(Me=(this.K===90?pn:-Mt)/2),y.m(je++,tt,Jt+Me)),y.m(je++,kt,Jt)))}else{for(;ue!==null&&ue!==me;){for(Mt=ut=null,ue=ue.destinationEdges.iterator;ue.next()&&(tt=ue.value,tt.link!==x.link||(ut=tt.toVertex,Mt=tt.fromVertex,Mt.node!==null&&(Mt=null),ut.node!==null)););if(ut===null)break;ut!==me&&(tt=y.i(je-1).x,Ct=y.i(je-1).y,kt=ut.centerX,Jt=ut.centerY,Me?this.K===180||this.K===0?(Mt!==null?Mt.centerY:Ct)!==Jt&&(Mt=this.Ta[ut.layer]+this.Rf.x,je===y.firstPickIndex+1&&(Mt=this.K===0?Math.max(Mt,tt):Math.min(Mt,tt)),y.m(je++,Mt,Ct),y.m(je++,Mt,Jt)):(Mt!==null?Mt.centerX:tt)!==kt&&(Mt=this.Ta[ut.layer]+this.Rf.y,je===y.firstPickIndex+1&&(Mt=this.K===90?Math.max(Mt,Ct):Math.min(Mt,Ct)),y.m(je++,tt,Mt),y.m(je++,kt,Mt)):(Mt=Math.max(10,this.he[ut.layer]),pn=Math.max(10,this.Ld[ut.layer]),we?this.K===180?(y.m(je++,kt+pn+Te,Jt),y.m(je++,Math.max(kt+pn-Te/2,kt),Jt),y.m(je++,kt,Jt),y.m(je++,kt,Jt),y.m(je++,Math.min(kt-Mt+Te/2,kt),Jt),y.m(je++,kt-Mt-Te,Jt)):this.K===90?(y.m(je++,kt,Jt-Mt-Te),y.m(je++,kt,Math.min(Jt-Mt+Te/2,Jt)),y.m(je++,kt,Jt),y.m(je++,kt,Jt),y.m(je++,kt,Math.max(Jt+pn-Te/2,Jt)),y.m(je++,kt,Jt+pn+Te)):this.K===270?(y.m(je++,kt,Jt+pn+Te),y.m(je++,kt,Math.max(Jt+pn-Te/2,Jt)),y.m(je++,kt,Jt),y.m(je++,kt,Jt),y.m(je++,kt,Math.min(Jt-Mt+Te/2,Jt)),y.m(je++,kt,Jt-Mt-Te)):(y.m(je++,kt-Mt-Te,Jt),y.m(je++,Math.min(kt-Mt+Te/2,kt),Jt),y.m(je++,kt,Jt),y.m(je++,kt,Jt),y.m(je++,Math.max(kt+pn-Te/2,kt),Jt),y.m(je++,kt+pn+Te,Jt)):this.K===180?(y.m(je++,kt+pn,Jt),y.m(je++,kt-Mt,Jt)):this.K===90?(y.m(je++,kt,Jt-Mt),y.m(je++,kt,Jt+pn)):this.K===270?(y.m(je++,kt,Jt+pn),y.m(je++,kt,Jt-Mt)):(y.m(je++,kt-Mt,Jt),y.m(je++,kt+pn,Jt)))),ue=ut}Me&&(tt=y.i(je-1).x,Ct=y.i(je-1).y,kt=y.i(je).x,Jt=y.i(je).y,this.K===180||this.K===0?Ct!==Jt&&(Mt=this.K===0?Math.min(Math.max((kt+tt)/2,this.Ta[me.layer]+this.Rf.x),kt):Math.max(Math.min((kt+tt)/2,this.Ta[me.layer]+this.Rf.x),kt),y.m(je++,Mt,Ct),y.m(je++,Mt,Jt)):tt!==kt&&(Mt=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++,tt,Mt),y.m(je++,kt,Mt)))}b!==null&&we&&4<=y.pointsCount&&(te!==null&&(te=le===La?y.getLinkPointFromPoint(E,te,te.ga(So),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(So),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 Dn,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 Me=we.link;z=Me.i(we.index),te=Me.i(we.index+1);var Te=this.linkSpacing*(ue-(le-1)/2);y++,Me.uh(),Me.L(we.index,z.x,z.y+Te),Me.L(we.index+1,te.x,te.y+Te),Me.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),Me=we.link,z=Me.i(we.index),te=Me.i(we.index+1),Te=this.linkSpacing*(ue-(le-1)/2),y++,Me.uh(),Me.L(we.index,z.x+Te,z.y),Me.L(we.index+1,te.x+Te,te.y),Me.zf()}z=E}a=b}}}},Ne=ea.prototype,Ne.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},Ne.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},Ne.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},Ne.B=function(a,y){return a-=y,-1<a&&1>a},Ne.zi=function(a,y,x,b){var E=a.length,z=b-x;if(!(1>=z))if((0>x||x>=E-1)&&Rt("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}ft.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()):Rt("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 Xt(ea,"CycleDepthFirst",0),Fy=new Xt(ea,"CycleGreedy",1),Cm=new Xt(ea,"CycleFromLayers",2),Q0=new Xt(ea,"LayerOptimalLinkLength",0),Ay=new Xt(ea,"LayerLongestPathSink",1),Dy=new Xt(ea,"LayerLongestPathSource",2),q0=new Xt(ea,"InitDepthFirstOut",0),By=new Xt(ea,"InitDepthFirstIn",1),Ty=new Xt(ea,"InitNaive",2),ky=new Xt(ea,"AggressiveNone",0),ev=new Xt(ea,"AggressiveLess",1),Iy=new Xt(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)}jt(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}jt(nc,Ms);function rx(a,y){return a.index-y.index}function tv(a,y){if(!a.$n){for(var x=[],b=Oi(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Oi(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Rt("Unable to find destination edge to given vertex")}function Oy(a){if(!a.co){for(var y=[],x=Oi(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=Oi(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},ft.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}jt(bm,Tu),ft.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 ho(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 hi(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)}jt(ho,Ma),ho.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)},ho.prototype.qb=function(a){a.classType===ho?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:Rt("Unknown enum value: "+a):Ma.prototype.qb.call(this,a)},ho.prototype.createNetwork=function(){return new Gg(this)},ho.prototype.makeNetwork=function(a){function y(b){if(b instanceof Bi)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof xi){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 fn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof qr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},ho.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 fn&&(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 Bi?(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}ho.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:Rt("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:Rt("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 Dn,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 Dn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Rt("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}ho.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}}ho.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])}}ho.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])}}ho.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:Rt("Unhandled sorting value "+a.sorting.toString())}},ho.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},ho.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}ho.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=et.alloc(),we=0;we<ue;we++){var Me=le[we],Te=Me.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-Te.width,a.bounds.y+oe),Me.move(me),Me=Me.Sd();Me.next();){var je=Me.value;je.fromSpot=ss,je.toSpot=xs}else for(me.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Me.move(me),Me=Me.Sd();Me.next();)je=Me.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),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=xs,je.toSpot=ss;else for(me.h(a.bounds.x+a.commentMargin-Te.width,a.bounds.y+oe),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=ss,je.toSpot=xs;oe=0<=a.commentSpacing?oe+(Te.height+a.commentSpacing):oe+(a.commentSpacing-Te.height)}else{if(135<E&&!z||!x&&re)if(0<=a.commentMargin)for(me.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-Te.height),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=Ua,je.toSpot=vs;else for(me.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Me.move(me),Me=Me.Sd();Me.next();)je=Me.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),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=vs,je.toSpot=Ua;else for(me.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-Te.height),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=Ua,je.toSpot=vs;oe=0<=a.commentSpacing?oe+(Te.width+a.commentSpacing):oe+(a.commentSpacing-Te.width)}}if(et.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)}},ho.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,Me=this.computeNodeIndent(a),Te=a.rowSpacing,je=0;(b||le||a.hm||a.im&&a.maxGenerationCount===1)&&(je=Math.max(0,a.rowIndent)),b=a.width;var ut=a.height,tt=0,Ct=0,Mt=0,kt=null,Jt=null,pn=0,Fi=0,_i=0,Zi=0,yi=0,ei=0,Xr=0,Ar=0;if(ue&&!Em(oe)&&135<E&&te.reverse(),Em(oe))if(1<re)for(var Go=0;Go<re;Go++)Go%2===0&&Go!==re-1&&(Ar=Math.max(Ar,y?te[Go].Da.width:te[Go].Da.height));else re===1&&(Ar=y?te[0].Da.width:te[0].Da.height);if(ue){switch(oe){case Uh:Ct=135>E?dx(this,a,te,Ar,tt,Ct):hx(this,a,te,Ar,tt,Ct),Ar=Ct.x,tt=Ct.width,Ct=Ct.height;break;case _h:for(kt=0;kt<re;kt++)Jt=te[kt],me=Jt.Da,Mt=ei===0?0:Te,y?(Jt.S.h(z-me.width,Zi+Mt),tt=Math.max(tt,me.width),Ct=Math.max(Ct,Zi+Mt+me.height),Zi+=Mt+me.height):(Jt.S.h(_i+Mt,z-me.height),tt=Math.max(tt,_i+Mt+me.width),Ct=Math.max(Ct,me.height),_i+=Mt+me.width),ei++;break;case vh:for(kt=0;kt<re;kt++)Jt=te[kt],z=Jt.Da,me=ei===0?0:Te,y?(Jt.S.h(we/2+a.focus.x,Zi+me),tt=Math.max(tt,z.width),Ct=Math.max(Ct,Zi+me+z.height),Zi+=me+z.height):(Jt.S.h(_i+me,we/2+a.focus.y),tt=Math.max(tt,_i+me+z.width),Ct=Math.max(Ct,z.height),_i+=me+z.width),ei++}kt=xu(this,2),Jt=xu(this,2),y?(kt[0].h(0,0),kt[1].h(0,Ct),Jt[0].h(tt,0)):(kt[0].h(0,0),kt[1].h(tt,0),Jt[0].h(0,Ct)),Jt[1].h(tt,Ct)}else for(Go=0;Go<re;Go++){var aa=te[Go],Rs=aa.Da;if(y){0<me&&0<ei&&_i+we+Rs.width>me&&(_i<z&&ig(a,oe,z-_i,0,Xr,Go-1),yi++,ei=0,Xr=Go,Mt=Ct,_i=0,Zi=135<E?-Ct-Te:Ct+Te),iv(this,aa,0,Zi);var Vs=0;if(ei===0)kt=aa.Yo,Jt=aa.kp,pn=Rs.width,Fi=Rs.height,(kt===null||Jt===null||E!==Dc(aa))&&(kt=xu(this,2),Jt=xu(this,2),kt[0].h(0,0),kt[1].h(0,Fi),Jt[0].h(pn,0),Jt[1].h(pn,Fi));else{var Dl=yn();Fi=fx(this,a,aa,kt,Jt,pn,Fi,Dl),Vs=Fi.x,kt=Dl[0],Jt=Dl[1],pn=Fi.width,Fi=Fi.height,On(Dl),_i<Rs.width&&0>Vs&&(Hg(a,-Vs,0,Xr,Go-1),rv(kt,-Vs,0),rv(Jt,-Vs,0),Vs=0)}aa.S.h(Vs,Zi),tt=Math.max(tt,pn),Ct=Math.max(Ct,Mt+(yi===0?0:Te)+Rs.height),_i=pn}else 0<me&&0<ei&&Zi+we+Rs.height>me&&(Zi<z&&ig(a,oe,0,z-Zi,Xr,Go-1),yi++,ei=0,Xr=Go,Mt=tt,Zi=0,_i=135<E?-tt-Te:tt+Te),iv(this,aa,_i,0),Vs=0,ei===0?(kt=aa.Yo,Jt=aa.kp,pn=Rs.width,Fi=Rs.height,(kt===null||Jt===null||E!==Dc(aa))&&(kt=xu(this,2),Jt=xu(this,2),kt[0].h(0,0),kt[1].h(pn,0),Jt[0].h(0,Fi),Jt[1].h(pn,Fi))):(Dl=yn(),Fi=fx(this,a,aa,kt,Jt,pn,Fi,Dl),Vs=Fi.x,kt=Dl[0],Jt=Dl[1],pn=Fi.width,Fi=Fi.height,On(Dl),Zi<Rs.height&&0>Vs&&(Hg(a,0,-Vs,Xr,Go-1),rv(kt,0,-Vs),rv(Jt,0,-Vs),Vs=0)),aa.S.h(_i,Vs),Ct=Math.max(Ct,Fi),tt=Math.max(tt,Mt+(yi===0?0:Te)+Rs.width),Zi=Fi;ei++}switch(0<yi&&(y?(Ct+=Math.max(0,x),_i<tt&&ig(a,oe,tt-_i,0,Xr,re-1),0<je&&(le||Hg(a,je,0,0,re-1),tt+=je)):(tt+=Math.max(0,x),Zi<Ct&&ig(a,oe,0,Ct-Zi,Xr,re-1),0<je&&(le||Hg(a,0,je,0,re-1),Ct+=je))),je=le=0,oe){case Ap:y?le+=tt/2-a.focus.x-Me/2:je+=Ct/2-a.focus.y-Me/2;break;case Wg:0<yi?y?le+=tt/2-a.focus.x-Me/2:je+=Ct/2-a.focus.y-Me/2:y?(Ar=te[0].S.x+te[0].la.x,le+=Ar+(te[re-1].S.x+te[re-1].la.x+2*te[re-1].focus.x-Ar)/2-a.focus.x-Me/2):(Ar=te[0].S.y+te[0].la.y,je+=Ar+(te[re-1].S.y+te[re-1].la.y+2*te[re-1].focus.y-Ar)/2-a.focus.y-Me/2);break;case Wd:y?(le-=Me,tt+=Me):(je-=Me,Ct+=Me);break;case Gd:y?(le+=tt-a.width+Me,tt+=Me):(je+=Ct-a.height+Me,Ct+=Me);break;case Uh:y?1<re?le+=Ar+we/2-a.focus.x:le+=te[0].focus.x-a.focus.x+te[0].la.x:1<re?je+=Ar+we/2-a.focus.y:je+=te[0].focus.y-a.focus.y+te[0].la.y;break;case _h:y?le+=tt+we/2-a.focus.x:je+=Ct+we/2-a.focus.y;break;case vh:break;default:Ct=this.customAlignment(a,le,je,tt,Ct),le=Ct[0],je=Ct[1],tt=Ct[2],Ct=Ct[3]}for(Me=0;Me<re;Me++)Ar=te[Me],y?Ar.S.h(Ar.S.x+Ar.la.x-le,Ar.S.y+(135<E?(ue?-Ct:-Ar.Da.height)+Ar.la.y-x:ut+x+Ar.la.y)):Ar.S.h(Ar.S.x+(135<E?(ue?-tt:-Ar.Da.width)+Ar.la.x-x:b+x+Ar.la.x),Ar.S.y+Ar.la.y-je);if(re=te=0,ue?y?(tt=zy(a,tt,le),0>le&&(le=0),135<E&&(je+=Ct+x),Ct+=ut+x,oe===vh&&(te+=we/2+a.focus.x),re+=ut+x):(135<E&&(le+=tt+x),tt+=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>tt&&(tt=Zy(oe,b-tt,0),te=tt.x,re=tt.y,tt=b,le=0):tt=zy(a,tt,le),0>le&&(te-=le,le=0),135<E&&(je+=Ct+x),Ct=Math.max(Math.max(Ct,ut),Ct+ut+x),re+=ut+x):(135<E&&(le+=tt+x),tt=Math.max(Math.max(tt,b),tt+b+x),a.comments===null?ut>Ct&&(Ct=Zy(oe,0,ut-Ct),te=Ct.x,re=Ct.y,Ct=ut,je=0):Ct=Hy(a,Ct,je),0>je&&(re-=je,je=0),te+=b+x),0<yi)E=xu(this,4),yi=xu(this,4),y?(E[2].h(0,ut+x),E[3].h(E[2].x,Ct),yi[2].h(tt,E[2].y),yi[3].h(yi[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(tt,E[2].y),yi[2].h(E[2].x,Ct),yi[3].h(E[3].x,yi[2].y));else{for(E=xu(this,kt.length+2),yi=xu(this,Jt.length+2),oe=0;oe<kt.length;oe++)ue=kt[oe],E[oe+2].h(ue.x+te,ue.y+re);for(oe=0;oe<Jt.length;oe++)ue=Jt[oe],yi[oe+2].h(ue.x+te,ue.y+re)}y?(E[0].h(le,0),E[1].h(E[0].x,ut),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])),yi[0].h(le+b,0),yi[1].h(yi[0].x,ut),yi[2].y<yi[1].y&&(yi[2].x<yi[0].x?yi[2].assign(yi[1]):yi[1].assign(yi[2])),yi[3].y<yi[2].y&&(yi[3].x<yi[0].x?yi[3].assign(yi[2]):yi[2].assign(yi[3])),E[2].y-=x/2,yi[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])),yi[0].h(0,je+ut),yi[1].h(b,yi[0].y),yi[2].x<yi[1].x&&(yi[2].y<yi[0].y?yi[2].assign(yi[1]):yi[1].assign(yi[2])),yi[3].x<yi[2].x&&(yi[3].y<yi[0].y?yi[3].assign(yi[2]):yi[2].assign(yi[3])),E[2].x-=x/2,yi[2].x-=x/2),Xc(this,kt),Xc(this,Jt),a.Yo=E,a.kp=yi,a.la.h(le,je),a.Da.h(tt,Ct)}break;default:Rt("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 Me=y.nodeSpacing,Te=a.computeNodeIndent(y),je=ue||me?0:Te/2,ut=y.rowSpacing,tt=0;(ue||me||y.hm||y.im&&y.maxGenerationCount===1)&&(tt=Math.max(0,y.rowIndent)),ue=y.width;var Ct=y.height,Mt=0,kt=0,Jt=0,pn=0,Fi=0,_i=0,Zi=0,yi=0,ei=0,Xr=0;if(re&&!Em(le)&&135<b&&E.reverse(),Em(le))if(1<te)for(var Ar=0;Ar<te;Ar++){var Go=E[Ar],aa=Go.Da;Ar%2===0&&Ar!==te-1?ei=Math.max(ei,(x?aa.width:aa.height)+a.computeBusNodeSpacing(Go)-Me):Ar%2!==0&&(Xr=Math.max(Xr,(x?aa.width:aa.height)+a.computeBusNodeSpacing(Go)-Me))}else te===1&&(ei=x?E[0].Da.width:E[0].Da.height);if(re)switch(le){case Uh:case $d:kt=135>b?dx(a,y,E,ei,Mt,kt):hx(a,y,E,ei,Mt,kt),ei=kt.x,Mt=kt.width,kt=kt.height;break;case _h:for(we=0;we<te;we++)je=E[we],Jt=je.Da,Xr=Zi===0?0:ut,x?(je.S.h(z-Jt.width,Fi+Xr),Mt=Math.max(Mt,Jt.width),kt=Math.max(kt,Fi+Xr+Jt.height),Fi+=Xr+Jt.height):(je.S.h(pn+Xr,z-Jt.height),Mt=Math.max(Mt,pn+Xr+Jt.width),kt=Math.max(kt,Jt.height),pn+=Xr+Jt.width),Zi++;break;case vh:for(z=0;z<te;z++)we=E[z],je=we.Da,Jt=Zi===0?0:ut,x?(we.S.h(Me/2+y.focus.x,Fi+Jt),Mt=Math.max(Mt,je.width),kt=Math.max(kt,Fi+Jt+je.height),Fi+=Jt+je.height):(we.S.h(pn+Jt,Me/2+y.focus.y),Mt=Math.max(Mt,pn+Jt+je.width),kt=Math.max(kt,je.height),pn+=Jt+je.width),Zi++}else for(Xr=0;Xr<te;Xr++)Ar=E[Xr],Go=Ar.Da,x?(0<we&&0<Zi&&pn+Me+Go.width>we&&(pn<z&&ig(y,le,z-pn,0,yi,Xr-1),_i++,Zi=0,yi=Xr,Jt=kt,pn=0,Fi=135<b?-kt-ut:kt+ut),aa=Zi===0?je:Me,iv(a,Ar,0,Fi),Ar.S.h(pn+aa,Fi),Mt=Math.max(Mt,pn+aa+Go.width),kt=Math.max(kt,Jt+(_i===0?0:ut)+Go.height),pn+=aa+Go.width):(0<we&&0<Zi&&Fi+Me+Go.height>we&&(Fi<z&&ig(y,le,0,z-Fi,yi,Xr-1),_i++,Zi=0,yi=Xr,Jt=Mt,Fi=0,pn=135<b?-Mt-ut:Mt+ut),aa=Zi===0?je:Me,iv(a,Ar,pn,0),Ar.S.h(pn,Fi+aa),kt=Math.max(kt,Fi+aa+Go.height),Mt=Math.max(Mt,Jt+(_i===0?0:ut)+Go.width),Fi+=aa+Go.height),Zi++;switch(0<_i&&(x?(kt+=Math.max(0,oe),pn<Mt&&ig(y,le,Mt-pn,0,yi,te-1),0<tt&&(me||Hg(y,tt,0,0,te-1),Mt+=tt)):(Mt+=Math.max(0,oe),Fi<kt&&ig(y,le,0,kt-Fi,yi,te-1),0<tt&&(me||Hg(y,0,tt,0,te-1),kt+=tt))),tt=me=0,le){case Ap:x?me+=Mt/2-y.focus.x-Te/2:tt+=kt/2-y.focus.y-Te/2;break;case Wg:0<_i?x?me+=Mt/2-y.focus.x-Te/2:tt+=kt/2-y.focus.y-Te/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-Te/2):(a=E[0].S.y+E[0].la.y,tt+=a+(E[te-1].S.y+E[te-1].la.y+2*E[te-1].focus.y-a)/2-y.focus.y-Te/2);break;case Wd:x?(me-=Te,Mt+=Te):(tt-=Te,kt+=Te);break;case Gd:x?(me+=Mt-y.width+Te,Mt+=Te):(tt+=kt-y.height+Te,kt+=Te);break;case Uh:case $d:x?1<te?me+=ei+Me/2-y.focus.x:me+=E[0].focus.x-y.focus.x+E[0].la.x:1<te?tt+=ei+Me/2-y.focus.y:tt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case _h:x?me+=Mt+Me/2-y.focus.x:tt+=kt+Me/2-y.focus.y;break;case vh:break;default:a=a.customAlignment(y,me,tt,Mt,kt),me=a[0],tt=a[1],Mt=a[2],kt=a[3]}for(a=0;a<te;a++)Te=E[a],x?Te.S.h(Te.S.x+Te.la.x-me,Te.S.y+(135<b?(re?-kt:-Te.Da.height)+Te.la.y-oe:Ct+oe+Te.la.y)):Te.S.h(Te.S.x+(135<b?(re?-Mt:-Te.Da.width)+Te.la.x-oe:ue+oe+Te.la.x),Te.S.y+Te.la.y-tt);x?(Mt=zy(y,Mt,me),0>me&&(me=0),135<b&&(tt+=kt+oe),kt=Math.max(Math.max(kt,Ct),kt+Ct+oe)):(135<b&&(me+=Mt+oe),Mt=Math.max(Math.max(Mt,ue),Mt+ue+oe),kt=Hy(y,kt,tt),0>tt&&(tt=0)),y.la.h(me,tt),y.Da.h(Mt,kt)}}ho.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,Me=0;Me<te;Me++)if(!(Me%2!==0||1<te&&Me===te-1)){var Te=x[Me],je=Te.Da,ut=ue===0?0:oe;if(le){var tt=a.computeBusNodeSpacing(Te)-re;Te.S.h(b-(je.width+tt),we+ut),E=Math.max(E,je.width+tt),z=Math.max(z,we+ut+je.height),we+=ut+je.height}else tt=a.computeBusNodeSpacing(Te)-re,Te.S.h(me+ut,b-(je.height+tt)),z=Math.max(z,je.height+tt),E=Math.max(E,me+ut+je.width),me+=ut+je.width;ue++}for(ue=0,Te=me,Me=we,le?(me=b+re,we=0):(me=0,we=b+re),je=0;je<te;je++)if(je%2!==0){ut=x[je],tt=ut.Da;var Ct=ue===0?0:oe;if(le){var Mt=a.computeBusNodeSpacing(ut)-re;ut.S.h(me+Mt,we+Ct),E=Math.max(E,me+tt.width+Mt),z=Math.max(z,we+Ct+tt.height),we+=Ct+tt.height}else Mt=a.computeBusNodeSpacing(ut)-re,ut.S.h(me+Ct,we+Mt),E=Math.max(E,me+Ct+tt.width),z=Math.max(z,we+tt.height+Mt),me+=Ct+tt.width;ue++}return 1<te&&te%2===1&&(x=x[te-1],te=x.Da,a=a.computeBusLastRowSpacing(x,le?Math.max(Math.abs(Me),Math.abs(we)):Math.max(Math.abs(Te),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(Me,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(Te,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,Me=0;Me<te;Me++)if(!(Me%2!==0||1<te&&Me===te-1)){var Te=x[Me],je=Te.Da,ut=ue===0?0:oe;if(le){var tt=a.computeBusNodeSpacing(Te)-re;we-=ut+je.height,Te.S.h(b-(je.width+tt),we),E=Math.max(E,je.width+tt),z=Math.max(z,Math.abs(we))}else tt=a.computeBusNodeSpacing(Te)-re,me-=ut+je.width,Te.S.h(me,b-(je.height+tt)),z=Math.max(z,je.height+tt),E=Math.max(E,Math.abs(me));ue++}for(ue=0,Te=me,Me=we,le?(me=b+re,we=0):(me=0,we=b+re),je=0;je<te;je++)if(je%2!==0){ut=x[je],tt=ut.Da;var Ct=ue===0?0:oe;if(le){var Mt=a.computeBusNodeSpacing(ut)-re;we-=Ct+tt.height,ut.S.h(me+Mt,we),E=Math.max(E,me+tt.width+Mt),z=Math.max(z,Math.abs(we))}else Mt=a.computeBusNodeSpacing(ut)-re,me-=Ct+tt.width,ut.S.h(me,we+Mt),z=Math.max(z,we+tt.height+Mt),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(Me),Math.abs(we)):Math.max(Math.abs(Te),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(Me,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(Te,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)}ho.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},ho.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:Rt("Unhandled alignment value "+a.toString())}return new et(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:Rt("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,Me=x.Yo,Te=x.kp;te=x.Da;var je=le?Math.max(we,te.height):Math.max(b,te.width);if((Me===null||oe!==Dc(x))&&(Me=xu(a,2),Te=xu(a,2),le?(Me[0].h(0,0),Me[1].h(0,te.height),Te[0].h(te.width,0),Te[1].h(Te[0].x,Me[1].y)):(Me[0].h(0,0),Me[1].h(te.width,0),Te[0].h(0,te.height),Te[1].h(Me[1].x,Te[0].y))),le){if(we=9999999,!(me===null||2>me.length||Me===null||2>Me.length))for(E=x=0;x<me.length&&E<Me.length;){z=me[x];var ut=Me[E];oe=ut.x,le=ut.y,oe+=b;var tt=z;x+1<me.length&&(tt=me[x+1]);var Ct=ut;ut=Ct.x,Ct=Ct.y,E+1<Me.length&&(Ct=Me[E+1],ut=Ct.x,Ct=Ct.y,ut+=b);var Mt=we;z.y===le?Mt=oe-z.x:z.y>le&&z.y<Ct?Mt=oe+(z.y-le)/(Ct-le)*(ut-oe)-z.x:le>z.y&&le<tt.y&&(Mt=oe-(z.x+(le-z.y)/(tt.y-z.y)*(tt.x-z.x))),Mt<we&&(we=Mt),tt.y<=z.y?x++:Ct<=le?E++:(tt.y<=Ct&&x++,Ct<=tt.y&&E++)}if(we=b-we,we+=ue,x=Me,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=Te,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;)tt=me[x++],ue[E++].h(tt.x,tt.y);for(;le<z.length;)tt=z[le++],ue[E++].h(tt.x+oe,tt.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,Me),Xc(a,me),Xc(a,Te),re[0]=b,re[1]=E,new _t(we,0,z,te)}if(b=9999999,!(me===null||2>me.length||Me===null||2>Me.length))for(E=x=0;x<me.length&&E<Me.length;)z=me[x],ut=Me[E],oe=ut.x,le=ut.y,le+=we,tt=z,x+1<me.length&&(tt=me[x+1]),Ct=ut,ut=Ct.x,Ct=Ct.y,E+1<Me.length&&(Ct=Me[E+1],ut=Ct.x,Ct=Ct.y,Ct+=we),Mt=b,z.x===oe?Mt=le-z.y:z.x>oe&&z.x<ut?Mt=le+(z.x-oe)/(ut-oe)*(Ct-le)-z.y:oe>z.x&&oe<tt.x&&(Mt=le-(z.y+(oe-z.x)/(tt.x-z.x)*(tt.y-z.y))),Mt<b&&(b=Mt),tt.x<=z.x?x++:ut<=oe?E++:(tt.x<=ut&&x++,ut<=tt.x&&E++);if(we-=b,we+=ue,x=Me,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=Te,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;)tt=me[x++],ue[E++].h(tt.x,tt.y);for(;le<z.length;)tt=z[le++],ue[E++].h(tt.x,tt.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,Me),Xc(a,me),Xc(a,Te),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 et;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)}ho.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:Rt("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:Rt("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)}}}ho.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},ho.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},ho.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 et(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new et(-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)}},ho.prototype.commitLayers=function(){},ho.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},ho.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])}}ho.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}ho.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},ho.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)},ft.Object.defineProperties(ho.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()):Rt("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 Xt(ho,"PathDefault",-1),Zd=new Xt(ho,"PathDestination",0),Zg=new Xt(ho,"PathSource",1),Fp=new Xt(ho,"SortingForwards",10),Mm=new Xt(ho,"SortingReverse",11),Lm=new Xt(ho,"SortingAscending",12),Nm=new Xt(ho,"SortingDescending",13),Ap=new Xt(ho,"AlignmentCenterSubtrees",20),Wg=new Xt(ho,"AlignmentCenterChildren",21),Wd=new Xt(ho,"AlignmentStart",22),Gd=new Xt(ho,"AlignmentEnd",23),Uh=new Xt(ho,"AlignmentBus",24),$d=new Xt(ho,"AlignmentBusBranching",25),_h=new Xt(ho,"AlignmentTopLeftBus",26),vh=new Xt(ho,"AlignmentBottomRightBus",27),av=new Xt(ho,"CompactionNone",30),Fm=new Xt(ho,"CompactionBlock",31),sv=new Xt(ho,"StyleLayered",40),Gy=new Xt(ho,"StyleLastParents",41),$y=new Xt(ho,"StyleAlternating",42),Ky=new Xt(ho,"StyleRootOnly",43),lv=new Xt(ho,"ArrangementVertical",50),Vy=new Xt(ho,"ArrangementHorizontal",51),uv=new Xt(ho,"ArrangementFixedRoots",52),Uy=new Xt(ho,"LayerIndividual",60),_y=new Xt(ho,"LayerSiblings",61),cv=new Xt(ho,"LayerUniform",62);ho.className="TreeLayout",ho.PathDefault=ov,ho.PathDestination=Zd,ho.PathSource=Zg,ho.SortingForwards=Fp,ho.SortingReverse=Mm,ho.SortingAscending=Lm,ho.SortingDescending=Nm,ho.AlignmentCenterSubtrees=Ap,ho.AlignmentCenterChildren=Wg,ho.AlignmentStart=Wd,ho.AlignmentEnd=Gd,ho.AlignmentBus=Uh,ho.AlignmentBusBranching=$d,ho.AlignmentTopLeftBus=_h,ho.AlignmentBottomRightBus=vh,ho.CompactionNone=av,ho.CompactionBlock=Fm,ho.StyleLayered=sv,ho.StyleLastParents=Gy,ho.StyleAlternating=$y,ho.StyleRootOnly=Ky,ho.ArrangementVertical=lv,ho.ArrangementHorizontal=Vy,ho.ArrangementFixedRoots=uv,ho.LayerIndividual=Uy,ho.LayerSiblings=_y,ho.LayerUniform=cv;function Gg(a){ca.call(this,a)}jt(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 et(0,0),this.Da=new hi(0,0),this.la=new et(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=Ko,this.wr=!0,this.Dp=Ko}jt(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)},ft.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 et(0,0)}jt(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:Rt("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 Me=a.i(a.pointsCount-1);z===0?(x.alignment===Gd?(z=b.bottom+E.y,E.y===0&&me.y>Me.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<Me.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>Me.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<Me.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>Me.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<Me.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>Me.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<Me.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))):Rt("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()))}}},ft.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 Jr,this.mouseDownTools),this.gb("Relinking",new nr,this.mouseDownTools),this.gb("LinkReshaping",new sr,this.mouseDownTools),this.gb("Rotating",new po,this.mouseDownTools),this.gb("Resizing",new Vr,this.mouseDownTools),this.gb("Linking",new Di,this.mouseMoveTools),this.gb("Dragging",new Fa,this.mouseMoveTools),this.gb("DragSelecting",new Qr,this.mouseMoveTools),this.gb("Panning",new br,this.mouseMoveTools),this.gb("ContextMenu",new zo,this.mouseUpTools),this.gb("TextEditing",new Fo,this.mouseUpTools),this.gb("ClickCreating",new lo,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 fn.licenseKey},set licenseKey(a){fn.licenseKey=a},get version(){return fn.version},Group:qr,EnumValue:Xt,List:Dn,Set:_n,Map:Ai,Point:et,Size:hi,Rect:_t,Margin:zi,Spot:Ui,Geometry:Pi,PathFigure:ys,PathSegment:Bo,InputEvent:nl,DiagramEvent:od,ChangedEvent:wa,Model:rr,GraphLinksModel:No,TreeModel:$l,Binding:fs,Transaction:Ps,UndoManager:Na,CommandHandler:lt,Tool:Do,DraggingTool:Fa,DraggingInfo:Zc,DraggingOptions:ae,LinkingBaseTool:bn,LinkingTool:Di,RelinkingTool:nr,LinkReshapingTool:sr,ResizingTool:Vr,RotatingTool:po,ClickSelectingTool:Xo,ActionTool:Jr,ClickCreatingTool:lo,HTMLInfo:oo,ContextMenuTool:zo,DragSelectingTool:Qr,PanningTool:br,TextEditingTool:Fo,ToolManager:fa,Animation:za,AnimationManager:ka,AnimationTrigger:ql,Layer:ba,Diagram:fn,Palette:fe,Overview:Se,Brush:Ro,GraphObject:Qt,Panel:fi,RowColumnDefinition:Cs,Shape:io,TextBlock:ua,Picture:ru,Part:pr,Adornment:jo,Node:Bi,Link:xi,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:ho,TreeNetwork:Gg,TreeVertex:gc,TreeEdge:Dp};typeof dv=="object"&&dv.version&&gi("WARNING: a `go` object on the root object is already defined. "+("Debug"in dv?"debug ":"")+"version: "+dv.version+", replaced with version: "+Xy.version),fn.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 Oe=typeof pe.g!="undefined"?pe.g.go:self.go,Ke=Oe.Group,st=Oe.EnumValue,Ge=Oe.List,_e=Oe.Set,Le=Oe.Map,Tt=Oe.Point,Pt=Oe.Size,Xe=Oe.Rect,Et=Oe.Margin,ct=Oe.Spot,It=Oe.Geometry,Be=Oe.PathFigure,ne=Oe.PathSegment,ee=Oe.InputEvent,ce=Oe.DiagramEvent,se=Oe.ChangedEvent,he=Oe.Model,ve=Oe.GraphLinksModel,be=Oe.TreeModel,ke=Oe.Binding,Ae=Oe.Transaction,ze=Oe.UndoManager,Ze=Oe.CommandHandler,ot=Oe.Tool,qe=Oe.DraggingTool,bt=Oe.DraggingInfo,He=Oe.LinkingBaseTool,wt=Oe.LinkingTool,nt=Oe.RelinkingTool,Dt=Oe.LinkReshapingTool,ht=Oe.ResizingTool,zt=Oe.RotatingTool,Yt=Oe.ClickSelectingTool,Ut=Oe.ActionTool,it=Oe.ClickCreatingTool,Ve=Oe.HTMLInfo,Wt=Oe.ContextMenuTool,Ln=Oe.DragSelectingTool,Nn=Oe.PanningTool,$t=Oe.TextEditingTool,rn=Oe.ToolManager,An=Oe.Animation,ti=Oe.AnimationManager,xn=Oe.AnimationTrigger,Qn=Oe.Layer,Ot=Oe.Diagram,Cn=Oe.Palette,Wn=Oe.Overview,We=Oe.Brush,Ee=Oe.GraphObject,Pe=Oe.Panel,De=Oe.RowColumnDefinition,Fe=Oe.Shape,ye=Oe.TextBlock,Qe=Oe.TextBlockMetrics,vt=Oe.Picture,Ye=Oe.Part,Je=Oe.Adornment,yt=Oe.Node,St=Oe.Link,rt=Oe.Placeholder,Zt=Oe.Layout,dn=Oe.LayoutNetwork,mn=Oe.LayoutVertex,qt=Oe.LayoutEdge,Gn=Oe.GridLayout,Kn=Oe.PanelLayout,Nt=Oe.CircularLayout,sn=Oe.CircularNetwork,Fn=Oe.CircularVertex,hn=Oe.CircularEdge,Mn=Oe.ForceDirectedLayout,li=Oe.ForceDirectedNetwork,pi=Oe.ForceDirectedVertex,mi=Oe.ForceDirectedEdge,Li=Oe.LayeredDigraphLayout,Gi=Oe.LayeredDigraphNetwork,ar=Oe.LayeredDigraphVertex,Xi=Oe.LayeredDigraphEdge,wr=Oe.TreeLayout,vr=Oe.TreeNetwork,ji=Oe.TreeVertex,Lr=Oe.TreeEdge,jn=Oe.version},24334:function(Vn,Pn,pe){var ge,Oe;(function(Ke,st){Vn.exports=st(Ke)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof pe.g!="undefined"?pe.g:this,function(Ke){"use strict";Ke=Ke||{};var st=Ke.Base64,Ge="2.6.4",_e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Le=function(nt){for(var Dt={},ht=0,zt=nt.length;ht<zt;ht++)Dt[nt.charAt(ht)]=ht;return Dt}(_e),Tt=String.fromCharCode,Pt=function(nt){if(nt.length<2){var Dt=nt.charCodeAt(0);return Dt<128?nt:Dt<2048?Tt(192|Dt>>>6)+Tt(128|Dt&63):Tt(224|Dt>>>12&15)+Tt(128|Dt>>>6&63)+Tt(128|Dt&63)}else{var Dt=65536+(nt.charCodeAt(0)-55296)*1024+(nt.charCodeAt(1)-56320);return Tt(240|Dt>>>18&7)+Tt(128|Dt>>>12&63)+Tt(128|Dt>>>6&63)+Tt(128|Dt&63)}},Xe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Et=function(nt){return nt.replace(Xe,Pt)},ct=function(nt){var Dt=[0,2,1][nt.length%3],ht=nt.charCodeAt(0)<<16|(nt.length>1?nt.charCodeAt(1):0)<<8|(nt.length>2?nt.charCodeAt(2):0),zt=[_e.charAt(ht>>>18),_e.charAt(ht>>>12&63),Dt>=2?"=":_e.charAt(ht>>>6&63),Dt>=1?"=":_e.charAt(ht&63)];return zt.join("")},It=Ke.btoa&&typeof Ke.btoa=="function"?function(nt){return Ke.btoa(nt)}:function(nt){if(nt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return nt.replace(/[\s\S]{1,3}/g,ct)},Be=function(nt){return It(Et(String(nt)))},ne=function(nt){return nt.replace(/[+\/]/g,function(Dt){return Dt=="+"?"-":"_"}).replace(/=/g,"")},ee=function(nt,Dt){return Dt?ne(Be(nt)):Be(nt)},ce=function(nt){return ee(nt,!0)},se;Ke.Uint8Array&&(se=function(nt,Dt){for(var ht="",zt=0,Yt=nt.length;zt<Yt;zt+=3){var Ut=nt[zt],it=nt[zt+1],Ve=nt[zt+2],Wt=Ut<<16|it<<8|Ve;ht+=_e.charAt(Wt>>>18)+_e.charAt(Wt>>>12&63)+(typeof it!="undefined"?_e.charAt(Wt>>>6&63):"=")+(typeof Ve!="undefined"?_e.charAt(Wt&63):"=")}return Dt?ne(ht):ht});var he=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ve=function(nt){switch(nt.length){case 4:var Dt=(7&nt.charCodeAt(0))<<18|(63&nt.charCodeAt(1))<<12|(63&nt.charCodeAt(2))<<6|63&nt.charCodeAt(3),ht=Dt-65536;return Tt((ht>>>10)+55296)+Tt((ht&1023)+56320);case 3:return Tt((15&nt.charCodeAt(0))<<12|(63&nt.charCodeAt(1))<<6|63&nt.charCodeAt(2));default:return Tt((31&nt.charCodeAt(0))<<6|63&nt.charCodeAt(1))}},be=function(nt){return nt.replace(he,ve)},ke=function(nt){var Dt=nt.length,ht=Dt%4,zt=(Dt>0?Le[nt.charAt(0)]<<18:0)|(Dt>1?Le[nt.charAt(1)]<<12:0)|(Dt>2?Le[nt.charAt(2)]<<6:0)|(Dt>3?Le[nt.charAt(3)]:0),Yt=[Tt(zt>>>16),Tt(zt>>>8&255),Tt(zt&255)];return Yt.length-=[0,0,2,1][ht],Yt.join("")},Ae=Ke.atob&&typeof Ke.atob=="function"?function(nt){return Ke.atob(nt)}:function(nt){return nt.replace(/\S{1,4}/g,ke)},ze=function(nt){return Ae(String(nt).replace(/[^A-Za-z0-9\+\/]/g,""))},Ze=function(nt){return be(Ae(nt))},ot=function(nt){return String(nt).replace(/[-_]/g,function(Dt){return Dt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},qe=function(nt){return Ze(ot(nt))},bt;Ke.Uint8Array&&(bt=function(nt){return Uint8Array.from(ze(ot(nt)),function(Dt){return Dt.charCodeAt(0)})});var He=function(){var nt=Ke.Base64;return Ke.Base64=st,nt};if(Ke.Base64={VERSION:Ge,atob:ze,btoa:It,fromBase64:qe,toBase64:ee,utob:Et,encode:ee,encodeURI:ce,btou:be,decode:qe,noConflict:He,fromUint8Array:se,toUint8Array:bt},typeof Object.defineProperty=="function"){var wt=function(nt){return{value:nt,enumerable:!1,writable:!0,configurable:!0}};Ke.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",wt(function(){return qe(this)})),Object.defineProperty(String.prototype,"toBase64",wt(function(nt){return ee(this,nt)})),Object.defineProperty(String.prototype,"toBase64URI",wt(function(){return ee(this,!0)}))}}return Ke.Meteor&&(Base64=Ke.Base64),Vn.exports?Vn.exports.Base64=Ke.Base64:(ge=[],Oe=function(){return Ke.Base64}.apply(Pn,ge),Oe!==void 0&&(Vn.exports=Oe)),{Base64:Ke.Base64}})},2859:function(Vn,Pn,pe){"use strict";pe.d(Pn,{hP:function(){return Wn}});var ge=function(We,Ee){return(ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Pe,De){Pe.__proto__=De}||function(Pe,De){for(var Fe in De)Object.prototype.hasOwnProperty.call(De,Fe)&&(Pe[Fe]=De[Fe])})(We,Ee)};function Oe(We,Ee){function Pe(){this.constructor=We}ge(We,Ee),We.prototype=Ee===null?Object.create(Ee):(Pe.prototype=Ee.prototype,new Pe)}function Ke(We,Ee,Pe,De){return new(Pe||(Pe=Promise))(function(Fe,ye){function Qe(Je){try{Ye(De.next(Je))}catch(yt){ye(yt)}}function vt(Je){try{Ye(De.throw(Je))}catch(yt){ye(yt)}}function Ye(Je){var yt;Je.done?Fe(Je.value):(yt=Je.value,yt instanceof Pe?yt:new Pe(function(St){St(yt)})).then(Qe,vt)}Ye((De=De.apply(We,Ee||[])).next())})}function st(We,Ee){var Pe,De,Fe,ye,Qe={label:0,sent:function(){if(1&Fe[0])throw Fe[1];return Fe[1]},trys:[],ops:[]};return ye={next:vt(0),throw:vt(1),return:vt(2)},typeof Symbol=="function"&&(ye[Symbol.iterator]=function(){return this}),ye;function vt(Ye){return function(Je){return function(yt){if(Pe)throw new TypeError("Generator is already executing.");for(;Qe;)try{if(Pe=1,De&&(Fe=2&yt[0]?De.return:yt[0]?De.throw||((Fe=De.return)&&Fe.call(De),0):De.next)&&!(Fe=Fe.call(De,yt[1])).done)return Fe;switch(De=0,Fe&&(yt=[2&yt[0],Fe.value]),yt[0]){case 0:case 1:Fe=yt;break;case 4:return Qe.label++,{value:yt[1],done:!1};case 5:Qe.label++,De=yt[1],yt=[0];continue;case 7:yt=Qe.ops.pop(),Qe.trys.pop();continue;default:if(Fe=Qe.trys,!((Fe=Fe.length>0&&Fe[Fe.length-1])||yt[0]!==6&&yt[0]!==2)){Qe=0;continue}if(yt[0]===3&&(!Fe||yt[1]>Fe[0]&&yt[1]<Fe[3])){Qe.label=yt[1];break}if(yt[0]===6&&Qe.label<Fe[1]){Qe.label=Fe[1],Fe=yt;break}if(Fe&&Qe.label<Fe[2]){Qe.label=Fe[2],Qe.ops.push(yt);break}Fe[2]&&Qe.ops.pop(),Qe.trys.pop();continue}yt=Ee.call(We,Qe)}catch(St){yt=[6,St],De=0}finally{Pe=Fe=0}if(5&yt[0])throw yt[1];return{value:yt[0]?yt[1]:void 0,done:!0}}([Ye,Je])}}}function Ge(){for(var We=0,Ee=0,Pe=arguments.length;Ee<Pe;Ee++)We+=arguments[Ee].length;var De=Array(We),Fe=0;for(Ee=0;Ee<Pe;Ee++)for(var ye=arguments[Ee],Qe=0,vt=ye.length;Qe<vt;Qe++,Fe++)De[Fe]=ye[Qe];return De}var _e=function(){function We(){}return We.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},We.setAttributes=function(Ee,Pe){for(var De=0,Fe=Pe;De<Fe.length;De++){var ye=Fe[De],Qe=ye[0],vt=ye[1];Ee.setAttribute(Qe,vt)}},We.createRect=function(Ee,Pe,De){var Fe=document.createElementNS("http://www.w3.org/2000/svg","rect");return Fe.setAttribute("width",Ee.toString()),Fe.setAttribute("height",Pe.toString()),De&&We.setAttributes(Fe,De),Fe},We.createLine=function(Ee,Pe,De,Fe,ye){var Qe=document.createElementNS("http://www.w3.org/2000/svg","line");return Qe.setAttribute("x1",Ee.toString()),Qe.setAttribute("y1",Pe.toString()),Qe.setAttribute("x2",De.toString()),Qe.setAttribute("y2",Fe.toString()),ye&&We.setAttributes(Qe,ye),Qe},We.createPolygon=function(Ee,Pe){var De=document.createElementNS("http://www.w3.org/2000/svg","polygon");return De.setAttribute("points",Ee),Pe&&We.setAttributes(De,Pe),De},We.createCircle=function(Ee,Pe){var De=document.createElementNS("http://www.w3.org/2000/svg","circle");return De.setAttribute("cx",(Ee/2).toString()),De.setAttribute("cy",(Ee/2).toString()),De.setAttribute("r",Ee.toString()),Pe&&We.setAttributes(De,Pe),De},We.createEllipse=function(Ee,Pe,De){var Fe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Fe.setAttribute("cx",(Ee/2).toString()),Fe.setAttribute("cy",(Pe/2).toString()),Fe.setAttribute("rx",(Ee/2).toString()),Fe.setAttribute("ry",(Pe/2).toString()),De&&We.setAttributes(Fe,De),Fe},We.createGroup=function(Ee){var Pe=document.createElementNS("http://www.w3.org/2000/svg","g");return Ee&&We.setAttributes(Pe,Ee),Pe},We.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},We.createMarker=function(Ee,Pe,De,Fe,ye,Qe,vt){var Ye=document.createElementNS("http://www.w3.org/2000/svg","marker");return We.setAttributes(Ye,[["id",Ee],["orient",Pe],["markerWidth",De.toString()],["markerHeight",Fe.toString()],["refX",ye.toString()],["refY",Qe.toString()]]),Ye.appendChild(vt),Ye},We.createText=function(Ee){var Pe=document.createElementNS("http://www.w3.org/2000/svg","text");return Pe.setAttribute("x","0"),Pe.setAttribute("y","0"),Ee&&We.setAttributes(Pe,Ee),Pe},We.createTSpan=function(Ee,Pe){var De=document.createElementNS("http://www.w3.org/2000/svg","tspan");return De.textContent=Ee,Pe&&We.setAttributes(De,Pe),De},We.createImage=function(Ee){var Pe=document.createElementNS("http://www.w3.org/2000/svg","image");return Ee&&We.setAttributes(Pe,Ee),Pe},We.createPoint=function(Ee,Pe){var De=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return De.x=Ee,De.y=Pe,De},We.createPath=function(Ee,Pe){var De=document.createElementNS("http://www.w3.org/2000/svg","path");return De.setAttribute("d",Ee),Pe&&We.setAttributes(De,Pe),De},We}(),Le=function(){function We(){}return We.addKey=function(Ee){We.key=Ee},Object.defineProperty(We,"isLicensed",{get:function(){return!!We.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(We.key)},enumerable:!1,configurable:!0}),We}(),Tt=function(){function We(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return We.prototype.rasterize=function(Ee,Pe,De){var Fe=this;return new Promise(function(ye){var Qe=De!==void 0?De:document.createElement("canvas");Ee===null&&(Fe.markersOnly=!0,Fe.naturalSize=!1);var vt=document.createElementNS("http://www.w3.org/2000/svg","svg");vt.setAttribute("xmlns","http://www.w3.org/2000/svg"),vt.setAttribute("width",Pe.width.baseVal.valueAsString),vt.setAttribute("height",Pe.height.baseVal.valueAsString),vt.setAttribute("viewBox","0 0 "+Pe.viewBox.baseVal.width.toString()+" "+Pe.viewBox.baseVal.height.toString()),vt.innerHTML=Pe.innerHTML,Fe.naturalSize===!0?(vt.width.baseVal.value=Ee.naturalWidth,vt.height.baseVal.value=Ee.naturalHeight):Fe.width!==void 0&&Fe.height!==void 0&&(vt.width.baseVal.value=Fe.width,vt.height.baseVal.value=Fe.height),Qe.width=vt.width.baseVal.value,Qe.height=vt.height.baseVal.value;var Ye=vt.outerHTML,Je=Qe.getContext("2d");Fe.markersOnly!==!0&&Je.drawImage(Ee,0,0,Qe.width,Qe.height);var yt=window.URL,St=new Image(Qe.width,Qe.height);St.setAttribute("crossOrigin","anonymous");var rt=new Blob([Ye],{type:"image/svg+xml"}),Zt=yt.createObjectURL(rt);St.onload=function(){Je.drawImage(St,0,0),yt.revokeObjectURL(Zt);var dn=Qe.toDataURL(Fe.imageType,Fe.imageQuality);ye(dn)},St.src=Zt})},We}(),Pt=function(){},Xe=function(){function We(Ee){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ee+"_"}return Object.defineProperty(We.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(We.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(We.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),We.prototype.addClass=function(Ee){return this.styleSheet===void 0&&this.addStyleSheet(),Ee.name=""+this.classNamePrefix+Ee.localName,this.classes.push(Ee),this.styleSheet.sheet.insertRule("."+Ee.name+" {"+Ee.style+"}",this.styleSheet.sheet.cssRules.length),Ee},We.prototype.addRule=function(Ee){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ee),this.styleSheet.sheet.insertRule(Ee.selector+" {"+Ee.style+"}",this.styleSheet.sheet.cssRules.length)},We.prototype.addStyleSheet=function(){var Ee;this.styleSheet=document.createElement("style"),((Ee=this.styleSheetRoot)!==null&&Ee!==void 0?Ee:document.head).appendChild(this.styleSheet),this.addRule(new Et("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Et("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Et("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ct("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ct("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},We.prototype.removeStyleSheet=function(){var Ee;this.styleSheet&&(((Ee=this.styleSheetRoot)!==null&&Ee!==void 0?Ee:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},We}(),Et=function(We,Ee){this.selector=We,this.style=Ee},ct=function(We,Ee){this.localName=We,this.style=Ee},It=function(){function We(Ee,Pe,De,Fe,ye){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ee,this.displayMode=Pe,this.markerItems=De,this.uiStyleSettings=Fe,this.styles=ye,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return We.prototype.show=function(Ee){var Pe=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ee,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var De=document.createElement("div");De.className=this.toolbarBlockStyleClass.name,De.style.whiteSpace="nowrap",this.uiContainer.appendChild(De),this.addActionButton(De,'<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(De,'<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(De,'<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(De,'<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(De,'<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(De,'<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(De,'<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(De,'<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(ye){var Qe=document.createElement("div");Qe.className=""+Pe.toolbarButtonStyleClass.name,Qe.setAttribute("data-type-name",ye.typeName),Qe.innerHTML=ye.icon,Qe.addEventListener("click",function(){Pe.markerToolbarButtonClicked(Qe,ye)}),Pe.buttons.push(Qe),Pe.markerButtons.push(Qe)}),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 Fe=document.createElement("div");Fe.className=this.toolbarBlockStyleClass.name,Fe.style.whiteSpace="nowrap",Fe.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Fe),this.addActionButton(Fe,'<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(Fe,'<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()},We.prototype.addButtonClickListener=function(Ee){this.buttonClickListeners.push(Ee)},We.prototype.removeButtonClickListener=function(Ee){this.buttonClickListeners.indexOf(Ee)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ee),1)},We.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},We.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ee=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Pe=0;Pe<this.markerButtons.length;Pe++)Pe<Ee||Pe===Ee&&this.markerButtons.length-1===Ee?this.markerButtonBlock.appendChild(this.markerButtons[Pe]):(Pe===Ee&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Pe]))}},We.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")},We.prototype.resetButtonStyles=function(){var Ee=this;this.buttons.forEach(function(Pe){Pe.className=Pe.className.replace(Ee.uiStyleSettings.toolbarButtonStyleColorsClassName?Ee.uiStyleSettings.toolbarButtonStyleColorsClassName:Ee.toolbarButtonStyleColorsClass.name,"").trim(),Pe.className=Pe.className.replace(Ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ee.toolbarActiveButtonStyleColorsClass.name,"").trim(),Pe.className+=" "+(Ee.uiStyleSettings.toolbarButtonStyleColorsClassName?Ee.uiStyleSettings.toolbarButtonStyleColorsClassName:Ee.toolbarButtonStyleColorsClass.name)})},We.prototype.addActionButton=function(Ee,Pe,De){var Fe=this,ye=document.createElement("div");switch(ye.className=""+this.toolbarButtonStyleClass.name,ye.innerHTML=Pe,ye.setAttribute("data-action",De),ye.addEventListener("click",function(){Fe.actionToolbarButtonClicked(ye,De)}),De){case"select":ye.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ye.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ye.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ye.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ye.style.fill=this.uiStyleSettings.closeButtonColor}Ee.appendChild(ye),this.buttons.push(ye)},We.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ct("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 ct("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ct("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ct("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 ct("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Ee=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ct("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Ee)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Ee)+`px;
padding: `+Ee+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ct("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ct("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Et("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Et("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},We.prototype.markerToolbarButtonClicked=function(Ee,Pe){this.setActiveButton(Ee),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(De){return De("marker",Pe)}),this.markerButtonOverflowBlock.style.display="none"},We.prototype.actionToolbarButtonClicked=function(Ee,Pe){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(De){return De("action",Pe)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},We.prototype.setActiveButton=function(Ee){this.resetButtonStyles(),Ee.className=Ee.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ee.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},We.prototype.setActiveMarkerButton=function(Ee){var Pe=this.markerButtons.find(function(De){return De.getAttribute("data-type-name")===Ee});Pe&&this.setActiveButton(Pe)},We.prototype.setCurrentMarker=function(Ee){var Pe=this;this.currentMarker=Ee,this.buttons.filter(function(De){return/delete|notes/.test(De.getAttribute("data-action"))}).forEach(function(De){Pe.currentMarker===void 0?(De.style.fillOpacity="0.4",De.style.pointerEvents="none"):(De.style.fillOpacity="1",De.style.pointerEvents="all")})},We}(),Be=function(){function We(Ee,Pe,De,Fe){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ee,this.displayMode=Pe,this.uiStyleSettings=De,this.styles=Fe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return We.prototype.addStyles=function(){var Ee;this.toolboxStyleClass=this.styles.addClass(new ct("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 ct("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Pe=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ct("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ct("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ct("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 ct("toolbox-panel-row_colors",`
background-color: `+((Ee=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ee!==void 0?Ee:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ct("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
padding: `+Pe+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ct("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ct("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Et("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Et("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},We.prototype.show=function(Ee){var Pe;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ee,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},We.prototype.setPanelButtons=function(Ee){var Pe,De,Fe=this;this.panels=Ee,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((De=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&De!==void 0?De:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ye){var Qe;ye.uiStyleSettings=Fe.uiStyleSettings;var vt=document.createElement("div");vt.className=Fe.toolboxButtonStyleClass.name+" "+((Qe=Fe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Qe!==void 0?Qe:Fe.toolboxButtonStyleColorsClass.name),vt.innerHTML=ye.icon,vt.title=ye.title,vt.addEventListener("click",function(){Fe.panelButtonClick(ye)}),Fe.panelButtons.push(vt),Fe.buttonRow.appendChild(vt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},We.prototype.panelButtonClick=function(Ee){var Pe=this,De=-1;if(Ee!==this.activePanel){De=this.panels.indexOf(Ee),this.panelRow.innerHTML="";var Fe=Ee.getUi();Fe.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Fe),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=Ee}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Pe.displayMode==="inline"?Pe.panelRow.style.display="none":Pe.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ye,Qe){var vt,Ye;ye.className=Pe.toolboxButtonStyleClass.name+" "+(Qe===De?""+((vt=Pe.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&vt!==void 0?vt:Pe.toolboxActiveButtonStyleColorsClass.name):""+((Ye=Pe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ye!==void 0?Ye:Pe.toolboxButtonStyleColorsClass.name))})},We}(),ne=function(We,Ee){this.title=We,this.icon=Ee},ee=function(We){function Ee(Pe,De,Fe,ye){var Qe=We.call(this,Pe,ye||'<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 Qe.colors=[],Qe.addTransparent=!1,Qe.colorBoxes=[],Qe.colors=De,Qe.currentColor=Fe,Qe.setCurrentColor=Qe.setCurrentColor.bind(Qe),Qe.getColorBox=Qe.getColorBox.bind(Qe),Qe}return Oe(Ee,We),Ee.prototype.getUi=function(){var Pe=this,De=document.createElement("div");return De.style.overflow="hidden",De.style.whiteSpace="nowrap",this.colors.forEach(function(Fe){var ye=Pe.getColorBox(Fe);De.appendChild(ye),Pe.colorBoxes.push(ye)}),De},Ee.prototype.getColorBox=function(Pe){var De=this,Fe=this.uiStyleSettings.toolbarHeight/4,ye=this.uiStyleSettings.toolbarHeight-Fe,Qe=document.createElement("div");Qe.style.display="inline-block",Qe.style.boxSizing="content-box",Qe.style.width=ye-2+"px",Qe.style.height=ye-2+"px",Qe.style.padding="1px",Qe.style.marginRight="2px",Qe.style.marginBottom="2px",Qe.style.borderWidth="2px",Qe.style.borderStyle="solid",Qe.style.borderRadius=(ye+2)/2+"px",Qe.style.borderColor=Pe===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Qe.addEventListener("click",function(){De.setCurrentColor(Pe,Qe)});var vt=document.createElement("div");return vt.style.display="inline-block",vt.style.width=ye-2+"px",vt.style.height=ye-2+"px",vt.style.backgroundColor=Pe,vt.style.borderRadius=ye/2+"px",Pe==="transparent"&&(vt.style.fill=this.uiStyleSettings.toolboxAccentColor,vt.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>`),Qe.appendChild(vt),Qe},Ee.prototype.setCurrentColor=function(Pe,De){var Fe=this;this.currentColor=Pe,this.colorBoxes.forEach(function(ye){ye.style.borderColor=ye===De?Fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Pe)},Ee}(ne),ce=function(){function We(Ee,Pe,De){this._state="new",this._isSelected=!1,this._container=Ee,this._overlayContainer=Pe,this.globalSettings=De,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(We.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),We.prototype.ownsTarget=function(Ee){return!1},Object.defineProperty(We.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),We.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},We.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},We.prototype.pointerDown=function(Ee,Pe){},We.prototype.dblClick=function(Ee,Pe){},We.prototype.manipulate=function(Ee){},We.prototype.pointerUp=function(Ee){this.stateChanged()},We.prototype.dispose=function(){},We.prototype.addMarkerVisualToContainer=function(Ee){this.container.childNodes.length>0?this.container.insertBefore(Ee,this.container.childNodes[0]):this.container.appendChild(Ee)},We.prototype.getState=function(){return{typeName:We.typeName,state:this.state,notes:this.notes}},We.prototype.restoreState=function(Ee){this._state=Ee.state,this.notes=Ee.notes},We.prototype.scale=function(Ee,Pe){},We.prototype.colorChanged=function(Ee){this.onColorChanged&&this.onColorChanged(Ee),this.stateChanged()},We.prototype.fillColorChanged=function(Ee){this.onFillColorChanged&&this.onFillColorChanged(Ee),this.stateChanged()},We.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ee=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ee.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ee)&&this.onStateChanged(this)}},We.typeName="MarkerBase",We}(),se=function(){function We(){this.findGripByVisual=this.findGripByVisual.bind(this)}return We.prototype.findGripByVisual=function(Ee){return this.topLeft.ownsTarget(Ee)?this.topLeft:this.topCenter.ownsTarget(Ee)?this.topCenter:this.topRight.ownsTarget(Ee)?this.topRight:this.centerLeft.ownsTarget(Ee)?this.centerLeft:this.centerRight.ownsTarget(Ee)?this.centerRight:this.bottomLeft.ownsTarget(Ee)?this.bottomLeft:this.bottomCenter.ownsTarget(Ee)?this.bottomCenter:this.bottomRight.ownsTarget(Ee)?this.bottomRight:void 0},We}(),he=function(){function We(){this.GRIP_SIZE=10,this.visual=_e.createGroup(),this.visual.appendChild(_e.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_e.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return We.prototype.ownsTarget=function(Ee){return Ee===this.visual||Ee===this.visual.childNodes[0]||Ee===this.visual.childNodes[1]},We}(),ve=function(){function We(){}return We.toITransformMatrix=function(Ee){return{a:Ee.a,b:Ee.b,c:Ee.c,d:Ee.d,e:Ee.e,f:Ee.f}},We.toSVGMatrix=function(Ee,Pe){return Ee.a=Pe.a,Ee.b=Pe.b,Ee.c=Pe.c,Ee.d=Pe.d,Ee.e=Pe.e,Ee.f=Pe.f,Ee},We}(),be=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.left=0,ye.top=0,ye.width=0,ye.height=0,ye.defaultSize={x:50,y:20},ye.offsetX=0,ye.offsetY=0,ye.rotationAngle=0,ye.CB_DISTANCE=10,ye._suppressMarkerCreateEvent=!1,ye.container.transform.baseVal.appendItem(_e.createTransform()),ye.setupControlBox(),ye}return Oe(Ee,We),Object.defineProperty(Ee.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"visual",{get:function(){return this._visual},set:function(Pe){this._visual=Pe;var De=_e.createTransform();this._visual.transform.baseVal.appendItem(De)},enumerable:!1,configurable:!0}),Ee.prototype.ownsTarget=function(Pe){return!!We.prototype.ownsTarget.call(this,Pe)||!!(this.controlGrips.findGripByVisual(Pe)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Pe))},Ee.prototype.pointerDown=function(Pe,De){We.prototype.pointerDown.call(this,Pe,De),this.state==="new"&&(this.left=Pe.x,this.top=Pe.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Fe=this.unrotatePoint(Pe);if(this.manipulationStartX=Fe.x,this.manipulationStartY=Fe.y,this.offsetX=Fe.x-this.left,this.offsetY=Fe.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(De),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(De)){this.activeGrip=this.rotatorGrip;var ye=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ye.x-this.width/2,this.top=ye.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Qe=this.container.transform.baseVal.getItem(0);Qe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Qe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ee.prototype.pointerUp=function(Pe){var De=this.state;We.prototype.pointerUp.call(this,Pe),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Pe),this._state="select",De==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ee.prototype.moveVisual=function(Pe){this.visual.style.transform="translate("+Pe.x+"px, "+Pe.y+"px)"},Ee.prototype.manipulate=function(Pe){var De=this.unrotatePoint(Pe);this.state==="creating"?this.resize(Pe):this.state==="move"?(this.left=this.manipulationStartLeft+(De.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(De.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(De):this.state==="rotate"&&this.rotate(Pe)},Ee.prototype.resize=function(Pe){var De=this.manipulationStartLeft,Fe=this.manipulationStartWidth,ye=this.manipulationStartTop,Qe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:De=this.manipulationStartLeft+Pe.x-this.manipulationStartX,Fe=this.manipulationStartWidth+this.manipulationStartLeft-De;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Fe=this.manipulationStartWidth+Pe.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ye=this.manipulationStartTop+Pe.y-this.manipulationStartY,Qe=this.manipulationStartHeight+this.manipulationStartTop-ye;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Qe=this.manipulationStartHeight+Pe.y-this.manipulationStartY}Fe>=0?(this.left=De,this.width=Fe):(this.left=De+Fe,this.width=-Fe),Qe>=0?(this.top=ye,this.height=Qe):(this.top=ye+Qe,this.height=-Qe),this.setSize()},Ee.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ee.prototype.rotate=function(Pe){if(Math.abs(Pe.x-this.centerX)>.1){var De=Math.sign(Pe.x-this.centerX);this.rotationAngle=180*Math.atan((Pe.y-this.centerY)/(Pe.x-this.centerX))/Math.PI+90*De,this.applyRotation()}},Ee.prototype.applyRotation=function(){var Pe=this.container.transform.baseVal.getItem(0);Pe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Pe,0)},Ee.prototype.rotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var De=this.container.getCTM(),Fe=_e.createPoint(Pe.x,Pe.y);return{x:(Fe=Fe.matrixTransform(De)).x,y:Fe.y}},Ee.prototype.unrotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var De=this.container.getCTM();De=De.inverse();var Fe=_e.createPoint(Pe.x,Pe.y);return{x:(Fe=Fe.matrixTransform(De)).x,y:Fe.y}},Ee.prototype.select=function(){We.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ee.prototype.deselect=function(){We.prototype.deselect.call(this),this.controlBox.style.display="none"},Ee.prototype.setupControlBox=function(){this.controlBox=_e.createGroup();var Pe=_e.createTransform();Pe.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Pe),this.container.appendChild(this.controlBox),this.controlRect=_e.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=_e.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new se,this.addControlGrips(),this.controlBox.style.display="none"},Ee.prototype.adjustControlBox=function(){var Pe=this.controlBox.transform.baseVal.getItem(0);Pe.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Pe,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},Ee.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()},Ee.prototype.createGrip=function(){var Pe=new he;return Pe.visual.transform.baseVal.appendItem(_e.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},Ee.prototype.positionGrips=function(){var Pe=this.controlGrips.topLeft.GRIP_SIZE,De=-Pe/2,Fe=De,ye=(this.width+this.CB_DISTANCE)/2-Pe/2,Qe=(this.height+this.CB_DISTANCE)/2-Pe/2,vt=this.height+this.CB_DISTANCE-Pe/2,Ye=this.width+this.CB_DISTANCE-Pe/2;this.positionGrip(this.controlGrips.topLeft.visual,De,Fe),this.positionGrip(this.controlGrips.topCenter.visual,ye,Fe),this.positionGrip(this.controlGrips.topRight.visual,Ye,Fe),this.positionGrip(this.controlGrips.centerLeft.visual,De,Qe),this.positionGrip(this.controlGrips.centerRight.visual,Ye,Qe),this.positionGrip(this.controlGrips.bottomLeft.visual,De,vt),this.positionGrip(this.controlGrips.bottomCenter.visual,ye,vt),this.positionGrip(this.controlGrips.bottomRight.visual,Ye,vt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ye,Fe-3*this.CB_DISTANCE)},Ee.prototype.positionGrip=function(Pe,De,Fe){var ye=Pe.transform.baseVal.getItem(0);ye.setTranslate(De,Fe),Pe.transform.baseVal.replaceItem(ye,0)},Ee.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ee.prototype.showControlBox=function(){this.controlBox.style.display=""},Ee.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ve.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ve.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},We.prototype.getState.call(this))},Ee.prototype.restoreState=function(Pe){We.prototype.restoreState.call(this,Pe);var De=Pe;this.left=De.left,this.top=De.top,this.width=De.width,this.height=De.height,this.rotationAngle=De.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,De.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,De.containerTransformMatrix))},Ee.prototype.scale=function(Pe,De){We.prototype.scale.call(this,Pe,De);var Fe=this.rotatePoint({x:this.left,y:this.top}),ye=this.unrotatePoint({x:Fe.x*Pe,y:Fe.y*De});this.left=ye.x,this.top=ye.y,this.width=this.width*Pe,this.height=this.height*De,this.adjustControlBox()},Ee}(ce),ke=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.fillColor="transparent",ye.strokeColor="transparent",ye.strokeWidth=0,ye.strokeDasharray="",ye.opacity=1,ye.setStrokeColor=ye.setStrokeColor.bind(ye),ye.setFillColor=ye.setFillColor.bind(ye),ye.setStrokeWidth=ye.setStrokeWidth.bind(ye),ye.setStrokeDasharray=ye.setStrokeDasharray.bind(ye),ye.createVisual=ye.createVisual.bind(ye),ye}return Oe(Ee,We),Ee.prototype.ownsTarget=function(Pe){return!(!We.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},Ee.prototype.createVisual=function(){this.visual=_e.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)},Ee.prototype.pointerDown=function(Pe,De){We.prototype.pointerDown.call(this,Pe,De),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ee.prototype.manipulate=function(Pe){We.prototype.manipulate.call(this,Pe)},Ee.prototype.resize=function(Pe){We.prototype.resize.call(this,Pe),this.setSize()},Ee.prototype.setSize=function(){We.prototype.setSize.call(this),_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ee.prototype.pointerUp=function(Pe){We.prototype.pointerUp.call(this,Pe),this.setSize()},Ee.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&_e.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ee.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&_e.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ee.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&_e.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ee.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&_e.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ee.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},We.prototype.getState.call(this))},Ee.prototype.restoreState=function(Pe){var De=Pe;this.fillColor=De.fillColor,this.strokeColor=De.strokeColor,this.strokeWidth=De.strokeWidth,this.strokeDasharray=De.strokeDasharray,this.opacity=De.opacity,this.createVisual(),We.prototype.restoreState.call(this,Pe),this.setSize()},Ee.prototype.scale=function(Pe,De){We.prototype.scale.call(this,Pe,De),this.setSize()},Ee.title="Rectangle marker",Ee}(be),Ae=function(We){function Ee(Pe,De,Fe,ye){var Qe=We.call(this,Pe,ye||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Qe.widths=[],Qe.widthBoxes=[],Qe.widths=De,Qe.currentWidth=Fe,Qe.setCurrentWidth=Qe.setCurrentWidth.bind(Qe),Qe}return Oe(Ee,We),Ee.prototype.getUi=function(){var Pe=this,De=document.createElement("div");return De.style.display="flex",De.style.overflow="hidden",De.style.flexGrow="2",this.widths.forEach(function(Fe){var ye=document.createElement("div");ye.style.display="flex",ye.style.flexGrow="2",ye.style.alignItems="center",ye.style.justifyContent="space-between",ye.style.padding="5px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderColor=Fe===Pe.currentWidth?Pe.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){Pe.setCurrentWidth(Fe,ye)}),De.appendChild(ye);var Qe=document.createElement("div");Qe.innerText=Fe.toString(),Qe.style.marginRight="5px",ye.appendChild(Qe);var vt=document.createElement("div");vt.style.minHeight="20px",vt.style.flexGrow="2",vt.style.display="flex",vt.style.alignItems="center";var Ye=document.createElement("hr");Ye.style.minWidth="20px",Ye.style.border="0px",Ye.style.borderTop=Fe+"px solid "+Pe.uiStyleSettings.toolboxColor,Ye.style.flexGrow="2",vt.appendChild(Ye),ye.appendChild(vt),Pe.widthBoxes.push(ye)}),De},Ee.prototype.setCurrentWidth=function(Pe,De){var Fe=this;this.currentWidth=Pe,this.widthBoxes.forEach(function(ye){ye.style.borderColor=ye===De?Fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ee}(ne),ze=function(We){function Ee(Pe,De,Fe,ye){var Qe=We.call(this,Pe,ye||'<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 Qe.styles=[],Qe.styleBoxes=[],Qe.styles=De,Qe.currentStyle=Fe,Qe.setCurrentStyle=Qe.setCurrentStyle.bind(Qe),Qe}return Oe(Ee,We),Ee.prototype.getUi=function(){var Pe=this,De=document.createElement("div");return De.style.display="flex",De.style.overflow="hidden",De.style.flexGrow="2",this.styles.forEach(function(Fe){var ye=document.createElement("div");ye.style.display="flex",ye.style.alignItems="center",ye.style.justifyContent="space-between",ye.style.padding="5px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.overflow="hidden",ye.style.maxWidth=100/Pe.styles.length-5+"%",ye.style.borderColor=Fe===Pe.currentStyle?Pe.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){Pe.setCurrentStyle(Fe,ye)}),De.appendChild(ye);var Qe=document.createElement("div");Qe.style.minHeight="20px",Qe.style.flexGrow="2",Qe.style.overflow="hidden";var vt=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Pe.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Fe!==""?'stroke-dasharray="'+Fe+'"':"")+` />
</svg>`;Qe.innerHTML=vt,ye.appendChild(Qe),Pe.styleBoxes.push(ye)}),De},Ee.prototype.setCurrentStyle=function(Pe,De){var Fe=this;this.currentStyle=Pe,this.styleBoxes.forEach(function(ye){ye.style.borderColor=ye===De?Fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ee}(ne),Ze=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.strokeColor=Fe.defaultColor,ye.strokeWidth=Fe.defaultStrokeWidth,ye.strokeDasharray=Fe.defaultStrokeDasharray,ye.strokePanel=new ee("Line color",Fe.defaultColorSet,Fe.defaultColor),ye.strokePanel.onColorChanged=ye.setStrokeColor,ye.strokeWidthPanel=new Ae("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),ye.strokeWidthPanel.onWidthChanged=ye.setStrokeWidth,ye.strokeStylePanel=new ze("Line style",Fe.defaultStrokeDasharrays,Fe.defaultStrokeDasharray),ye.strokeStylePanel.onStyleChanged=ye.setStrokeDasharray,ye}return Oe(Ee,We),Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=We.prototype.getState.call(this);return Pe.typeName=Ee.typeName,Pe},Ee.typeName="FrameMarker",Ee.title="Frame marker",Ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ee}(ke),ot=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"},qe=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.x1=0,ye.y1=0,ye.x2=0,ye.y2=0,ye.defaultLength=50,ye.manipulationStartX=0,ye.manipulationStartY=0,ye.manipulationStartX1=0,ye.manipulationStartY1=0,ye.manipulationStartX2=0,ye.manipulationStartY2=0,ye.setupControlBox(),ye}return Oe(Ee,We),Ee.prototype.ownsTarget=function(Pe){return!!We.prototype.ownsTarget.call(this,Pe)||!(!this.grip1.ownsTarget(Pe)&&!this.grip2.ownsTarget(Pe))},Ee.prototype.pointerDown=function(Pe,De){We.prototype.pointerDown.call(this,Pe,De),this.manipulationStartX=Pe.x,this.manipulationStartY=Pe.y,this.state==="new"&&(this.x1=Pe.x,this.y1=Pe.y,this.x2=Pe.x,this.y2=Pe.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(De)?this.activeGrip=this.grip1:this.grip2.ownsTarget(De)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ee.prototype.pointerUp=function(Pe){var De=this.state;We.prototype.pointerUp.call(this,Pe),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Pe),this._state="select",De==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ee.prototype.adjustVisual=function(){},Ee.prototype.manipulate=function(Pe){this.state==="creating"?this.resize(Pe):this.state==="move"?(this.x1=this.manipulationStartX1+Pe.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Pe.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Pe.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Pe.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Pe)},Ee.prototype.resize=function(Pe){switch(this.activeGrip){case this.grip1:this.x1=Pe.x,this.y1=Pe.y;break;case this.grip2:case void 0:this.x2=Pe.x,this.y2=Pe.y}this.adjustVisual(),this.adjustControlBox()},Ee.prototype.select=function(){We.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ee.prototype.deselect=function(){We.prototype.deselect.call(this),this.controlBox.style.display="none"},Ee.prototype.setupControlBox=function(){this.controlBox=_e.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ee.prototype.adjustControlBox=function(){this.positionGrips()},Ee.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ee.prototype.createGrip=function(){var Pe=new he;return Pe.visual.transform.baseVal.appendItem(_e.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},Ee.prototype.positionGrips=function(){var Pe=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Pe/2,this.y1-Pe/2),this.positionGrip(this.grip2.visual,this.x2-Pe/2,this.y2-Pe/2)},Ee.prototype.positionGrip=function(Pe,De,Fe){var ye=Pe.transform.baseVal.getItem(0);ye.setTranslate(De,Fe),Pe.transform.baseVal.replaceItem(ye,0)},Ee.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},We.prototype.getState.call(this))},Ee.prototype.restoreState=function(Pe){We.prototype.restoreState.call(this,Pe);var De=Pe;this.x1=De.x1,this.y1=De.y1,this.x2=De.x2,this.y2=De.y2},Ee.prototype.scale=function(Pe,De){We.prototype.scale.call(this,Pe,De),this.x1=this.x1*Pe,this.y1=this.y1*De,this.x2=this.x2*Pe,this.y2=this.y2*De,this.adjustVisual(),this.adjustControlBox()},Ee}(ce),bt=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.strokeColor="transparent",ye.strokeWidth=0,ye.strokeDasharray="",ye.setStrokeColor=ye.setStrokeColor.bind(ye),ye.setStrokeWidth=ye.setStrokeWidth.bind(ye),ye.setStrokeDasharray=ye.setStrokeDasharray.bind(ye),ye.strokeColor=Fe.defaultColor,ye.strokeWidth=Fe.defaultStrokeWidth,ye.strokeDasharray=Fe.defaultStrokeDasharray,ye.strokePanel=new ee("Line color",Fe.defaultColorSet,Fe.defaultColor),ye.strokePanel.onColorChanged=ye.setStrokeColor,ye.strokeWidthPanel=new Ae("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),ye.strokeWidthPanel.onWidthChanged=ye.setStrokeWidth,ye.strokeStylePanel=new ze("Line style",Fe.defaultStrokeDasharrays,Fe.defaultStrokeDasharray),ye.strokeStylePanel.onStyleChanged=ye.setStrokeDasharray,ye}return Oe(Ee,We),Ee.prototype.ownsTarget=function(Pe){return!(!We.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorLine&&Pe!==this.visibleLine)},Ee.prototype.createVisual=function(){this.visual=_e.createGroup(),this.selectorLine=_e.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=_e.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)},Ee.prototype.pointerDown=function(Pe,De){We.prototype.pointerDown.call(this,Pe,De),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ee.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()),_e.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),_e.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ee.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},Ee.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},Ee.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},We.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){We.prototype.restoreState.call(this,Pe);var De=Pe;this.strokeColor=De.strokeColor,this.strokeWidth=De.strokeWidth,this.strokeDasharray=De.strokeDasharray,this.createVisual(),this.adjustVisual()},Ee.typeName="LineMarker",Ee.title="Line marker",Ee.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ee}(qe),He=function(We){function Ee(Pe,De,Fe,ye){var Qe=We.call(this,Pe,ye||'<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 Qe.fonts=[],Qe.fontBoxes=[],Qe.fonts=De,Qe.currentFont=Fe,Qe.setCurrentFont=Qe.setCurrentFont.bind(Qe),Qe}return Oe(Ee,We),Ee.prototype.getUi=function(){var Pe=this,De=document.createElement("div");return De.style.overflow="hidden",De.style.flexGrow="2",this.fonts.forEach(function(Fe){var ye=document.createElement("div");ye.style.display="inline-block",ye.style.alignItems="center",ye.style.justifyContent="space-between",ye.style.padding="5px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.overflow="hidden",ye.style.maxWidth=100/Pe.fonts.length-5+"%",ye.style.borderColor=Fe===Pe.currentFont?Pe.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){Pe.setCurrentFont(Fe,ye)}),De.appendChild(ye);var Qe=document.createElement("div");Qe.style.display="flex",Qe.style.minHeight="20px",Qe.style.flexGrow="2",Qe.style.fontFamily=Fe,Qe.style.overflow="hidden";var vt=document.createElement("div");vt.style.whiteSpace="nowrap",vt.style.overflow="hidden",vt.style.textOverflow="ellipsis",vt.innerHTML="The quick brown fox jumps over the lazy dog",Qe.appendChild(vt),ye.appendChild(Qe),Pe.fontBoxes.push(ye)}),De},Ee.prototype.setCurrentFont=function(Pe,De){var Fe=this;this.currentFont=Pe,this.fontBoxes.forEach(function(ye){ye.style.borderColor=ye===De?Fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ee}(ne),wt=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.color="transparent",ye.padding=5,ye.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ye.text=ye.DEFAULT_TEXT,ye.isMoved=!1,ye.color=Fe.defaultColor,ye.fontFamily=Fe.defaultFontFamily,ye.defaultSize={x:100,y:30},ye.setColor=ye.setColor.bind(ye),ye.setFont=ye.setFont.bind(ye),ye.renderText=ye.renderText.bind(ye),ye.sizeText=ye.sizeText.bind(ye),ye.textEditDivClicked=ye.textEditDivClicked.bind(ye),ye.showTextEditor=ye.showTextEditor.bind(ye),ye.setSize=ye.setSize.bind(ye),ye.positionTextEditor=ye.positionTextEditor.bind(ye),ye.colorPanel=new ee("Color",Fe.defaultColorSet,Fe.defaultColor),ye.colorPanel.onColorChanged=ye.setColor,ye.fontFamilyPanel=new He("Font",Fe.defaultFontFamilies,Fe.defaultFontFamily),ye.fontFamilyPanel.onFontChanged=ye.setFont,ye}return Oe(Ee,We),Ee.prototype.ownsTarget=function(Pe){if(We.prototype.ownsTarget.call(this,Pe)||Pe===this.visual||Pe===this.textElement||Pe===this.bgRectangle)return!0;var De=!1;return this.textElement.childNodes.forEach(function(Fe){Fe===Pe&&(De=!0)}),De},Ee.prototype.createVisual=function(){this.visual=_e.createGroup(),this.bgRectangle=_e.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=_e.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(_e.createTransform()),this.textElement.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ee.prototype.pointerDown=function(Pe,De){We.prototype.pointerDown.call(this,Pe,De),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ee.prototype.renderText=function(){var Pe=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(De){Pe.textElement.appendChild(_e.createTSpan(De.trim()===""?" ":De.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ee.prototype.getTextScale=function(){var Pe=this.textElement.getBBox(),De=1;if(Pe.width>0&&Pe.height>0){var Fe=(1*this.width-this.width*this.padding*2/100)/Pe.width,ye=(1*this.height-this.height*this.padding*2/100)/Pe.height;De=Math.min(Fe,ye)}return De},Ee.prototype.getTextPosition=function(Pe){var De=this.textElement.getBBox(),Fe=0,ye=0;return De.width>0&&De.height>0&&(Fe=(this.width-De.width*Pe)/2,ye=this.height/2-De.height*Pe/2),{x:Fe,y:ye}},Ee.prototype.sizeText=function(){var Pe=this.textElement.getBBox(),De=this.getTextScale(),Fe=this.getTextPosition(De);Fe.y-=Pe.y*De,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Fe.x+"px, "+Fe.y+"px) scale("+De+", "+De+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Fe.x,Fe.y),this.textElement.transform.baseVal.getItem(1).setScale(De,De))},Ee.prototype.manipulate=function(Pe){We.prototype.manipulate.call(this,Pe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Pe.x-this.pointerDownPoint.x)>5||Math.abs(Pe.y-this.pointerDownPoint.y)>5)},Ee.prototype.resize=function(Pe){We.prototype.resize.call(this,Pe),this.isMoved=!0,this.setSize(),this.sizeText()},Ee.prototype.setSize=function(){We.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ee.prototype.pointerUp=function(Pe){var De=this.state;De==="creating"&&(this._suppressMarkerCreateEvent=!0),We.prototype.pointerUp.call(this,Pe),this.setSize(),(De==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ee.prototype.showTextEditor=function(){var Pe=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(De){De.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var De=Number.parseFloat(Pe.textEditor.style.fontSize);Pe.textEditor.clientWidth>=Number.parseInt(Pe.textEditor.style.maxWidth)&&De>.9;)De-=.1,Pe.textEditor.style.fontSize=Math.max(De,.9)+"em"}),this.textEditor.addEventListener("keyup",function(De){De.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(De){if(De.clipboardData){var Fe=De.clipboardData.getData("text"),ye=window.getSelection();if(!ye.rangeCount)return!1;ye.deleteFromDocument(),ye.getRangeAt(0).insertNode(document.createTextNode(Fe)),De.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Pe.textEditDivClicked(Pe.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Ee.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Pe=this.getTextScale(),De=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Fe=this.textElement.getBBox(),ye={x:Fe.width*Pe,y:Fe.height*Pe};De.x-=ye.x/2,De.y-=ye.y/2,this.textEditor.style.top=De.y+"px",this.textEditor.style.left=De.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-De.x+"px",this.textEditor.style.fontSize=Math.max(16*Pe,12)+"px",this.textElement.style.display="none"}},Ee.prototype.textEditDivClicked=function(Pe){this.text=Pe.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Ee.prototype.select=function(){We.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ee.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),We.prototype.deselect.call(this)},Ee.prototype.dblClick=function(Pe,De){We.prototype.dblClick.call(this,Pe,De),this.showTextEditor()},Ee.prototype.setColor=function(Pe){this.textElement&&_e.setAttributes(this.textElement,[["fill",Pe]]),this.color=Pe,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Pe)},Ee.prototype.setFont=function(Pe){this.textElement&&_e.setAttributes(this.textElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ee.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ee.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},We.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){var De=Pe;this.color=De.color,this.fontFamily=De.fontFamily,this.padding=De.padding,this.text=De.text,this.createVisual(),We.prototype.restoreState.call(this,Pe),this.setSize()},Ee.prototype.scale=function(Pe,De){We.prototype.scale.call(this,Pe,De),this.setSize(),this.sizeText(),this.positionTextEditor()},Ee.typeName="TextMarker",Ee.title="Text marker",Ee.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>',Ee}(be),nt=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.color="transparent",ye.lineWidth=3,ye.drawing=!1,ye.pixelRatio=1,ye.color=Fe.defaultColor,ye.lineWidth=Fe.defaultStrokeWidth,ye.pixelRatio=Fe.freehandPixelRatio,ye.setColor=ye.setColor.bind(ye),ye.addCanvas=ye.addCanvas.bind(ye),ye.finishCreation=ye.finishCreation.bind(ye),ye.setLineWidth=ye.setLineWidth.bind(ye),ye.colorPanel=new ee("Color",Fe.defaultColorSet,Fe.defaultColor),ye.colorPanel.onColorChanged=ye.setColor,ye.lineWidthPanel=new Ae("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),ye.lineWidthPanel.onWidthChanged=ye.setLineWidth,ye}return Oe(Ee,We),Ee.prototype.ownsTarget=function(Pe){return!(!We.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.drawingImage)},Ee.prototype.createVisual=function(){this.visual=_e.createGroup(),this.drawingImage=_e.createImage(),this.visual.appendChild(this.drawingImage);var Pe=_e.createTransform();this.visual.transform.baseVal.appendItem(Pe),this.addMarkerVisualToContainer(this.visual)},Ee.prototype.pointerDown=function(Pe,De){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Pe.x,Pe.y),this.drawing=!0):We.prototype.pointerDown.call(this,Pe,De)},Ee.prototype.manipulate=function(Pe){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Pe.x,Pe.y),this.canvasContext.stroke()):We.prototype.manipulate.call(this,Pe)},Ee.prototype.resize=function(Pe){We.prototype.resize.call(this,Pe),_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ee.prototype.pointerUp=function(Pe){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):We.prototype.pointerUp.call(this,Pe)},Ee.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)},Ee.prototype.select=function(){this.state==="creating"&&this.finishCreation(),We.prototype.select.call(this)},Ee.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),We.prototype.deselect.call(this)},Ee.prototype.finishCreation=function(){for(var Pe=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),De=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Fe=De[0],ye=De[1],Qe=De[2],vt=De[3],Ye=!1,Je=0;Je<this.canvasElement.height;Je++)for(var yt=0;yt<this.canvasElement.width;yt++)Pe.data[Je*this.canvasElement.width*4+4*yt+3]>0&&(Ye=!0,Je<ye&&(ye=Je),yt<Fe&&(Fe=yt),Je>vt&&(vt=Je),yt>Qe&&(Qe=yt));if(Ye){this.left=Fe/this.pixelRatio,this.top=ye/this.pixelRatio,this.width=(Qe-Fe)/this.pixelRatio,this.height=(vt-ye)/this.pixelRatio;var St=document.createElement("canvas");St.width=Qe-Fe,St.height=vt-ye,St.getContext("2d").putImageData(this.canvasContext.getImageData(Fe,ye,Qe-Fe,vt-ye),0,0),this.drawingImgUrl=St.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ee.prototype.setDrawingImage=function(){_e.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ee.prototype.setColor=function(Pe){this.color=Pe,this.colorChanged(Pe)},Ee.prototype.setLineWidth=function(Pe){this.lineWidth=Pe},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({drawingImgUrl:this.drawingImgUrl},We.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){this.createVisual(),We.prototype.restoreState.call(this,Pe),this.drawingImgUrl=Pe.drawingImgUrl,this.setDrawingImage()},Ee.prototype.scale=function(Pe,De){We.prototype.scale.call(this,Pe,De),this.setDrawingImage()},Ee.typeName="FreehandMarker",Ee.title="Freehand marker",Ee.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>',Ee}(be),Dt=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,Fe||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ye.typeBoxes=[],ye.currentType=De,ye.setCurrentType=ye.setCurrentType.bind(ye),ye}return Oe(Ee,We),Ee.prototype.getUi=function(){var Pe=this,De=document.createElement("div");De.style.display="flex",De.style.overflow="hidden",De.style.flexGrow="2";for(var Fe=function(vt){var Ye="both";switch(vt){case 0:Ye="both";break;case 1:Ye="start";break;case 2:Ye="end";break;case 3:Ye="none"}var Je=document.createElement("div");if(Je.style.display="flex",Je.style.flexGrow="2",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.borderColor=Ye===ye.currentType?ye.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Pe.setCurrentType(Ye,Je)}),De.appendChild(Je),Ye==="both"||Ye==="start"){var yt=document.createElement("div");yt.style.display="flex",yt.style.alignItems="center",yt.style.minHeight="20px",yt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(ye.uiStyleSettings!==void 0?ye.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,yt.style.marginLeft="5px",Je.appendChild(yt)}var St=document.createElement("div");St.style.display="flex",St.style.alignItems="center",St.style.minHeight="20px",St.style.flexGrow="2";var rt=document.createElement("hr");if(rt.style.minWidth="20px",rt.style.border="0px",rt.style.borderTop="3px solid "+(ye.uiStyleSettings!==void 0?ye.uiStyleSettings.toolboxColor:"#eeeeee"),rt.style.flexGrow="2",St.appendChild(rt),Je.appendChild(St),Ye==="both"||Ye==="end"){var Zt=document.createElement("div");Zt.style.display="flex",Zt.style.alignItems="center",Zt.style.minHeight="20px",Zt.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="`+(ye.uiStyleSettings!==void 0?ye.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Zt.style.marginRight="5px",Je.appendChild(Zt)}ye.typeBoxes.push(Je)},ye=this,Qe=0;Qe<4;Qe++)Fe(Qe);return De},Ee.prototype.setCurrentType=function(Pe,De){var Fe=this;this.currentType=Pe,this.typeBoxes.forEach(function(ye){ye.style.borderColor=ye===De?Fe.uiStyleSettings!==void 0?Fe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ee}(ne),ht=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.arrowType="end",ye.arrowBaseHeight=10,ye.arrowBaseWidth=10,ye.getArrowPoints=ye.getArrowPoints.bind(ye),ye.setArrowType=ye.setArrowType.bind(ye),ye.arrowTypePanel=new Dt("Arrow type","end"),ye.arrowTypePanel.onArrowTypeChanged=ye.setArrowType,ye}return Oe(Ee,We),Ee.prototype.ownsTarget=function(Pe){return!(!We.prototype.ownsTarget.call(this,Pe)&&Pe!==this.arrow1&&Pe!==this.arrow2)},Ee.prototype.getArrowPoints=function(Pe,De){var Fe=this.arrowBaseWidth+2*this.strokeWidth,ye=this.arrowBaseHeight+2*this.strokeWidth;return Pe-Fe/2+","+(De+ye/2)+" "+Pe+","+(De-ye/2)+" "+(Pe+Fe/2)+","+(De+ye/2)},Ee.prototype.createTips=function(){this.arrow1=_e.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=_e.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.arrow2)},Ee.prototype.pointerDown=function(Pe,De){We.prototype.pointerDown.call(this,Pe,De),this.state==="creating"&&this.createTips()},Ee.prototype.adjustVisual=function(){if(We.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",_e.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),_e.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Pe=0;Math.abs(this.x1-this.x2)>.1&&(Pe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var De=this.arrow1.transform.baseVal.getItem(0);De.setRotate(Pe,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(De,0);var Fe=this.arrow2.transform.baseVal.getItem(0);Fe.setRotate(Pe+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Fe,0)}},Ee.prototype.setArrowType=function(Pe){this.arrowType=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({arrowType:this.arrowType},We.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){We.prototype.restoreState.call(this,Pe);var De=Pe;this.arrowType=De.arrowType,this.createTips(),this.adjustVisual()},Ee.typeName="ArrowMarker",Ee.title="Arrow marker",Ee.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ee}(bt),zt=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.fillColor=Fe.defaultFillColor,ye.strokeWidth=0,ye.fillPanel=new ee("Color",Fe.defaultColorSet,Fe.defaultFillColor),ye.fillPanel.onColorChanged=ye.setFillColor,ye}return Oe(Ee,We),Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=We.prototype.getState.call(this);return Pe.typeName=Ee.typeName,Pe},Ee.typeName="CoverMarker",Ee.title="Cover marker",Ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ee}(ke),Yt=function(We){function Ee(Pe,De,Fe,ye){var Qe=We.call(this,Pe,ye||'<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 Qe.opacities=[],Qe.opacityBoxes=[],Qe.opacities=De,Qe.currentOpacity=Fe,Qe.setCurrentOpacity=Qe.setCurrentOpacity.bind(Qe),Qe}return Oe(Ee,We),Ee.prototype.getUi=function(){var Pe=this,De=document.createElement("div");return De.style.display="flex",De.style.overflow="hidden",De.style.flexGrow="2",De.style.justifyContent="space-between",this.opacities.forEach(function(Fe){var ye=document.createElement("div");ye.style.display="flex",ye.style.alignItems="center",ye.style.justifyContent="center",ye.style.padding="5px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderColor=Fe===Pe.currentOpacity?Pe.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){Pe.setCurrentOpacity(Fe,ye)}),De.appendChild(ye);var Qe=document.createElement("div");Qe.innerText=100*Fe+"%",ye.appendChild(Qe),Pe.opacityBoxes.push(ye)}),De},Ee.prototype.setCurrentOpacity=function(Pe,De){var Fe=this;this.currentOpacity=Pe,this.opacityBoxes.forEach(function(ye){ye.style.borderColor=ye===De?Fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ee}(ne),Ut=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.setOpacity=ye.setOpacity.bind(ye),ye.fillColor=Fe.defaultHighlightColor,ye.strokeWidth=0,ye.opacity=Fe.defaultHighlightOpacity,ye.fillPanel=new ee("Color",Fe.defaultColorSet,ye.fillColor),ye.fillPanel.onColorChanged=ye.setFillColor,ye.opacityPanel=new Yt("Opacity",Fe.defaultOpacitySteps,ye.opacity),ye.opacityPanel.onOpacityChanged=ye.setOpacity,ye}return Oe(Ee,We),Ee.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&_e.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=We.prototype.getState.call(this);return Pe.typeName=Ee.typeName,Pe},Ee.typeName="HighlightMarker",Ee.title="Highlight marker",Ee.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>',Ee}(zt),it='<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>',Ve='<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>',Wt=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.bgColor="transparent",ye.tipPosition={x:0,y:0},ye.tipBase1Position={x:0,y:0},ye.tipBase2Position={x:0,y:0},ye.tipMoving=!1,ye.color=Fe.defaultStrokeColor,ye.bgColor=Fe.defaultFillColor,ye.fontFamily=Fe.defaultFontFamily,ye.defaultSize={x:100,y:30},ye.setBgColor=ye.setBgColor.bind(ye),ye.getTipPoints=ye.getTipPoints.bind(ye),ye.positionTip=ye.positionTip.bind(ye),ye.setTipPoints=ye.setTipPoints.bind(ye),ye.colorPanel=new ee("Text color",Fe.defaultColorSet,ye.color,it),ye.colorPanel.onColorChanged=ye.setColor,ye.bgColorPanel=new ee("Fill color",Fe.defaultColorSet,ye.bgColor,Ve),ye.bgColorPanel.onColorChanged=ye.setBgColor,ye.fontFamilyPanel=new He("Font",Fe.defaultFontFamilies,Fe.defaultFontFamily),ye.fontFamilyPanel.onFontChanged=ye.setFont,ye.tipGrip=new he,ye.tipGrip.visual.transform.baseVal.appendItem(_e.createTransform()),ye.controlBox.appendChild(ye.tipGrip.visual),ye}return Oe(Ee,We),Ee.prototype.ownsTarget=function(Pe){return We.prototype.ownsTarget.call(this,Pe)||this.tipGrip.ownsTarget(Pe)||this.tip===Pe},Ee.prototype.createTip=function(){_e.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=_e.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ee.prototype.pointerDown=function(Pe,De){this.state==="new"&&We.prototype.pointerDown.call(this,Pe,De),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(De)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):We.prototype.pointerDown.call(this,Pe,De)},Ee.prototype.pointerUp=function(Pe){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,We.prototype.pointerUp.call(this,Pe);else{var De=this.state==="creating";We.prototype.pointerUp.call(this,Pe),this.setTipPoints(De),this.positionTip()}},Ee.prototype.manipulate=function(Pe){if(this.tipMoving){var De=this.unrotatePoint(Pe);this.tipPosition={x:De.x-this.manipulationStartLeft,y:De.y-this.manipulationStartTop},this.positionTip()}else We.prototype.manipulate.call(this,Pe)},Ee.prototype.setBgColor=function(Pe){this.bgRectangle&&this.tip&&(_e.setAttributes(this.bgRectangle,[["fill",Pe]]),_e.setAttributes(this.tip,[["fill",Pe]])),this.bgColor=Pe,this.fillColorChanged(Pe)},Ee.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},Ee.prototype.setTipPoints=function(Pe){Pe===void 0&&(Pe=!1);var De=Math.min(this.height/2,15),Fe=this.height/5;Pe&&(this.tipPosition={x:De+Fe/2,y:this.height+20});var ye=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ye<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Fe=this.width/5,De=Math.min(this.width/2,15),this.tipBase1Position={x:De,y:0},this.tipBase2Position={x:De+Fe,y:0}):(this.tipBase1Position={x:0,y:De},this.tipBase2Position={x:0,y:De+Fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ye<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Fe=this.width/5,De=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-De-Fe,y:0},this.tipBase2Position={x:this.width-De,y:0}):(this.tipBase1Position={x:this.width,y:De},this.tipBase2Position={x:this.width,y:De+Fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ye<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Fe=this.width/5,De=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-De-Fe,y:this.height},this.tipBase2Position={x:this.width-De,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-De-Fe},this.tipBase2Position={x:this.width,y:this.height-De}):ye<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Fe=this.width/5,De=Math.min(this.width/2,15),this.tipBase1Position={x:De,y:this.height},this.tipBase2Position={x:De+Fe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-De},this.tipBase2Position={x:0,y:this.height-De-Fe})},Ee.prototype.resize=function(Pe){We.prototype.resize.call(this,Pe),this.positionTip()},Ee.prototype.positionTip=function(){_e.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Pe=this.tipGrip.visual.transform.baseVal.getItem(0);Pe.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Pe,0)},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ee.prototype.select=function(){this.positionTip(),We.prototype.select.call(this)},Ee.prototype.getState=function(){var Pe=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},We.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){var De=Pe;this.bgColor=De.bgColor,this.tipPosition=De.tipPosition,We.prototype.restoreState.call(this,Pe),this.createTip(),this.setTipPoints()},Ee.prototype.scale=function(Pe,De){We.prototype.scale.call(this,Pe,De),this.tipPosition={x:this.tipPosition.x*Pe,y:this.tipPosition.y*De},this.positionTip()},Ee.typeName="CalloutMarker",Ee.title="Callout marker",Ee.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>',Ee}(wt),Ln=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.fillColor="transparent",ye.strokeColor="transparent",ye.strokeWidth=0,ye.strokeDasharray="",ye.opacity=1,ye.strokeColor=Fe.defaultColor,ye.strokeWidth=Fe.defaultStrokeWidth,ye.strokeDasharray=Fe.defaultStrokeDasharray,ye.fillColor=Fe.defaultFillColor,ye.setStrokeColor=ye.setStrokeColor.bind(ye),ye.setFillColor=ye.setFillColor.bind(ye),ye.setStrokeWidth=ye.setStrokeWidth.bind(ye),ye.setStrokeDasharray=ye.setStrokeDasharray.bind(ye),ye.setOpacity=ye.setOpacity.bind(ye),ye.createVisual=ye.createVisual.bind(ye),ye.strokePanel=new ee("Line color",Ge(Fe.defaultColorSet,["transparent"]),Fe.defaultColor),ye.strokePanel.onColorChanged=ye.setStrokeColor,ye.fillPanel=new ee("Fill color",Ge(Fe.defaultColorSet,["transparent"]),ye.fillColor,Ve),ye.fillPanel.onColorChanged=ye.setFillColor,ye.strokeWidthPanel=new Ae("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),ye.strokeWidthPanel.onWidthChanged=ye.setStrokeWidth,ye.strokeStylePanel=new ze("Line style",Fe.defaultStrokeDasharrays,Fe.defaultStrokeDasharray),ye.strokeStylePanel.onStyleChanged=ye.setStrokeDasharray,ye.opacityPanel=new Yt("Opacity",Fe.defaultOpacitySteps,ye.opacity),ye.opacityPanel.onOpacityChanged=ye.setOpacity,ye}return Oe(Ee,We),Ee.prototype.ownsTarget=function(Pe){return!(!We.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},Ee.prototype.createVisual=function(){this.visual=_e.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)},Ee.prototype.pointerDown=function(Pe,De){We.prototype.pointerDown.call(this,Pe,De),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ee.prototype.manipulate=function(Pe){We.prototype.manipulate.call(this,Pe)},Ee.prototype.resize=function(Pe){We.prototype.resize.call(this,Pe),this.setSize()},Ee.prototype.setSize=function(){We.prototype.setSize.call(this),_e.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ee.prototype.pointerUp=function(Pe){We.prototype.pointerUp.call(this,Pe),this.setSize()},Ee.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&_e.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ee.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&_e.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},Ee.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&_e.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ee.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&_e.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ee.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&_e.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},We.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){var De=Pe;this.fillColor=De.fillColor,this.strokeColor=De.strokeColor,this.strokeWidth=De.strokeWidth,this.strokeDasharray=De.strokeDasharray,this.opacity=De.opacity,this.createVisual(),We.prototype.restoreState.call(this,Pe),this.setSize()},Ee.prototype.scale=function(Pe,De){We.prototype.scale.call(this,Pe,De),this.setSize()},Ee.typeName="EllipseMarker",Ee.title="Ellipse marker",Ee.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>',Ee}(be),Nn=function(We){function Ee(Pe,De,Fe){return We.call(this,Pe,De,Fe)||this}return Oe(Ee,We),Object.defineProperty(Ee.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ee.prototype.ownsTarget=function(Pe){return!(!We.prototype.ownsTarget.call(this,Pe)&&Pe!==this.tip1&&Pe!==this.tip2)},Ee.prototype.createTips=function(){this.tip1=_e.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(_e.createTransform()),this.visual.appendChild(this.tip1),this.tip2=_e.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(_e.createTransform()),this.visual.appendChild(this.tip2)},Ee.prototype.pointerDown=function(Pe,De){We.prototype.pointerDown.call(this,Pe,De),this.state==="creating"&&this.createTips()},Ee.prototype.adjustVisual=function(){if(We.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(_e.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()]]),_e.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Pe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),De=this.tip1.transform.baseVal.getItem(0);De.setRotate(Pe,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(De,0);var Fe=this.tip2.transform.baseVal.getItem(0);Fe.setRotate(Pe+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Fe,0)}},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=We.prototype.getState.call(this);return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){We.prototype.restoreState.call(this,Pe),this.createTips(),this.adjustVisual()},Ee.typeName="MeasurementMarker",Ee.title="Measurement marker",Ee.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>',Ee}(bt),$t=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.strokePanel.colors=Fe.defaultColorSet,ye.fillColor="transparent",ye}return Oe(Ee,We),Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=We.prototype.getState.call(this);return Pe.typeName=Ee.typeName,Pe},Ee.typeName="EllipseFrameMarker",Ee.title="Ellipse frame marker",Ee.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>',Ee}(Ln),rn=function(){function We(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(We.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),We.prototype.addUndoStep=function(Ee){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ee)||(this.undoStack.push(Ee),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ee)&&this.redoStack.splice(0,this.redoStack.length))},We.prototype.replaceLastUndoStep=function(Ee){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ee)},We.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},We.prototype.undo=function(){if(this.undoStack.length>1){var Ee=this.undoStack.pop();return Ee!==void 0&&this.redoStack.push(Ee),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},We.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},We}(),An=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.strokeColor="transparent",ye.strokeWidth=0,ye.strokeDasharray="",ye.curveX=0,ye.curveY=0,ye.manipulationStartCurveX=0,ye.manipulationStartCurveY=0,ye.setStrokeColor=ye.setStrokeColor.bind(ye),ye.setStrokeWidth=ye.setStrokeWidth.bind(ye),ye.setStrokeDasharray=ye.setStrokeDasharray.bind(ye),ye.positionGrips=ye.positionGrips.bind(ye),ye.addControlGrips=ye.addControlGrips.bind(ye),ye.adjustVisual=ye.adjustVisual.bind(ye),ye.setupControlBox=ye.setupControlBox.bind(ye),ye.resize=ye.resize.bind(ye),ye.strokeColor=Fe.defaultColor,ye.strokeWidth=Fe.defaultStrokeWidth,ye.strokeDasharray=Fe.defaultStrokeDasharray,ye.strokePanel=new ee("Line color",Fe.defaultColorSet,Fe.defaultColor),ye.strokePanel.onColorChanged=ye.setStrokeColor,ye.strokeWidthPanel=new Ae("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),ye.strokeWidthPanel.onWidthChanged=ye.setStrokeWidth,ye.strokeStylePanel=new ze("Line style",Fe.defaultStrokeDasharrays,Fe.defaultStrokeDasharray),ye.strokeStylePanel.onStyleChanged=ye.setStrokeDasharray,ye}return Oe(Ee,We),Ee.prototype.ownsTarget=function(Pe){return!(!We.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorCurve&&Pe!==this.visibleCurve&&!this.curveGrip.ownsTarget(Pe))},Ee.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ee.prototype.createVisual=function(){this.visual=_e.createGroup(),this.selectorCurve=_e.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=_e.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)},Ee.prototype.pointerDown=function(Pe,De){We.prototype.pointerDown.call(this,Pe,De),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Pe.x,this.curveY=Pe.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(De)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ee.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),_e.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),_e.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ee.prototype.setupControlBox=function(){We.prototype.setupControlBox.call(this),this.curveControlLine1=_e.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=_e.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)},Ee.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,We.prototype.addControlGrips.call(this)},Ee.prototype.positionGrips=function(){We.prototype.positionGrips.call(this);var Pe=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Pe/2,this.curveY-Pe/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},Ee.prototype.manipulate=function(Pe){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Pe.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Pe.y-this.manipulationStartY),We.prototype.manipulate.call(this,Pe)},Ee.prototype.resize=function(Pe){this.activeGrip===this.curveGrip&&(this.curveX=Pe.x,this.curveY=Pe.y),We.prototype.resize.call(this,Pe),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Ee.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},Ee.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},Ee.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual()},Ee.prototype.scale=function(Pe,De){this.curveX=this.curveX*Pe,this.curveY=this.curveY*De,We.prototype.scale.call(this,Pe,De)},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},We.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){We.prototype.restoreState.call(this,Pe);var De=Pe;this.strokeColor=De.strokeColor,this.strokeWidth=De.strokeWidth,this.strokeDasharray=De.strokeDasharray,this.curveX=De.curveX,this.curveY=De.curveY,this.createVisual(),this.adjustVisual()},Ee.typeName="CurveMarker",Ee.title="Curve marker",Ee.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>',Ee}(qe),ti=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,De,Fe)||this;return ye.fillColor="transparent",ye.strokeColor="transparent",ye.strokeWidth=0,ye.strokeDasharray="",ye.textColor="transparent",ye.fontSize="1rem",ye.isMoved=!1,ye.captionText="Caption",ye.PADDING=5,ye.captionBoxWidth=0,ye.captionBoxHeight=0,ye.strokeColor=Fe.defaultColor,ye.strokeWidth=Fe.defaultStrokeWidth,ye.strokeDasharray=Fe.defaultStrokeDasharray,ye.fillColor=Fe.defaultFillColor,ye.textColor=Fe.defaultStrokeColor,ye.fontFamily=Fe.defaultFontFamily,ye.fontSize=Fe.defaultCaptionFontSize,ye.captionText=Fe.defaultCaptionText,ye.setStrokeColor=ye.setStrokeColor.bind(ye),ye.setFillColor=ye.setFillColor.bind(ye),ye.setStrokeWidth=ye.setStrokeWidth.bind(ye),ye.setStrokeDasharray=ye.setStrokeDasharray.bind(ye),ye.createVisual=ye.createVisual.bind(ye),ye.sizeCaption=ye.sizeCaption.bind(ye),ye.setCaptionText=ye.setCaptionText.bind(ye),ye.showTextEditor=ye.showTextEditor.bind(ye),ye.positionTextEditor=ye.positionTextEditor.bind(ye),ye.finishTextEditing=ye.finishTextEditing.bind(ye),ye.setFont=ye.setFont.bind(ye),ye.setTextColor=ye.setTextColor.bind(ye),ye.strokePanel=new ee("Line color",Ge(Fe.defaultColorSet,["transparent"]),ye.strokeColor),ye.strokePanel.onColorChanged=ye.setStrokeColor,ye.fillPanel=new ee("Fill color",Ge(Fe.defaultColorSet,["transparent"]),ye.fillColor,Ve),ye.fillPanel.onColorChanged=ye.setFillColor,ye.strokeWidthPanel=new Ae("Line width",Fe.defaultStrokeWidths,Fe.defaultStrokeWidth),ye.strokeWidthPanel.onWidthChanged=ye.setStrokeWidth,ye.strokeStylePanel=new ze("Line style",Fe.defaultStrokeDasharrays,Fe.defaultStrokeDasharray),ye.strokeStylePanel.onStyleChanged=ye.setStrokeDasharray,ye.fontFamilyPanel=new He("Font",Fe.defaultFontFamilies,Fe.defaultFontFamily),ye.fontFamilyPanel.onFontChanged=ye.setFont,ye.textColorPanel=new ee("Text color",Fe.defaultColorSet,ye.textColor,it),ye.textColorPanel.onColorChanged=ye.setTextColor,ye}return Oe(Ee,We),Ee.prototype.ownsTarget=function(Pe){return!(!We.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.frame&&Pe!==this.captionBg&&Pe!==this.captionElement)},Ee.prototype.createVisual=function(){this.visual=_e.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=_e.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=_e.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=_e.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()},Ee.prototype.setCaptionText=function(Pe){this.captionText=Pe,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ee.prototype.pointerDown=function(Pe,De){We.prototype.pointerDown.call(this,Pe,De),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ee.prototype.manipulate=function(Pe){We.prototype.manipulate.call(this,Pe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Pe.x-this.pointerDownPoint.x)>5||Math.abs(Pe.y-this.pointerDownPoint.y)>5)},Ee.prototype.resize=function(Pe){We.prototype.resize.call(this,Pe),this.setSize()},Ee.prototype.sizeCaption=function(){var Pe=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Pe.width+2*this.PADDING,this.captionBoxHeight=Pe.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),_e.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')"]]),_e.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')"]])},Ee.prototype.showTextEditor=function(){var Pe=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(De){De.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(De){De.key==="Enter"&&Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(De){De.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Pe.finishTextEditing(Pe.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Ee.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"))},Ee.prototype.finishTextEditing=function(Pe){this.setCaptionText(Pe.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ee.prototype.setFont=function(Pe){this.captionElement&&_e.setAttributes(this.captionElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ee.prototype.setTextColor=function(Pe){this.captionElement&&_e.setAttributes(this.captionElement,[["fill",Pe]]),this.textColor=Pe,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ee.prototype.setSize=function(){We.prototype.setSize.call(this),_e.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ee.prototype.pointerUp=function(Pe){We.prototype.pointerUp.call(this,Pe),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ee.prototype.dblClick=function(Pe,De){We.prototype.dblClick.call(this,Pe,De),this.showTextEditor()},Ee.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.frame&&_e.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ee.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.captionBg&&_e.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},Ee.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.frame&&_e.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ee.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.frame&&_e.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},We.prototype.getState.call(this));return Pe.typeName=this.typeName,Pe},Ee.prototype.restoreState=function(Pe){var De=Pe;this.fillColor=De.fillColor,this.strokeColor=De.strokeColor,this.strokeWidth=De.strokeWidth,this.strokeDasharray=De.strokeDasharray,this.textColor=De.textColor,this.fontFamily=De.fontFamily,this.captionText=De.captionText,this.fontSize=De.fontSize,this.createVisual(),We.prototype.restoreState.call(this,Pe),this.setSize()},Ee.prototype.scale=function(Pe,De){We.prototype.scale.call(this,Pe,De),this.setSize()},Ee.typeName="CaptionFrameMarker",Ee.title="Caption frame marker",Ee.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>',Ee}(be),xn=function(){function We(Ee,Pe){Pe===void 0&&(Pe=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ee,this.cancelable=Pe}return Object.defineProperty(We.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),We.prototype.preventDefault=function(){this._defaultPrevented=!0},We}(),Qn=function(We){function Ee(Pe,De,Fe){var ye=We.call(this,Pe,!1)||this;return ye.dataUrl=De,ye.state=Fe,ye}return Oe(Ee,We),Ee}(xn),Ot=function(We){function Ee(Pe,De,Fe){Fe===void 0&&(Fe=!1);var ye=We.call(this,Pe,Fe)||this;return ye.marker=De,ye}return Oe(Ee,We),Ee}(xn),Cn=function(){function We(){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 We.prototype.addEventListener=function(Ee,Pe){this[Ee].push(Pe)},We.prototype.removeEventListener=function(Ee,Pe){var De=this[Ee].indexOf(Pe);De>-1&&this[Ee].splice(De,1)},We}(),Wn=function(){function We(Ee){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ot,this._isOpen=!1,this.undoRedoManager=new rn,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 Cn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=We.instanceCounter++,this.styles=new Xe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ee,this.targetRoot=document.body,this.width=Ee.clientWidth,this.height=Ee.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(We.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ze,nt,ht,wt,$t,Ln,Ut,Wt,Nn,zt,bt,An,ti]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ze,nt,ht,wt,Ln,Ut,Wt]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ze,nt,ht,wt,Ut]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ee){var Pe=this;this._availableMarkerTypes.splice(0),Ee.forEach(function(De){if(typeof De=="string"){var Fe=Pe.ALL_MARKER_TYPES.find(function(ye){return ye.typeName===De});Fe!==void 0&&Pe._availableMarkerTypes.push(Fe)}else Pe._availableMarkerTypes.push(De)})},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ee){this._zoomLevel=Ee,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(We.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),We.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Le.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},We.prototype.show=function(){var Ee=this;this.styles.styleSheetRoot===void 0&&Pt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Pt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Pe){return Pe(new xn(Ee))})},We.prototype.render=function(){return Ke(this,void 0,void 0,function(){var Ee;return st(this,function(Pe){switch(Pe.label){case 0:return this.setCurrentMarker(),(Ee=new Tt).naturalSize=this.renderAtNaturalSize,Ee.imageType=this.renderImageType,Ee.imageQuality=this.renderImageQuality,Ee.markersOnly=this.renderMarkersOnly,Ee.width=this.renderWidth,Ee.height=this.renderHeight,[4,Ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Pe.sent(),[4,Ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Pe.sent()]}})})},We.prototype.close=function(Ee){var Pe=this;if(Ee===void 0&&(Ee=!1),this.isOpen){var De=!1;Ee||this.eventListeners.beforeclose.forEach(function(Fe){var ye=new xn(Pe,!0);Fe(ye),ye.defaultPrevented&&(De=!0)}),De||(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(Fe){return Fe(new xn(Pe))}),this.detachEvents(),this._isOpen=!1)}},We.prototype.addMarkersToToolbar=function(){for(var Ee,Pe=[],De=0;De<arguments.length;De++)Pe[De]=arguments[De];(Ee=this._availableMarkerTypes).push.apply(Ee,Pe)},We.prototype.addRenderEventListener=function(Ee){this.addEventListener("render",function(Pe){Ee(Pe.dataUrl,Pe.state)})},We.prototype.removeRenderEventListener=function(Ee){},We.prototype.addCloseEventListener=function(Ee){this.addEventListener("close",function(){Ee()})},We.prototype.removeCloseEventListener=function(Ee){},We.prototype.setupResizeObserver=function(){var Ee=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ee.resize(Ee.target.clientWidth,Ee.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ee.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},We.prototype.onPopupTargetResize=function(){var Ee=1*this.target.clientWidth/this.target.clientHeight,Pe=this.editorCanvas.clientWidth/Ee>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ee:this.editorCanvas.clientWidth,De=Pe<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ee;this.resize(Pe,De)},We.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},We.prototype.resize=function(Ee,Pe){this._isResizing=!0;var De=Ee/this.imageWidth,Fe=Pe/this.imageHeight;this.imageWidth=Math.round(Ee),this.imageHeight=Math.round(Pe),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(De,Fe),this._isResizing=!1},We.prototype.scaleMarkers=function(Ee,Pe){var De,Fe=this;this._currentMarker&&this._currentMarker instanceof wt?this._currentMarker.scale(Ee,Pe):(De=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ye){ye!==Fe._currentMarker&&ye.scale(Ee,Pe)}),De!==void 0&&this.setCurrentMarker(De)},We.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"},We.prototype.setTopLeft=function(){var Ee=this.editingTarget.getBoundingClientRect(),Pe=this.editorCanvas.getBoundingClientRect();this.left=Ee.left-Pe.left,this.top=Ee.top-Pe.top},We.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)},We.prototype.addDefs=function(){for(var Ee,Pe=[],De=0;De<arguments.length;De++)Pe[De]=arguments[De];this.defs=_e.createDefs(),this.addDefsToImage(),(Ee=this.defs).append.apply(Ee,Pe)},We.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},We.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)},We.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},We.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},We.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)},We.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},We.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)},We.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 Ee=document.createElement("a");Ee.href="https://markerjs.com/",Ee.target="_blank",Ee.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>',Ee.title="Powered by marker.js",Ee.style.display="grid",Ee.style.alignItems="center",Ee.style.justifyItems="center",Ee.style.padding="3px",Ee.style.width="20px",Ee.style.height="20px",this.logoUI.appendChild(Ee),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},We.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")},We.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"},We.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},We.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 Ee=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=Ee+"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 It(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 Be(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},We.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},We.prototype.removeMarker=function(Ee){this.markerImage.removeChild(Ee.container),this.markers.indexOf(Ee)>-1&&this.markers.splice(this.markers.indexOf(Ee),1),Ee.dispose()},We.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())},We.prototype.toolbarButtonClicked=function(Ee,Pe){if(Ee==="marker"&&Pe!==void 0)this.createNewMarker(Pe);else if(Ee==="action")switch(Pe){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},We.prototype.deleteSelectedMarker=function(){var Ee=this;if(this._currentMarker!==void 0){var Pe=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Fe){var ye=new Ot(Ee,Ee._currentMarker,!0);Fe(ye),ye.defaultPrevented&&(Pe=!0)}),!Pe){var De=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(Fe){return Fe(new Ot(Ee,De))})}}},We.prototype.clear=function(){var Ee=this,Pe=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Qe){var vt=new Ot(Ee,void 0,!0);Qe(vt),vt.defaultPrevented&&(Pe=!0)}),!Pe)){this.setCurrentMarker();for(var De=function(Qe){var vt=Fe.markers[Qe];Fe.setCurrentMarker(Fe.markers[Qe]),Fe._currentMarker.dispose(),Fe.markerImage.removeChild(Fe._currentMarker.container),Fe.markers.splice(Fe.markers.indexOf(Fe._currentMarker),1),Fe.eventListeners.markerdelete.forEach(function(Ye){return Ye(new Ot(Ee,vt))})},Fe=this,ye=this.markers.length-1;ye>=0;ye--)De(ye);this.addUndoStep()}},Object.defineProperty(We.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),We.prototype.showNotesEditor=function(){var Ee;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=(Ee=this._currentMarker.notes)!==null&&Ee!==void 0?Ee:"",this.overlayContainer.appendChild(this.notesArea))},We.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)},We.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},We.prototype.addUndoStep=function(){var Ee=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Pe=this.getState(),De=this.undoRedoManager.getLastUndoStep();if(!De||De.width===Pe.width&&De.height===Pe.height){var Fe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Pe),Fe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ye){return ye(new xn(Ee))})}else this.undoRedoManager.replaceLastUndoStep(Pe),this.eventListeners.statechange.forEach(function(ye){return ye(new xn(Ee))})}},We.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},We.prototype.undoStep=function(){var Ee=this,Pe=this.undoRedoManager.undo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(De){return De(new xn(Ee))}))},We.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},We.prototype.redoStep=function(){var Ee=this,Pe=this.undoRedoManager.redo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(De){return De(new xn(Ee))}))},We.prototype.stepZoom=function(){var Ee=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ee<this.zoomSteps.length-1?this.zoomSteps[Ee+1]:this.zoomSteps[0]},We.prototype.panTo=function(Ee){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ee.x,top:this.prevPanPoint.y-Ee.y}),this.prevPanPoint=Ee},We.prototype.startRenderAndClose=function(){return Ke(this,void 0,void 0,function(){var Ee,Pe,De=this;return st(this,function(Fe){switch(Fe.label){case 0:return[4,this.render()];case 1:return Ee=Fe.sent(),Pe=this.getState(),this.eventListeners.render.forEach(function(ye){return ye(new Qn(De,Ee,Pe))}),this.close(!0),[2]}})})},We.prototype.getState=function(Ee){Ee===!0&&this.setCurrentMarker();var Pe={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(De){return Pe.markers.push(De.getState())}),Pe},We.prototype.restoreState=function(Ee){var Pe=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ee.markers.forEach(function(De){var Fe=Pe._availableMarkerTypes.find(function(Qe){return Qe.typeName===De.typeName});if(Fe!==void 0){var ye=Pe.addNewMarker(Fe);ye.restoreState(De),Pe.markers.push(ye)}}),Ee.width&&Ee.height&&(Ee.width!==this.imageWidth||Ee.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ee.width,this.imageHeight/Ee.height),this.eventListeners.restorestate.forEach(function(De){return De(new xn(Pe))})},We.prototype.addNewMarker=function(Ee){var Pe=_e.createGroup();return this.markerImage.appendChild(Pe),new Ee(Pe,this.overlayContainer,this.settings)},We.prototype.createNewMarker=function(Ee){var Pe,De=this;(Pe=typeof Ee=="string"?this._availableMarkerTypes.find(function(Fe){return Fe.typeName===Ee}):Ee)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Pe),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Pe.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Fe){return Fe(new Ot(De,De._currentMarker))}))},We.prototype.markerCreated=function(Ee){var Pe=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ee),this.setCurrentMarker(Ee),Ee instanceof nt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(nt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(De){return De(new Ot(Pe,Pe._currentMarker))})},We.prototype.colorChanged=function(Ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ee,this.settings.defaultStrokeColor=Ee)},We.prototype.fillColorChanged=function(Ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ee)},We.prototype.markerStateChanged=function(Ee){var Pe=this;this.eventListeners.markerchange.forEach(function(De){return De(new Ot(Pe,Ee))})},We.prototype.setCurrentMarker=function(Ee){var Pe=this;this._currentMarker!==Ee&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(De){return De(new Ot(Pe,Pe._currentMarker))})),this._currentMarker=Ee,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(De){return De(new Ot(Pe,Pe._currentMarker))}))},We.prototype.onPointerDown=function(Ee){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ee.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Pe=this.markers.find(function(De){return De.ownsTarget(Ee.target)});Pe!==void 0?(this.setCurrentMarker(Pe),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ee.clientX,Ee.clientY),Ee.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ee.clientX,y:Ee.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ee.clientX,Ee.clientY))},We.prototype.onDblClick=function(Ee){if(this._isFocused||this.focus(),this.mode==="select"){var Pe=this.markers.find(function(De){return De.ownsTarget(Ee.target)});Pe!==void 0&&Pe!==this._currentMarker&&this.setCurrentMarker(Pe),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ee.clientX,Ee.clientY),Ee.target):this.setCurrentMarker()}},We.prototype.onPointerMove=function(Ee){this.touchPoints!==1&&Ee.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ee.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ee.clientX,Ee.clientY)):this.zoomLevel>1&&this.panTo({x:Ee.clientX,y:Ee.clientY}))},We.prototype.onPointerUp=function(Ee){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ee.clientX,Ee.clientY)),this.isDragging=!1,this.addUndoStep()},We.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},We.prototype.onKeyUp=function(Ee){this._currentMarker===void 0||this.notesArea!==void 0||Ee.key!=="Delete"&&Ee.key!=="Backspace"||this.deleteSelectedMarker()},We.prototype.clientToLocalCoordinates=function(Ee,Pe){var De=this.markerImage.getBoundingClientRect();return{x:(Ee-De.left)/this.zoomLevel,y:(Pe-De.top)/this.zoomLevel}},We.prototype.onWindowResize=function(){this.positionUI()},We.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ee=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ee+"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()},We.prototype.addLicenseKey=function(Ee){Le.addKey(Ee)},We.prototype.addEventListener=function(Ee,Pe){this.eventListeners.addEventListener(Ee,Pe)},We.prototype.removeEventListener=function(Ee,Pe){this.eventListeners.removeEventListener(Ee,Pe)},We.prototype.renderState=function(Ee){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ee),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(We.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),We.prototype.focus=function(){var Ee=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Pe){return Pe(new xn(Ee))}))},We.prototype.blur=function(){var Ee=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Pe){return Pe(new xn(Ee))}))},We.instanceCounter=0,We}()},17115:function(Vn,Pn,pe){"use strict";pe.d(Pn,{ZP:function(){return Le}});var ge=pe(33606),Oe=pe(59301),Ke=pe(47273),st=0,Ge=(0,Ke.Z)();function _e(){var Tt;return Ge?(Tt=st,st+=1):Tt="TEST_OR_SSR",Tt}function Le(Tt){var Pt=Oe.useState(),Xe=(0,ge.Z)(Pt,2),Et=Xe[0],ct=Xe[1];return Oe.useEffect(function(){ct("rc_select_".concat(_e()))},[]),Tt||Et}},77861:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Ac:function(){return Zt},Xo:function(){return mi},Wx:function(){return Gi},ZP:function(){return vn},lk:function(){return be}});var ge=pe(92413),Oe=pe(26407),Ke=pe(400),st=pe(33708),Ge=pe(33606),_e=pe(37061),Le=pe(39559),Tt=pe(18929),Pt=pe(48736),Xe=pe(59301),Et=pe(92310),ct=pe.n(Et),It=pe(34280),Be=pe(49658),ne=pe(10228),ee=pe(8654),ce=function(at){var cn=at.className,Sn=at.customizeIcon,Un=at.customizeIconProps,un=at.onMouseDown,Rt=at.onClick,zn=at.children,ni;return typeof Sn=="function"?ni=Sn(Un):ni=Sn,Xe.createElement("span",{className:cn,onMouseDown:function(tn){tn.preventDefault(),un&&un(tn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Rt,"aria-hidden":!0},ni!==void 0?ni:Xe.createElement("span",{className:ct()(cn.split(/\s+/).map(function(gi){return"".concat(gi,"-icon")}))},zn))},se=ce;function he(Bt,at,cn,Sn,Un){var un=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Rt=arguments.length>6?arguments[6]:void 0,zn=arguments.length>7?arguments[7]:void 0,ni=Xe.useMemo(function(){if((0,Le.Z)(Sn)==="object")return Sn.clearIcon;if(Un)return Un},[Sn,Un]),gi=Xe.useMemo(function(){return!!(!un&&Sn&&(cn.length||Rt)&&!(zn==="combobox"&&Rt===""))},[Sn,un,cn.length,Rt,zn]);return{allowClear:gi,clearIcon:Xe.createElement(se,{className:"".concat(Bt,"-clear"),onMouseDown:at,customizeIcon:ni},"\xD7")}}var ve=Xe.createContext(null);function be(){return Xe.useContext(ve)}function ke(){var Bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,at=Xe.useState(!1),cn=(0,Ge.Z)(at,2),Sn=cn[0],Un=cn[1],un=Xe.useRef(null),Rt=function(){window.clearTimeout(un.current)};Xe.useEffect(function(){return Rt},[]);var zn=function(gi,tn){Rt(),un.current=window.setTimeout(function(){Un(gi),tn&&tn()},Bt)};return[Sn,zn,Rt]}function Ae(){var Bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,at=Xe.useRef(null),cn=Xe.useRef(null);Xe.useEffect(function(){return function(){window.clearTimeout(cn.current)}},[]);function Sn(Un){(Un||at.current===null)&&(at.current=Un),window.clearTimeout(cn.current),cn.current=window.setTimeout(function(){at.current=null},Bt)}return[function(){return at.current},Sn]}function ze(Bt,at,cn,Sn){var Un=Xe.useRef(null);Un.current={open:at,triggerOpen:cn,customizedTrigger:Sn},Xe.useEffect(function(){function un(Rt){var zn;if(!((zn=Un.current)!==null&&zn!==void 0&&zn.customizedTrigger)){var ni=Rt.target;ni.shadowRoot&&Rt.composed&&(ni=Rt.composedPath()[0]||ni),Un.current.open&&Bt().filter(function(gi){return gi}).every(function(gi){return!gi.contains(ni)&&gi!==ni})&&Un.current.triggerOpen(!1)}}return window.addEventListener("mousedown",un),function(){return window.removeEventListener("mousedown",un)}},[])}var Ze=pe(26112),ot=pe(11780),qe=function(at,cn){var Sn,Un,un=at.prefixCls,Rt=at.id,zn=at.inputElement,ni=at.disabled,gi=at.tabIndex,tn=at.autoFocus,Bn=at.autoComplete,Ft=at.editable,wn=at.activeDescendantId,gn=at.value,yn=at.maxLength,On=at.onKeyDown,$n=at.onMouseDown,Yn=at.onChange,ii=at.onPaste,Xn=at.onCompositionStart,di=at.onCompositionEnd,Hi=at.open,$i=at.attrs,Wi=zn||Xe.createElement("input",null),Xt=Wi,Si=Xt.ref,Ki=Xt.props,Ti=Ki.onKeyDown,cr=Ki.onChange,Qi=Ki.onMouseDown,yr=Ki.onCompositionStart,fr=Ki.onCompositionEnd,Vi=Ki.style;return(0,Pt.Kp)(!("maxLength"in Wi.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Wi=Xe.cloneElement(Wi,(0,st.Z)((0,st.Z)((0,st.Z)({type:"search"},Ki),{},{id:Rt,ref:(0,ee.sQ)(cn,Si),disabled:ni,tabIndex:gi,autoComplete:Bn||"off",autoFocus:tn,className:ct()("".concat(un,"-selection-search-input"),(Sn=Wi)===null||Sn===void 0||(Un=Sn.props)===null||Un===void 0?void 0:Un.className),role:"combobox","aria-label":"Search","aria-expanded":Hi||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Rt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Rt,"_list"),"aria-activedescendant":Hi?wn:void 0},$i),{},{value:Ft?gn:"",maxLength:yn,readOnly:!Ft,unselectable:Ft?null:"on",style:(0,st.Z)((0,st.Z)({},Vi),{},{opacity:Ft?null:0}),onKeyDown:function(Dn){On(Dn),Ti&&Ti(Dn)},onMouseDown:function(Dn){$n(Dn),Qi&&Qi(Dn)},onChange:function(Dn){Yn(Dn),cr&&cr(Dn)},onCompositionStart:function(Dn){Xn(Dn),yr&&yr(Dn)},onCompositionEnd:function(Dn){di(Dn),fr&&fr(Dn)},onPaste:ii})),Wi},bt=Xe.forwardRef(qe);bt.displayName="Input";var He=bt;function wt(Bt){return Array.isArray(Bt)?Bt:Bt!==void 0?[Bt]:[]}var nt=typeof window!="undefined"&&window.document&&window.document.documentElement,Dt=nt;function ht(Bt){return Bt!=null}function zt(Bt){return!Bt&&Bt!==0}function Yt(Bt){return["string","number"].includes((0,Le.Z)(Bt))}function Ut(Bt){var at=void 0;return Bt&&(Yt(Bt.title)?at=Bt.title.toString():Yt(Bt.label)&&(at=Bt.label.toString())),at}function it(Bt,at){Dt?Xe.useLayoutEffect(Bt,at):Xe.useEffect(Bt,at)}function Ve(Bt){var at;return(at=Bt.key)!==null&&at!==void 0?at:Bt.value}var Wt=function(at){at.preventDefault(),at.stopPropagation()},Ln=function(at){var cn=at.id,Sn=at.prefixCls,Un=at.values,un=at.open,Rt=at.searchValue,zn=at.autoClearSearchValue,ni=at.inputRef,gi=at.placeholder,tn=at.disabled,Bn=at.mode,Ft=at.showSearch,wn=at.autoFocus,gn=at.autoComplete,yn=at.activeDescendantId,On=at.tabIndex,$n=at.removeIcon,Yn=at.maxTagCount,ii=at.maxTagTextLength,Xn=at.maxTagPlaceholder,di=Xn===void 0?function(jr){return"+ ".concat(jr.length," ...")}:Xn,Hi=at.tagRender,$i=at.onToggleOpen,Wi=at.onRemove,Xt=at.onInputChange,Si=at.onInputPaste,Ki=at.onInputKeyDown,Ti=at.onInputMouseDown,cr=at.onInputCompositionStart,Qi=at.onInputCompositionEnd,yr=Xe.useRef(null),fr=(0,Xe.useState)(0),Vi=(0,Ge.Z)(fr,2),Mr=Vi[0],Dn=Vi[1],Wr=(0,Xe.useState)(!1),_n=(0,Ge.Z)(Wr,2),Ir=_n[0],eo=_n[1],xr="".concat(Sn,"-selection"),bo=un||Bn==="multiple"&&zn===!1||Bn==="tags"?Rt:"",Yr=Bn==="tags"||Bn==="multiple"&&zn===!1||Ft&&(un||Ir);it(function(){Dn(yr.current.scrollWidth)},[bo]);function ur(jr,yo,Or,wo,co){return Xe.createElement("span",{className:ct()("".concat(xr,"-item"),(0,Ke.Z)({},"".concat(xr,"-item-disabled"),Or)),title:Ut(jr)},Xe.createElement("span",{className:"".concat(xr,"-item-content")},yo),wo&&Xe.createElement(se,{className:"".concat(xr,"-item-remove"),onMouseDown:Wt,onClick:co,customizeIcon:$n},"\xD7"))}function ir(jr,yo,Or,wo,co){var $o=function(zr){Wt(zr),$i(!un)};return Xe.createElement("span",{onMouseDown:$o},Hi({label:yo,value:jr,disabled:Or,closable:wo,onClose:co}))}function qi(jr){var yo=jr.disabled,Or=jr.label,wo=jr.value,co=!tn&&!yo,$o=Or;if(typeof ii=="number"&&(typeof Or=="string"||typeof Or=="number")){var Gr=String($o);Gr.length>ii&&($o="".concat(Gr.slice(0,ii),"..."))}var zr=function(Eo){Eo&&Eo.stopPropagation(),Wi(jr)};return typeof Hi=="function"?ir(wo,$o,yo,co,zr):ur(jr,$o,yo,co,zr)}function Dr(jr){var yo=typeof di=="function"?di(jr):di;return ur({title:yo},yo,!1)}var Ai=Xe.createElement("div",{className:"".concat(xr,"-search"),style:{width:Mr},onFocus:function(){eo(!0)},onBlur:function(){eo(!1)}},Xe.createElement(He,{ref:ni,open:un,prefixCls:Sn,id:cn,inputElement:null,disabled:tn,autoFocus:wn,autoComplete:gn,editable:Yr,activeDescendantId:yn,value:bo,onKeyDown:Ki,onMouseDown:Ti,onChange:Xt,onPaste:Si,onCompositionStart:cr,onCompositionEnd:Qi,tabIndex:On,attrs:(0,Ze.Z)(at,!0)}),Xe.createElement("span",{ref:yr,className:"".concat(xr,"-search-mirror"),"aria-hidden":!0},bo,"\xA0")),et=Xe.createElement(ot.Z,{prefixCls:"".concat(xr,"-overflow"),data:Un,renderItem:qi,renderRest:Dr,suffix:Ai,itemKey:Ve,maxCount:Yn});return Xe.createElement(Xe.Fragment,null,et,!Un.length&&!bo&&Xe.createElement("span",{className:"".concat(xr,"-placeholder")},gi))},Nn=Ln,$t=function(at){var cn=at.inputElement,Sn=at.prefixCls,Un=at.id,un=at.inputRef,Rt=at.disabled,zn=at.autoFocus,ni=at.autoComplete,gi=at.activeDescendantId,tn=at.mode,Bn=at.open,Ft=at.values,wn=at.placeholder,gn=at.tabIndex,yn=at.showSearch,On=at.searchValue,$n=at.activeValue,Yn=at.maxLength,ii=at.onInputKeyDown,Xn=at.onInputMouseDown,di=at.onInputChange,Hi=at.onInputPaste,$i=at.onInputCompositionStart,Wi=at.onInputCompositionEnd,Xt=at.title,Si=Xe.useState(!1),Ki=(0,Ge.Z)(Si,2),Ti=Ki[0],cr=Ki[1],Qi=tn==="combobox",yr=Qi||yn,fr=Ft[0],Vi=On||"";Qi&&$n&&!Ti&&(Vi=$n),Xe.useEffect(function(){Qi&&cr(!1)},[Qi,$n]);var Mr=tn!=="combobox"&&!Bn&&!yn?!1:!!Vi,Dn=Xt===void 0?Ut(fr):Xt,Wr=function(){if(fr)return null;var Ir=Mr?{visibility:"hidden"}:void 0;return Xe.createElement("span",{className:"".concat(Sn,"-selection-placeholder"),style:Ir},wn)};return Xe.createElement(Xe.Fragment,null,Xe.createElement("span",{className:"".concat(Sn,"-selection-search")},Xe.createElement(He,{ref:un,prefixCls:Sn,id:Un,open:Bn,inputElement:cn,disabled:Rt,autoFocus:zn,autoComplete:ni,editable:yr,activeDescendantId:gi,value:Vi,onKeyDown:ii,onMouseDown:Xn,onChange:function(Ir){cr(!0),di(Ir)},onPaste:Hi,onCompositionStart:$i,onCompositionEnd:Wi,tabIndex:gn,attrs:(0,Ze.Z)(at,!0),maxLength:Qi?Yn:void 0})),!Qi&&fr?Xe.createElement("span",{className:"".concat(Sn,"-selection-item"),title:Dn,style:Mr?{visibility:"hidden"}:void 0},fr.label):null,Wr())},rn=$t;function An(Bt){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(Bt)}var ti=function(at,cn){var Sn=(0,Xe.useRef)(null),Un=(0,Xe.useRef)(!1),un=at.prefixCls,Rt=at.open,zn=at.mode,ni=at.showSearch,gi=at.tokenWithEnter,tn=at.autoClearSearchValue,Bn=at.onSearch,Ft=at.onSearchSubmit,wn=at.onToggleOpen,gn=at.onInputKeyDown,yn=at.domRef;Xe.useImperativeHandle(cn,function(){return{focus:function(){Sn.current.focus()},blur:function(){Sn.current.blur()}}});var On=Ae(0),$n=(0,Ge.Z)(On,2),Yn=$n[0],ii=$n[1],Xn=function(Vi){var Mr=Vi.which;(Mr===ne.Z.UP||Mr===ne.Z.DOWN)&&Vi.preventDefault(),gn&&gn(Vi),Mr===ne.Z.ENTER&&zn==="tags"&&!Un.current&&!Rt&&(Ft==null||Ft(Vi.target.value)),An(Mr)&&wn(!0)},di=function(){ii(!0)},Hi=(0,Xe.useRef)(null),$i=function(Vi){Bn(Vi,!0,Un.current)!==!1&&wn(!0)},Wi=function(){Un.current=!0},Xt=function(Vi){Un.current=!1,zn!=="combobox"&&$i(Vi.target.value)},Si=function(Vi){var Mr=Vi.target.value;if(gi&&Hi.current&&/[\r\n]/.test(Hi.current)){var Dn=Hi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Mr=Mr.replace(Dn,Hi.current)}Hi.current=null,$i(Mr)},Ki=function(Vi){var Mr=Vi.clipboardData,Dn=Mr.getData("text");Hi.current=Dn},Ti=function(Vi){var Mr=Vi.target;if(Mr!==Sn.current){var Dn=document.body.style.msTouchAction!==void 0;Dn?setTimeout(function(){Sn.current.focus()}):Sn.current.focus()}},cr=function(Vi){var Mr=Yn();Vi.target!==Sn.current&&!Mr&&zn!=="combobox"&&Vi.preventDefault(),(zn!=="combobox"&&(!ni||!Mr)||!Rt)&&(Rt&&tn!==!1&&Bn("",!0,!1),wn())},Qi={inputRef:Sn,onInputKeyDown:Xn,onInputMouseDown:di,onInputChange:Si,onInputPaste:Ki,onInputCompositionStart:Wi,onInputCompositionEnd:Xt},yr=zn==="multiple"||zn==="tags"?Xe.createElement(Nn,(0,ge.Z)({},at,Qi)):Xe.createElement(rn,(0,ge.Z)({},at,Qi));return Xe.createElement("div",{ref:yn,className:"".concat(un,"-selector"),onClick:Ti,onMouseDown:cr},yr)},xn=Xe.forwardRef(ti);xn.displayName="Selector";var Qn=xn,Ot=pe(35593),Cn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Wn=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"}}},We=function(at,cn){var Sn=at.prefixCls,Un=at.disabled,un=at.visible,Rt=at.children,zn=at.popupElement,ni=at.animation,gi=at.transitionName,tn=at.dropdownStyle,Bn=at.dropdownClassName,Ft=at.direction,wn=Ft===void 0?"ltr":Ft,gn=at.placement,yn=at.builtinPlacements,On=at.dropdownMatchSelectWidth,$n=at.dropdownRender,Yn=at.dropdownAlign,ii=at.getPopupContainer,Xn=at.empty,di=at.getTriggerDOMNode,Hi=at.onPopupVisibleChange,$i=at.onPopupMouseEnter,Wi=(0,_e.Z)(at,Cn),Xt="".concat(Sn,"-dropdown"),Si=zn;$n&&(Si=$n(zn));var Ki=Xe.useMemo(function(){return yn||Wn(On)},[yn,On]),Ti=ni?"".concat(Xt,"-").concat(ni):gi,cr=typeof On=="number",Qi=Xe.useMemo(function(){return cr?null:On===!1?"minWidth":"width"},[On,cr]),yr=tn;cr&&(yr=(0,st.Z)((0,st.Z)({},yr),{},{width:On}));var fr=Xe.useRef(null);return Xe.useImperativeHandle(cn,function(){return{getPopupElement:function(){return fr.current}}}),Xe.createElement(Ot.Z,(0,ge.Z)({},Wi,{showAction:Hi?["click"]:[],hideAction:Hi?["click"]:[],popupPlacement:gn||(wn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ki,prefixCls:Xt,popupTransitionName:Ti,popup:Xe.createElement("div",{ref:fr,onMouseEnter:$i},Si),stretch:Qi,popupAlign:Yn,popupVisible:un,getPopupContainer:ii,popupClassName:ct()(Bn,(0,Ke.Z)({},"".concat(Xt,"-empty"),Xn)),popupStyle:yr,getTriggerDOMNode:di,onPopupVisibleChange:Hi}),Rt)},Ee=Xe.forwardRef(We);Ee.displayName="SelectTrigger";var Pe=Ee,De=pe(34589);function Fe(Bt,at){var cn=Bt.key,Sn;return"value"in Bt&&(Sn=Bt.value),cn!=null?cn:Sn!==void 0?Sn:"rc-index-key-".concat(at)}function ye(Bt,at){var cn=Bt||{},Sn=cn.label,Un=cn.value,un=cn.options,Rt=cn.groupLabel,zn=Sn||(at?"children":"label");return{label:zn,value:Un||"value",options:un||"options",groupLabel:Rt||zn}}function Qe(Bt){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},cn=at.fieldNames,Sn=at.childrenAsData,Un=[],un=ye(cn,!1),Rt=un.label,zn=un.value,ni=un.options,gi=un.groupLabel;function tn(Bn,Ft){Bn.forEach(function(wn){if(Ft||!(ni in wn)){var gn=wn[zn];Un.push({key:Fe(wn,Un.length),groupOption:Ft,data:wn,label:wn[Rt],value:gn})}else{var yn=wn[gi];yn===void 0&&Sn&&(yn=wn.label),Un.push({key:Fe(wn,Un.length),group:!0,data:wn,label:yn}),tn(wn[ni],!0)}})}return tn(Bt,!1),Un}function vt(Bt){var at=(0,st.Z)({},Bt);return"props"in at||Object.defineProperty(at,"props",{get:function(){return(0,Pt.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),at}}),at}function Ye(Bt,at){if(!at||!at.length)return null;var cn=!1;function Sn(un,Rt){var zn=(0,De.Z)(Rt),ni=zn[0],gi=zn.slice(1);if(!ni)return[un];var tn=un.split(ni);return cn=cn||tn.length>1,tn.reduce(function(Bn,Ft){return[].concat((0,Oe.Z)(Bn),(0,Oe.Z)(Sn(Ft,gi)))},[]).filter(function(Bn){return Bn})}var Un=Sn(Bt,at);return cn?Un:null}var Je=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],yt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function St(Bt){return Bt==="tags"||Bt==="multiple"}var rt=Xe.forwardRef(function(Bt,at){var cn,Sn,Un=Bt.id,un=Bt.prefixCls,Rt=Bt.className,zn=Bt.showSearch,ni=Bt.tagRender,gi=Bt.direction,tn=Bt.omitDomProps,Bn=Bt.displayValues,Ft=Bt.onDisplayValuesChange,wn=Bt.emptyOptions,gn=Bt.notFoundContent,yn=gn===void 0?"Not Found":gn,On=Bt.onClear,$n=Bt.mode,Yn=Bt.disabled,ii=Bt.loading,Xn=Bt.getInputElement,di=Bt.getRawInputElement,Hi=Bt.open,$i=Bt.defaultOpen,Wi=Bt.onDropdownVisibleChange,Xt=Bt.activeValue,Si=Bt.onActiveValueChange,Ki=Bt.activeDescendantId,Ti=Bt.searchValue,cr=Bt.autoClearSearchValue,Qi=Bt.onSearch,yr=Bt.onSearchSplit,fr=Bt.tokenSeparators,Vi=Bt.allowClear,Mr=Bt.suffixIcon,Dn=Bt.clearIcon,Wr=Bt.OptionList,_n=Bt.animation,Ir=Bt.transitionName,eo=Bt.dropdownStyle,xr=Bt.dropdownClassName,bo=Bt.dropdownMatchSelectWidth,Yr=Bt.dropdownRender,ur=Bt.dropdownAlign,ir=Bt.placement,qi=Bt.builtinPlacements,Dr=Bt.getPopupContainer,Ai=Bt.showAction,et=Ai===void 0?[]:Ai,jr=Bt.onFocus,yo=Bt.onBlur,Or=Bt.onKeyUp,wo=Bt.onKeyDown,co=Bt.onMouseDown,$o=(0,_e.Z)(Bt,Je),Gr=St($n),zr=(zn!==void 0?zn:Gr)||$n==="combobox",Nr=(0,st.Z)({},$o);yt.forEach(function(Ko){delete Nr[Ko]}),tn==null||tn.forEach(function(Ko){delete Nr[Ko]});var Eo=Xe.useState(!1),or=(0,Ge.Z)(Eo,2),mr=or[0],$r=or[1];Xe.useEffect(function(){$r((0,Be.Z)())},[]);var hi=Xe.useRef(null),Ao=Xe.useRef(null),Vo=Xe.useRef(null),sa=Xe.useRef(null),ko=Xe.useRef(null),Io=ke(),_o=(0,Ge.Z)(Io,3),la=_o[0],pa=_o[1],Lt=_o[2];Xe.useImperativeHandle(at,function(){var Ko,Sa;return{focus:(Ko=sa.current)===null||Ko===void 0?void 0:Ko.focus,blur:(Sa=sa.current)===null||Sa===void 0?void 0:Sa.blur,scrollTo:function(Ss){var ms;return(ms=ko.current)===null||ms===void 0?void 0:ms.scrollTo(Ss)}}});var wi=Xe.useMemo(function(){var Ko;if($n!=="combobox")return Ti;var Sa=(Ko=Bn[0])===null||Ko===void 0?void 0:Ko.value;return typeof Sa=="string"||typeof Sa=="number"?String(Sa):""},[Ti,$n,Bn]),_t=$n==="combobox"&&typeof Xn=="function"&&Xn()||null,Yi=typeof di=="function"&&di(),Ci=(0,ee.x1)(Ao,Yi==null||(cn=Yi.props)===null||cn===void 0?void 0:cn.ref),Cr=Xe.useState(!1),Ri=(0,Ge.Z)(Cr,2),Ii=Ri[0],er=Ri[1];(0,It.Z)(function(){er(!0)},[]);var tr=(0,Tt.Z)(!1,{defaultValue:$i,value:Hi}),hr=(0,Ge.Z)(tr,2),Sr=hr[0],kr=hr[1],Er=Ii?Sr:!1,Br=!yn&&wn;(Yn||Br&&Er&&$n==="combobox")&&(Er=!1);var Zr=Br?!1:Er,zi=Xe.useCallback(function(Ko){var Sa=Ko!==void 0?Ko:!Er;Yn||(kr(Sa),Er!==Sa&&(Wi==null||Wi(Sa)))},[Yn,Er,kr,Wi]),oa=Xe.useMemo(function(){return(fr||[]).some(function(Ko){return[`
`,`\r
`].includes(Ko)})},[fr]),Ra=function(Sa,ll,Ss){var ms=!0,Ua=Sa;Si==null||Si(null);var ss=Ss?null:Ye(Sa,fr);return $n!=="combobox"&&ss&&(Ua="",yr==null||yr(ss),zi(!1),ms=!1),Qi&&wi!==Ua&&Qi(Ua,{source:ll?"typing":"effect"}),ms},Ls=function(Sa){!Sa||!Sa.trim()||Qi(Sa,{source:"submit"})};Xe.useEffect(function(){!Er&&!Gr&&$n!=="combobox"&&Ra("",!1,!1)},[Er]),Xe.useEffect(function(){Sr&&Yn&&kr(!1),Yn&&pa(!1)},[Yn]);var Ys=Ae(),tl=(0,Ge.Z)(Ys,2),Ui=tl[0],La=tl[1],Ba=function(Sa){var ll=Ui(),Ss=Sa.which;if(Ss===ne.Z.ENTER&&($n!=="combobox"&&Sa.preventDefault(),Er||zi(!0)),La(!!wi),Ss===ne.Z.BACKSPACE&&!ll&&Gr&&!wi&&Bn.length){for(var ms=(0,Oe.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(Er&&ko.current){var is;(is=ko.current).onKeyDown.apply(is,[Sa].concat(oc))}wo==null||wo.apply(void 0,[Sa].concat(oc))},zs=function(Sa){for(var ll=arguments.length,Ss=new Array(ll>1?ll-1:0),ms=1;ms<ll;ms++)Ss[ms-1]=arguments[ms];if(Er&&ko.current){var Ua;(Ua=ko.current).onKeyUp.apply(Ua,[Sa].concat(Ss))}Or==null||Or.apply(void 0,[Sa].concat(Ss))},su=function(Sa){var ll=Bn.filter(function(Ss){return Ss!==Sa});Ft(ll,{type:"remove",values:[Sa]})},lu=Xe.useRef(!1),So=function(){pa(!0),Yn||(jr&&!lu.current&&jr.apply(void 0,arguments),et.includes("focus")&&zi(!0)),lu.current=!0},yc=function(){pa(!1,function(){lu.current=!1,zi(!1)}),!Yn&&(wi&&($n==="tags"?Qi(wi,{source:"submit"}):$n==="multiple"&&Qi("",{source:"blur"})),yo&&yo.apply(void 0,arguments))},Ml=[];Xe.useEffect(function(){return function(){Ml.forEach(function(Ko){return clearTimeout(Ko)}),Ml.splice(0,Ml.length)}},[]);var as=function(Sa){var ll,Ss=Sa.target,ms=(ll=Vo.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),Lt(),!mr&&!ms.contains(document.activeElement)){var _l;(_l=sa.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];co==null||co.apply(void 0,[Sa].concat(xs))},vl=Xe.useState({}),ju=(0,Ge.Z)(vl,2),rc=ju[1];function wl(){rc({})}var sl;Yi&&(sl=function(Sa){zi(Sa)}),ze(function(){var Ko;return[hi.current,(Ko=Vo.current)===null||Ko===void 0?void 0:Ko.getPopupElement()]},Zr,zi,!!Yi);var td=Xe.useMemo(function(){return(0,st.Z)((0,st.Z)({},Bt),{},{notFoundContent:yn,open:Er,triggerOpen:Zr,id:Un,showSearch:zr,multiple:Gr,toggleOpen:zi})},[Bt,yn,Zr,Er,Un,zr,Gr,zi]),nd=!!Mr||ii,kc;nd&&(kc=Xe.createElement(se,{className:ct()("".concat(un,"-arrow"),(0,Ke.Z)({},"".concat(un,"-arrow-loading"),ii)),customizeIcon:Mr,customizeIconProps:{loading:ii,searchValue:wi,open:Er,focused:la,showSearch:zr}}));var _d=function(){var Sa;On==null||On(),(Sa=sa.current)===null||Sa===void 0||Sa.focus(),Ft([],{type:"clear",values:Bn}),Ra("",!1,!1)},id=he(un,_d,Bn,Vi,Dn,Yn,wi,$n),Ic=id.allowClear,Js=id.clearIcon,uu=Xe.createElement(Wr,{ref:ko}),xd=ct()(un,Rt,(Sn={},(0,Ke.Z)(Sn,"".concat(un,"-focused"),la),(0,Ke.Z)(Sn,"".concat(un,"-multiple"),Gr),(0,Ke.Z)(Sn,"".concat(un,"-single"),!Gr),(0,Ke.Z)(Sn,"".concat(un,"-allow-clear"),Vi),(0,Ke.Z)(Sn,"".concat(un,"-show-arrow"),nd),(0,Ke.Z)(Sn,"".concat(un,"-disabled"),Yn),(0,Ke.Z)(Sn,"".concat(un,"-loading"),ii),(0,Ke.Z)(Sn,"".concat(un,"-open"),Er),(0,Ke.Z)(Sn,"".concat(un,"-customize-input"),_t),(0,Ke.Z)(Sn,"".concat(un,"-show-search"),zr),Sn)),Eu=Xe.createElement(Pe,{ref:Vo,disabled:Yn,prefixCls:un,visible:Zr,popupElement:uu,animation:_n,transitionName:Ir,dropdownStyle:eo,dropdownClassName:xr,direction:gi,dropdownMatchSelectWidth:bo,dropdownRender:Yr,dropdownAlign:ur,placement:ir,builtinPlacements:qi,getPopupContainer:Dr,empty:wn,getTriggerDOMNode:function(){return Ao.current},onPopupVisibleChange:sl,onPopupMouseEnter:wl},Yi?Xe.cloneElement(Yi,{ref:Ci}):Xe.createElement(Qn,(0,ge.Z)({},Bt,{domRef:Ao,prefixCls:un,inputElement:_t,ref:sa,id:Un,showSearch:zr,autoClearSearchValue:cr,mode:$n,activeDescendantId:Ki,tagRender:ni,values:Bn,open:Er,onToggleOpen:zi,activeValue:Xt,searchValue:wi,onSearch:Ra,onSearchSubmit:Ls,onRemove:su,tokenWithEnter:oa}))),Sc;return Yi?Sc=Eu:Sc=Xe.createElement("div",(0,ge.Z)({className:xd},Nr,{ref:hi,onMouseDown:as,onKeyDown:Ba,onKeyUp:zs,onFocus:So,onBlur:yc}),la&&!Er&&Xe.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Bn.map(function(Ko){var Sa=Ko.label,ll=Ko.value;return["number","string"].includes((0,Le.Z)(Sa))?Sa:ll}).join(", "))),Eu,kc,Ic&&Js),Xe.createElement(ve.Provider,{value:td},Sc)}),Zt=rt,dn=function(Bt,at){var cn=Xe.useRef({values:new Map,options:new Map}),Sn=Xe.useMemo(function(){var un=cn.current,Rt=un.values,zn=un.options,ni=Bt.map(function(Bn){if(Bn.label===void 0){var Ft;return(0,st.Z)((0,st.Z)({},Bn),{},{label:(Ft=Rt.get(Bn.value))===null||Ft===void 0?void 0:Ft.label})}return Bn}),gi=new Map,tn=new Map;return ni.forEach(function(Bn){gi.set(Bn.value,Bn),tn.set(Bn.value,at.get(Bn.value)||zn.get(Bn.value))}),cn.current.values=gi,cn.current.options=tn,ni},[Bt,at]),Un=Xe.useCallback(function(un){return at.get(un)||cn.current.options.get(un)},[at]);return[Sn,Un]};function mn(Bt,at){return wt(Bt).join("").toUpperCase().includes(at)}var qt=function(Bt,at,cn,Sn,Un){return Xe.useMemo(function(){if(!cn||Sn===!1)return Bt;var un=at.options,Rt=at.label,zn=at.value,ni=[],gi=typeof Sn=="function",tn=cn.toUpperCase(),Bn=gi?Sn:function(wn,gn){return Un?mn(gn[Un],tn):gn[un]?mn(gn[Rt!=="children"?Rt:"label"],tn):mn(gn[zn],tn)},Ft=gi?function(wn){return vt(wn)}:function(wn){return wn};return Bt.forEach(function(wn){if(wn[un]){var gn=Bn(cn,Ft(wn));if(gn)ni.push(wn);else{var yn=wn[un].filter(function(On){return Bn(cn,Ft(On))});yn.length&&ni.push((0,st.Z)((0,st.Z)({},wn),{},(0,Ke.Z)({},un,yn)))}return}Bn(cn,Ft(wn))&&ni.push(wn)}),ni},[Bt,Sn,Un,cn,at])},Gn=pe(17115),Kn=pe(11592),Nt=["children","value"],sn=["children"];function Fn(Bt){var at=Bt,cn=at.key,Sn=at.props,Un=Sn.children,un=Sn.value,Rt=(0,_e.Z)(Sn,Nt);return(0,st.Z)({key:cn,value:un!==void 0?un:cn,children:Un},Rt)}function hn(Bt){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Kn.Z)(Bt).map(function(cn,Sn){if(!Xe.isValidElement(cn)||!cn.type)return null;var Un=cn,un=Un.type.isSelectOptGroup,Rt=Un.key,zn=Un.props,ni=zn.children,gi=(0,_e.Z)(zn,sn);return at||!un?Fn(cn):(0,st.Z)((0,st.Z)({key:"__RC_SELECT_GRP__".concat(Rt===null?Sn:Rt,"__"),label:Rt},gi),{},{options:hn(ni)})}).filter(function(cn){return cn})}function Mn(Bt,at,cn,Sn,Un){return Xe.useMemo(function(){var un=Bt,Rt=!Bt;Rt&&(un=hn(at));var zn=new Map,ni=new Map,gi=function(Ft,wn,gn){gn&&typeof gn=="string"&&Ft.set(wn[gn],wn)};function tn(Bn){for(var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,wn=0;wn<Bn.length;wn+=1){var gn=Bn[wn];!gn[cn.options]||Ft?(zn.set(gn[cn.value],gn),gi(ni,gn,cn.label),gi(ni,gn,Sn),gi(ni,gn,Un)):tn(gn[cn.options],!0)}}return tn(un),{options:un,valueOptions:zn,labelOptions:ni}},[Bt,at,cn,Sn,Un])}function li(Bt){var at=Xe.useRef();at.current=Bt;var cn=Xe.useCallback(function(){return at.current.apply(at,arguments)},[]);return cn}var pi=function(){return null};pi.isSelectOptGroup=!0;var mi=pi,Li=function(){return null};Li.isSelectOption=!0;var Gi=Li,ar=pe(80547),Xi=pe(2738),wr=pe(4409),vr=Xe.createContext(null),ji=vr;function Lr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var jn=["disabled","title","children","style","className"];function Ne(Bt){return typeof Bt=="string"||typeof Bt=="number"}var Ei=function(at,cn){var Sn=be(),Un=Sn.prefixCls,un=Sn.id,Rt=Sn.open,zn=Sn.multiple,ni=Sn.mode,gi=Sn.searchValue,tn=Sn.toggleOpen,Bn=Sn.notFoundContent,Ft=Sn.onPopupScroll,wn=Xe.useContext(ji),gn=wn.flattenOptions,yn=wn.onActiveValue,On=wn.defaultActiveFirstOption,$n=wn.onSelect,Yn=wn.menuItemSelectedIcon,ii=wn.rawValues,Xn=wn.fieldNames,di=wn.virtual,Hi=wn.direction,$i=wn.listHeight,Wi=wn.listItemHeight,Xt="".concat(Un,"-item"),Si=(0,ar.Z)(function(){return gn},[Rt,gn],function(ur,ir){return ir[0]&&ur[1]!==ir[1]}),Ki=Xe.useRef(null),Ti=function(ir){ir.preventDefault()},cr=function(ir){Ki.current&&Ki.current.scrollTo(typeof ir=="number"?{index:ir}:ir)},Qi=function(ir){for(var qi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Dr=Si.length,Ai=0;Ai<Dr;Ai+=1){var et=(ir+Ai*qi+Dr)%Dr,jr=Si[et],yo=jr.group,Or=jr.data;if(!yo&&!Or.disabled)return et}return-1},yr=Xe.useState(function(){return Qi(0)}),fr=(0,Ge.Z)(yr,2),Vi=fr[0],Mr=fr[1],Dn=function(ir){var qi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Mr(ir);var Dr={source:qi?"keyboard":"mouse"},Ai=Si[ir];if(!Ai){yn(null,-1,Dr);return}yn(Ai.value,ir,Dr)};(0,Xe.useEffect)(function(){Dn(On!==!1?Qi(0):-1)},[Si.length,gi]);var Wr=Xe.useCallback(function(ur){return ii.has(ur)&&ni!=="combobox"},[ni,(0,Oe.Z)(ii).toString(),ii.size]);(0,Xe.useEffect)(function(){var ur=setTimeout(function(){if(!zn&&Rt&&ii.size===1){var qi=Array.from(ii)[0],Dr=Si.findIndex(function(Ai){var et=Ai.data;return et.value===qi});Dr!==-1&&(Dn(Dr),cr(Dr))}});if(Rt){var ir;(ir=Ki.current)===null||ir===void 0||ir.scrollTo(void 0)}return function(){return clearTimeout(ur)}},[Rt,gi,gn.length]);var _n=function(ir){ir!==void 0&&$n(ir,{selected:!ii.has(ir)}),zn||tn(!1)};if(Xe.useImperativeHandle(cn,function(){return{onKeyDown:function(ir){var qi=ir.which,Dr=ir.ctrlKey;switch(qi){case ne.Z.N:case ne.Z.P:case ne.Z.UP:case ne.Z.DOWN:{var Ai=0;if(qi===ne.Z.UP?Ai=-1:qi===ne.Z.DOWN?Ai=1:Lr()&&Dr&&(qi===ne.Z.N?Ai=1:qi===ne.Z.P&&(Ai=-1)),Ai!==0){var et=Qi(Vi+Ai,Ai);cr(et),Dn(et,!0)}break}case ne.Z.ENTER:{var jr=Si[Vi];jr&&!jr.data.disabled?_n(jr.value):_n(void 0),Rt&&ir.preventDefault();break}case ne.Z.ESC:tn(!1),Rt&&ir.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ir){cr(ir)}}}),Si.length===0)return Xe.createElement("div",{role:"listbox",id:"".concat(un,"_list"),className:"".concat(Xt,"-empty"),onMouseDown:Ti},Bn);var Ir=Object.keys(Xn).map(function(ur){return Xn[ur]}),eo=function(ir){return ir.label};function xr(ur,ir){var qi=ur.group;return{role:qi?"presentation":"option",id:"".concat(un,"_list_").concat(ir)}}var bo=function(ir){var qi=Si[ir];if(!qi)return null;var Dr=qi.data||{},Ai=Dr.value,et=qi.group,jr=(0,Ze.Z)(Dr,!0),yo=eo(qi);return qi?Xe.createElement("div",(0,ge.Z)({"aria-label":typeof yo=="string"&&!et?yo:null},jr,{key:ir},xr(qi,ir),{"aria-selected":Wr(Ai)}),Ai):null},Yr={role:"listbox",id:"".concat(un,"_list")};return Xe.createElement(Xe.Fragment,null,di&&Xe.createElement("div",(0,ge.Z)({},Yr,{style:{height:0,width:0,overflow:"hidden"}}),bo(Vi-1),bo(Vi),bo(Vi+1)),Xe.createElement(wr.Z,{itemKey:"key",ref:Ki,data:Si,height:$i,itemHeight:Wi,fullHeight:!1,onMouseDown:Ti,onScroll:Ft,virtual:di,direction:Hi,innerProps:di?null:Yr},function(ur,ir){var qi,Dr=ur.group,Ai=ur.groupOption,et=ur.data,jr=ur.label,yo=ur.value,Or=et.key;if(Dr){var wo,co=(wo=et.title)!==null&&wo!==void 0?wo:Ne(jr)?jr.toString():void 0;return Xe.createElement("div",{className:ct()(Xt,"".concat(Xt,"-group")),title:co},jr!==void 0?jr:Or)}var $o=et.disabled,Gr=et.title,zr=et.children,Nr=et.style,Eo=et.className,or=(0,_e.Z)(et,jn),mr=(0,Xi.Z)(or,Ir),$r=Wr(yo),hi="".concat(Xt,"-option"),Ao=ct()(Xt,hi,Eo,(qi={},(0,Ke.Z)(qi,"".concat(hi,"-grouped"),Ai),(0,Ke.Z)(qi,"".concat(hi,"-active"),Vi===ir&&!$o),(0,Ke.Z)(qi,"".concat(hi,"-disabled"),$o),(0,Ke.Z)(qi,"".concat(hi,"-selected"),$r),qi)),Vo=eo(ur),sa=!Yn||typeof Yn=="function"||$r,ko=typeof Vo=="number"?Vo:Vo||yo,Io=Ne(ko)?ko.toString():void 0;return Gr!==void 0&&(Io=Gr),Xe.createElement("div",(0,ge.Z)({},(0,Ze.Z)(mr),di?{}:xr(ur,ir),{"aria-selected":$r,className:Ao,title:Io,onMouseMove:function(){Vi===ir||$o||Dn(ir)},onClick:function(){$o||_n(yo)},style:Nr}),Xe.createElement("div",{className:"".concat(hi,"-content")},ko),Xe.isValidElement(Yn)||$r,sa&&Xe.createElement(se,{className:"".concat(Xt,"-option-state"),customizeIcon:Yn,customizeIconProps:{isSelected:$r}},$r?"\u2713":null))}))},Oi=Xe.forwardRef(Ei);Oi.displayName="OptionList";var on=Oi;function ui(Bt){var at=Bt.mode,cn=Bt.options,Sn=Bt.children,Un=Bt.backfill,un=Bt.allowClear,Rt=Bt.placeholder,zn=Bt.getInputElement,ni=Bt.showSearch,gi=Bt.onSearch,tn=Bt.defaultOpen,Bn=Bt.autoFocus,Ft=Bt.labelInValue,wn=Bt.value,gn=Bt.inputValue,yn=Bt.optionLabelProp,On=isMultiple(at),$n=ni!==void 0?ni:On||at==="combobox",Yn=cn||convertChildrenToData(Sn);if(warning(at!=="tags"||Yn.every(function(Hi){return!Hi.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),at==="tags"||at==="combobox"){var ii=Yn.some(function(Hi){return Hi.options?Hi.options.some(function($i){return typeof("value"in $i?$i.value:$i.key)=="number"}):typeof("value"in Hi?Hi.value:Hi.key)=="number"});warning(!ii,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(at!=="combobox"||!yn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(at==="combobox"||!Un,"`backfill` only works with `combobox` mode."),warning(at==="combobox"||!zn,"`getInputElement` only work with `combobox` mode."),noteOnce(at!=="combobox"||!zn||!un||!Rt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),gi&&!$n&&at!=="combobox"&&at!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!tn||Bn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),wn!=null){var Xn=toArray(wn);warning(!Ft||Xn.every(function(Hi){return _typeof(Hi)==="object"&&("key"in Hi||"value"in Hi)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!On||Array.isArray(wn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Sn){var di=null;toNodeArray(Sn).some(function(Hi){if(!React.isValidElement(Hi)||!Hi.type)return!1;var $i=Hi,Wi=$i.type;if(Wi.isSelectOption)return!1;if(Wi.isSelectOptGroup){var Xt=toNodeArray(Hi.props.children).every(function(Si){return!React.isValidElement(Si)||!Hi.type||Si.type.isSelectOption?!0:(di=Si.type,!1)});return!Xt}return di=Wi,!0}),di&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(di.displayName||di.name||di,"`.")),warning(gn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function vi(Bt,at){if(Bt){var cn=function Sn(Un){for(var un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=0;Rt<Un.length;Rt++){var zn=Un[Rt];if(zn[at==null?void 0:at.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!un&&Array.isArray(zn[at==null?void 0:at.options])&&Sn(zn[at==null?void 0:at.options],!0))break}};cn(Bt)}}var bi=null,In=["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"],Gt=["inputValue"];function Kt(Bt){return!Bt||(0,Le.Z)(Bt)!=="object"}var jt=Xe.forwardRef(function(Bt,at){var cn=Bt.id,Sn=Bt.mode,Un=Bt.prefixCls,un=Un===void 0?"rc-select":Un,Rt=Bt.backfill,zn=Bt.fieldNames,ni=Bt.inputValue,gi=Bt.searchValue,tn=Bt.onSearch,Bn=Bt.autoClearSearchValue,Ft=Bn===void 0?!0:Bn,wn=Bt.onSelect,gn=Bt.onDeselect,yn=Bt.dropdownMatchSelectWidth,On=yn===void 0?!0:yn,$n=Bt.filterOption,Yn=Bt.filterSort,ii=Bt.optionFilterProp,Xn=Bt.optionLabelProp,di=Bt.options,Hi=Bt.children,$i=Bt.defaultActiveFirstOption,Wi=Bt.menuItemSelectedIcon,Xt=Bt.virtual,Si=Bt.direction,Ki=Bt.listHeight,Ti=Ki===void 0?200:Ki,cr=Bt.listItemHeight,Qi=cr===void 0?20:cr,yr=Bt.value,fr=Bt.defaultValue,Vi=Bt.labelInValue,Mr=Bt.onChange,Dn=(0,_e.Z)(Bt,In),Wr=(0,Gn.ZP)(cn),_n=St(Sn),Ir=!!(!di&&Hi),eo=Xe.useMemo(function(){return $n===void 0&&Sn==="combobox"?!1:$n},[$n,Sn]),xr=Xe.useMemo(function(){return ye(zn,Ir)},[JSON.stringify(zn),Ir]),bo=(0,Tt.Z)("",{value:gi!==void 0?gi:ni,postState:function(Br){return Br||""}}),Yr=(0,Ge.Z)(bo,2),ur=Yr[0],ir=Yr[1],qi=Mn(di,Hi,xr,ii,Xn),Dr=qi.valueOptions,Ai=qi.labelOptions,et=qi.options,jr=Xe.useCallback(function(Er){var Br=wt(Er);return Br.map(function(Zr){var zi,oa,Ra,Ls,Ys;if(Kt(Zr))zi=Zr;else{var tl;Ra=Zr.key,oa=Zr.label,zi=(tl=Zr.value)!==null&&tl!==void 0?tl:Ra}var Ui=Dr.get(zi);if(Ui){var La;if(oa===void 0&&(oa=Ui==null?void 0:Ui[Xn||xr.label]),Ra===void 0&&(Ra=(La=Ui==null?void 0:Ui.key)!==null&&La!==void 0?La:zi),Ls=Ui==null?void 0:Ui.disabled,Ys=Ui==null?void 0:Ui.title,0)var Ba}return{label:oa,value:zi,key:Ra,disabled:Ls,title:Ys}})},[xr,Xn,Dr]),yo=(0,Tt.Z)(fr,{value:yr}),Or=(0,Ge.Z)(yo,2),wo=Or[0],co=Or[1],$o=Xe.useMemo(function(){var Er,Br=jr(wo);return Sn==="combobox"&&zt((Er=Br[0])===null||Er===void 0?void 0:Er.value)?[]:Br},[wo,jr,Sn]),Gr=dn($o,Dr),zr=(0,Ge.Z)(Gr,2),Nr=zr[0],Eo=zr[1],or=Xe.useMemo(function(){if(!Sn&&Nr.length===1){var Er=Nr[0];if(Er.value===null&&(Er.label===null||Er.label===void 0))return[]}return Nr.map(function(Br){var Zr;return(0,st.Z)((0,st.Z)({},Br),{},{label:(Zr=Br.label)!==null&&Zr!==void 0?Zr:Br.value})})},[Sn,Nr]),mr=Xe.useMemo(function(){return new Set(Nr.map(function(Er){return Er.value}))},[Nr]);Xe.useEffect(function(){if(Sn==="combobox"){var Er,Br=(Er=Nr[0])===null||Er===void 0?void 0:Er.value;ir(ht(Br)?String(Br):"")}},[Nr]);var $r=li(function(Er,Br){var Zr,zi=Br!=null?Br:Er;return Zr={},(0,Ke.Z)(Zr,xr.value,Er),(0,Ke.Z)(Zr,xr.label,zi),Zr}),hi=Xe.useMemo(function(){if(Sn!=="tags")return et;var Er=(0,Oe.Z)(et),Br=function(zi){return Dr.has(zi)};return(0,Oe.Z)(Nr).sort(function(Zr,zi){return Zr.value<zi.value?-1:1}).forEach(function(Zr){var zi=Zr.value;Br(zi)||Er.push($r(zi,Zr.label))}),Er},[$r,et,Dr,Nr,Sn]),Ao=qt(hi,xr,ur,eo,ii),Vo=Xe.useMemo(function(){return Sn!=="tags"||!ur||Ao.some(function(Er){return Er[ii||"value"]===ur})||Ao.some(function(Er){return Er[xr.value]===ur})?Ao:[$r(ur)].concat((0,Oe.Z)(Ao))},[$r,ii,Sn,Ao,ur,xr]),sa=Xe.useMemo(function(){return Yn?(0,Oe.Z)(Vo).sort(function(Er,Br){return Yn(Er,Br)}):Vo},[Vo,Yn]),ko=Xe.useMemo(function(){return Qe(sa,{fieldNames:xr,childrenAsData:Ir})},[sa,xr,Ir]),Io=function(Br){var Zr=jr(Br);if(co(Zr),Mr&&(Zr.length!==Nr.length||Zr.some(function(Ra,Ls){var Ys;return((Ys=Nr[Ls])===null||Ys===void 0?void 0:Ys.value)!==(Ra==null?void 0:Ra.value)}))){var zi=Vi?Zr:Zr.map(function(Ra){return Ra.value}),oa=Zr.map(function(Ra){return vt(Eo(Ra.value))});Mr(_n?zi:zi[0],_n?oa:oa[0])}},_o=Xe.useState(null),la=(0,Ge.Z)(_o,2),pa=la[0],Lt=la[1],wi=Xe.useState(0),_t=(0,Ge.Z)(wi,2),Yi=_t[0],Ci=_t[1],Cr=$i!==void 0?$i:Sn!=="combobox",Ri=Xe.useCallback(function(Er,Br){var Zr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},zi=Zr.source,oa=zi===void 0?"keyboard":zi;Ci(Br),Rt&&Sn==="combobox"&&Er!==null&&oa==="keyboard"&&Lt(String(Er))},[Rt,Sn]),Ii=function(Br,Zr,zi){var oa=function(){var lu,So=Eo(Br);return[Vi?{label:So==null?void 0:So[xr.label],value:Br,key:(lu=So==null?void 0:So.key)!==null&&lu!==void 0?lu:Br}:Br,vt(So)]};if(Zr&&wn){var Ra=oa(),Ls=(0,Ge.Z)(Ra,2),Ys=Ls[0],tl=Ls[1];wn(Ys,tl)}else if(!Zr&&gn&&zi!=="clear"){var Ui=oa(),La=(0,Ge.Z)(Ui,2),Ba=La[0],zs=La[1];gn(Ba,zs)}},er=li(function(Er,Br){var Zr,zi=_n?Br.selected:!0;zi?Zr=_n?[].concat((0,Oe.Z)(Nr),[Er]):[Er]:Zr=Nr.filter(function(oa){return oa.value!==Er}),Io(Zr),Ii(Er,zi),Sn==="combobox"?Lt(""):(!St||Ft)&&(ir(""),Lt(""))}),tr=function(Br,Zr){Io(Br);var zi=Zr.type,oa=Zr.values;(zi==="remove"||zi==="clear")&&oa.forEach(function(Ra){Ii(Ra.value,!1,zi)})},hr=function(Br,Zr){if(ir(Br),Lt(null),Zr.source==="submit"){var zi=(Br||"").trim();if(zi){var oa=Array.from(new Set([].concat((0,Oe.Z)(mr),[zi])));Io(oa),Ii(zi,!0),ir("")}return}Zr.source!=="blur"&&(Sn==="combobox"&&Io(Br),tn==null||tn(Br))},Sr=function(Br){var Zr=Br;Sn!=="tags"&&(Zr=Br.map(function(oa){var Ra=Ai.get(oa);return Ra==null?void 0:Ra.value}).filter(function(oa){return oa!==void 0}));var zi=Array.from(new Set([].concat((0,Oe.Z)(mr),(0,Oe.Z)(Zr))));Io(zi),zi.forEach(function(oa){Ii(oa,!0)})},kr=Xe.useMemo(function(){var Er=Xt!==!1&&On!==!1;return(0,st.Z)((0,st.Z)({},qi),{},{flattenOptions:ko,onActiveValue:Ri,defaultActiveFirstOption:Cr,onSelect:er,menuItemSelectedIcon:Wi,rawValues:mr,fieldNames:xr,virtual:Er,direction:Si,listHeight:Ti,listItemHeight:Qi,childrenAsData:Ir})},[qi,ko,Ri,Cr,er,Wi,mr,xr,Xt,On,Ti,Qi,Ir]);return Xe.createElement(ji.Provider,{value:kr},Xe.createElement(Zt,(0,ge.Z)({},Dn,{id:Wr,prefixCls:un,ref:at,omitDomProps:Gt,mode:Sn,displayValues:or,onDisplayValuesChange:tr,direction:Si,searchValue:ur,onSearch:hr,autoClearSearchValue:Ft,onSearchSplit:Sr,dropdownMatchSelectWidth:On,OptionList:on,emptyOptions:!ko.length,activeValue:pa,activeDescendantId:"".concat(Wr,"_list_").concat(Yi)})))}),ft=jt;ft.Option=Gi,ft.OptGroup=mi;var an=ft,vn=an},9296:function(Vn,Pn,pe){"use strict";pe.r(Pn),pe.d(Pn,{ResizableTextArea:function(){return bt},default:function(){return zt}});var ge=pe(92413),Oe=pe(33708),Ke=pe(400),st=pe(39559),Ge=pe(33606),_e=pe(37061),Le=pe(26407),Tt=pe(92310),Pt=pe.n(Tt),Xe=pe(93681),Et=pe(5643),ct=pe(18929),It=pe(59301),Be=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"],he={},ve;function be(Yt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,it=Yt.getAttribute("id")||Yt.getAttribute("data-reactid")||Yt.getAttribute("name");if(Ut&&he[it])return he[it];var Ve=window.getComputedStyle(Yt),Wt=Ve.getPropertyValue("box-sizing")||Ve.getPropertyValue("-moz-box-sizing")||Ve.getPropertyValue("-webkit-box-sizing"),Ln=parseFloat(Ve.getPropertyValue("padding-bottom"))+parseFloat(Ve.getPropertyValue("padding-top")),Nn=parseFloat(Ve.getPropertyValue("border-bottom-width"))+parseFloat(Ve.getPropertyValue("border-top-width")),$t=se.map(function(An){return"".concat(An,":").concat(Ve.getPropertyValue(An))}).join(";"),rn={sizingStyle:$t,paddingSize:Ln,borderSize:Nn,boxSizing:Wt};return Ut&&it&&(he[it]=rn),rn}function ke(Yt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,it=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ve||(ve=document.createElement("textarea"),ve.setAttribute("tab-index","-1"),ve.setAttribute("aria-hidden","true"),document.body.appendChild(ve)),Yt.getAttribute("wrap")?ve.setAttribute("wrap",Yt.getAttribute("wrap")):ve.removeAttribute("wrap");var Wt=be(Yt,Ut),Ln=Wt.paddingSize,Nn=Wt.borderSize,$t=Wt.boxSizing,rn=Wt.sizingStyle;ve.setAttribute("style","".concat(rn,";").concat(ce)),ve.value=Yt.value||Yt.placeholder||"";var An=void 0,ti=void 0,xn,Qn=ve.scrollHeight;if($t==="border-box"?Qn+=Nn:$t==="content-box"&&(Qn-=Ln),it!==null||Ve!==null){ve.value=" ";var Ot=ve.scrollHeight-Ln;it!==null&&(An=Ot*it,$t==="border-box"&&(An=An+Ln+Nn),Qn=Math.max(An,Qn)),Ve!==null&&(ti=Ot*Ve,$t==="border-box"&&(ti=ti+Ln+Nn),xn=Qn>ti?"":"hidden",Qn=Math.min(ti,Qn))}var Cn={height:Qn,overflowY:xn,resize:"none"};return An&&(Cn.minHeight=An),ti&&(Cn.maxHeight=ti),Cn}var Ae=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ze=0,Ze=1,ot=2,qe=It.forwardRef(function(Yt,Ut){var it=Yt,Ve=it.prefixCls,Wt=it.onPressEnter,Ln=it.defaultValue,Nn=it.value,$t=it.autoSize,rn=it.onResize,An=it.className,ti=it.style,xn=it.disabled,Qn=it.onChange,Ot=it.onInternalAutoSize,Cn=(0,_e.Z)(it,Ae),Wn=(0,ct.Z)(Ln,{value:Nn,postState:function(mi){return mi!=null?mi:""}}),We=(0,Ge.Z)(Wn,2),Ee=We[0],Pe=We[1],De=function(mi){Pe(mi.target.value),Qn==null||Qn(mi)},Fe=It.useRef();It.useImperativeHandle(Ut,function(){return{textArea:Fe.current}});var ye=It.useMemo(function(){return $t&&(0,st.Z)($t)==="object"?[$t.minRows,$t.maxRows]:[]},[$t]),Qe=(0,Ge.Z)(ye,2),vt=Qe[0],Ye=Qe[1],Je=!!$t,yt=function(){try{if(document.activeElement===Fe.current){var mi=Fe.current,Li=mi.selectionStart,Gi=mi.selectionEnd,ar=mi.scrollTop;Fe.current.setSelectionRange(Li,Gi),Fe.current.scrollTop=ar}}catch(Xi){}},St=It.useState(ot),rt=(0,Ge.Z)(St,2),Zt=rt[0],dn=rt[1],mn=It.useState(),qt=(0,Ge.Z)(mn,2),Gn=qt[0],Kn=qt[1],Nt=function(){dn(ze)};(0,ne.Z)(function(){Je&&Nt()},[Nn,vt,Ye,Je]),(0,ne.Z)(function(){if(Zt===ze)dn(Ze);else if(Zt===Ze){var pi=ke(Fe.current,!1,vt,Ye);dn(ot),Kn(pi)}else yt()},[Zt]);var sn=It.useRef(),Fn=function(){ee.Z.cancel(sn.current)},hn=function(mi){Zt===ot&&(rn==null||rn(mi),$t&&(Fn(),sn.current=(0,ee.Z)(function(){Nt()})))};It.useEffect(function(){return Fn},[]);var Mn=Je?Gn:null,li=(0,Oe.Z)((0,Oe.Z)({},ti),Mn);return(Zt===ze||Zt===Ze)&&(li.overflowY="hidden",li.overflowX="hidden"),It.createElement(Be.Z,{onResize:hn,disabled:!($t||rn)},It.createElement("textarea",(0,ge.Z)({},Cn,{ref:Fe,style:li,className:Pt()(Ve,An,(0,Ke.Z)({},"".concat(Ve,"-disabled"),xn)),disabled:xn,value:Ee,onChange:De})))}),bt=qe,He=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function wt(Yt,Ut){return(0,Le.Z)(Yt||"").slice(0,Ut).join("")}function nt(Yt,Ut,it,Ve){var Wt=it;return Yt?Wt=wt(it,Ve):(0,Le.Z)(Ut||"").length<it.length&&(0,Le.Z)(it||"").length>Ve&&(Wt=Ut),Wt}var Dt=It.forwardRef(function(Yt,Ut){var it,Ve=Yt.defaultValue,Wt=Yt.value,Ln=Yt.onFocus,Nn=Yt.onBlur,$t=Yt.onChange,rn=Yt.allowClear,An=Yt.maxLength,ti=Yt.onCompositionStart,xn=Yt.onCompositionEnd,Qn=Yt.suffix,Ot=Yt.prefixCls,Cn=Ot===void 0?"rc-textarea":Ot,Wn=Yt.classes,We=Yt.showCount,Ee=Yt.className,Pe=Yt.style,De=Yt.disabled,Fe=Yt.hidden,ye=Yt.classNames,Qe=Yt.styles,vt=Yt.onResize,Ye=(0,_e.Z)(Yt,He),Je=(0,ct.Z)(Ve,{value:Wt,defaultValue:Ve}),yt=(0,Ge.Z)(Je,2),St=yt[0],rt=yt[1],Zt=(0,It.useRef)(null),dn=It.useState(!1),mn=(0,Ge.Z)(dn,2),qt=mn[0],Gn=mn[1],Kn=It.useState(!1),Nt=(0,Ge.Z)(Kn,2),sn=Nt[0],Fn=Nt[1],hn=It.useRef(),Mn=It.useRef(0),li=It.useState(null),pi=(0,Ge.Z)(li,2),mi=pi[0],Li=pi[1],Gi=function(){var Kt;(Kt=Zt.current)===null||Kt===void 0||Kt.textArea.focus()};(0,It.useImperativeHandle)(Ut,function(){return{resizableTextArea:Zt.current,focus:Gi,blur:function(){var Kt;(Kt=Zt.current)===null||Kt===void 0||Kt.textArea.blur()}}}),(0,It.useEffect)(function(){Gn(function(Gt){return!De&&Gt})},[De]);var ar=Number(An)>0,Xi=function(Kt){Fn(!0),hn.current=St,Mn.current=Kt.currentTarget.selectionStart,ti==null||ti(Kt)},wr=function(Kt){Fn(!1);var jt=Kt.currentTarget.value;if(ar){var ft,an=Mn.current>=An+1||Mn.current===((ft=hn.current)===null||ft===void 0?void 0:ft.length);jt=nt(an,hn.current,jt,An)}jt!==St&&(rt(jt),(0,Et.rJ)(Kt.currentTarget,Kt,$t,jt)),xn==null||xn(Kt)},vr=function(Kt){var jt=Kt.target.value;if(!sn&&ar){var ft=Kt.target.selectionStart>=An+1||Kt.target.selectionStart===jt.length||!Kt.target.selectionStart;jt=nt(ft,St,jt,An)}rt(jt),(0,Et.rJ)(Kt.currentTarget,Kt,$t,jt)},ji=function(Kt){var jt=Ye.onPressEnter,ft=Ye.onKeyDown;Kt.key==="Enter"&&jt&&jt(Kt),ft==null||ft(Kt)},Lr=function(Kt){Gn(!0),Ln==null||Ln(Kt)},jn=function(Kt){Gn(!1),Nn==null||Nn(Kt)},Ne=function(Kt){var jt;rt(""),Gi(),(0,Et.rJ)((jt=Zt.current)===null||jt===void 0?void 0:jt.textArea,Kt,$t)},Ei=(0,Et.D7)(St);!sn&&ar&&Wt==null&&(Ei=wt(Ei,An));var Oi=Qn,on;if(We){var ui=(0,Le.Z)(Ei).length;(0,st.Z)(We)==="object"?on=We.formatter({value:Ei,count:ui,maxLength:An}):on="".concat(ui).concat(ar?" / ".concat(An):""),Oi=It.createElement(It.Fragment,null,Oi,It.createElement("span",{className:Pt()("".concat(Cn,"-data-count"),ye==null?void 0:ye.count),style:Qe==null?void 0:Qe.count},on))}var vi=function(Kt){var jt;vt==null||vt(Kt),(jt=Zt.current)!==null&&jt!==void 0&&jt.textArea.style.height&&Li(!0)},bi=!Ye.autoSize&&!We&&!rn,In=It.createElement(Xe.BaseInput,{value:Ei,allowClear:rn,handleReset:Ne,suffix:Oi,prefixCls:Cn,classes:{affixWrapper:Pt()(Wn==null?void 0:Wn.affixWrapper,(it={},(0,Ke.Z)(it,"".concat(Cn,"-show-count"),We),(0,Ke.Z)(it,"".concat(Cn,"-textarea-allow-clear"),rn),it))},disabled:De,focused:qt,className:Ee,style:(0,Oe.Z)((0,Oe.Z)({},Pe),mi&&!bi?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof on=="string"?on:void 0}},hidden:Fe,inputElement:It.createElement(bt,(0,ge.Z)({},Ye,{onKeyDown:ji,onChange:vr,onFocus:Lr,onBlur:jn,onCompositionStart:Xi,onCompositionEnd:wr,className:ye==null?void 0:ye.textarea,style:(0,Oe.Z)((0,Oe.Z)({},Qe==null?void 0:Qe.textarea),{},{resize:Pe==null?void 0:Pe.resize}),disabled:De,prefixCls:Cn,onResize:vi,ref:Zt}))});return In}),ht=Dt,zt=ht},39417:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Ze}});var ge=pe(92413),Oe=pe(400),Ke=pe(37061),st=pe(33708),Ge=pe(6909),_e=pe(4771),Le=pe(25314),Tt=pe(9427),Pt=pe(25440),Xe=pe(92310),Et=pe.n(Xe),ct=pe(26112),It=pe(59301),Be=pe(39378),ne=function(qe){for(var bt=qe.prefixCls,He=qe.level,wt=qe.isStart,nt=qe.isEnd,Dt="".concat(bt,"-indent-unit"),ht=[],zt=0;zt<He;zt+=1){var Yt;ht.push(It.createElement("span",{key:zt,className:Et()(Dt,(Yt={},(0,Oe.Z)(Yt,"".concat(Dt,"-start"),wt[zt]),(0,Oe.Z)(Yt,"".concat(Dt,"-end"),nt[zt]),Yt))}))}return It.createElement("span",{"aria-hidden":"true",className:"".concat(bt,"-indent")},ht)},ee=It.memo(ne),ce=pe(67841),se=pe(71430),he=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ve="open",be="close",ke="---",Ae=function(ot){(0,Tt.Z)(bt,ot);var qe=(0,Pt.Z)(bt);function bt(){var He;(0,Ge.Z)(this,bt);for(var wt=arguments.length,nt=new Array(wt),Dt=0;Dt<wt;Dt++)nt[Dt]=arguments[Dt];return He=qe.call.apply(qe,[this].concat(nt)),He.state={dragNodeHighlight:!1},He.selectHandle=void 0,He.cacheIndent=void 0,He.onSelectorClick=function(ht){var zt=He.props.context.onNodeClick;zt(ht,(0,se.F)(He.props)),He.isSelectable()?He.onSelect(ht):He.onCheck(ht)},He.onSelectorDoubleClick=function(ht){var zt=He.props.context.onNodeDoubleClick;zt(ht,(0,se.F)(He.props))},He.onSelect=function(ht){if(!He.isDisabled()){var zt=He.props.context.onNodeSelect;zt(ht,(0,se.F)(He.props))}},He.onCheck=function(ht){if(!He.isDisabled()){var zt=He.props,Yt=zt.disableCheckbox,Ut=zt.checked,it=He.props.context.onNodeCheck;if(!(!He.isCheckable()||Yt)){var Ve=!Ut;it(ht,(0,se.F)(He.props),Ve)}}},He.onMouseEnter=function(ht){var zt=He.props.context.onNodeMouseEnter;zt(ht,(0,se.F)(He.props))},He.onMouseLeave=function(ht){var zt=He.props.context.onNodeMouseLeave;zt(ht,(0,se.F)(He.props))},He.onContextMenu=function(ht){var zt=He.props.context.onNodeContextMenu;zt(ht,(0,se.F)(He.props))},He.onDragStart=function(ht){var zt=He.props.context.onNodeDragStart;ht.stopPropagation(),He.setState({dragNodeHighlight:!0}),zt(ht,(0,Le.Z)(He));try{ht.dataTransfer.setData("text/plain","")}catch(Yt){}},He.onDragEnter=function(ht){var zt=He.props.context.onNodeDragEnter;ht.preventDefault(),ht.stopPropagation(),zt(ht,(0,Le.Z)(He))},He.onDragOver=function(ht){var zt=He.props.context.onNodeDragOver;ht.preventDefault(),ht.stopPropagation(),zt(ht,(0,Le.Z)(He))},He.onDragLeave=function(ht){var zt=He.props.context.onNodeDragLeave;ht.stopPropagation(),zt(ht,(0,Le.Z)(He))},He.onDragEnd=function(ht){var zt=He.props.context.onNodeDragEnd;ht.stopPropagation(),He.setState({dragNodeHighlight:!1}),zt(ht,(0,Le.Z)(He))},He.onDrop=function(ht){var zt=He.props.context.onNodeDrop;ht.preventDefault(),ht.stopPropagation(),He.setState({dragNodeHighlight:!1}),zt(ht,(0,Le.Z)(He))},He.onExpand=function(ht){var zt=He.props,Yt=zt.loading,Ut=zt.context.onNodeExpand;Yt||Ut(ht,(0,se.F)(He.props))},He.setSelectHandle=function(ht){He.selectHandle=ht},He.getNodeState=function(){var ht=He.props.expanded;return He.isLeaf()?null:ht?ve:be},He.hasChildren=function(){var ht=He.props.eventKey,zt=He.props.context.keyEntities,Yt=(0,ce.Z)(zt,ht)||{},Ut=Yt.children;return!!(Ut||[]).length},He.isLeaf=function(){var ht=He.props,zt=ht.isLeaf,Yt=ht.loaded,Ut=He.props.context.loadData,it=He.hasChildren();return zt===!1?!1:zt||!Ut&&!it||Ut&&Yt&&!it},He.isDisabled=function(){var ht=He.props.disabled,zt=He.props.context.disabled;return!!(zt||ht)},He.isCheckable=function(){var ht=He.props.checkable,zt=He.props.context.checkable;return!zt||ht===!1?!1:zt},He.syncLoadData=function(ht){var zt=ht.expanded,Yt=ht.loading,Ut=ht.loaded,it=He.props.context,Ve=it.loadData,Wt=it.onNodeLoad;Yt||Ve&&zt&&!He.isLeaf()&&!He.hasChildren()&&!Ut&&Wt((0,se.F)(He.props))},He.isDraggable=function(){var ht=He.props,zt=ht.data,Yt=ht.context.draggable;return!!(Yt&&(!Yt.nodeDraggable||Yt.nodeDraggable(zt)))},He.renderDragHandler=function(){var ht=He.props.context,zt=ht.draggable,Yt=ht.prefixCls;return zt!=null&&zt.icon?It.createElement("span",{className:"".concat(Yt,"-draggable-icon")},zt.icon):null},He.renderSwitcherIconDom=function(ht){var zt=He.props.switcherIcon,Yt=He.props.context.switcherIcon,Ut=zt||Yt;return typeof Ut=="function"?Ut((0,st.Z)((0,st.Z)({},He.props),{},{isLeaf:ht})):Ut},He.renderSwitcher=function(){var ht=He.props.expanded,zt=He.props.context.prefixCls;if(He.isLeaf()){var Yt=He.renderSwitcherIconDom(!0);return Yt!==!1?It.createElement("span",{className:Et()("".concat(zt,"-switcher"),"".concat(zt,"-switcher-noop"))},Yt):null}var Ut=Et()("".concat(zt,"-switcher"),"".concat(zt,"-switcher_").concat(ht?ve:be)),it=He.renderSwitcherIconDom(!1);return it!==!1?It.createElement("span",{onClick:He.onExpand,className:Ut},it):null},He.renderCheckbox=function(){var ht=He.props,zt=ht.checked,Yt=ht.halfChecked,Ut=ht.disableCheckbox,it=He.props.context.prefixCls,Ve=He.isDisabled(),Wt=He.isCheckable();if(!Wt)return null;var Ln=typeof Wt!="boolean"?Wt:null;return It.createElement("span",{className:Et()("".concat(it,"-checkbox"),zt&&"".concat(it,"-checkbox-checked"),!zt&&Yt&&"".concat(it,"-checkbox-indeterminate"),(Ve||Ut)&&"".concat(it,"-checkbox-disabled")),onClick:He.onCheck},Ln)},He.renderIcon=function(){var ht=He.props.loading,zt=He.props.context.prefixCls;return It.createElement("span",{className:Et()("".concat(zt,"-iconEle"),"".concat(zt,"-icon__").concat(He.getNodeState()||"docu"),ht&&"".concat(zt,"-icon_loading"))})},He.renderSelector=function(){var ht=He.state.dragNodeHighlight,zt=He.props,Yt=zt.title,Ut=Yt===void 0?ke:Yt,it=zt.selected,Ve=zt.icon,Wt=zt.loading,Ln=zt.data,Nn=He.props.context,$t=Nn.prefixCls,rn=Nn.showIcon,An=Nn.icon,ti=Nn.loadData,xn=Nn.titleRender,Qn=He.isDisabled(),Ot="".concat($t,"-node-content-wrapper"),Cn;if(rn){var Wn=Ve||An;Cn=Wn?It.createElement("span",{className:Et()("".concat($t,"-iconEle"),"".concat($t,"-icon__customize"))},typeof Wn=="function"?Wn(He.props):Wn):He.renderIcon()}else ti&&Wt&&(Cn=He.renderIcon());var We;typeof Ut=="function"?We=Ut(Ln):xn?We=xn(Ln):We=Ut;var Ee=It.createElement("span",{className:"".concat($t,"-title")},We);return It.createElement("span",{ref:He.setSelectHandle,title:typeof Ut=="string"?Ut:"",className:Et()("".concat(Ot),"".concat(Ot,"-").concat(He.getNodeState()||"normal"),!Qn&&(it||ht)&&"".concat($t,"-node-selected")),onMouseEnter:He.onMouseEnter,onMouseLeave:He.onMouseLeave,onContextMenu:He.onContextMenu,onClick:He.onSelectorClick,onDoubleClick:He.onSelectorDoubleClick},Cn,Ee,He.renderDropIndicator())},He.renderDropIndicator=function(){var ht=He.props,zt=ht.disabled,Yt=ht.eventKey,Ut=He.props.context,it=Ut.draggable,Ve=Ut.dropLevelOffset,Wt=Ut.dropPosition,Ln=Ut.prefixCls,Nn=Ut.indent,$t=Ut.dropIndicatorRender,rn=Ut.dragOverNodeKey,An=Ut.direction,ti=!!it,xn=!zt&&ti&&rn===Yt,Qn=Nn!=null?Nn:He.cacheIndent;return He.cacheIndent=Nn,xn?$t({dropPosition:Wt,dropLevelOffset:Ve,indent:Qn,prefixCls:Ln,direction:An}):null},He}return(0,_e.Z)(bt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var wt=this.props.selectable,nt=this.props.context.selectable;return typeof wt=="boolean"?wt:nt}},{key:"render",value:function(){var wt,nt=this.props,Dt=nt.eventKey,ht=nt.className,zt=nt.style,Yt=nt.dragOver,Ut=nt.dragOverGapTop,it=nt.dragOverGapBottom,Ve=nt.isLeaf,Wt=nt.isStart,Ln=nt.isEnd,Nn=nt.expanded,$t=nt.selected,rn=nt.checked,An=nt.halfChecked,ti=nt.loading,xn=nt.domRef,Qn=nt.active,Ot=nt.data,Cn=nt.onMouseMove,Wn=nt.selectable,We=(0,Ke.Z)(nt,he),Ee=this.props.context,Pe=Ee.prefixCls,De=Ee.filterTreeNode,Fe=Ee.keyEntities,ye=Ee.dropContainerKey,Qe=Ee.dropTargetKey,vt=Ee.draggingNodeKey,Ye=this.isDisabled(),Je=(0,ct.Z)(We,{aria:!0,data:!0}),yt=(0,ce.Z)(Fe,Dt)||{},St=yt.level,rt=Ln[Ln.length-1],Zt=this.isDraggable(),dn=!Ye&&Zt,mn=vt===Dt,qt=Wn!==void 0?{"aria-selected":!!Wn}:void 0;return It.createElement("div",(0,ge.Z)({ref:xn,className:Et()(ht,"".concat(Pe,"-treenode"),(wt={},(0,Oe.Z)(wt,"".concat(Pe,"-treenode-disabled"),Ye),(0,Oe.Z)(wt,"".concat(Pe,"-treenode-switcher-").concat(Nn?"open":"close"),!Ve),(0,Oe.Z)(wt,"".concat(Pe,"-treenode-checkbox-checked"),rn),(0,Oe.Z)(wt,"".concat(Pe,"-treenode-checkbox-indeterminate"),An),(0,Oe.Z)(wt,"".concat(Pe,"-treenode-selected"),$t),(0,Oe.Z)(wt,"".concat(Pe,"-treenode-loading"),ti),(0,Oe.Z)(wt,"".concat(Pe,"-treenode-active"),Qn),(0,Oe.Z)(wt,"".concat(Pe,"-treenode-leaf-last"),rt),(0,Oe.Z)(wt,"".concat(Pe,"-treenode-draggable"),Zt),(0,Oe.Z)(wt,"dragging",mn),(0,Oe.Z)(wt,"drop-target",Qe===Dt),(0,Oe.Z)(wt,"drop-container",ye===Dt),(0,Oe.Z)(wt,"drag-over",!Ye&&Yt),(0,Oe.Z)(wt,"drag-over-gap-top",!Ye&&Ut),(0,Oe.Z)(wt,"drag-over-gap-bottom",!Ye&&it),(0,Oe.Z)(wt,"filter-node",De&&De((0,se.F)(this.props))),wt)),style:zt,draggable:dn,"aria-grabbed":mn,onDragStart:dn?this.onDragStart:void 0,onDragEnter:Zt?this.onDragEnter:void 0,onDragOver:Zt?this.onDragOver:void 0,onDragLeave:Zt?this.onDragLeave:void 0,onDrop:Zt?this.onDrop:void 0,onDragEnd:Zt?this.onDragEnd:void 0,onMouseMove:Cn},qt,Je),It.createElement(ee,{prefixCls:Pe,level:St,isStart:Wt,isEnd:Ln}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),bt}(It.Component),ze=function(qe){return It.createElement(Be.k.Consumer,null,function(bt){return It.createElement(Ae,(0,ge.Z)({},qe,{context:bt}))})};ze.displayName="TreeNode",ze.isTreeNode=1;var Ze=ze},39378:function(Vn,Pn,pe){"use strict";pe.d(Pn,{k:function(){return Oe}});var ge=pe(59301),Oe=ge.createContext(null)},23130:function(Vn,Pn,pe){"use strict";pe.d(Pn,{O:function(){return Ze.Z},Z:function(){return Ee}});var ge=pe(92413),Oe=pe(400),Ke=pe(39559),st=pe(33708),Ge=pe(26407),_e=pe(6909),Le=pe(4771),Tt=pe(25314),Pt=pe(9427),Xe=pe(25440),Et=pe(92310),ct=pe.n(Et),It=pe(10228),Be=pe(26112),ne=pe(48736),ee=pe(59301),ce=pe(39378);function se(Pe){var De=Pe.dropPosition,Fe=Pe.dropLevelOffset,ye=Pe.indent,Qe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(De){case-1:Qe.top=0,Qe.left=-Fe*ye;break;case 1:Qe.bottom=0,Qe.left=-Fe*ye;break;case 0:Qe.bottom=0,Qe.left=ye;break}return ee.createElement("div",{style:Qe})}function he(Pe){if(Pe==null)throw new TypeError("Cannot destructure "+Pe)}var ve=pe(33606),be=pe(37061),ke=pe(34280),Ae=pe(4409),ze=pe(77900),Ze=pe(39417);function ot(Pe,De){var Fe=ee.useState(!1),ye=(0,ve.Z)(Fe,2),Qe=ye[0],vt=ye[1];ee.useLayoutEffect(function(){if(Qe)return Pe(),function(){De()}},[Qe]),ee.useLayoutEffect(function(){return vt(!0),function(){vt(!1)}},[])}var qe=pe(71430),bt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],He=function(De,Fe){var ye=De.className,Qe=De.style,vt=De.motion,Ye=De.motionNodes,Je=De.motionType,yt=De.onMotionStart,St=De.onMotionEnd,rt=De.active,Zt=De.treeNodeRequiredProps,dn=(0,be.Z)(De,bt),mn=ee.useState(!0),qt=(0,ve.Z)(mn,2),Gn=qt[0],Kn=qt[1],Nt=ee.useContext(ce.k),sn=Nt.prefixCls,Fn=Ye&&Je!=="hide";(0,ke.Z)(function(){Ye&&Fn!==Gn&&Kn(Fn)},[Ye]);var hn=function(){Ye&&yt()},Mn=ee.useRef(!1),li=function(){Ye&&!Mn.current&&(Mn.current=!0,St())};ot(hn,li);var pi=function(Li){Fn===Li&&li()};return Ye?ee.createElement(ze.default,(0,ge.Z)({ref:Fe,visible:Gn},vt,{motionAppear:Je==="show",onVisibleChanged:pi}),function(mi,Li){var Gi=mi.className,ar=mi.style;return ee.createElement("div",{ref:Li,className:ct()("".concat(sn,"-treenode-motion"),Gi),style:ar},Ye.map(function(Xi){var wr=(0,ge.Z)({},(he(Xi.data),Xi.data)),vr=Xi.title,ji=Xi.key,Lr=Xi.isStart,jn=Xi.isEnd;delete wr.children;var Ne=(0,qe.H8)(ji,Zt);return ee.createElement(Ze.Z,(0,ge.Z)({},wr,Ne,{title:vr,active:rt,data:Xi.data,key:ji,isStart:Lr,isEnd:jn}))}))}):ee.createElement(Ze.Z,(0,ge.Z)({domRef:Fe,className:ye,style:Qe},dn,{active:rt}))};He.displayName="MotionTreeNode";var wt=ee.forwardRef(He),nt=wt;function Dt(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Fe=Pe.length,ye=De.length;if(Math.abs(Fe-ye)!==1)return{add:!1,key:null};function Qe(vt,Ye){var Je=new Map;vt.forEach(function(St){Je.set(St,!0)});var yt=Ye.filter(function(St){return!Je.has(St)});return yt.length===1?yt[0]:null}return Fe<ye?{add:!0,key:Qe(Pe,De)}:{add:!1,key:Qe(De,Pe)}}function ht(Pe,De,Fe){var ye=Pe.findIndex(function(Je){return Je.key===Fe}),Qe=Pe[ye+1],vt=De.findIndex(function(Je){return Je.key===Fe});if(Qe){var Ye=De.findIndex(function(Je){return Je.key===Qe.key});return De.slice(vt+1,Ye)}return De.slice(vt+1)}var zt=["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"],Yt={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()),Ve={key:it},Wt={key:it,level:0,index:0,pos:"0",node:Ve,nodes:[Ve]},Ln={parent:null,children:[],pos:Wt.pos,data:Ve,title:null,key:it,isStart:[],isEnd:[]};function Nn(Pe,De,Fe,ye){return De===!1||!Fe?Pe:Pe.slice(0,Math.ceil(Fe/ye)+1)}function $t(Pe){var De=Pe.key,Fe=Pe.pos;return(0,qe.km)(De,Fe)}function rn(Pe){for(var De=String(Pe.data.key),Fe=Pe;Fe.parent;)Fe=Fe.parent,De="".concat(Fe.data.key," > ").concat(De);return De}var An=ee.forwardRef(function(Pe,De){var Fe=Pe.prefixCls,ye=Pe.data,Qe=Pe.selectable,vt=Pe.checkable,Ye=Pe.expandedKeys,Je=Pe.selectedKeys,yt=Pe.checkedKeys,St=Pe.loadedKeys,rt=Pe.loadingKeys,Zt=Pe.halfCheckedKeys,dn=Pe.keyEntities,mn=Pe.disabled,qt=Pe.dragging,Gn=Pe.dragOverNodeKey,Kn=Pe.dropPosition,Nt=Pe.motion,sn=Pe.height,Fn=Pe.itemHeight,hn=Pe.virtual,Mn=Pe.focusable,li=Pe.activeItem,pi=Pe.focused,mi=Pe.tabIndex,Li=Pe.onKeyDown,Gi=Pe.onFocus,ar=Pe.onBlur,Xi=Pe.onActiveChange,wr=Pe.onListChangeStart,vr=Pe.onListChangeEnd,ji=(0,be.Z)(Pe,zt),Lr=ee.useRef(null),jn=ee.useRef(null);ee.useImperativeHandle(De,function(){return{scrollTo:function(Bn){Lr.current.scrollTo(Bn)},getIndentWidth:function(){return jn.current.offsetWidth}}});var Ne=ee.useState(Ye),Ei=(0,ve.Z)(Ne,2),Oi=Ei[0],on=Ei[1],ui=ee.useState(ye),vi=(0,ve.Z)(ui,2),bi=vi[0],In=vi[1],Gt=ee.useState(ye),Kt=(0,ve.Z)(Gt,2),jt=Kt[0],ft=Kt[1],an=ee.useState([]),vn=(0,ve.Z)(an,2),Bt=vn[0],at=vn[1],cn=ee.useState(null),Sn=(0,ve.Z)(cn,2),Un=Sn[0],un=Sn[1],Rt=ee.useRef(ye);Rt.current=ye;function zn(){var tn=Rt.current;In(tn),ft(tn),at([]),un(null),vr()}(0,ke.Z)(function(){on(Ye);var tn=Dt(Oi,Ye);if(tn.key!==null)if(tn.add){var Bn=bi.findIndex(function($n){var Yn=$n.key;return Yn===tn.key}),Ft=Nn(ht(bi,ye,tn.key),hn,sn,Fn),wn=bi.slice();wn.splice(Bn+1,0,Ln),ft(wn),at(Ft),un("show")}else{var gn=ye.findIndex(function($n){var Yn=$n.key;return Yn===tn.key}),yn=Nn(ht(ye,bi,tn.key),hn,sn,Fn),On=ye.slice();On.splice(gn+1,0,Ln),ft(On),at(yn),un("hide")}else bi!==ye&&(In(ye),ft(ye))},[Ye,ye]),ee.useEffect(function(){qt||zn()},[qt]);var ni=Nt?jt:ye,gi={expandedKeys:Ye,selectedKeys:Je,loadedKeys:St,loadingKeys:rt,checkedKeys:yt,halfCheckedKeys:Zt,dragOverNodeKey:Gn,dropPosition:Kn,keyEntities:dn};return ee.createElement(ee.Fragment,null,pi&&li&&ee.createElement("span",{style:Yt,"aria-live":"assertive"},rn(li)),ee.createElement("div",null,ee.createElement("input",{style:Yt,disabled:Mn===!1||mn,tabIndex:Mn!==!1?mi:null,onKeyDown:Li,onFocus:Gi,onBlur:ar,value:"",onChange:Ut,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Fe,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Fe,"-indent")},ee.createElement("div",{ref:jn,className:"".concat(Fe,"-indent-unit")}))),ee.createElement(Ae.Z,(0,ge.Z)({},ji,{data:ni,itemKey:$t,height:sn,fullHeight:!1,virtual:hn,itemHeight:Fn,prefixCls:"".concat(Fe,"-list"),ref:Lr,onVisibleChange:function(Bn,Ft){var wn=new Set(Bn),gn=Ft.filter(function(yn){return!wn.has(yn)});gn.some(function(yn){return $t(yn)===it})&&zn()}}),function(tn){var Bn=tn.pos,Ft=(0,ge.Z)({},(he(tn.data),tn.data)),wn=tn.title,gn=tn.key,yn=tn.isStart,On=tn.isEnd,$n=(0,qe.km)(gn,Bn);delete Ft.key,delete Ft.children;var Yn=(0,qe.H8)($n,gi);return ee.createElement(nt,(0,ge.Z)({},Ft,Yn,{title:wn,active:!!li&&gn===li.key,pos:Bn,data:tn.data,isStart:yn,isEnd:On,motion:Nt,motionNodes:gn===it?Bt:null,motionType:Un,onMotionStart:wr,onMotionEnd:zn,treeNodeRequiredProps:gi,onMouseMove:function(){Xi(null)}}))}))});An.displayName="NodeList";var ti=An,xn=pe(35654),Qn=pe(90782),Ot=pe(67841),Cn=10,Wn=function(Pe){(0,Pt.Z)(Fe,Pe);var De=(0,Xe.Z)(Fe);function Fe(){var ye;(0,_e.Z)(this,Fe);for(var Qe=arguments.length,vt=new Array(Qe),Ye=0;Ye<Qe;Ye++)vt[Ye]=arguments[Ye];return ye=De.call.apply(De,[this].concat(vt)),ye.destroyed=!1,ye.delayedDragEnterLogic=void 0,ye.loadingRetryTimes={},ye.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,qe.w$)()},ye.dragStartMousePosition=null,ye.dragNode=void 0,ye.currentMouseOverDroppableNodeKey=null,ye.listRef=ee.createRef(),ye.onNodeDragStart=function(Je,yt){var St=ye.state,rt=St.expandedKeys,Zt=St.keyEntities,dn=ye.props.onDragStart,mn=yt.props.eventKey;ye.dragNode=yt,ye.dragStartMousePosition={x:Je.clientX,y:Je.clientY};var qt=(0,xn._5)(rt,mn);ye.setState({draggingNodeKey:mn,dragChildrenKeys:(0,xn.wA)(mn,Zt),indent:ye.listRef.current.getIndentWidth()}),ye.setExpandedKeys(qt),window.addEventListener("dragend",ye.onWindowDragEnd),dn==null||dn({event:Je,node:(0,qe.F)(yt.props)})},ye.onNodeDragEnter=function(Je,yt){var St=ye.state,rt=St.expandedKeys,Zt=St.keyEntities,dn=St.dragChildrenKeys,mn=St.flattenNodes,qt=St.indent,Gn=ye.props,Kn=Gn.onDragEnter,Nt=Gn.onExpand,sn=Gn.allowDrop,Fn=Gn.direction,hn=yt.props,Mn=hn.pos,li=hn.eventKey,pi=(0,Tt.Z)(ye),mi=pi.dragNode;if(ye.currentMouseOverDroppableNodeKey!==li&&(ye.currentMouseOverDroppableNodeKey=li),!mi){ye.resetDragState();return}var Li=(0,xn.OM)(Je,mi,yt,qt,ye.dragStartMousePosition,sn,mn,Zt,rt,Fn),Gi=Li.dropPosition,ar=Li.dropLevelOffset,Xi=Li.dropTargetKey,wr=Li.dropContainerKey,vr=Li.dropTargetPos,ji=Li.dropAllowed,Lr=Li.dragOverNodeKey;if(dn.indexOf(Xi)!==-1||!ji){ye.resetDragState();return}if(ye.delayedDragEnterLogic||(ye.delayedDragEnterLogic={}),Object.keys(ye.delayedDragEnterLogic).forEach(function(jn){clearTimeout(ye.delayedDragEnterLogic[jn])}),mi.props.eventKey!==yt.props.eventKey&&(Je.persist(),ye.delayedDragEnterLogic[Mn]=window.setTimeout(function(){if(ye.state.draggingNodeKey!==null){var jn=(0,Ge.Z)(rt),Ne=(0,Ot.Z)(Zt,yt.props.eventKey);Ne&&(Ne.children||[]).length&&(jn=(0,xn.L0)(rt,yt.props.eventKey)),"expandedKeys"in ye.props||ye.setExpandedKeys(jn),Nt==null||Nt(jn,{node:(0,qe.F)(yt.props),expanded:!0,nativeEvent:Je.nativeEvent})}},800)),mi.props.eventKey===Xi&&ar===0){ye.resetDragState();return}ye.setState({dragOverNodeKey:Lr,dropPosition:Gi,dropLevelOffset:ar,dropTargetKey:Xi,dropContainerKey:wr,dropTargetPos:vr,dropAllowed:ji}),Kn==null||Kn({event:Je,node:(0,qe.F)(yt.props),expandedKeys:rt})},ye.onNodeDragOver=function(Je,yt){var St=ye.state,rt=St.dragChildrenKeys,Zt=St.flattenNodes,dn=St.keyEntities,mn=St.expandedKeys,qt=St.indent,Gn=ye.props,Kn=Gn.onDragOver,Nt=Gn.allowDrop,sn=Gn.direction,Fn=(0,Tt.Z)(ye),hn=Fn.dragNode;if(hn){var Mn=(0,xn.OM)(Je,hn,yt,qt,ye.dragStartMousePosition,Nt,Zt,dn,mn,sn),li=Mn.dropPosition,pi=Mn.dropLevelOffset,mi=Mn.dropTargetKey,Li=Mn.dropContainerKey,Gi=Mn.dropAllowed,ar=Mn.dropTargetPos,Xi=Mn.dragOverNodeKey;rt.indexOf(mi)!==-1||!Gi||(hn.props.eventKey===mi&&pi===0?ye.state.dropPosition===null&&ye.state.dropLevelOffset===null&&ye.state.dropTargetKey===null&&ye.state.dropContainerKey===null&&ye.state.dropTargetPos===null&&ye.state.dropAllowed===!1&&ye.state.dragOverNodeKey===null||ye.resetDragState():li===ye.state.dropPosition&&pi===ye.state.dropLevelOffset&&mi===ye.state.dropTargetKey&&Li===ye.state.dropContainerKey&&ar===ye.state.dropTargetPos&&Gi===ye.state.dropAllowed&&Xi===ye.state.dragOverNodeKey||ye.setState({dropPosition:li,dropLevelOffset:pi,dropTargetKey:mi,dropContainerKey:Li,dropTargetPos:ar,dropAllowed:Gi,dragOverNodeKey:Xi}),Kn==null||Kn({event:Je,node:(0,qe.F)(yt.props)}))}},ye.onNodeDragLeave=function(Je,yt){ye.currentMouseOverDroppableNodeKey===yt.props.eventKey&&!Je.currentTarget.contains(Je.relatedTarget)&&(ye.resetDragState(),ye.currentMouseOverDroppableNodeKey=null);var St=ye.props.onDragLeave;St==null||St({event:Je,node:(0,qe.F)(yt.props)})},ye.onWindowDragEnd=function(Je){ye.onNodeDragEnd(Je,null,!0),window.removeEventListener("dragend",ye.onWindowDragEnd)},ye.onNodeDragEnd=function(Je,yt){var St=ye.props.onDragEnd;ye.setState({dragOverNodeKey:null}),ye.cleanDragState(),St==null||St({event:Je,node:(0,qe.F)(yt.props)}),ye.dragNode=null,window.removeEventListener("dragend",ye.onWindowDragEnd)},ye.onNodeDrop=function(Je,yt){var St,rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Zt=ye.state,dn=Zt.dragChildrenKeys,mn=Zt.dropPosition,qt=Zt.dropTargetKey,Gn=Zt.dropTargetPos,Kn=Zt.dropAllowed;if(Kn){var Nt=ye.props.onDrop;if(ye.setState({dragOverNodeKey:null}),ye.cleanDragState(),qt!==null){var sn=(0,st.Z)((0,st.Z)({},(0,qe.H8)(qt,ye.getTreeNodeRequiredProps())),{},{active:((St=ye.getActiveItem())===null||St===void 0?void 0:St.key)===qt,data:(0,Ot.Z)(ye.state.keyEntities,qt).node}),Fn=dn.indexOf(qt)!==-1;(0,ne.ZP)(!Fn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var hn=(0,xn.yx)(Gn),Mn={event:Je,node:(0,qe.F)(sn),dragNode:ye.dragNode?(0,qe.F)(ye.dragNode.props):null,dragNodesKeys:[ye.dragNode.props.eventKey].concat(dn),dropToGap:mn!==0,dropPosition:mn+Number(hn[hn.length-1])};rt||Nt==null||Nt(Mn),ye.dragNode=null}}},ye.cleanDragState=function(){var Je=ye.state.draggingNodeKey;Je!==null&&ye.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),ye.dragStartMousePosition=null,ye.currentMouseOverDroppableNodeKey=null},ye.triggerExpandActionExpand=function(Je,yt){var St=ye.state,rt=St.expandedKeys,Zt=St.flattenNodes,dn=yt.expanded,mn=yt.key,qt=yt.isLeaf;if(!(qt||Je.shiftKey||Je.metaKey||Je.ctrlKey)){var Gn=Zt.filter(function(Nt){return Nt.key===mn})[0],Kn=(0,qe.F)((0,st.Z)((0,st.Z)({},(0,qe.H8)(mn,ye.getTreeNodeRequiredProps())),{},{data:Gn.data}));ye.setExpandedKeys(dn?(0,xn._5)(rt,mn):(0,xn.L0)(rt,mn)),ye.onNodeExpand(Je,Kn)}},ye.onNodeClick=function(Je,yt){var St=ye.props,rt=St.onClick,Zt=St.expandAction;Zt==="click"&&ye.triggerExpandActionExpand(Je,yt),rt==null||rt(Je,yt)},ye.onNodeDoubleClick=function(Je,yt){var St=ye.props,rt=St.onDoubleClick,Zt=St.expandAction;Zt==="doubleClick"&&ye.triggerExpandActionExpand(Je,yt),rt==null||rt(Je,yt)},ye.onNodeSelect=function(Je,yt){var St=ye.state.selectedKeys,rt=ye.state,Zt=rt.keyEntities,dn=rt.fieldNames,mn=ye.props,qt=mn.onSelect,Gn=mn.multiple,Kn=yt.selected,Nt=yt[dn.key],sn=!Kn;sn?Gn?St=(0,xn.L0)(St,Nt):St=[Nt]:St=(0,xn._5)(St,Nt);var Fn=St.map(function(hn){var Mn=(0,Ot.Z)(Zt,hn);return Mn?Mn.node:null}).filter(function(hn){return hn});ye.setUncontrolledState({selectedKeys:St}),qt==null||qt(St,{event:"select",selected:sn,node:yt,selectedNodes:Fn,nativeEvent:Je.nativeEvent})},ye.onNodeCheck=function(Je,yt,St){var rt=ye.state,Zt=rt.keyEntities,dn=rt.checkedKeys,mn=rt.halfCheckedKeys,qt=ye.props,Gn=qt.checkStrictly,Kn=qt.onCheck,Nt=yt.key,sn,Fn={event:"check",node:yt,checked:St,nativeEvent:Je.nativeEvent};if(Gn){var hn=St?(0,xn.L0)(dn,Nt):(0,xn._5)(dn,Nt),Mn=(0,xn._5)(mn,Nt);sn={checked:hn,halfChecked:Mn},Fn.checkedNodes=hn.map(function(ar){return(0,Ot.Z)(Zt,ar)}).filter(function(ar){return ar}).map(function(ar){return ar.node}),ye.setUncontrolledState({checkedKeys:hn})}else{var li=(0,Qn.S)([].concat((0,Ge.Z)(dn),[Nt]),!0,Zt),pi=li.checkedKeys,mi=li.halfCheckedKeys;if(!St){var Li=new Set(pi);Li.delete(Nt);var Gi=(0,Qn.S)(Array.from(Li),{checked:!1,halfCheckedKeys:mi},Zt);pi=Gi.checkedKeys,mi=Gi.halfCheckedKeys}sn=pi,Fn.checkedNodes=[],Fn.checkedNodesPositions=[],Fn.halfCheckedKeys=mi,pi.forEach(function(ar){var Xi=(0,Ot.Z)(Zt,ar);if(Xi){var wr=Xi.node,vr=Xi.pos;Fn.checkedNodes.push(wr),Fn.checkedNodesPositions.push({node:wr,pos:vr})}}),ye.setUncontrolledState({checkedKeys:pi},!1,{halfCheckedKeys:mi})}Kn==null||Kn(sn,Fn)},ye.onNodeLoad=function(Je){var yt=Je.key,St=new Promise(function(rt,Zt){ye.setState(function(dn){var mn=dn.loadedKeys,qt=mn===void 0?[]:mn,Gn=dn.loadingKeys,Kn=Gn===void 0?[]:Gn,Nt=ye.props,sn=Nt.loadData,Fn=Nt.onLoad;if(!sn||qt.indexOf(yt)!==-1||Kn.indexOf(yt)!==-1)return null;var hn=sn(Je);return hn.then(function(){var Mn=ye.state.loadedKeys,li=(0,xn.L0)(Mn,yt);Fn==null||Fn(li,{event:"load",node:Je}),ye.setUncontrolledState({loadedKeys:li}),ye.setState(function(pi){return{loadingKeys:(0,xn._5)(pi.loadingKeys,yt)}}),rt()}).catch(function(Mn){if(ye.setState(function(pi){return{loadingKeys:(0,xn._5)(pi.loadingKeys,yt)}}),ye.loadingRetryTimes[yt]=(ye.loadingRetryTimes[yt]||0)+1,ye.loadingRetryTimes[yt]>=Cn){var li=ye.state.loadedKeys;(0,ne.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),ye.setUncontrolledState({loadedKeys:(0,xn.L0)(li,yt)}),rt()}Zt(Mn)}),{loadingKeys:(0,xn.L0)(Kn,yt)}})});return St.catch(function(){}),St},ye.onNodeMouseEnter=function(Je,yt){var St=ye.props.onMouseEnter;St==null||St({event:Je,node:yt})},ye.onNodeMouseLeave=function(Je,yt){var St=ye.props.onMouseLeave;St==null||St({event:Je,node:yt})},ye.onNodeContextMenu=function(Je,yt){var St=ye.props.onRightClick;St&&(Je.preventDefault(),St({event:Je,node:yt}))},ye.onFocus=function(){var Je=ye.props.onFocus;ye.setState({focused:!0});for(var yt=arguments.length,St=new Array(yt),rt=0;rt<yt;rt++)St[rt]=arguments[rt];Je==null||Je.apply(void 0,St)},ye.onBlur=function(){var Je=ye.props.onBlur;ye.setState({focused:!1}),ye.onActiveChange(null);for(var yt=arguments.length,St=new Array(yt),rt=0;rt<yt;rt++)St[rt]=arguments[rt];Je==null||Je.apply(void 0,St)},ye.getTreeNodeRequiredProps=function(){var Je=ye.state,yt=Je.expandedKeys,St=Je.selectedKeys,rt=Je.loadedKeys,Zt=Je.loadingKeys,dn=Je.checkedKeys,mn=Je.halfCheckedKeys,qt=Je.dragOverNodeKey,Gn=Je.dropPosition,Kn=Je.keyEntities;return{expandedKeys:yt||[],selectedKeys:St||[],loadedKeys:rt||[],loadingKeys:Zt||[],checkedKeys:dn||[],halfCheckedKeys:mn||[],dragOverNodeKey:qt,dropPosition:Gn,keyEntities:Kn}},ye.setExpandedKeys=function(Je){var yt=ye.state,St=yt.treeData,rt=yt.fieldNames,Zt=(0,qe.oH)(St,Je,rt);ye.setUncontrolledState({expandedKeys:Je,flattenNodes:Zt},!0)},ye.onNodeExpand=function(Je,yt){var St=ye.state.expandedKeys,rt=ye.state,Zt=rt.listChanging,dn=rt.fieldNames,mn=ye.props,qt=mn.onExpand,Gn=mn.loadData,Kn=yt.expanded,Nt=yt[dn.key];if(!Zt){var sn=St.indexOf(Nt),Fn=!Kn;if((0,ne.ZP)(Kn&&sn!==-1||!Kn&&sn===-1,"Expand state not sync with index check"),Fn?St=(0,xn.L0)(St,Nt):St=(0,xn._5)(St,Nt),ye.setExpandedKeys(St),qt==null||qt(St,{node:yt,expanded:Fn,nativeEvent:Je.nativeEvent}),Fn&&Gn){var hn=ye.onNodeLoad(yt);hn&&hn.then(function(){var Mn=(0,qe.oH)(ye.state.treeData,St,dn);ye.setUncontrolledState({flattenNodes:Mn})}).catch(function(){var Mn=ye.state.expandedKeys,li=(0,xn._5)(Mn,Nt);ye.setExpandedKeys(li)})}}},ye.onListChangeStart=function(){ye.setUncontrolledState({listChanging:!0})},ye.onListChangeEnd=function(){setTimeout(function(){ye.setUncontrolledState({listChanging:!1})})},ye.onActiveChange=function(Je){var yt=ye.state.activeKey,St=ye.props.onActiveChange;yt!==Je&&(ye.setState({activeKey:Je}),Je!==null&&ye.scrollTo({key:Je}),St==null||St(Je))},ye.getActiveItem=function(){var Je=ye.state,yt=Je.activeKey,St=Je.flattenNodes;return yt===null?null:St.find(function(rt){var Zt=rt.key;return Zt===yt})||null},ye.offsetActiveKey=function(Je){var yt=ye.state,St=yt.flattenNodes,rt=yt.activeKey,Zt=St.findIndex(function(qt){var Gn=qt.key;return Gn===rt});Zt===-1&&Je<0&&(Zt=St.length),Zt=(Zt+Je+St.length)%St.length;var dn=St[Zt];if(dn){var mn=dn.key;ye.onActiveChange(mn)}else ye.onActiveChange(null)},ye.onKeyDown=function(Je){var yt=ye.state,St=yt.activeKey,rt=yt.expandedKeys,Zt=yt.checkedKeys,dn=yt.fieldNames,mn=ye.props,qt=mn.onKeyDown,Gn=mn.checkable,Kn=mn.selectable;switch(Je.which){case It.Z.UP:{ye.offsetActiveKey(-1),Je.preventDefault();break}case It.Z.DOWN:{ye.offsetActiveKey(1),Je.preventDefault();break}}var Nt=ye.getActiveItem();if(Nt&&Nt.data){var sn=ye.getTreeNodeRequiredProps(),Fn=Nt.data.isLeaf===!1||!!(Nt.data[dn.children]||[]).length,hn=(0,qe.F)((0,st.Z)((0,st.Z)({},(0,qe.H8)(St,sn)),{},{data:Nt.data,active:!0}));switch(Je.which){case It.Z.LEFT:{Fn&&rt.includes(St)?ye.onNodeExpand({},hn):Nt.parent&&ye.onActiveChange(Nt.parent.key),Je.preventDefault();break}case It.Z.RIGHT:{Fn&&!rt.includes(St)?ye.onNodeExpand({},hn):Nt.children&&Nt.children.length&&ye.onActiveChange(Nt.children[0].key),Je.preventDefault();break}case It.Z.ENTER:case It.Z.SPACE:{Gn&&!hn.disabled&&hn.checkable!==!1&&!hn.disableCheckbox?ye.onNodeCheck({},hn,!Zt.includes(St)):!Gn&&Kn&&!hn.disabled&&hn.selectable!==!1&&ye.onNodeSelect({},hn);break}}}qt==null||qt(Je)},ye.setUncontrolledState=function(Je){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ye.destroyed){var rt=!1,Zt=!0,dn={};Object.keys(Je).forEach(function(mn){if(mn in ye.props){Zt=!1;return}rt=!0,dn[mn]=Je[mn]}),rt&&(!yt||Zt)&&ye.setState((0,st.Z)((0,st.Z)({},dn),St))}},ye.scrollTo=function(Je){ye.listRef.current.scrollTo(Je)},ye}return(0,Le.Z)(Fe,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Qe=this.props.activeKey;Qe!==void 0&&Qe!==this.state.activeKey&&(this.setState({activeKey:Qe}),Qe!==null&&this.scrollTo({key:Qe}))}},{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 Qe,vt=this.state,Ye=vt.focused,Je=vt.flattenNodes,yt=vt.keyEntities,St=vt.draggingNodeKey,rt=vt.activeKey,Zt=vt.dropLevelOffset,dn=vt.dropContainerKey,mn=vt.dropTargetKey,qt=vt.dropPosition,Gn=vt.dragOverNodeKey,Kn=vt.indent,Nt=this.props,sn=Nt.prefixCls,Fn=Nt.className,hn=Nt.style,Mn=Nt.showLine,li=Nt.focusable,pi=Nt.tabIndex,mi=pi===void 0?0:pi,Li=Nt.selectable,Gi=Nt.showIcon,ar=Nt.icon,Xi=Nt.switcherIcon,wr=Nt.draggable,vr=Nt.checkable,ji=Nt.checkStrictly,Lr=Nt.disabled,jn=Nt.motion,Ne=Nt.loadData,Ei=Nt.filterTreeNode,Oi=Nt.height,on=Nt.itemHeight,ui=Nt.virtual,vi=Nt.titleRender,bi=Nt.dropIndicatorRender,In=Nt.onContextMenu,Gt=Nt.onScroll,Kt=Nt.direction,jt=Nt.rootClassName,ft=Nt.rootStyle,an=(0,Be.Z)(this.props,{aria:!0,data:!0}),vn;return wr&&((0,Ke.Z)(wr)==="object"?vn=wr:typeof wr=="function"?vn={nodeDraggable:wr}:vn={}),ee.createElement(ce.k.Provider,{value:{prefixCls:sn,selectable:Li,showIcon:Gi,icon:ar,switcherIcon:Xi,draggable:vn,draggingNodeKey:St,checkable:vr,checkStrictly:ji,disabled:Lr,keyEntities:yt,dropLevelOffset:Zt,dropContainerKey:dn,dropTargetKey:mn,dropPosition:qt,dragOverNodeKey:Gn,indent:Kn,direction:Kt,dropIndicatorRender:bi,loadData:Ne,filterTreeNode:Ei,titleRender:vi,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:ct()(sn,Fn,jt,(Qe={},(0,Oe.Z)(Qe,"".concat(sn,"-show-line"),Mn),(0,Oe.Z)(Qe,"".concat(sn,"-focused"),Ye),(0,Oe.Z)(Qe,"".concat(sn,"-active-focused"),rt!==null),Qe)),style:ft},ee.createElement(ti,(0,ge.Z)({ref:this.listRef,prefixCls:sn,style:hn,data:Je,disabled:Lr,selectable:Li,checkable:!!vr,motion:jn,dragging:St!==null,height:Oi,itemHeight:on,virtual:ui,focusable:li,focused:Ye,tabIndex:mi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:In,onScroll:Gt},this.getTreeNodeRequiredProps(),an))))}}],[{key:"getDerivedStateFromProps",value:function(Qe,vt){var Ye=vt.prevProps,Je={prevProps:Qe};function yt(li){return!Ye&&li in Qe||Ye&&Ye[li]!==Qe[li]}var St,rt=vt.fieldNames;if(yt("fieldNames")&&(rt=(0,qe.w$)(Qe.fieldNames),Je.fieldNames=rt),yt("treeData")?St=Qe.treeData:yt("children")&&((0,ne.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),St=(0,qe.zn)(Qe.children)),St){Je.treeData=St;var Zt=(0,qe.I8)(St,{fieldNames:rt});Je.keyEntities=(0,st.Z)((0,Oe.Z)({},it,Wt),Zt.keyEntities)}var dn=Je.keyEntities||vt.keyEntities;if(yt("expandedKeys")||Ye&&yt("autoExpandParent"))Je.expandedKeys=Qe.autoExpandParent||!Ye&&Qe.defaultExpandParent?(0,xn.r7)(Qe.expandedKeys,dn):Qe.expandedKeys;else if(!Ye&&Qe.defaultExpandAll){var mn=(0,st.Z)({},dn);delete mn[it],Je.expandedKeys=Object.keys(mn).map(function(li){return mn[li].key})}else!Ye&&Qe.defaultExpandedKeys&&(Je.expandedKeys=Qe.autoExpandParent||Qe.defaultExpandParent?(0,xn.r7)(Qe.defaultExpandedKeys,dn):Qe.defaultExpandedKeys);if(Je.expandedKeys||delete Je.expandedKeys,St||Je.expandedKeys){var qt=(0,qe.oH)(St||vt.treeData,Je.expandedKeys||vt.expandedKeys,rt);Je.flattenNodes=qt}if(Qe.selectable&&(yt("selectedKeys")?Je.selectedKeys=(0,xn.BT)(Qe.selectedKeys,Qe):!Ye&&Qe.defaultSelectedKeys&&(Je.selectedKeys=(0,xn.BT)(Qe.defaultSelectedKeys,Qe))),Qe.checkable){var Gn;if(yt("checkedKeys")?Gn=(0,xn.E6)(Qe.checkedKeys)||{}:!Ye&&Qe.defaultCheckedKeys?Gn=(0,xn.E6)(Qe.defaultCheckedKeys)||{}:St&&(Gn=(0,xn.E6)(Qe.checkedKeys)||{checkedKeys:vt.checkedKeys,halfCheckedKeys:vt.halfCheckedKeys}),Gn){var Kn=Gn,Nt=Kn.checkedKeys,sn=Nt===void 0?[]:Nt,Fn=Kn.halfCheckedKeys,hn=Fn===void 0?[]:Fn;if(!Qe.checkStrictly){var Mn=(0,Qn.S)(sn,!0,dn);sn=Mn.checkedKeys,hn=Mn.halfCheckedKeys}Je.checkedKeys=sn,Je.halfCheckedKeys=hn}}return yt("loadedKeys")&&(Je.loadedKeys=Qe.loadedKeys),Je}}]),Fe}(ee.Component);Wn.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},Wn.TreeNode=Ze.Z;var We=Wn,Ee=We},35654:function(Vn,Pn,pe){"use strict";pe.d(Pn,{BT:function(){return ee},E6:function(){return he},L0:function(){return Xe},OM:function(){return ne},_5:function(){return Pt},r7:function(){return ve},wA:function(){return ct},yx:function(){return Et}});var ge=pe(26407),Oe=pe(39559),Ke=pe(48736),st=pe(59301),Ge=pe(39417),_e=pe(67841),Le=pe(71430),Tt=null;function Pt(be,ke){if(!be)return[];var Ae=be.slice(),ze=Ae.indexOf(ke);return ze>=0&&Ae.splice(ze,1),Ae}function Xe(be,ke){var Ae=(be||[]).slice();return Ae.indexOf(ke)===-1&&Ae.push(ke),Ae}function Et(be){return be.split("-")}function ct(be,ke){var Ae=[],ze=(0,_e.Z)(ke,be);function Ze(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ot.forEach(function(qe){var bt=qe.key,He=qe.children;Ae.push(bt),Ze(He)})}return Ze(ze.children),Ae}function It(be){if(be.parent){var ke=Et(be.pos);return Number(ke[ke.length-1])===be.parent.children.length-1}return!1}function Be(be){var ke=Et(be.pos);return Number(ke[ke.length-1])===0}function ne(be,ke,Ae,ze,Ze,ot,qe,bt,He,wt){var nt,Dt=be.clientX,ht=be.clientY,zt=be.target.getBoundingClientRect(),Yt=zt.top,Ut=zt.height,it=(wt==="rtl"?-1:1)*(((Ze==null?void 0:Ze.x)||0)-Dt),Ve=(it-12)/ze,Wt=(0,_e.Z)(bt,Ae.props.eventKey);if(ht<Yt+Ut/2){var Ln=qe.findIndex(function(Ee){return Ee.key===Wt.key}),Nn=Ln<=0?0:Ln-1,$t=qe[Nn].key;Wt=(0,_e.Z)(bt,$t)}var rn=Wt.key,An=Wt,ti=Wt.key,xn=0,Qn=0;if(!He.includes(rn))for(var Ot=0;Ot<Ve&&It(Wt);Ot+=1)Wt=Wt.parent,Qn+=1;var Cn=ke.props.data,Wn=Wt.node,We=!0;return Be(Wt)&&Wt.level===0&&ht<Yt+Ut/2&&ot({dragNode:Cn,dropNode:Wn,dropPosition:-1})&&Wt.key===Ae.props.eventKey?xn=-1:(An.children||[]).length&&He.includes(ti)?ot({dragNode:Cn,dropNode:Wn,dropPosition:0})?xn=0:We=!1:Qn===0?Ve>-1.5?ot({dragNode:Cn,dropNode:Wn,dropPosition:1})?xn=1:We=!1:ot({dragNode:Cn,dropNode:Wn,dropPosition:0})?xn=0:ot({dragNode:Cn,dropNode:Wn,dropPosition:1})?xn=1:We=!1:ot({dragNode:Cn,dropNode:Wn,dropPosition:1})?xn=1:We=!1,{dropPosition:xn,dropLevelOffset:Qn,dropTargetKey:Wt.key,dropTargetPos:Wt.pos,dragOverNodeKey:ti,dropContainerKey:xn===0?null:((nt=Wt.parent)===null||nt===void 0?void 0:nt.key)||null,dropAllowed:We}}function ee(be,ke){if(be){var Ae=ke.multiple;return Ae?be.slice():be.length?[be[0]]:be}}var ce=function(ke){return ke};function se(be,ke){if(!be)return[];var Ae=ke||{},ze=Ae.processProps,Ze=ze===void 0?ce:ze,ot=Array.isArray(be)?be:[be];return ot.map(function(qe){var bt=qe.children,He=_objectWithoutProperties(qe,Tt),wt=se(bt,ke);return React.createElement(TreeNode,_extends({key:He.key},Ze(He)),wt)})}function he(be){if(!be)return null;var ke;if(Array.isArray(be))ke={checkedKeys:be,halfCheckedKeys:void 0};else if((0,Oe.Z)(be)==="object")ke={checkedKeys:be.checked||void 0,halfCheckedKeys:be.halfChecked||void 0};else return(0,Ke.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return ke}function ve(be,ke){var Ae=new Set;function ze(Ze){if(!Ae.has(Ze)){var ot=(0,_e.Z)(ke,Ze);if(ot){Ae.add(Ze);var qe=ot.parent,bt=ot.node;bt.disabled||qe&&ze(qe.key)}}}return(be||[]).forEach(function(Ze){ze(Ze)}),(0,ge.Z)(Ae)}},90782:function(Vn,Pn,pe){"use strict";pe.d(Pn,{S:function(){return Le}});var ge=pe(48736),Oe=pe(67841);function Ke(Tt,Pt){var Xe=new Set;return Tt.forEach(function(Et){Pt.has(Et)||Xe.add(Et)}),Xe}function st(Tt){var Pt=Tt||{},Xe=Pt.disabled,Et=Pt.disableCheckbox,ct=Pt.checkable;return!!(Xe||Et)||ct===!1}function Ge(Tt,Pt,Xe,Et){for(var ct=new Set(Tt),It=new Set,Be=0;Be<=Xe;Be+=1){var ne=Pt.get(Be)||new Set;ne.forEach(function(he){var ve=he.key,be=he.node,ke=he.children,Ae=ke===void 0?[]:ke;ct.has(ve)&&!Et(be)&&Ae.filter(function(ze){return!Et(ze.node)}).forEach(function(ze){ct.add(ze.key)})})}for(var ee=new Set,ce=Xe;ce>=0;ce-=1){var se=Pt.get(ce)||new Set;se.forEach(function(he){var ve=he.parent,be=he.node;if(!(Et(be)||!he.parent||ee.has(he.parent.key))){if(Et(he.parent.node)){ee.add(ve.key);return}var ke=!0,Ae=!1;(ve.children||[]).filter(function(ze){return!Et(ze.node)}).forEach(function(ze){var Ze=ze.key,ot=ct.has(Ze);ke&&!ot&&(ke=!1),!Ae&&(ot||It.has(Ze))&&(Ae=!0)}),ke&&ct.add(ve.key),Ae&&It.add(ve.key),ee.add(ve.key)}})}return{checkedKeys:Array.from(ct),halfCheckedKeys:Array.from(Ke(It,ct))}}function _e(Tt,Pt,Xe,Et,ct){for(var It=new Set(Tt),Be=new Set(Pt),ne=0;ne<=Et;ne+=1){var ee=Xe.get(ne)||new Set;ee.forEach(function(ve){var be=ve.key,ke=ve.node,Ae=ve.children,ze=Ae===void 0?[]:Ae;!It.has(be)&&!Be.has(be)&&!ct(ke)&&ze.filter(function(Ze){return!ct(Ze.node)}).forEach(function(Ze){It.delete(Ze.key)})})}Be=new Set;for(var ce=new Set,se=Et;se>=0;se-=1){var he=Xe.get(se)||new Set;he.forEach(function(ve){var be=ve.parent,ke=ve.node;if(!(ct(ke)||!ve.parent||ce.has(ve.parent.key))){if(ct(ve.parent.node)){ce.add(be.key);return}var Ae=!0,ze=!1;(be.children||[]).filter(function(Ze){return!ct(Ze.node)}).forEach(function(Ze){var ot=Ze.key,qe=It.has(ot);Ae&&!qe&&(Ae=!1),!ze&&(qe||Be.has(ot))&&(ze=!0)}),Ae||It.delete(be.key),ze&&Be.add(be.key),ce.add(be.key)}})}return{checkedKeys:Array.from(It),halfCheckedKeys:Array.from(Ke(Be,It))}}function Le(Tt,Pt,Xe,Et){var ct=[],It;Et?It=Et:It=st;var Be=new Set(Tt.filter(function(se){var he=!!(0,Oe.Z)(Xe,se);return he||ct.push(se),he})),ne=new Map,ee=0;Object.keys(Xe).forEach(function(se){var he=Xe[se],ve=he.level,be=ne.get(ve);be||(be=new Set,ne.set(ve,be)),be.add(he),ee=Math.max(ee,ve)}),(0,ge.ZP)(!ct.length,"Tree missing follow keys: ".concat(ct.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var ce;return Pt===!0?ce=Ge(Be,ne,ee,It):ce=_e(Be,Pt.halfCheckedKeys,ne,ee,It),ce}},67841:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return ge}});function ge(Oe,Ke){return Oe[Ke]}},71430:function(Vn,Pn,pe){"use strict";pe.d(Pn,{F:function(){return ve},H8:function(){return he},I8:function(){return se},km:function(){return ct},oH:function(){return ee},w$:function(){return It},zn:function(){return ne}});var ge=pe(39559),Oe=pe(26407),Ke=pe(33708),st=pe(37061),Ge=pe(11592),_e=pe(2738),Le=pe(48736),Tt=pe(67841),Pt=["children"];function Xe(be,ke){return"".concat(be,"-").concat(ke)}function Et(be){return be&&be.type&&be.type.isTreeNode}function ct(be,ke){return be!=null?be:ke}function It(be){var ke=be||{},Ae=ke.title,ze=ke._title,Ze=ke.key,ot=ke.children,qe=Ae||"title";return{title:qe,_title:ze||[qe],key:Ze||"key",children:ot||"children"}}function Be(be,ke){var Ae=new Map;function ze(Ze){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Ze||[]).forEach(function(qe){var bt=qe[ke.key],He=qe[ke.children];warning(bt!=null,"Tree node must have a certain key: [".concat(ot).concat(bt,"]"));var wt=String(bt);warning(!Ae.has(wt)||bt===null||bt===void 0,"Same 'key' exist in the Tree: ".concat(wt)),Ae.set(wt,!0),ze(He,"".concat(ot).concat(wt," > "))})}ze(be)}function ne(be){function ke(Ae){var ze=(0,Ge.Z)(Ae);return ze.map(function(Ze){if(!Et(Ze))return(0,Le.ZP)(!Ze,"Tree/TreeNode can only accept TreeNode as children."),null;var ot=Ze.key,qe=Ze.props,bt=qe.children,He=(0,st.Z)(qe,Pt),wt=(0,Ke.Z)({key:ot},He),nt=ke(bt);return nt.length&&(wt.children=nt),wt}).filter(function(Ze){return Ze})}return ke(be)}function ee(be,ke,Ae){var ze=It(Ae),Ze=ze._title,ot=ze.key,qe=ze.children,bt=new Set(ke===!0?[]:ke),He=[];function wt(nt){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return nt.map(function(ht,zt){for(var Yt=Xe(Dt?Dt.pos:"0",zt),Ut=ct(ht[ot],Yt),it,Ve=0;Ve<Ze.length;Ve+=1){var Wt=Ze[Ve];if(ht[Wt]!==void 0){it=ht[Wt];break}}var Ln=(0,Ke.Z)((0,Ke.Z)({},(0,_e.Z)(ht,[].concat((0,Oe.Z)(Ze),[ot,qe]))),{},{title:it,key:Ut,parent:Dt,pos:Yt,children:null,data:ht,isStart:[].concat((0,Oe.Z)(Dt?Dt.isStart:[]),[zt===0]),isEnd:[].concat((0,Oe.Z)(Dt?Dt.isEnd:[]),[zt===nt.length-1])});return He.push(Ln),ke===!0||bt.has(Ut)?Ln.children=wt(ht[qe]||[],Ln):Ln.children=[],Ln})}return wt(be),He}function ce(be,ke,Ae){var ze={};(0,ge.Z)(Ae)==="object"?ze=Ae:ze={externalGetKey:Ae},ze=ze||{};var Ze=ze,ot=Ze.childrenPropName,qe=Ze.externalGetKey,bt=Ze.fieldNames,He=It(bt),wt=He.key,nt=He.children,Dt=ot||nt,ht;qe?typeof qe=="string"?ht=function(Ut){return Ut[qe]}:typeof qe=="function"&&(ht=function(Ut){return qe(Ut)}):ht=function(Ut,it){return ct(Ut[wt],it)};function zt(Yt,Ut,it,Ve){var Wt=Yt?Yt[Dt]:be,Ln=Yt?Xe(it.pos,Ut):"0",Nn=Yt?[].concat((0,Oe.Z)(Ve),[Yt]):[];if(Yt){var $t=ht(Yt,Ln),rn={node:Yt,index:Ut,pos:Ln,key:$t,parentPos:it.node?it.pos:null,level:it.level+1,nodes:Nn};ke(rn)}Wt&&Wt.forEach(function(An,ti){zt(An,ti,{node:Yt,pos:Ln,level:it?it.level+1:-1},Nn)})}zt(null)}function se(be){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ae=ke.initWrapper,ze=ke.processEntity,Ze=ke.onProcessFinished,ot=ke.externalGetKey,qe=ke.childrenPropName,bt=ke.fieldNames,He=arguments.length>2?arguments[2]:void 0,wt=ot||He,nt={},Dt={},ht={posEntities:nt,keyEntities:Dt};return Ae&&(ht=Ae(ht)||ht),ce(be,function(zt){var Yt=zt.node,Ut=zt.index,it=zt.pos,Ve=zt.key,Wt=zt.parentPos,Ln=zt.level,Nn=zt.nodes,$t={node:Yt,nodes:Nn,index:Ut,key:Ve,pos:it,level:Ln},rn=ct(Ve,it);nt[it]=$t,Dt[rn]=$t,$t.parent=nt[Wt],$t.parent&&($t.parent.children=$t.parent.children||[],$t.parent.children.push($t)),ze&&ze($t,ht)},{externalGetKey:wt,childrenPropName:qe,fieldNames:bt}),Ze&&Ze(ht),ht}function he(be,ke){var Ae=ke.expandedKeys,ze=ke.selectedKeys,Ze=ke.loadedKeys,ot=ke.loadingKeys,qe=ke.checkedKeys,bt=ke.halfCheckedKeys,He=ke.dragOverNodeKey,wt=ke.dropPosition,nt=ke.keyEntities,Dt=(0,Tt.Z)(nt,be),ht={eventKey:be,expanded:Ae.indexOf(be)!==-1,selected:ze.indexOf(be)!==-1,loaded:Ze.indexOf(be)!==-1,loading:ot.indexOf(be)!==-1,checked:qe.indexOf(be)!==-1,halfChecked:bt.indexOf(be)!==-1,pos:String(Dt?Dt.pos:""),dragOver:He===be&&wt===0,dragOverGapTop:He===be&&wt===-1,dragOverGapBottom:He===be&&wt===1};return ht}function ve(be){var ke=be.data,Ae=be.expanded,ze=be.selected,Ze=be.checked,ot=be.loaded,qe=be.loading,bt=be.halfChecked,He=be.dragOver,wt=be.dragOverGapTop,nt=be.dragOverGapBottom,Dt=be.pos,ht=be.active,zt=be.eventKey,Yt=(0,Ke.Z)((0,Ke.Z)({},ke),{},{expanded:Ae,selected:ze,checked:Ze,loaded:ot,loading:qe,halfChecked:bt,dragOver:He,dragOverGapTop:wt,dragOverGapBottom:nt,pos:Dt,active:ht,key:zt});return"props"in Yt||Object.defineProperty(Yt,"props",{get:function(){return(0,Le.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),be}}),Yt}},8224:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Oe}});var ge=pe(4676);function Oe(Ke,st,Ge,_e){var Le=ge.unstable_batchedUpdates?function(Pt){ge.unstable_batchedUpdates(Ge,Pt)}:Ge;return Ke!=null&&Ke.addEventListener&&Ke.addEventListener(st,Le,_e),{remove:function(){Ke!=null&&Ke.removeEventListener&&Ke.removeEventListener(st,Le,_e)}}}},55468:function(Vn,Pn,pe){"use strict";pe.d(Pn,{g1:function(){return Et},os:function(){return It}});var ge=/margin|padding|width|height|max|min|offset/,Oe={left:!0,top:!0},Ke={cssFloat:1,styleFloat:1,float:1};function st(Be){return Be.nodeType===1?Be.ownerDocument.defaultView.getComputedStyle(Be,null):{}}function Ge(Be,ne,ee){if(ne=ne.toLowerCase(),ee==="auto"){if(ne==="height")return Be.offsetHeight;if(ne==="width")return Be.offsetWidth}return ne in Oe||(Oe[ne]=ge.test(ne)),Oe[ne]?parseFloat(ee)||0:ee}function _e(Be,ne){var ee=arguments.length,ce=st(Be);return ne=Ke[ne]?"cssFloat"in Be.style?"cssFloat":"styleFloat":ne,ee===1?ce:Ge(Be,ne,ce[ne]||Be.style[ne])}function Le(Be,ne,ee){var ce=arguments.length;if(ne=Ke[ne]?"cssFloat"in Be.style?"cssFloat":"styleFloat":ne,ce===3)return typeof ee=="number"&&ge.test(ne)&&(ee="".concat(ee,"px")),Be.style[ne]=ee,ee;for(var se in ne)ne.hasOwnProperty(se)&&Le(Be,se,ne[se]);return st(Be)}function Tt(Be){return Be===document.body?document.documentElement.clientWidth:Be.offsetWidth}function Pt(Be){return Be===document.body?window.innerHeight||document.documentElement.clientHeight:Be.offsetHeight}function Xe(){var Be=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),ne=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Be,height:ne}}function Et(){var Be=document.documentElement.clientWidth,ne=window.innerHeight||document.documentElement.clientHeight;return{width:Be,height:ne}}function ct(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function It(Be){var ne=Be.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,Pn,pe){"use strict";pe.d(Pn,{G:function(){return st}});var ge=pe(47273),Oe=function(_e){if((0,ge.Z)()&&window.document.documentElement){var Le=Array.isArray(_e)?_e:[_e],Tt=window.document.documentElement;return Le.some(function(Pt){return Pt in Tt.style})}return!1},Ke=function(_e,Le){if(!Oe(_e))return!1;var Tt=document.createElement("div"),Pt=Tt.style[_e];return Tt.style[_e]=Le,Tt.style[_e]!==Pt};function st(Ge,_e){return!Array.isArray(Ge)&&_e!==void 0?Ke(Ge,_e):Oe(Ge)}},4409:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return We}});var ge=pe(92413),Oe=pe(39559),Ke=pe(33708),st=pe(400),Ge=pe(33606),_e=pe(37061),Le=pe(92310),Tt=pe.n(Le),Pt=pe(29301),Xe=pe(70425),Et=pe(34280),ct=pe(59301),It=pe(4676),Be=ct.forwardRef(function(Ee,Pe){var De=Ee.height,Fe=Ee.offsetY,ye=Ee.offsetX,Qe=Ee.children,vt=Ee.prefixCls,Ye=Ee.onInnerResize,Je=Ee.innerProps,yt=Ee.rtl,St=Ee.extra,rt={},Zt={display:"flex",flexDirection:"column"};return Fe!==void 0&&(rt={height:De,position:"relative",overflow:"hidden"},Zt=(0,Ke.Z)((0,Ke.Z)({},Zt),{},(0,st.Z)((0,st.Z)((0,st.Z)((0,st.Z)((0,st.Z)({transform:"translateY(".concat(Fe,"px)")},yt?"marginRight":"marginLeft",-ye),"position","absolute"),"left",0),"right",0),"top",0))),ct.createElement("div",{style:rt},ct.createElement(Pt.Z,{onResize:function(mn){var qt=mn.offsetHeight;qt&&Ye&&Ye()}},ct.createElement("div",(0,ge.Z)({style:Zt,className:Tt()((0,st.Z)({},"".concat(vt,"-holder-inner"),vt)),ref:Pe},Je),Qe,St)))});Be.displayName="Filler";var ne=Be;function ee(Ee){var Pe=Ee.children,De=Ee.setRef,Fe=ct.useCallback(function(ye){De(ye)},[]);return ct.cloneElement(Pe,{ref:Fe})}function ce(Ee,Pe,De,Fe,ye,Qe,vt,Ye){var Je=Ye.getKey;return Ee.slice(Pe,De+1).map(function(yt,St){var rt=Pe+St,Zt=vt(yt,rt,{style:{width:Fe},offsetX:ye}),dn=Je(yt);return ct.createElement(ee,{key:dn,setRef:function(qt){return Qe(yt,qt)}},Zt)})}function se(Ee,Pe,De,Fe){var ye=De-Ee,Qe=Pe-De,vt=Math.min(ye,Qe)*2;if(Fe<=vt){var Ye=Math.floor(Fe/2);return Fe%2?De+Ye+1:De-Ye}return ye>Qe?De-(Fe-Qe):De+(Fe-ye)}function he(Ee,Pe,De){var Fe=Ee.length,ye=Pe.length,Qe,vt;if(Fe===0&&ye===0)return null;Fe<ye?(Qe=Ee,vt=Pe):(Qe=Pe,vt=Ee);var Ye={__EMPTY_ITEM__:!0};function Je(mn){return mn!==void 0?De(mn):Ye}for(var yt=null,St=Math.abs(Fe-ye)!==1,rt=0;rt<vt.length;rt+=1){var Zt=Je(Qe[rt]),dn=Je(vt[rt]);if(Zt!==dn){yt=rt,St=St||Zt!==Je(vt[rt+1]);break}}return yt===null?null:{index:yt,multiple:St}}function ve(Ee,Pe,De){var Fe=ct.useState(Ee),ye=(0,Ge.Z)(Fe,2),Qe=ye[0],vt=ye[1],Ye=ct.useState(null),Je=(0,Ge.Z)(Ye,2),yt=Je[0],St=Je[1];return ct.useEffect(function(){var rt=he(Qe||[],Ee||[],Pe);(rt==null?void 0:rt.index)!==void 0&&(De==null||De(rt.index),St(Ee[rt.index])),vt(Ee)},[Ee]),[yt]}var be=pe(16089),ke=(typeof navigator=="undefined"?"undefined":(0,Oe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ae=ke,ze=function(Ee,Pe,De,Fe){var ye=(0,ct.useRef)(!1),Qe=(0,ct.useRef)(null);function vt(){clearTimeout(Qe.current),ye.current=!0,Qe.current=setTimeout(function(){ye.current=!1},50)}var Ye=(0,ct.useRef)({top:Ee,bottom:Pe,left:De,right:Fe});return Ye.current.top=Ee,Ye.current.bottom=Pe,Ye.current.left=De,Ye.current.right=Fe,function(Je,yt){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,rt=Je?yt<0&&Ye.current.left||yt>0&&Ye.current.right:yt<0&&Ye.current.top||yt>0&&Ye.current.bottom;return St&&rt?(clearTimeout(Qe.current),ye.current=!1):(!rt||ye.current)&&vt(),!ye.current&&rt}};function Ze(Ee,Pe,De,Fe,ye,Qe,vt){var Ye=(0,ct.useRef)(0),Je=(0,ct.useRef)(null),yt=(0,ct.useRef)(null),St=(0,ct.useRef)(!1),rt=ze(Pe,De,Fe,ye);function Zt(Nt,sn){if(be.Z.cancel(Je.current),!rt(!1,sn)){var Fn=Nt;if(!Fn._virtualHandled)Fn._virtualHandled=!0;else return;Ye.current+=sn,yt.current=sn,Ae||Fn.preventDefault(),Je.current=(0,be.Z)(function(){var hn=St.current?10:1;vt(Ye.current*hn,!1),Ye.current=0})}}function dn(Nt,sn){vt(sn,!0),Ae||Nt.preventDefault()}var mn=(0,ct.useRef)(null),qt=(0,ct.useRef)(null);function Gn(Nt){if(Ee){be.Z.cancel(qt.current),qt.current=(0,be.Z)(function(){mn.current=null},2);var sn=Nt.deltaX,Fn=Nt.deltaY,hn=Nt.shiftKey,Mn=sn,li=Fn;(mn.current==="sx"||!mn.current&&hn&&Fn&&!sn)&&(Mn=Fn,li=0,mn.current="sx");var pi=Math.abs(Mn),mi=Math.abs(li);mn.current===null&&(mn.current=Qe&&pi>mi?"x":"y"),mn.current==="y"?Zt(Nt,li):dn(Nt,Mn)}}function Kn(Nt){Ee&&(St.current=Nt.detail===yt.current)}return[Gn,Kn]}function ot(Ee,Pe,De,Fe){var ye=ct.useMemo(function(){return[new Map,[]]},[Ee,De.id,Fe]),Qe=(0,Ge.Z)(ye,2),vt=Qe[0],Ye=Qe[1],Je=function(St){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:St,Zt=vt.get(St),dn=vt.get(rt);if(Zt===void 0||dn===void 0)for(var mn=Ee.length,qt=Ye.length;qt<mn;qt+=1){var Gn,Kn=Ee[qt],Nt=Pe(Kn);vt.set(Nt,qt);var sn=(Gn=De.get(Nt))!==null&&Gn!==void 0?Gn:Fe;if(Ye[qt]=(Ye[qt-1]||0)+sn,Nt===St&&(Zt=qt),Nt===rt&&(dn=qt),Zt!==void 0&&dn!==void 0)break}return{top:Ye[Zt-1]||0,bottom:Ye[dn]}};return Je}var qe=pe(76846),bt=pe(6909),He=pe(4771),wt=function(){function Ee(){(0,bt.Z)(this,Ee),(0,st.Z)(this,"maps",void 0),(0,st.Z)(this,"id",0),(0,st.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,He.Z)(Ee,[{key:"set",value:function(De,Fe){this.maps[De]=Fe,this.id+=1,this.diffKeys.add(De)}},{key:"get",value:function(De){return this.maps[De]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Ee}(),nt=wt;function Dt(Ee){var Pe=parseFloat(Ee);return isNaN(Pe)?0:Pe}function ht(Ee,Pe,De){var Fe=ct.useState(0),ye=(0,Ge.Z)(Fe,2),Qe=ye[0],vt=ye[1],Ye=(0,ct.useRef)(new Map),Je=(0,ct.useRef)(new nt),yt=(0,ct.useRef)(0);function St(){yt.current+=1}function rt(){var dn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;St();var mn=function(){var Kn=!1;Ye.current.forEach(function(Nt,sn){if(Nt&&Nt.offsetParent){var Fn=(0,qe.ZP)(Nt),hn=Fn.offsetHeight,Mn=getComputedStyle(Fn),li=Mn.marginTop,pi=Mn.marginBottom,mi=Dt(li),Li=Dt(pi),Gi=hn+mi+Li;Je.current.get(sn)!==Gi&&(Je.current.set(sn,Gi),Kn=!0)}}),Kn&&vt(function(Nt){return Nt+1})};if(dn)mn();else{yt.current+=1;var qt=yt.current;Promise.resolve().then(function(){qt===yt.current&&mn()})}}function Zt(dn,mn){var qt=Ee(dn),Gn=Ye.current.get(qt);mn?(Ye.current.set(qt,mn),rt()):Ye.current.delete(qt),!Gn!=!mn&&(mn?Pe==null||Pe(dn):De==null||De(dn))}return(0,ct.useEffect)(function(){return St},[]),[Zt,rt,Je.current,Qe]}var zt=14/15;function Yt(Ee,Pe,De){var Fe=(0,ct.useRef)(!1),ye=(0,ct.useRef)(0),Qe=(0,ct.useRef)(0),vt=(0,ct.useRef)(null),Ye=(0,ct.useRef)(null),Je,yt=function(dn){if(Fe.current){var mn=Math.ceil(dn.touches[0].pageX),qt=Math.ceil(dn.touches[0].pageY),Gn=ye.current-mn,Kn=Qe.current-qt,Nt=Math.abs(Gn)>Math.abs(Kn);Nt?ye.current=mn:Qe.current=qt;var sn=De(Nt,Nt?Gn:Kn,!1,dn);sn&&dn.preventDefault(),clearInterval(Ye.current),sn&&(Ye.current=setInterval(function(){Nt?Gn*=zt:Kn*=zt;var Fn=Math.floor(Nt?Gn:Kn);(!De(Nt,Fn,!0)||Math.abs(Fn)<=.1)&&clearInterval(Ye.current)},16))}},St=function(){Fe.current=!1,Je()},rt=function(dn){Je(),dn.touches.length===1&&!Fe.current&&(Fe.current=!0,ye.current=Math.ceil(dn.touches[0].pageX),Qe.current=Math.ceil(dn.touches[0].pageY),vt.current=dn.target,vt.current.addEventListener("touchmove",yt,{passive:!1}),vt.current.addEventListener("touchend",St,{passive:!0}))};Je=function(){vt.current&&(vt.current.removeEventListener("touchmove",yt),vt.current.removeEventListener("touchend",St))},(0,Et.Z)(function(){return Ee&&Pe.current.addEventListener("touchstart",rt,{passive:!0}),function(){var Zt;(Zt=Pe.current)===null||Zt===void 0||Zt.removeEventListener("touchstart",rt),Je(),clearInterval(Ye.current)}},[Ee])}function Ut(Ee){return Math.floor(Math.pow(Ee,.5))}function it(Ee,Pe){var De="touches"in Ee?Ee.touches[0]:Ee;return De[Pe?"pageX":"pageY"]-window[Pe?"scrollX":"scrollY"]}function Ve(Ee,Pe,De){ct.useEffect(function(){var Fe=Pe.current;if(Ee&&Fe){var ye=!1,Qe,vt,Ye=function(){be.Z.cancel(Qe)},Je=function Zt(){Ye(),Qe=(0,be.Z)(function(){De(vt),Zt()})},yt=function(dn){if(!dn.target.draggable){var mn=dn;mn._virtualHandled||(mn._virtualHandled=!0,ye=!0)}},St=function(){ye=!1,Ye()},rt=function(dn){if(ye){var mn=it(dn,!1),qt=Fe.getBoundingClientRect(),Gn=qt.top,Kn=qt.bottom;if(mn<=Gn){var Nt=Gn-mn;vt=-Ut(Nt),Je()}else if(mn>=Kn){var sn=mn-Kn;vt=Ut(sn),Je()}else Ye()}};return Fe.addEventListener("mousedown",yt),Fe.ownerDocument.addEventListener("mouseup",St),Fe.ownerDocument.addEventListener("mousemove",rt),function(){Fe.removeEventListener("mousedown",yt),Fe.ownerDocument.removeEventListener("mouseup",St),Fe.ownerDocument.removeEventListener("mousemove",rt),Ye()}}},[Ee])}var Wt=10;function Ln(Ee,Pe,De,Fe,ye,Qe,vt,Ye){var Je=ct.useRef(),yt=ct.useState(null),St=(0,Ge.Z)(yt,2),rt=St[0],Zt=St[1];return(0,Et.Z)(function(){if(rt&&rt.times<Wt){if(!Ee.current){Zt(function(Ne){return(0,Ke.Z)({},Ne)});return}Qe();var dn=rt.targetAlign,mn=rt.originAlign,qt=rt.index,Gn=rt.offset,Kn=Ee.current.clientHeight,Nt=!1,sn=dn,Fn=null;if(Kn){for(var hn=dn||mn,Mn=0,li=0,pi=0,mi=Math.min(Pe.length-1,qt),Li=0;Li<=mi;Li+=1){var Gi=ye(Pe[Li]);li=Mn;var ar=De.get(Gi);pi=li+(ar===void 0?Fe:ar),Mn=pi}for(var Xi=hn==="top"?Gn:Kn-Gn,wr=mi;wr>=0;wr-=1){var vr=ye(Pe[wr]),ji=De.get(vr);if(ji===void 0){Nt=!0;break}if(Xi-=ji,Xi<=0)break}switch(hn){case"top":Fn=li-Gn;break;case"bottom":Fn=pi-Kn+Gn;break;default:{var Lr=Ee.current.scrollTop,jn=Lr+Kn;li<Lr?sn="top":pi>jn&&(sn="bottom")}}Fn!==null&&vt(Fn),Fn!==rt.lastTop&&(Nt=!0)}Nt&&Zt((0,Ke.Z)((0,Ke.Z)({},rt),{},{times:rt.times+1,targetAlign:sn,lastTop:Fn}))}},[rt,Ee.current]),function(dn){if(dn==null){Ye();return}if(be.Z.cancel(Je.current),typeof dn=="number")vt(dn);else if(dn&&(0,Oe.Z)(dn)==="object"){var mn,qt=dn.align;"index"in dn?mn=dn.index:mn=Pe.findIndex(function(Nt){return ye(Nt)===dn.key});var Gn=dn.offset,Kn=Gn===void 0?0:Gn;Zt({times:0,index:mn,offset:Kn,originAlign:qt})}}}var Nn=ct.forwardRef(function(Ee,Pe){var De=Ee.prefixCls,Fe=Ee.rtl,ye=Ee.scrollOffset,Qe=Ee.scrollRange,vt=Ee.onStartMove,Ye=Ee.onStopMove,Je=Ee.onScroll,yt=Ee.horizontal,St=Ee.spinSize,rt=Ee.containerSize,Zt=Ee.style,dn=Ee.thumbStyle,mn=Ee.showScrollBar,qt=ct.useState(!1),Gn=(0,Ge.Z)(qt,2),Kn=Gn[0],Nt=Gn[1],sn=ct.useState(null),Fn=(0,Ge.Z)(sn,2),hn=Fn[0],Mn=Fn[1],li=ct.useState(null),pi=(0,Ge.Z)(li,2),mi=pi[0],Li=pi[1],Gi=!Fe,ar=ct.useRef(),Xi=ct.useRef(),wr=ct.useState(mn),vr=(0,Ge.Z)(wr,2),ji=vr[0],Lr=vr[1],jn=ct.useRef(),Ne=function(){mn===!0||mn===!1||(clearTimeout(jn.current),Lr(!0),jn.current=setTimeout(function(){Lr(!1)},3e3))},Ei=Qe-rt||0,Oi=rt-St||0,on=ct.useMemo(function(){if(ye===0||Ei===0)return 0;var an=ye/Ei;return an*Oi},[ye,Ei,Oi]),ui=function(vn){vn.stopPropagation(),vn.preventDefault()},vi=ct.useRef({top:on,dragging:Kn,pageY:hn,startTop:mi});vi.current={top:on,dragging:Kn,pageY:hn,startTop:mi};var bi=function(vn){Nt(!0),Mn(it(vn,yt)),Li(vi.current.top),vt(),vn.stopPropagation(),vn.preventDefault()};ct.useEffect(function(){var an=function(cn){cn.preventDefault()},vn=ar.current,Bt=Xi.current;return vn.addEventListener("touchstart",an,{passive:!1}),Bt.addEventListener("touchstart",bi,{passive:!1}),function(){vn.removeEventListener("touchstart",an),Bt.removeEventListener("touchstart",bi)}},[]);var In=ct.useRef();In.current=Ei;var Gt=ct.useRef();Gt.current=Oi,ct.useEffect(function(){if(Kn){var an,vn=function(cn){var Sn=vi.current,Un=Sn.dragging,un=Sn.pageY,Rt=Sn.startTop;be.Z.cancel(an);var zn=ar.current.getBoundingClientRect(),ni=rt/(yt?zn.width:zn.height);if(Un){var gi=(it(cn,yt)-un)*ni,tn=Rt;!Gi&&yt?tn-=gi:tn+=gi;var Bn=In.current,Ft=Gt.current,wn=Ft?tn/Ft:0,gn=Math.ceil(wn*Bn);gn=Math.max(gn,0),gn=Math.min(gn,Bn),an=(0,be.Z)(function(){Je(gn,yt)})}},Bt=function(){Nt(!1),Ye()};return window.addEventListener("mousemove",vn,{passive:!0}),window.addEventListener("touchmove",vn,{passive:!0}),window.addEventListener("mouseup",Bt,{passive:!0}),window.addEventListener("touchend",Bt,{passive:!0}),function(){window.removeEventListener("mousemove",vn),window.removeEventListener("touchmove",vn),window.removeEventListener("mouseup",Bt),window.removeEventListener("touchend",Bt),be.Z.cancel(an)}}},[Kn]),ct.useEffect(function(){return Ne(),function(){clearTimeout(jn.current)}},[ye]),ct.useImperativeHandle(Pe,function(){return{delayHidden:Ne}});var Kt="".concat(De,"-scrollbar"),jt={position:"absolute",visibility:ji?null:"hidden"},ft={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return yt?(jt.height=8,jt.left=0,jt.right=0,jt.bottom=0,ft.height="100%",ft.width=St,Gi?ft.left=on:ft.right=on):(jt.width=8,jt.top=0,jt.bottom=0,Gi?jt.right=0:jt.left=0,ft.width="100%",ft.height=St,ft.top=on),ct.createElement("div",{ref:ar,className:Tt()(Kt,(0,st.Z)((0,st.Z)((0,st.Z)({},"".concat(Kt,"-horizontal"),yt),"".concat(Kt,"-vertical"),!yt),"".concat(Kt,"-visible"),ji)),style:(0,Ke.Z)((0,Ke.Z)({},jt),Zt),onMouseDown:ui,onMouseMove:Ne},ct.createElement("div",{ref:Xi,className:Tt()("".concat(Kt,"-thumb"),(0,st.Z)({},"".concat(Kt,"-thumb-moving"),Kn)),style:(0,Ke.Z)((0,Ke.Z)({},ft),dn),onMouseDown:bi}))}),$t=Nn,rn=20;function An(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,De=Ee/Pe*Ee;return isNaN(De)&&(De=0),De=Math.max(De,rn),Math.floor(De)}var ti=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],xn=[],Qn={overflowY:"auto",overflowAnchor:"none"};function Ot(Ee,Pe){var De=Ee.prefixCls,Fe=De===void 0?"rc-virtual-list":De,ye=Ee.className,Qe=Ee.height,vt=Ee.itemHeight,Ye=Ee.fullHeight,Je=Ye===void 0?!0:Ye,yt=Ee.style,St=Ee.data,rt=Ee.children,Zt=Ee.itemKey,dn=Ee.virtual,mn=Ee.direction,qt=Ee.scrollWidth,Gn=Ee.component,Kn=Gn===void 0?"div":Gn,Nt=Ee.onScroll,sn=Ee.onVirtualScroll,Fn=Ee.onVisibleChange,hn=Ee.innerProps,Mn=Ee.extraRender,li=Ee.styles,pi=Ee.showScrollBar,mi=pi===void 0?"optional":pi,Li=(0,_e.Z)(Ee,ti),Gi=ct.useCallback(function(Gr){return typeof Zt=="function"?Zt(Gr):Gr==null?void 0:Gr[Zt]},[Zt]),ar=ht(Gi,null,null),Xi=(0,Ge.Z)(ar,4),wr=Xi[0],vr=Xi[1],ji=Xi[2],Lr=Xi[3],jn=!!(dn!==!1&&Qe&&vt),Ne=ct.useMemo(function(){return Object.values(ji.maps).reduce(function(Gr,zr){return Gr+zr},0)},[ji.id,ji.maps]),Ei=jn&&St&&(Math.max(vt*St.length,Ne)>Qe||!!qt),Oi=mn==="rtl",on=Tt()(Fe,(0,st.Z)({},"".concat(Fe,"-rtl"),Oi),ye),ui=St||xn,vi=(0,ct.useRef)(),bi=(0,ct.useRef)(),In=(0,ct.useRef)(),Gt=(0,ct.useState)(0),Kt=(0,Ge.Z)(Gt,2),jt=Kt[0],ft=Kt[1],an=(0,ct.useState)(0),vn=(0,Ge.Z)(an,2),Bt=vn[0],at=vn[1],cn=(0,ct.useState)(!1),Sn=(0,Ge.Z)(cn,2),Un=Sn[0],un=Sn[1],Rt=function(){un(!0)},zn=function(){un(!1)},ni={getKey:Gi};function gi(Gr){ft(function(zr){var Nr;typeof Gr=="function"?Nr=Gr(zr):Nr=Gr;var Eo=yr(Nr);return vi.current.scrollTop=Eo,Eo})}var tn=(0,ct.useRef)({start:0,end:ui.length}),Bn=(0,ct.useRef)(),Ft=ve(ui,Gi),wn=(0,Ge.Z)(Ft,1),gn=wn[0];Bn.current=gn;var yn=ct.useMemo(function(){if(!jn)return{scrollHeight:void 0,start:0,end:ui.length-1,offset:void 0};if(!Ei){var Gr;return{scrollHeight:((Gr=bi.current)===null||Gr===void 0?void 0:Gr.offsetHeight)||0,start:0,end:ui.length-1,offset:void 0}}for(var zr=0,Nr,Eo,or,mr=ui.length,$r=0;$r<mr;$r+=1){var hi=ui[$r],Ao=Gi(hi),Vo=ji.get(Ao),sa=zr+(Vo===void 0?vt:Vo);sa>=jt&&Nr===void 0&&(Nr=$r,Eo=zr),sa>jt+Qe&&or===void 0&&(or=$r),zr=sa}return Nr===void 0&&(Nr=0,Eo=0,or=Math.ceil(Qe/vt)),or===void 0&&(or=ui.length-1),or=Math.min(or+1,ui.length-1),{scrollHeight:zr,start:Nr,end:or,offset:Eo}},[Ei,jn,jt,ui,Lr,Qe]),On=yn.scrollHeight,$n=yn.start,Yn=yn.end,ii=yn.offset;tn.current.start=$n,tn.current.end=Yn,ct.useLayoutEffect(function(){var Gr=ji.getRecord();if(Gr.size===1){var zr=Array.from(Gr)[0],Nr=Gi(ui[$n]);if(Nr===zr){var Eo=ji.get(zr),or=Eo-vt;gi(function(mr){return mr+or})}}ji.resetRecord()},[On]);var Xn=ct.useState({width:0,height:Qe}),di=(0,Ge.Z)(Xn,2),Hi=di[0],$i=di[1],Wi=function(zr){$i({width:zr.offsetWidth,height:zr.offsetHeight})},Xt=(0,ct.useRef)(),Si=(0,ct.useRef)(),Ki=ct.useMemo(function(){return An(Hi.width,qt)},[Hi.width,qt]),Ti=ct.useMemo(function(){return An(Hi.height,On)},[Hi.height,On]),cr=On-Qe,Qi=(0,ct.useRef)(cr);Qi.current=cr;function yr(Gr){var zr=Gr;return Number.isNaN(Qi.current)||(zr=Math.min(zr,Qi.current)),zr=Math.max(zr,0),zr}var fr=jt<=0,Vi=jt>=cr,Mr=Bt<=0,Dn=Bt>=qt,Wr=ze(fr,Vi,Mr,Dn),_n=function(){return{x:Oi?-Bt:Bt,y:jt}},Ir=(0,ct.useRef)(_n()),eo=(0,Xe.useEvent)(function(Gr){if(sn){var zr=(0,Ke.Z)((0,Ke.Z)({},_n()),Gr);(Ir.current.x!==zr.x||Ir.current.y!==zr.y)&&(sn(zr),Ir.current=zr)}});function xr(Gr,zr){var Nr=Gr;zr?((0,It.flushSync)(function(){at(Nr)}),eo()):gi(Nr)}function bo(Gr){var zr=Gr.currentTarget.scrollTop;zr!==jt&&gi(zr),Nt==null||Nt(Gr),eo()}var Yr=function(zr){var Nr=zr,Eo=qt?qt-Hi.width:0;return Nr=Math.max(Nr,0),Nr=Math.min(Nr,Eo),Nr},ur=(0,Xe.useEvent)(function(Gr,zr){zr?((0,It.flushSync)(function(){at(function(Nr){var Eo=Nr+(Oi?-Gr:Gr);return Yr(Eo)})}),eo()):gi(function(Nr){var Eo=Nr+Gr;return Eo})}),ir=Ze(jn,fr,Vi,Mr,Dn,!!qt,ur),qi=(0,Ge.Z)(ir,2),Dr=qi[0],Ai=qi[1];Yt(jn,vi,function(Gr,zr,Nr,Eo){var or=Eo;return Wr(Gr,zr,Nr)?!1:!or||!or._virtualHandled?(or&&(or._virtualHandled=!0),Dr({preventDefault:function(){},deltaX:Gr?zr:0,deltaY:Gr?0:zr}),!0):!1}),Ve(Ei,vi,function(Gr){gi(function(zr){return zr+Gr})}),(0,Et.Z)(function(){function Gr(Nr){var Eo=fr&&Nr.detail<0,or=Vi&&Nr.detail>0;jn&&!Eo&&!or&&Nr.preventDefault()}var zr=vi.current;return zr.addEventListener("wheel",Dr,{passive:!1}),zr.addEventListener("DOMMouseScroll",Ai,{passive:!0}),zr.addEventListener("MozMousePixelScroll",Gr,{passive:!1}),function(){zr.removeEventListener("wheel",Dr),zr.removeEventListener("DOMMouseScroll",Ai),zr.removeEventListener("MozMousePixelScroll",Gr)}},[jn,fr,Vi]),(0,Et.Z)(function(){if(qt){var Gr=Yr(Bt);at(Gr),eo({x:Gr})}},[Hi.width,qt]);var et=function(){var zr,Nr;(zr=Xt.current)===null||zr===void 0||zr.delayHidden(),(Nr=Si.current)===null||Nr===void 0||Nr.delayHidden()},jr=Ln(vi,ui,ji,vt,Gi,function(){return vr(!0)},gi,et);ct.useImperativeHandle(Pe,function(){return{nativeElement:In.current,getScrollInfo:_n,scrollTo:function(zr){function Nr(Eo){return Eo&&(0,Oe.Z)(Eo)==="object"&&("left"in Eo||"top"in Eo)}Nr(zr)?(zr.left!==void 0&&at(Yr(zr.left)),jr(zr.top)):jr(zr)}}}),(0,Et.Z)(function(){if(Fn){var Gr=ui.slice($n,Yn+1);Fn(Gr,ui)}},[$n,Yn,ui]);var yo=ot(ui,Gi,ji,vt),Or=Mn==null?void 0:Mn({start:$n,end:Yn,virtual:Ei,offsetX:Bt,offsetY:ii,rtl:Oi,getSize:yo}),wo=ce(ui,$n,Yn,qt,Bt,wr,rt,ni),co=null;Qe&&(co=(0,Ke.Z)((0,st.Z)({},Je?"height":"maxHeight",Qe),Qn),jn&&(co.overflowY="hidden",qt&&(co.overflowX="hidden"),Un&&(co.pointerEvents="none")));var $o={};return Oi&&($o.dir="rtl"),ct.createElement("div",(0,ge.Z)({ref:In,style:(0,Ke.Z)((0,Ke.Z)({},yt),{},{position:"relative"}),className:on},$o,Li),ct.createElement(Pt.Z,{onResize:Wi},ct.createElement(Kn,{className:"".concat(Fe,"-holder"),style:co,ref:vi,onScroll:bo,onMouseEnter:et},ct.createElement(ne,{prefixCls:Fe,height:On,offsetX:Bt,offsetY:ii,scrollWidth:qt,onInnerResize:vr,ref:bi,innerProps:hn,rtl:Oi,extra:Or},wo))),Ei&&On>Qe&&ct.createElement($t,{ref:Xt,prefixCls:Fe,scrollOffset:jt,scrollRange:On,rtl:Oi,onScroll:xr,onStartMove:Rt,onStopMove:zn,spinSize:Ti,containerSize:Hi.height,style:li==null?void 0:li.verticalScrollBar,thumbStyle:li==null?void 0:li.verticalScrollBarThumb,showScrollBar:mi}),Ei&&qt>Hi.width&&ct.createElement($t,{ref:Si,prefixCls:Fe,scrollOffset:Bt,scrollRange:qt,rtl:Oi,onScroll:xr,onStartMove:Rt,onStopMove:zn,spinSize:Ki,containerSize:Hi.width,horizontal:!0,style:li==null?void 0:li.horizontalScrollBar,thumbStyle:li==null?void 0:li.horizontalScrollBarThumb,showScrollBar:mi}))}var Cn=ct.forwardRef(Ot);Cn.displayName="List";var Wn=Cn,We=Wn},78113:function(Vn,Pn,pe){"use strict";pe.d(Pn,{Z5:function(){return wg},_l:function(){return Nl},bK:function(){return Zu}});var ge=pe(59301),Oe=pe(2505);function Ke(xe,Ce){xe.prototype=Object.create(Ce.prototype),xe.prototype.constructor=xe,(0,Oe.Z)(xe,Ce)}var st=pe(92413),Ge=pe(59781),_e=ge.createContext(null),Le=null;function Tt(xe){xe()}var Pt=Tt,Xe=function(Ce){return Pt=Ce},Et=function(){return Pt};function ct(){var xe=Et(),Ce=null,Ie=null;return{clear:function(){Ce=null,Ie=null},notify:function(){xe(function(){for(var mt=Ce;mt;)mt.callback(),mt=mt.next})},get:function(){for(var mt=[],gt=Ce;gt;)mt.push(gt),gt=gt.next;return mt},subscribe:function(mt){var gt=!0,At=Ie={callback:mt,next:null,prev:Ie};return At.prev?At.prev.next=At:Ce=At,function(){!gt||Ce===null||(gt=!1,At.next?At.next.prev=At.prev:Ie=At.prev,At.prev?At.prev.next=At.next:Ce=At.next)}}}}var It={notify:function(){},get:function(){return[]}};function Be(xe,Ce){var Ie,$e=It;function mt(kn){return En(),$e.subscribe(kn)}function gt(){$e.notify()}function At(){Zn.onStateChange&&Zn.onStateChange()}function Vt(){return!!Ie}function En(){Ie||(Ie=Ce?Ce.addNestedSub(At):xe.subscribe(At),$e=ct())}function Jn(){Ie&&(Ie(),Ie=void 0,$e.clear(),$e=It)}var Zn={addNestedSub:mt,notifyNestedSubs:gt,handleChangeWrapper:At,isSubscribed:Vt,trySubscribe:En,tryUnsubscribe:Jn,getListeners:function(){return $e}};return Zn}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,Ie=xe.context,$e=xe.children,mt=(0,ge.useMemo)(function(){var Vt=Be(Ce);return{store:Ce,subscription:Vt}},[Ce]),gt=(0,ge.useMemo)(function(){return Ce.getState()},[Ce]);ne(function(){var Vt=mt.subscription;return Vt.onStateChange=Vt.notifyNestedSubs,Vt.trySubscribe(),gt!==Ce.getState()&&Vt.notifyNestedSubs(),function(){Vt.tryUnsubscribe(),Vt.onStateChange=null}},[mt,gt]);var At=Ie||_e;return ge.createElement(At.Provider,{value:mt},$e)}var ce=ee,se=pe(96529),he=pe(94266),ve=pe.n(he),be=pe(53410),ke=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Ae=["reactReduxForwardedRef"],ze=[],Ze=[null,null],ot=function(Ce){try{return JSON.stringify(Ce)}catch(Ie){return String(Ce)}};function qe(xe,Ce){var Ie=xe[1];return[Ce.payload,Ie+1]}function bt(xe,Ce,Ie){ne(function(){return xe.apply(void 0,Ce)},Ie)}function He(xe,Ce,Ie,$e,mt,gt,At){xe.current=$e,Ce.current=mt,Ie.current=!1,gt.current&&(gt.current=null,At())}function wt(xe,Ce,Ie,$e,mt,gt,At,Vt,En,Jn){if(xe){var Zn=!1,kn=null,Tn=function(){if(!Zn){var Fr=Ce.getState(),Hr,no;try{Hr=$e(Fr,mt.current)}catch(uo){no=uo,kn=uo}no||(kn=null),Hr===gt.current?At.current||En():(gt.current=Hr,Vt.current=Hr,At.current=!0,Jn({type:"STORE_UPDATED",payload:{error:no}}))}};Ie.onStateChange=Tn,Ie.trySubscribe(),Tn();var ri=function(){if(Zn=!0,Ie.tryUnsubscribe(),Ie.onStateChange=null,kn)throw kn};return ri}}var nt=function(){return[null,0]};function Dt(xe,Ce){Ce===void 0&&(Ce={});var Ie=Ce,$e=Ie.getDisplayName,mt=$e===void 0?function(ya){return"ConnectAdvanced("+ya+")"}:$e,gt=Ie.methodName,At=gt===void 0?"connectAdvanced":gt,Vt=Ie.renderCountProp,En=Vt===void 0?void 0:Vt,Jn=Ie.shouldHandleStateChanges,Zn=Jn===void 0?!0:Jn,kn=Ie.storeKey,Tn=kn===void 0?"store":kn,ri=Ie.withRef,ki=ri===void 0?!1:ri,Fr=Ie.forwardRef,Hr=Fr===void 0?!1:Fr,no=Ie.context,uo=no===void 0?_e:no,Lo=(0,se.Z)(Ie,ke);if(0)var Po;var Uo=uo;return function(Ka){var pl=Ka.displayName||Ka.name||"Component",Wa=mt(pl),ol=(0,st.Z)({},Lo,{getDisplayName:mt,methodName:At,renderCountProp:En,shouldHandleStateChanges:Zn,storeKey:Tn,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,Ae);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]),Ro=(0,ge.useContext)($c),Rh=!!Xs.store&&!!Xs.store.getState&&!!Xs.store.dispatch,Fg=!!Ro&&!!Ro.store,Kc=Rh?Xs.store:Ro.store,Od=(0,ge.useMemo)(function(){return yu(Kc)},[Kc]),fh=(0,ge.useMemo)(function(){if(!Zn)return Ze;var Qs=Be(Kc,Rh?null:Ro.subscription),dc=Qs.notifyNestedSubs.bind(Qs);return[Qs,dc]},[Kc,Rh,Ro]),Gu=fh[0],_f=fh[1],Xf=(0,ge.useMemo)(function(){return Rh?Ro:(0,st.Z)({},Ro,{subscription:Gu})},[Rh,Ro,Gu]),op=(0,ge.useReducer)(qe,ze,nt),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]);bt(He,[Dg,ap,pf,hf,Bg,gf,_f]),bt(wt,[Zn,Kc,Gu,Od,Dg,ap,pf,gf,_f,ff],[Kc,Gu,Od]);var ra=(0,ge.useMemo)(function(){return ge.createElement(Ka,(0,st.Z)({},Bg,{ref:Gc}))},[Gc,Ka,Bg]),Su=(0,ge.useMemo)(function(){return Zn?ge.createElement($c.Provider,{value:Xf},ra):ra},[$c,ra,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,st.Z)({},fd,{reactReduxForwardedRef:al}))});return Al.displayName=Wa,Al.WrappedComponent=Ka,ve()(Al,Ka)}return ve()(Wu,Ka)}}function ht(xe,Ce){return xe===Ce?xe!==0||Ce!==0||1/xe===1/Ce:xe!==xe&&Ce!==Ce}function zt(xe,Ce){if(ht(xe,Ce))return!0;if(typeof xe!="object"||xe===null||typeof Ce!="object"||Ce===null)return!1;var Ie=Object.keys(xe),$e=Object.keys(Ce);if(Ie.length!==$e.length)return!1;for(var mt=0;mt<Ie.length;mt++)if(!Object.prototype.hasOwnProperty.call(Ce,Ie[mt])||!ht(xe[Ie[mt]],Ce[Ie[mt]]))return!1;return!0}function Yt(xe,Ce){var Ie={},$e=function(At){var Vt=xe[At];typeof Vt=="function"&&(Ie[At]=function(){return Ce(Vt.apply(void 0,arguments))})};for(var mt in xe)$e(mt);return Ie}function Ut(xe){return function(Ie,$e){var mt=xe(Ie,$e);function gt(){return mt}return gt.dependsOnOwnProps=!1,gt}}function it(xe){return xe.dependsOnOwnProps!==null&&xe.dependsOnOwnProps!==void 0?!!xe.dependsOnOwnProps:xe.length!==1}function Ve(xe,Ce){return function($e,mt){var gt=mt.displayName,At=function(En,Jn){return At.dependsOnOwnProps?At.mapToProps(En,Jn):At.mapToProps(En)};return At.dependsOnOwnProps=!0,At.mapToProps=function(En,Jn){At.mapToProps=xe,At.dependsOnOwnProps=it(xe);var Zn=At(En,Jn);return typeof Zn=="function"&&(At.mapToProps=Zn,At.dependsOnOwnProps=it(Zn),Zn=At(En,Jn)),Zn},At}}function Wt(xe){return typeof xe=="function"?Ve(xe,"mapDispatchToProps"):void 0}function Ln(xe){return xe?void 0:Ut(function(Ce){return{dispatch:Ce}})}function Nn(xe){return xe&&typeof xe=="object"?Ut(function(Ce){return Yt(xe,Ce)}):void 0}var $t=[Wt,Ln,Nn];function rn(xe){return typeof xe=="function"?Ve(xe,"mapStateToProps"):void 0}function An(xe){return xe?void 0:Ut(function(){return{}})}var ti=[rn,An];function xn(xe,Ce,Ie){return(0,st.Z)({},Ie,xe,Ce)}function Qn(xe){return function(Ie,$e){var mt=$e.displayName,gt=$e.pure,At=$e.areMergedPropsEqual,Vt=!1,En;return function(Zn,kn,Tn){var ri=xe(Zn,kn,Tn);return Vt?(!gt||!At(ri,En))&&(En=ri):(Vt=!0,En=ri),En}}}function Ot(xe){return typeof xe=="function"?Qn(xe):void 0}function Cn(xe){return xe?void 0:function(){return xn}}var Wn=[Ot,Cn],We=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Ee(xe,Ce,Ie,$e){return function(gt,At){return Ie(xe(gt,At),Ce($e,At),At)}}function Pe(xe,Ce,Ie,$e,mt){var gt=mt.areStatesEqual,At=mt.areOwnPropsEqual,Vt=mt.areStatePropsEqual,En=!1,Jn,Zn,kn,Tn,ri;function ki(Lo,Po){return Jn=Lo,Zn=Po,kn=xe(Jn,Zn),Tn=Ce($e,Zn),ri=Ie(kn,Tn,Zn),En=!0,ri}function Fr(){return kn=xe(Jn,Zn),Ce.dependsOnOwnProps&&(Tn=Ce($e,Zn)),ri=Ie(kn,Tn,Zn),ri}function Hr(){return xe.dependsOnOwnProps&&(kn=xe(Jn,Zn)),Ce.dependsOnOwnProps&&(Tn=Ce($e,Zn)),ri=Ie(kn,Tn,Zn),ri}function no(){var Lo=xe(Jn,Zn),Po=!Vt(Lo,kn);return kn=Lo,Po&&(ri=Ie(kn,Tn,Zn)),ri}function uo(Lo,Po){var Uo=!At(Po,Zn),ya=!gt(Lo,Jn,Po,Zn);return Jn=Lo,Zn=Po,Uo&&ya?Fr():Uo?Hr():ya?no():ri}return function(Po,Uo){return En?uo(Po,Uo):ki(Po,Uo)}}function De(xe,Ce){var Ie=Ce.initMapStateToProps,$e=Ce.initMapDispatchToProps,mt=Ce.initMergeProps,gt=(0,se.Z)(Ce,We),At=Ie(xe,gt),Vt=$e(xe,gt),En=mt(xe,gt),Jn=gt.pure?Pe:Ee;return Jn(At,Vt,En,xe,gt)}var Fe=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ye(xe,Ce,Ie){for(var $e=Ce.length-1;$e>=0;$e--){var mt=Ce[$e](xe);if(mt)return mt}return function(gt,At){throw new Error("Invalid value of type "+typeof xe+" for "+Ie+" argument when connecting component "+At.wrappedComponentName+".")}}function Qe(xe,Ce){return xe===Ce}function vt(xe){var Ce=xe===void 0?{}:xe,Ie=Ce.connectHOC,$e=Ie===void 0?Dt:Ie,mt=Ce.mapStateToPropsFactories,gt=mt===void 0?ti:mt,At=Ce.mapDispatchToPropsFactories,Vt=At===void 0?$t:At,En=Ce.mergePropsFactories,Jn=En===void 0?Wn:En,Zn=Ce.selectorFactory,kn=Zn===void 0?De:Zn;return function(ri,ki,Fr,Hr){Hr===void 0&&(Hr={});var no=Hr,uo=no.pure,Lo=uo===void 0?!0:uo,Po=no.areStatesEqual,Uo=Po===void 0?Qe:Po,ya=no.areOwnPropsEqual,Ka=ya===void 0?zt:ya,pl=no.areStatePropsEqual,Wa=pl===void 0?zt:pl,ol=no.areMergedPropsEqual,nu=ol===void 0?zt:ol,yu=(0,se.Z)(no,Fe),Wc=ye(ri,gt,"mapStateToProps"),Ju=ye(ki,Vt,"mapDispatchToProps"),Wu=ye(Fr,Jn,"mergeProps");return $e(kn,(0,st.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 Ye=vt();function Je(){var xe=useContext(ReactReduxContext);return xe}function yt(xe){xe===void 0&&(xe=ReactReduxContext);var Ce=xe===ReactReduxContext?useDefaultReduxContext:function(){return useContext(xe)};return function(){var $e=Ce(),mt=$e.store;return mt}}var St=null;function rt(xe){xe===void 0&&(xe=ReactReduxContext);var Ce=xe===ReactReduxContext?useDefaultStore:createStoreHook(xe);return function(){var $e=Ce();return $e.dispatch}}var Zt=null,dn=function(Ce,Ie){return Ce===Ie};function mn(xe,Ce,Ie,$e){var mt=useReducer(function(ki){return ki+1},0),gt=mt[1],At=useMemo(function(){return createSubscription(Ie,$e)},[Ie,$e]),Vt=useRef(),En=useRef(),Jn=useRef(),Zn=useRef(),kn=Ie.getState(),Tn;try{if(xe!==En.current||kn!==Jn.current||Vt.current){var ri=xe(kn);Zn.current===void 0||!Ce(ri,Zn.current)?Tn=ri:Tn=Zn.current}else Tn=Zn.current}catch(ki){throw Vt.current&&(ki.message+=`
The error may be correlated with this previous error:
`+Vt.current.stack+`
`),ki}return useIsomorphicLayoutEffect(function(){En.current=xe,Jn.current=kn,Zn.current=Tn,Vt.current=void 0}),useIsomorphicLayoutEffect(function(){function ki(){try{var Fr=Ie.getState();if(Fr===Jn.current)return;var Hr=En.current(Fr);if(Ce(Hr,Zn.current))return;Zn.current=Hr,Jn.current=Fr}catch(no){Vt.current=no}gt()}return At.onStateChange=ki,At.trySubscribe(),ki(),function(){return At.tryUnsubscribe()}},[Ie,At]),Tn}function qt(xe){xe===void 0&&(xe=ReactReduxContext);var Ce=xe===ReactReduxContext?useDefaultReduxContext:function(){return useContext(xe)};return function($e,mt){mt===void 0&&(mt=dn);var gt=Ce(),At=gt.store,Vt=gt.subscription,En=mn($e,mt,At,Vt);return useDebugValue(En),En}}var Gn=null,Kn=pe(4676);Xe(Kn.unstable_batchedUpdates);function Nt(xe,Ce){if(xe.length!==Ce.length)return!1;for(var Ie=0;Ie<xe.length;Ie++)if(xe[Ie]!==Ce[Ie])return!1;return!0}function sn(xe,Ce){var Ie=(0,ge.useState)(function(){return{inputs:Ce,result:xe()}})[0],$e=(0,ge.useRef)(!0),mt=(0,ge.useRef)(Ie),gt=$e.current||!!(Ce&&mt.current.inputs&&Nt(Ce,mt.current.inputs)),At=gt?mt.current:{inputs:Ce,result:xe()};return(0,ge.useEffect)(function(){$e.current=!1,mt.current=At},[At]),At.result}function Fn(xe,Ce){return sn(function(){return xe},Ce)}var hn=sn,Mn=Fn,li=!0,pi="Invariant failed";function mi(xe,Ce){if(!xe){if(li)throw new Error(pi);var Ie=typeof Ce=="function"?Ce():Ce,$e=Ie?"".concat(pi,": ").concat(Ie):pi;throw new Error($e)}}var Li=function(Ce){var Ie=Ce.top,$e=Ce.right,mt=Ce.bottom,gt=Ce.left,At=$e-gt,Vt=mt-Ie,En={top:Ie,right:$e,bottom:mt,left:gt,width:At,height:Vt,x:gt,y:Ie,center:{x:($e+gt)/2,y:(mt+Ie)/2}};return En},Gi=function(Ce,Ie){return{top:Ce.top-Ie.top,left:Ce.left-Ie.left,bottom:Ce.bottom+Ie.bottom,right:Ce.right+Ie.right}},ar=function(Ce,Ie){return{top:Ce.top+Ie.top,left:Ce.left+Ie.left,bottom:Ce.bottom-Ie.bottom,right:Ce.right-Ie.right}},Xi=function(Ce,Ie){return{top:Ce.top+Ie.y,left:Ce.left+Ie.x,bottom:Ce.bottom+Ie.y,right:Ce.right+Ie.x}},wr={top:0,right:0,bottom:0,left:0},vr=function(Ce){var Ie=Ce.borderBox,$e=Ce.margin,mt=$e===void 0?wr:$e,gt=Ce.border,At=gt===void 0?wr:gt,Vt=Ce.padding,En=Vt===void 0?wr:Vt,Jn=Li(Gi(Ie,mt)),Zn=Li(ar(Ie,At)),kn=Li(ar(Zn,En));return{marginBox:Jn,borderBox:Li(Ie),paddingBox:Zn,contentBox:kn,margin:mt,border:At,padding:En}},ji=function(Ce){var Ie=Ce.slice(0,-2),$e=Ce.slice(-2);if($e!=="px")return 0;var mt=Number(Ie);return isNaN(mt)&&mi(!1),mt},Lr=function(){return{x:window.pageXOffset,y:window.pageYOffset}},jn=function(Ce,Ie){var $e=Ce.borderBox,mt=Ce.border,gt=Ce.margin,At=Ce.padding,Vt=Xi($e,Ie);return vr({borderBox:Vt,border:mt,margin:gt,padding:At})},Ne=function(Ce,Ie){return Ie===void 0&&(Ie=Lr()),jn(Ce,Ie)},Ei=function(Ce,Ie){var $e={top:ji(Ie.marginTop),right:ji(Ie.marginRight),bottom:ji(Ie.marginBottom),left:ji(Ie.marginLeft)},mt={top:ji(Ie.paddingTop),right:ji(Ie.paddingRight),bottom:ji(Ie.paddingBottom),left:ji(Ie.paddingLeft)},gt={top:ji(Ie.borderTopWidth),right:ji(Ie.borderRightWidth),bottom:ji(Ie.borderBottomWidth),left:ji(Ie.borderLeftWidth)};return vr({borderBox:Ce,margin:$e,padding:mt,border:gt})},Oi=function(Ce){var Ie=Ce.getBoundingClientRect(),$e=window.getComputedStyle(Ce);return Ei(Ie,$e)},on=Number.isNaN||function(Ce){return typeof Ce=="number"&&Ce!==Ce};function ui(xe,Ce){return!!(xe===Ce||on(xe)&&on(Ce))}function vi(xe,Ce){if(xe.length!==Ce.length)return!1;for(var Ie=0;Ie<xe.length;Ie++)if(!ui(xe[Ie],Ce[Ie]))return!1;return!0}function bi(xe,Ce){Ce===void 0&&(Ce=vi);var Ie,$e=[],mt,gt=!1;function At(){for(var Vt=[],En=0;En<arguments.length;En++)Vt[En]=arguments[En];return gt&&Ie===this&&Ce(Vt,$e)||(mt=xe.apply(this,Vt),gt=!0,Ie=this,$e=Vt),mt}return At}var In=bi,Gt=function(Ce){var Ie=[],$e=null,mt=function(){for(var At=arguments.length,Vt=new Array(At),En=0;En<At;En++)Vt[En]=arguments[En];Ie=Vt,!$e&&($e=requestAnimationFrame(function(){$e=null,Ce.apply(void 0,Ie)}))};return mt.cancel=function(){$e&&(cancelAnimationFrame($e),$e=null)},mt},Kt=Gt,jt=!0,ft=/[ \t]{2,}/g,an=/^[ \t]*/gm,vn=function(Ce){return Ce.replace(ft," ").replace(an,"").trim()},Bt=function(Ce){return vn(`
%creact-beautiful-dnd
%c`+vn(Ce)+`
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
`)},at=function(Ce){return[Bt(Ce),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},cn="__react-beautiful-dnd-disable-dev-warnings";function Sn(xe,Ce){var Ie;jt||typeof window!="undefined"&&window[cn]||(Ie=console)[xe].apply(Ie,at(Ce))}var Un=Sn.bind(null,"warn"),un=Sn.bind(null,"error");function Rt(){}function zn(xe,Ce){return(0,st.Z)({},xe,{},Ce)}function ni(xe,Ce,Ie){var $e=Ce.map(function(mt){var gt=zn(Ie,mt.options);return xe.addEventListener(mt.eventName,mt.fn,gt),function(){xe.removeEventListener(mt.eventName,mt.fn,gt)}});return function(){$e.forEach(function(gt){gt()})}}var gi=!0,tn="Invariant failed";function Bn(xe){this.message=xe}Bn.prototype.toString=function(){return this.message};function Ft(xe,Ce){if(!xe)throw gi?new Bn(tn):new Bn(tn+": "+(Ce||""))}var wn=function(xe){Ke(Ce,xe);function Ce(){for(var $e,mt=arguments.length,gt=new Array(mt),At=0;At<mt;At++)gt[At]=arguments[At];return $e=xe.call.apply(xe,[this].concat(gt))||this,$e.callbacks=null,$e.unbind=Rt,$e.onWindowError=function(Vt){var En=$e.getCallbacks();En.isDragging()&&En.tryAbort();var Jn=Vt.error;Jn 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 Ie=Ce.prototype;return Ie.componentDidMount=function(){this.unbind=ni(window,[{eventName:"error",fn:this.onWindowError}])},Ie.componentWillUnmount=function(){this.unbind()},Ie.componentDidCatch=function(mt){if(mt instanceof Bn){this.setState({});return}throw mt},Ie.render=function(){return this.props.children(this.setCallbacks)},Ce}(ge.Component),gn=`
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
`,yn=function(Ce){return Ce+1},On=function(Ce){return`
You have lifted an item in position `+yn(Ce.source.index)+`
`},$n=function(Ce,Ie){var $e=Ce.droppableId===Ie.droppableId,mt=yn(Ce.index),gt=yn(Ie.index);return $e?`
You have moved the item from position `+mt+`
to position `+gt+`
`:`
You have moved the item from position `+mt+`
in list `+Ce.droppableId+`
to list `+Ie.droppableId+`
in position `+gt+`
`},Yn=function(Ce,Ie,$e){var mt=Ie.droppableId===$e.droppableId;return mt?`
The item `+Ce+`
has been combined with `+$e.draggableId:`
The item `+Ce+`
in list `+Ie.droppableId+`
has been combined with `+$e.draggableId+`
in list `+$e.droppableId+`
`},ii=function(Ce){var Ie=Ce.destination;if(Ie)return $n(Ce.source,Ie);var $e=Ce.combine;return $e?Yn(Ce.draggableId,Ce.source,$e):"You are over an area that cannot be dropped on"},Xn=function(Ce){return`
The item has returned to its starting position
of `+yn(Ce.index)+`
`},di=function(Ce){if(Ce.reason==="CANCEL")return`
Movement cancelled.
`+Xn(Ce.source)+`
`;var Ie=Ce.destination,$e=Ce.combine;return Ie?`
You have dropped the item.
`+$n(Ce.source,Ie)+`
`:$e?`
You have dropped the item.
`+Yn(Ce.draggableId,Ce.source,$e)+`
`:`
The item has been dropped while not over a drop area.
`+Xn(Ce.source)+`
`},Hi={dragHandleUsageInstructions:gn,onDragStart:On,onDragUpdate:ii,onDragEnd:di},$i={x:0,y:0},Wi=function(Ce,Ie){return{x:Ce.x+Ie.x,y:Ce.y+Ie.y}},Xt=function(Ce,Ie){return{x:Ce.x-Ie.x,y:Ce.y-Ie.y}},Si=function(Ce,Ie){return Ce.x===Ie.x&&Ce.y===Ie.y},Ki=function(Ce){return{x:Ce.x!==0?-Ce.x:0,y:Ce.y!==0?-Ce.y:0}},Ti=function(Ce,Ie,$e){var mt;return $e===void 0&&($e=0),mt={},mt[Ce]=Ie,mt[Ce==="x"?"y":"x"]=$e,mt},cr=function(Ce,Ie){return Math.sqrt(Math.pow(Ie.x-Ce.x,2)+Math.pow(Ie.y-Ce.y,2))},Qi=function(Ce,Ie){return Math.min.apply(Math,Ie.map(function($e){return cr(Ce,$e)}))},yr=function(Ce){return function(Ie){return{x:Ce(Ie.x),y:Ce(Ie.y)}}},fr=function(xe,Ce){var Ie=Li({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 Ie.width<=0||Ie.height<=0?null:Ie},Vi=function(Ce,Ie){return{top:Ce.top+Ie.y,left:Ce.left+Ie.x,bottom:Ce.bottom+Ie.y,right:Ce.right+Ie.x}},Mr=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}]},Dn={top:0,right:0,bottom:0,left:0},Wr=function(Ce,Ie){return Ie?Vi(Ce,Ie.scroll.diff.displacement):Ce},_n=function(Ce,Ie,$e){if($e&&$e.increasedBy){var mt;return(0,st.Z)({},Ce,(mt={},mt[Ie.end]=Ce[Ie.end]+$e.increasedBy[Ie.line],mt))}return Ce},Ir=function(Ce,Ie){return Ie&&Ie.shouldClipSubject?fr(Ie.pageMarginBox,Ce):Li(Ce)},eo=function(xe){var Ce=xe.page,Ie=xe.withPlaceholder,$e=xe.axis,mt=xe.frame,gt=Wr(Ce.marginBox,mt),At=_n(gt,$e,Ie),Vt=Ir(At,mt);return{page:Ce,withPlaceholder:Ie,active:Vt}},xr=function(xe,Ce){xe.frame||Ft(!1);var Ie=xe.frame,$e=Xt(Ce,Ie.scroll.initial),mt=Ki($e),gt=(0,st.Z)({},Ie,{scroll:{initial:Ie.scroll.initial,current:Ce,diff:{value:$e,displacement:mt},max:Ie.scroll.max}}),At=eo({page:xe.subject.page,withPlaceholder:xe.subject.withPlaceholder,axis:xe.axis,frame:gt}),Vt=(0,st.Z)({},xe,{frame:gt,subject:At});return Vt};function bo(xe){return Number.isInteger?Number.isInteger(xe):typeof xe=="number"&&isFinite(xe)&&Math.floor(xe)===xe}function Yr(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 Ie=0;Ie<xe.length;Ie++)if(Ce(xe[Ie]))return Ie;return-1}function ir(xe,Ce){if(xe.find)return xe.find(Ce);var Ie=ur(xe,Ce);if(Ie!==-1)return xe[Ie]}function qi(xe){return Array.prototype.slice.call(xe)}var Dr=In(function(xe){return xe.reduce(function(Ce,Ie){return Ce[Ie.descriptor.id]=Ie,Ce},{})}),Ai=In(function(xe){return xe.reduce(function(Ce,Ie){return Ce[Ie.descriptor.id]=Ie,Ce},{})}),et=In(function(xe){return Yr(xe)}),jr=In(function(xe){return Yr(xe)}),yo=In(function(xe,Ce){var Ie=jr(Ce).filter(function($e){return xe===$e.descriptor.droppableId}).sort(function($e,mt){return $e.descriptor.index-mt.descriptor.index});return Ie});function Or(xe){return xe.at&&xe.at.type==="REORDER"?xe.at.destination:null}function wo(xe){return xe.at&&xe.at.type==="COMBINE"?xe.at.combine:null}var co=In(function(xe,Ce){return Ce.filter(function(Ie){return Ie.descriptor.id!==xe.descriptor.id})}),$o=function(xe){var Ce=xe.isMovingForward,Ie=xe.draggable,$e=xe.destination,mt=xe.insideDestination,gt=xe.previousImpact;if(!$e.isCombineEnabled)return null;var At=Or(gt);if(!At)return null;function Vt(Fr){var Hr={type:"COMBINE",combine:{draggableId:Fr,droppableId:$e.descriptor.id}};return(0,st.Z)({},gt,{at:Hr})}var En=gt.displaced.all,Jn=En.length?En[0]:null;if(Ce)return Jn?Vt(Jn):null;var Zn=co(Ie,mt);if(!Jn){if(!Zn.length)return null;var kn=Zn[Zn.length-1];return Vt(kn.descriptor.id)}var Tn=ur(Zn,function(Fr){return Fr.descriptor.id===Jn});Tn===-1&&Ft(!1);var ri=Tn-1;if(ri<0)return null;var ki=Zn[ri];return Vt(ki.descriptor.id)},Gr=function(xe,Ce){return xe.descriptor.droppableId===Ce.descriptor.id},zr={point:$i,value:0},Nr={invisible:{},visible:{},all:[]},Eo={displaced:Nr,displacedBy:zr,at:null},or=function(xe,Ce){return function(Ie){return xe<=Ie&&Ie<=Ce}},mr=function(xe){var Ce=or(xe.top,xe.bottom),Ie=or(xe.left,xe.right);return function($e){var mt=Ce($e.top)&&Ce($e.bottom)&&Ie($e.left)&&Ie($e.right);if(mt)return!0;var gt=Ce($e.top)||Ce($e.bottom),At=Ie($e.left)||Ie($e.right),Vt=gt&&At;if(Vt)return!0;var En=$e.top<xe.top&&$e.bottom>xe.bottom,Jn=$e.left<xe.left&&$e.right>xe.right,Zn=En&&Jn;if(Zn)return!0;var kn=En&&At||Jn&&gt;return kn}},$r=function(xe){var Ce=or(xe.top,xe.bottom),Ie=or(xe.left,xe.right);return function($e){var mt=Ce($e.top)&&Ce($e.bottom)&&Ie($e.left)&&Ie($e.right);return mt}},hi={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Ao={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Vo=function(xe){return function(Ce){var Ie=or(Ce.top,Ce.bottom),$e=or(Ce.left,Ce.right);return function(mt){return xe===hi?Ie(mt.top)&&Ie(mt.bottom):$e(mt.left)&&$e(mt.right)}}},sa=function(Ce,Ie){var $e=Ie.frame?Ie.frame.scroll.diff.displacement:$i;return Vi(Ce,$e)},ko=function(Ce,Ie,$e){return Ie.subject.active?$e(Ie.subject.active)(Ce):!1},Io=function(Ce,Ie,$e){return $e(Ie)(Ce)},_o=function(Ce){var Ie=Ce.target,$e=Ce.destination,mt=Ce.viewport,gt=Ce.withDroppableDisplacement,At=Ce.isVisibleThroughFrameFn,Vt=gt?sa(Ie,$e):Ie;return ko(Vt,$e,At)&&Io(Vt,mt,At)},la=function(Ce){return _o((0,st.Z)({},Ce,{isVisibleThroughFrameFn:mr}))},pa=function(Ce){return _o((0,st.Z)({},Ce,{isVisibleThroughFrameFn:$r}))},Lt=function(Ce){return _o((0,st.Z)({},Ce,{isVisibleThroughFrameFn:Vo(Ce.destination.axis)}))},wi=function(Ce,Ie,$e){if(typeof $e=="boolean")return $e;if(!Ie)return!0;var mt=Ie.invisible,gt=Ie.visible;if(mt[Ce])return!1;var At=gt[Ce];return At?At.shouldAnimate:!0};function _t(xe,Ce){var Ie=xe.page.marginBox,$e={top:Ce.point.y,right:0,bottom:0,left:Ce.point.x};return Li(Gi(Ie,$e))}function Yi(xe){var Ce=xe.afterDragging,Ie=xe.destination,$e=xe.displacedBy,mt=xe.viewport,gt=xe.forceShouldAnimate,At=xe.last;return Ce.reduce(function(En,Jn){var Zn=_t(Jn,$e),kn=Jn.descriptor.id;En.all.push(kn);var Tn=la({target:Zn,destination:Ie,viewport:mt,withDroppableDisplacement:!0});if(!Tn)return En.invisible[Jn.descriptor.id]=!0,En;var ri=wi(kn,At,gt),ki={draggableId:kn,shouldAnimate:ri};return En.visible[kn]=ki,En},{all:[],visible:{},invisible:{}})}function Ci(xe,Ce){if(!xe.length)return 0;var Ie=xe[xe.length-1].descriptor.index;return Ce.inHomeList?Ie:Ie+1}function Cr(xe){var Ce=xe.insideDestination,Ie=xe.inHomeList,$e=xe.displacedBy,mt=xe.destination,gt=Ci(Ce,{inHomeList:Ie});return{displaced:Nr,displacedBy:$e,at:{type:"REORDER",destination:{droppableId:mt.descriptor.id,index:gt}}}}function Ri(xe){var Ce=xe.draggable,Ie=xe.insideDestination,$e=xe.destination,mt=xe.viewport,gt=xe.displacedBy,At=xe.last,Vt=xe.index,En=xe.forceShouldAnimate,Jn=Gr(Ce,$e);if(Vt==null)return Cr({insideDestination:Ie,inHomeList:Jn,displacedBy:gt,destination:$e});var Zn=ir(Ie,function(Fr){return Fr.descriptor.index===Vt});if(!Zn)return Cr({insideDestination:Ie,inHomeList:Jn,displacedBy:gt,destination:$e});var kn=co(Ce,Ie),Tn=Ie.indexOf(Zn),ri=kn.slice(Tn),ki=Yi({afterDragging:ri,destination:$e,displacedBy:gt,last:At,viewport:mt.frame,forceShouldAnimate:En});return{displaced:ki,displacedBy:gt,at:{type:"REORDER",destination:{droppableId:$e.descriptor.id,index:Vt}}}}function Ii(xe,Ce){return!!Ce.effected[xe]}var er=function(xe){var Ce=xe.isMovingForward,Ie=xe.destination,$e=xe.draggables,mt=xe.combine,gt=xe.afterCritical;if(!Ie.isCombineEnabled)return null;var At=mt.draggableId,Vt=$e[At],En=Vt.descriptor.index,Jn=Ii(At,gt);return Jn?Ce?En:En-1:Ce?En+1:En},tr=function(xe){var Ce=xe.isMovingForward,Ie=xe.isInHomeList,$e=xe.insideDestination,mt=xe.location;if(!$e.length)return null;var gt=mt.index,At=Ce?gt+1:gt-1,Vt=$e[0].descriptor.index,En=$e[$e.length-1].descriptor.index,Jn=Ie?En:En+1;return At<Vt||At>Jn?null:At},hr=function(xe){var Ce=xe.isMovingForward,Ie=xe.isInHomeList,$e=xe.draggable,mt=xe.draggables,gt=xe.destination,At=xe.insideDestination,Vt=xe.previousImpact,En=xe.viewport,Jn=xe.afterCritical,Zn=Vt.at;if(Zn||Ft(!1),Zn.type==="REORDER"){var kn=tr({isMovingForward:Ce,isInHomeList:Ie,location:Zn.destination,insideDestination:At});return kn==null?null:Ri({draggable:$e,insideDestination:At,destination:gt,viewport:En,last:Vt.displaced,displacedBy:Vt.displacedBy,index:kn})}var Tn=er({isMovingForward:Ce,destination:gt,displaced:Vt.displaced,draggables:mt,combine:Zn.combine,afterCritical:Jn});return Tn==null?null:Ri({draggable:$e,insideDestination:At,destination:gt,viewport:En,last:Vt.displaced,displacedBy:Vt.displacedBy,index:Tn})},Sr=function(xe){var Ce=xe.displaced,Ie=xe.afterCritical,$e=xe.combineWith,mt=xe.displacedBy,gt=!!(Ce.visible[$e]||Ce.invisible[$e]);return Ii($e,Ie)?gt?$i:Ki(mt.point):gt?mt.point:$i},kr=function(xe){var Ce=xe.afterCritical,Ie=xe.impact,$e=xe.draggables,mt=wo(Ie);mt||Ft(!1);var gt=mt.draggableId,At=$e[gt].page.borderBox.center,Vt=Sr({displaced:Ie.displaced,afterCritical:Ce,combineWith:gt,displacedBy:Ie.displacedBy});return Wi(At,Vt)},Er=function(Ce,Ie){return Ie.margin[Ce.start]+Ie.borderBox[Ce.size]/2},Br=function(Ce,Ie){return Ie.margin[Ce.end]+Ie.borderBox[Ce.size]/2},Zr=function(Ce,Ie,$e){return Ie[Ce.crossAxisStart]+$e.margin[Ce.crossAxisStart]+$e.borderBox[Ce.crossAxisSize]/2},zi=function(Ce){var Ie=Ce.axis,$e=Ce.moveRelativeTo,mt=Ce.isMoving;return Ti(Ie.line,$e.marginBox[Ie.end]+Er(Ie,mt),Zr(Ie,$e.marginBox,mt))},oa=function(Ce){var Ie=Ce.axis,$e=Ce.moveRelativeTo,mt=Ce.isMoving;return Ti(Ie.line,$e.marginBox[Ie.start]-Br(Ie,mt),Zr(Ie,$e.marginBox,mt))},Ra=function(Ce){var Ie=Ce.axis,$e=Ce.moveInto,mt=Ce.isMoving;return Ti(Ie.line,$e.contentBox[Ie.start]+Er(Ie,mt),Zr(Ie,$e.contentBox,mt))},Ls=function(xe){var Ce=xe.impact,Ie=xe.draggable,$e=xe.draggables,mt=xe.droppable,gt=xe.afterCritical,At=yo(mt.descriptor.id,$e),Vt=Ie.page,En=mt.axis;if(!At.length)return Ra({axis:En,moveInto:mt.page,isMoving:Vt});var Jn=Ce.displaced,Zn=Ce.displacedBy,kn=Jn.all[0];if(kn){var Tn=$e[kn];if(Ii(kn,gt))return oa({axis:En,moveRelativeTo:Tn.page,isMoving:Vt});var ri=jn(Tn.page,Zn.point);return oa({axis:En,moveRelativeTo:ri,isMoving:Vt})}var ki=At[At.length-1];if(ki.descriptor.id===Ie.descriptor.id)return Vt.borderBox.center;if(Ii(ki.descriptor.id,gt)){var Fr=jn(ki.page,Ki(gt.displacedBy.point));return zi({axis:En,moveRelativeTo:Fr,isMoving:Vt})}return zi({axis:En,moveRelativeTo:ki.page,isMoving:Vt})},Ys=function(xe,Ce){var Ie=xe.frame;return Ie?Wi(Ce,Ie.scroll.diff.displacement):Ce},tl=function(Ce){var Ie=Ce.impact,$e=Ce.draggable,mt=Ce.droppable,gt=Ce.draggables,At=Ce.afterCritical,Vt=$e.page.borderBox.center,En=Ie.at;return!mt||!En?Vt:En.type==="REORDER"?Ls({impact:Ie,draggable:$e,draggables:gt,droppable:mt,afterCritical:At}):kr({impact:Ie,draggables:gt,afterCritical:At})},Ui=function(xe){var Ce=tl(xe),Ie=xe.droppable,$e=Ie?Ys(Ie,Ce):Ce;return $e},La=function(xe,Ce){var Ie=Xt(Ce,xe.scroll.initial),$e=Ki(Ie),mt=Li({top:Ce.y,bottom:Ce.y+xe.frame.height,left:Ce.x,right:Ce.x+xe.frame.width}),gt={frame:mt,scroll:{initial:xe.scroll.initial,max:xe.scroll.max,current:Ce,diff:{value:Ie,displacement:$e}}};return gt};function Ba(xe,Ce){return xe.map(function(Ie){return Ce[Ie]})}function zs(xe,Ce){for(var Ie=0;Ie<Ce.length;Ie++){var $e=Ce[Ie].visible[xe];if($e)return $e}return null}var su=function(xe){var Ce=xe.impact,Ie=xe.viewport,$e=xe.destination,mt=xe.draggables,gt=xe.maxScrollChange,At=La(Ie,Wi(Ie.scroll.current,gt)),Vt=$e.frame?xr($e,Wi($e.frame.scroll.current,gt)):$e,En=Ce.displaced,Jn=Yi({afterDragging:Ba(En.all,mt),destination:$e,displacedBy:Ce.displacedBy,viewport:At.frame,last:En,forceShouldAnimate:!1}),Zn=Yi({afterDragging:Ba(En.all,mt),destination:Vt,displacedBy:Ce.displacedBy,viewport:Ie.frame,last:En,forceShouldAnimate:!1}),kn={},Tn={},ri=[En,Jn,Zn];En.all.forEach(function(Fr){var Hr=zs(Fr,ri);if(Hr){Tn[Fr]=Hr;return}kn[Fr]=!0});var ki=(0,st.Z)({},Ce,{displaced:{all:En.all,invisible:kn,visible:Tn}});return ki},lu=function(xe,Ce){return Wi(xe.scroll.diff.displacement,Ce)},So=function(xe){var Ce=xe.pageBorderBoxCenter,Ie=xe.draggable,$e=xe.viewport,mt=lu($e,Ce),gt=Xt(mt,Ie.page.borderBox.center);return Wi(Ie.client.borderBox.center,gt)},yc=function(xe){var Ce=xe.draggable,Ie=xe.destination,$e=xe.newPageBorderBoxCenter,mt=xe.viewport,gt=xe.withDroppableDisplacement,At=xe.onlyOnMainAxis,Vt=At===void 0?!1:At,En=Xt($e,Ce.page.borderBox.center),Jn=Vi(Ce.page.borderBox,En),Zn={target:Jn,destination:Ie,withDroppableDisplacement:gt,viewport:mt};return Vt?Lt(Zn):pa(Zn)},Ml=function(xe){var Ce=xe.isMovingForward,Ie=xe.draggable,$e=xe.destination,mt=xe.draggables,gt=xe.previousImpact,At=xe.viewport,Vt=xe.previousPageBorderBoxCenter,En=xe.previousClientSelection,Jn=xe.afterCritical;if(!$e.isEnabled)return null;var Zn=yo($e.descriptor.id,mt),kn=Gr(Ie,$e),Tn=$o({isMovingForward:Ce,draggable:Ie,destination:$e,insideDestination:Zn,previousImpact:gt})||hr({isMovingForward:Ce,isInHomeList:kn,draggable:Ie,draggables:mt,destination:$e,insideDestination:Zn,previousImpact:gt,viewport:At,afterCritical:Jn});if(!Tn)return null;var ri=Ui({impact:Tn,draggable:Ie,droppable:$e,draggables:mt,afterCritical:Jn}),ki=yc({draggable:Ie,destination:$e,newPageBorderBoxCenter:ri,viewport:At.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(ki){var Fr=So({pageBorderBoxCenter:ri,draggable:Ie,viewport:At});return{clientSelection:Fr,impact:Tn,scrollJumpRequest:null}}var Hr=Xt(ri,Vt),no=su({impact:Tn,viewport:At,destination:$e,draggables:mt,maxScrollChange:Hr});return{clientSelection:En,impact:no,scrollJumpRequest:Hr}},as=function(Ce){var Ie=Ce.subject.active;return Ie||Ft(!1),Ie},vl=function(xe){var Ce=xe.isMovingForward,Ie=xe.pageBorderBoxCenter,$e=xe.source,mt=xe.droppables,gt=xe.viewport,At=$e.subject.active;if(!At)return null;var Vt=$e.axis,En=or(At[Vt.start],At[Vt.end]),Jn=et(mt).filter(function(kn){return kn!==$e}).filter(function(kn){return kn.isEnabled}).filter(function(kn){return!!kn.subject.active}).filter(function(kn){return mr(gt.frame)(as(kn))}).filter(function(kn){var Tn=as(kn);return Ce?At[Vt.crossAxisEnd]<Tn[Vt.crossAxisEnd]:Tn[Vt.crossAxisStart]<At[Vt.crossAxisStart]}).filter(function(kn){var Tn=as(kn),ri=or(Tn[Vt.start],Tn[Vt.end]);return En(Tn[Vt.start])||En(Tn[Vt.end])||ri(At[Vt.start])||ri(At[Vt.end])}).sort(function(kn,Tn){var ri=as(kn)[Vt.crossAxisStart],ki=as(Tn)[Vt.crossAxisStart];return Ce?ri-ki:ki-ri}).filter(function(kn,Tn,ri){return as(kn)[Vt.crossAxisStart]===as(ri[0])[Vt.crossAxisStart]});if(!Jn.length)return null;if(Jn.length===1)return Jn[0];var Zn=Jn.filter(function(kn){var Tn=or(as(kn)[Vt.start],as(kn)[Vt.end]);return Tn(Ie[Vt.line])});return Zn.length===1?Zn[0]:Zn.length>1?Zn.sort(function(kn,Tn){return as(kn)[Vt.start]-as(Tn)[Vt.start]})[0]:Jn.sort(function(kn,Tn){var ri=Qi(Ie,Mr(as(kn))),ki=Qi(Ie,Mr(as(Tn)));return ri!==ki?ri-ki:as(kn)[Vt.start]-as(Tn)[Vt.start]})[0]},ju=function(Ce,Ie){var $e=Ce.page.borderBox.center;return Ii(Ce.descriptor.id,Ie)?Xt($e,Ie.displacedBy.point):$e},rc=function(Ce,Ie){var $e=Ce.page.borderBox;return Ii(Ce.descriptor.id,Ie)?Vi($e,Ki(Ie.displacedBy.point)):$e},wl=function(xe){var Ce=xe.pageBorderBoxCenter,Ie=xe.viewport,$e=xe.destination,mt=xe.insideDestination,gt=xe.afterCritical,At=mt.filter(function(Vt){return pa({target:rc(Vt,gt),destination:$e,viewport:Ie.frame,withDroppableDisplacement:!0})}).sort(function(Vt,En){var Jn=cr(Ce,Ys($e,ju(Vt,gt))),Zn=cr(Ce,Ys($e,ju(En,gt)));return Jn<Zn?-1:Zn<Jn?1:Vt.descriptor.index-En.descriptor.index});return At[0]||null},sl=In(function(Ce,Ie){var $e=Ie[Ce.line];return{value:$e,point:Ti(Ce.line,$e)}}),td=function(Ce,Ie,$e){var mt=Ce.axis;if(Ce.descriptor.mode==="virtual")return Ti(mt.line,Ie[mt.line]);var gt=Ce.subject.page.contentBox[mt.size],At=yo(Ce.descriptor.id,$e),Vt=At.reduce(function(Zn,kn){return Zn+kn.client.marginBox[mt.size]},0),En=Vt+Ie[mt.line],Jn=En-gt;return Jn<=0?null:Ti(mt.line,Jn)},nd=function(Ce,Ie){return(0,st.Z)({},Ce,{scroll:(0,st.Z)({},Ce.scroll,{max:Ie})})},kc=function(Ce,Ie,$e){var mt=Ce.frame;Gr(Ie,Ce)&&Ft(!1),Ce.subject.withPlaceholder&&Ft(!1);var gt=sl(Ce.axis,Ie.displaceBy).point,At=td(Ce,gt,$e),Vt={placeholderSize:gt,increasedBy:At,oldFrameMaxScroll:Ce.frame?Ce.frame.scroll.max:null};if(!mt){var En=eo({page:Ce.subject.page,withPlaceholder:Vt,axis:Ce.axis,frame:Ce.frame});return(0,st.Z)({},Ce,{subject:En})}var Jn=At?Wi(mt.scroll.max,At):mt.scroll.max,Zn=nd(mt,Jn),kn=eo({page:Ce.subject.page,withPlaceholder:Vt,axis:Ce.axis,frame:Zn});return(0,st.Z)({},Ce,{subject:kn,frame:Zn})},_d=function(Ce){var Ie=Ce.subject.withPlaceholder;Ie||Ft(!1);var $e=Ce.frame;if(!$e){var mt=eo({page:Ce.subject.page,axis:Ce.axis,frame:null,withPlaceholder:null});return(0,st.Z)({},Ce,{subject:mt})}var gt=Ie.oldFrameMaxScroll;gt||Ft(!1);var At=nd($e,gt),Vt=eo({page:Ce.subject.page,axis:Ce.axis,frame:At,withPlaceholder:null});return(0,st.Z)({},Ce,{subject:Vt,frame:At})},id=function(xe){var Ce=xe.previousPageBorderBoxCenter,Ie=xe.moveRelativeTo,$e=xe.insideDestination,mt=xe.draggable,gt=xe.draggables,At=xe.destination,Vt=xe.viewport,En=xe.afterCritical;if(!Ie){if($e.length)return null;var Jn={displaced:Nr,displacedBy:zr,at:{type:"REORDER",destination:{droppableId:At.descriptor.id,index:0}}},Zn=Ui({impact:Jn,draggable:mt,droppable:At,draggables:gt,afterCritical:En}),kn=Gr(mt,At)?At:kc(At,mt,gt),Tn=yc({draggable:mt,destination:kn,newPageBorderBoxCenter:Zn,viewport:Vt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return Tn?Jn:null}var ri=Ce[At.axis.line]<=Ie.page.borderBox.center[At.axis.line],ki=function(){var Hr=Ie.descriptor.index;return Ie.descriptor.id===mt.descriptor.id||ri?Hr:Hr+1}(),Fr=sl(At.axis,mt.displaceBy);return Ri({draggable:mt,insideDestination:$e,destination:At,viewport:Vt,displacedBy:Fr,last:Nr,index:ki})},Ic=function(xe){var Ce=xe.isMovingForward,Ie=xe.previousPageBorderBoxCenter,$e=xe.draggable,mt=xe.isOver,gt=xe.draggables,At=xe.droppables,Vt=xe.viewport,En=xe.afterCritical,Jn=vl({isMovingForward:Ce,pageBorderBoxCenter:Ie,source:mt,droppables:At,viewport:Vt});if(!Jn)return null;var Zn=yo(Jn.descriptor.id,gt),kn=wl({pageBorderBoxCenter:Ie,viewport:Vt,destination:Jn,insideDestination:Zn,afterCritical:En}),Tn=id({previousPageBorderBoxCenter:Ie,destination:Jn,draggable:$e,draggables:gt,moveRelativeTo:kn,insideDestination:Zn,viewport:Vt,afterCritical:En});if(!Tn)return null;var ri=Ui({impact:Tn,draggable:$e,droppable:Jn,draggables:gt,afterCritical:En}),ki=So({pageBorderBoxCenter:ri,draggable:$e,viewport:Vt});return{clientSelection:ki,impact:Tn,scrollJumpRequest:null}},Js=function(xe){var Ce=xe.at;return Ce?Ce.type==="REORDER"?Ce.destination.droppableId:Ce.combine.droppableId:null},uu=function(Ce,Ie){var $e=Js(Ce);return $e?Ie[$e]:null},xd=function(xe){var Ce=xe.state,Ie=xe.type,$e=uu(Ce.impact,Ce.dimensions.droppables),mt=!!$e,gt=Ce.dimensions.droppables[Ce.critical.droppable.id],At=$e||gt,Vt=At.axis.direction,En=Vt==="vertical"&&(Ie==="MOVE_UP"||Ie==="MOVE_DOWN")||Vt==="horizontal"&&(Ie==="MOVE_LEFT"||Ie==="MOVE_RIGHT");if(En&&!mt)return null;var Jn=Ie==="MOVE_DOWN"||Ie==="MOVE_RIGHT",Zn=Ce.dimensions.draggables[Ce.critical.draggable.id],kn=Ce.current.page.borderBoxCenter,Tn=Ce.dimensions,ri=Tn.draggables,ki=Tn.droppables;return En?Ml({isMovingForward:Jn,previousPageBorderBoxCenter:kn,draggable:Zn,destination:At,draggables:ri,viewport:Ce.viewport,previousClientSelection:Ce.current.client.selection,previousImpact:Ce.impact,afterCritical:Ce.afterCritical}):Ic({isMovingForward:Jn,previousPageBorderBoxCenter:kn,draggable:Zn,isOver:At,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=or(xe.top,xe.bottom),Ie=or(xe.left,xe.right);return function(mt){return Ce(mt.y)&&Ie(mt.x)}}function Ko(xe,Ce){return xe.left<Ce.right&&xe.right>Ce.left&&xe.top<Ce.bottom&&xe.bottom>Ce.top}function Sa(xe){var Ce=xe.pageBorderBox,Ie=xe.draggable,$e=xe.candidates,mt=Ie.page.borderBox.center,gt=$e.map(function(At){var Vt=At.axis,En=Ti(At.axis.line,Ce.center[Vt.line],At.page.borderBox.center[Vt.crossAxisLine]);return{id:At.descriptor.id,distance:cr(mt,En)}}).sort(function(At,Vt){return Vt.distance-At.distance});return gt[0]?gt[0].id:null}function ll(xe){var Ce=xe.pageBorderBox,Ie=xe.draggable,$e=xe.droppables,mt=et($e).filter(function(gt){if(!gt.isEnabled)return!1;var At=gt.subject.active;if(!At||!Ko(Ce,At))return!1;if(Sc(At)(Ce.center))return!0;var Vt=gt.axis,En=At.center[Vt.crossAxisLine],Jn=Ce[Vt.crossAxisStart],Zn=Ce[Vt.crossAxisEnd],kn=or(At[Vt.crossAxisStart],At[Vt.crossAxisEnd]),Tn=kn(Jn),ri=kn(Zn);return!Tn&&!ri?!0:Tn?Jn<En:Zn>En});return mt.length?mt.length===1?mt[0].descriptor.id:Sa({pageBorderBox:Ce,draggable:Ie,candidates:mt}):null}var Ss=function(Ce,Ie){return Li(Vi(Ce,Ie))},ms=function(xe,Ce){var Ie=xe.frame;return Ie?Ss(Ce,Ie.scroll.diff.value):Ce};function Ua(xe){var Ce=xe.displaced,Ie=xe.id;return!!(Ce.visible[Ie]||Ce.invisible[Ie])}function ss(xe){var Ce=xe.draggable,Ie=xe.closest,$e=xe.inHomeList;return Ie?$e&&Ie.descriptor.index>Ce.descriptor.index?Ie.descriptor.index-1:Ie.descriptor.index:null}var xs=function(xe){var Ce=xe.pageBorderBoxWithDroppableScroll,Ie=xe.draggable,$e=xe.destination,mt=xe.insideDestination,gt=xe.last,At=xe.viewport,Vt=xe.afterCritical,En=$e.axis,Jn=sl($e.axis,Ie.displaceBy),Zn=Jn.value,kn=Ce[En.start],Tn=Ce[En.end],ri=co(Ie,mt),ki=ir(ri,function(Hr){var no=Hr.descriptor.id,uo=Hr.page.borderBox.center[En.line],Lo=Ii(no,Vt),Po=Ua({displaced:gt,id:no});return Lo?Po?Tn<=uo:kn<uo-Zn:Po?Tn<=uo+Zn:kn<uo}),Fr=ss({draggable:Ie,closest:ki,inHomeList:Gr(Ie,$e)});return Ri({draggable:Ie,insideDestination:mt,destination:$e,viewport:At,last:gt,displacedBy:Jn,index:Fr})},vs=4,oc=function(xe){var Ce=xe.draggable,Ie=xe.pageBorderBoxWithDroppableScroll,$e=xe.previousImpact,mt=xe.destination,gt=xe.insideDestination,At=xe.afterCritical;if(!mt.isCombineEnabled)return null;var Vt=mt.axis,En=sl(mt.axis,Ce.displaceBy),Jn=En.value,Zn=Ie[Vt.start],kn=Ie[Vt.end],Tn=co(Ce,gt),ri=ir(Tn,function(Fr){var Hr=Fr.descriptor.id,no=Fr.page.borderBox,uo=no[Vt.size],Lo=uo/vs,Po=Ii(Hr,At),Uo=Ua({displaced:$e.displaced,id:Hr});return Po?Uo?kn>no[Vt.start]+Lo&&kn<no[Vt.end]-Lo:Zn>no[Vt.start]-Jn+Lo&&Zn<no[Vt.end]-Jn-Lo:Uo?kn>no[Vt.start]+Jn+Lo&&kn<no[Vt.end]+Jn-Lo:Zn>no[Vt.start]+Lo&&Zn<no[Vt.end]-Lo});if(!ri)return null;var ki={displacedBy:En,displaced:$e.displaced,at:{type:"COMBINE",combine:{draggableId:ri.descriptor.id,droppableId:mt.descriptor.id}}};return ki},_l=function(xe){var Ce=xe.pageOffset,Ie=xe.draggable,$e=xe.draggables,mt=xe.droppables,gt=xe.previousImpact,At=xe.viewport,Vt=xe.afterCritical,En=Ss(Ie.page.borderBox,Ce),Jn=ll({pageBorderBox:En,draggable:Ie,droppables:mt});if(!Jn)return Eo;var Zn=mt[Jn],kn=yo(Zn.descriptor.id,$e),Tn=ms(Zn,En);return oc({pageBorderBoxWithDroppableScroll:Tn,draggable:Ie,previousImpact:gt,destination:Zn,insideDestination:kn,afterCritical:Vt})||xs({pageBorderBoxWithDroppableScroll:Tn,draggable:Ie,destination:Zn,insideDestination:kn,last:gt.displaced,viewport:At,afterCritical:Vt})},is=function(xe,Ce){var Ie;return(0,st.Z)({},xe,(Ie={},Ie[Ce.descriptor.id]=Ce,Ie))},bh=function(Ce){var Ie=Ce.previousImpact,$e=Ce.impact,mt=Ce.droppables,gt=Js(Ie),At=Js($e);if(!gt||gt===At)return mt;var Vt=mt[gt];if(!Vt.subject.withPlaceholder)return mt;var En=_d(Vt);return is(mt,En)},Eh=function(xe){var Ce=xe.draggable,Ie=xe.draggables,$e=xe.droppables,mt=xe.previousImpact,gt=xe.impact,At=bh({previousImpact:mt,impact:gt,droppables:$e}),Vt=Js(gt);if(!Vt)return At;var En=$e[Vt];if(Gr(Ce,En)||En.subject.withPlaceholder)return At;var Jn=kc(En,Ce,Ie);return is(At,Jn)},Uu=function(xe){var Ce=xe.state,Ie=xe.clientSelection,$e=xe.dimensions,mt=xe.viewport,gt=xe.impact,At=xe.scrollJumpRequest,Vt=mt||Ce.viewport,En=$e||Ce.dimensions,Jn=Ie||Ce.current.client.selection,Zn=Xt(Jn,Ce.initial.client.selection),kn={offset:Zn,selection:Jn,borderBoxCenter:Wi(Ce.initial.client.borderBoxCenter,Zn)},Tn={selection:Wi(kn.selection,Vt.scroll.current),borderBoxCenter:Wi(kn.borderBoxCenter,Vt.scroll.current),offset:Wi(kn.offset,Vt.scroll.diff.value)},ri={client:kn,page:Tn};if(Ce.phase==="COLLECTING")return(0,st.Z)({phase:"COLLECTING"},Ce,{dimensions:En,viewport:Vt,current:ri});var ki=En.draggables[Ce.critical.draggable.id],Fr=gt||_l({pageOffset:Tn.offset,draggable:ki,draggables:En.draggables,droppables:En.droppables,previousImpact:Ce.impact,viewport:Vt,afterCritical:Ce.afterCritical}),Hr=Eh({draggable:ki,impact:Fr,previousImpact:Ce.impact,draggables:En.draggables,droppables:En.droppables}),no=(0,st.Z)({},Ce,{current:ri,dimensions:{draggables:En.draggables,droppables:Hr},impact:Fr,viewport:Vt,scrollJumpRequest:At||null,forceShouldAnimate:At?!1:null});return no};function ro(xe,Ce){return xe.map(function(Ie){return Ce[Ie]})}var rd=function(xe){var Ce=xe.impact,Ie=xe.viewport,$e=xe.draggables,mt=xe.destination,gt=xe.forceShouldAnimate,At=Ce.displaced,Vt=ro(At.all,$e),En=Yi({afterDragging:Vt,destination:mt,displacedBy:Ce.displacedBy,viewport:Ie.frame,forceShouldAnimate:gt,last:At});return(0,st.Z)({},Ce,{displaced:En})},en=function(xe){var Ce=xe.impact,Ie=xe.draggable,$e=xe.droppable,mt=xe.draggables,gt=xe.viewport,At=xe.afterCritical,Vt=Ui({impact:Ce,draggable:Ie,draggables:mt,droppable:$e,afterCritical:At});return So({pageBorderBoxCenter:Vt,draggable:Ie,viewport:gt})},Pi=function(xe){var Ce=xe.state,Ie=xe.dimensions,$e=xe.viewport;Ce.movementMode!=="SNAP"&&Ft(!1);var mt=Ce.impact,gt=$e||Ce.viewport,At=Ie||Ce.dimensions,Vt=At.draggables,En=At.droppables,Jn=Vt[Ce.critical.draggable.id],Zn=Js(mt);Zn||Ft(!1);var kn=En[Zn],Tn=rd({impact:mt,viewport:gt,destination:kn,draggables:Vt}),ri=en({impact:Tn,draggable:Jn,droppable:kn,draggables:Vt,viewport:gt,afterCritical:Ce.afterCritical});return Uu({impact:Tn,clientSelection:ri,state:Ce,dimensions:At,viewport:gt})},Mh=function(xe){return{index:xe.index,droppableId:xe.droppableId}},Lh=function(xe){var Ce=xe.draggable,Ie=xe.home,$e=xe.draggables,mt=xe.viewport,gt=sl(Ie.axis,Ce.displaceBy),At=yo(Ie.descriptor.id,$e),Vt=At.indexOf(Ce);Vt===-1&&Ft(!1);var En=At.slice(Vt+1),Jn=En.reduce(function(ri,ki){return ri[ki.descriptor.id]=!0,ri},{}),Zn={inVirtualList:Ie.descriptor.mode==="virtual",displacedBy:gt,effected:Jn},kn=Yi({afterDragging:En,destination:Ie,displacedBy:gt,last:null,viewport:mt.frame,forceShouldAnimate:!1}),Tn={displaced:kn,displacedBy:gt,at:{type:"REORDER",destination:Mh(Ce.descriptor)}};return{impact:Tn,afterCritical:Zn}},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,Ie=xe.offset,$e=xe.initialWindowScroll,mt=jn(Ce.client,Ie),gt=Ne(mt,$e),At=(0,st.Z)({},Ce,{placeholder:(0,st.Z)({},Ce.placeholder,{client:mt}),client:mt,page:gt});return At},Pd=function(xe){var Ce=xe.frame;return Ce||Ft(!1),Ce},ys=function(xe){var Ce=xe.additions,Ie=xe.updatedDroppables,$e=xe.viewport,mt=$e.scroll.diff.value;return Ce.map(function(gt){var At=gt.descriptor.droppableId,Vt=Ie[At],En=Pd(Vt),Jn=En.scroll.diff.value,Zn=Wi(mt,Jn),kn=Nh({draggable:gt,offset:Zn,initialWindowScroll:$e.scroll.initial});return kn})},Bo=function(xe){var Ce=xe.state,Ie=xe.published;cu();var $e=Ie.modified.map(function(Lo){var Po=Ce.dimensions.droppables[Lo.droppableId],Uo=xr(Po,Lo.scroll);return Uo}),mt=(0,st.Z)({},Ce.dimensions.droppables,{},Dr($e)),gt=Ai(ys({additions:Ie.additions,updatedDroppables:mt,viewport:Ce.viewport})),At=(0,st.Z)({},Ce.dimensions.draggables,{},gt);Ie.removals.forEach(function(Lo){delete At[Lo]});var Vt={droppables:mt,draggables:At},En=Js(Ce.impact),Jn=En?Vt.droppables[En]:null,Zn=Vt.draggables[Ce.critical.draggable.id],kn=Vt.droppables[Ce.critical.droppable.id],Tn=Lh({draggable:Zn,home:kn,draggables:At,viewport:Ce.viewport}),ri=Tn.impact,ki=Tn.afterCritical,Fr=Jn&&Jn.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:Fr,viewport:Ce.viewport,afterCritical:ki});Mu();var no=(0,st.Z)({phase:"DRAGGING"},Ce,{phase:"DRAGGING",impact:Hr,onLiftImpact:ri,dimensions:Vt,afterCritical:ki,forceShouldAnimate:!1});if(Ce.phase==="COLLECTING")return no;var uo=(0,st.Z)({phase:"DROP_PENDING"},no,{phase:"DROP_PENDING",reason:Ce.reason,isWaiting:!1});return uo},yl=function(Ce){return Ce.movementMode==="SNAP"},ul=function(Ce,Ie,$e){var mt=ac(Ce.dimensions,Ie);return!yl(Ce)||$e?Uu({state:Ce,dimensions:mt}):Pi({state:Ce,dimensions:mt})};function _a(xe){return xe.isDragging&&xe.movementMode==="SNAP"?(0,st.Z)({phase:"DRAGGING"},xe,{scrollJumpRequest:null}):xe}var ia={phase:"IDLE",completed:null,shouldFlush:!1},Hs=function(xe,Ce){if(xe===void 0&&(xe=ia),Ce.type==="FLUSH")return(0,st.Z)({},ia,{shouldFlush:!0});if(Ce.type==="INITIAL_PUBLISH"){xe.phase!=="IDLE"&&Ft(!1);var Ie=Ce.payload,$e=Ie.critical,mt=Ie.clientSelection,gt=Ie.viewport,At=Ie.dimensions,Vt=Ie.movementMode,En=At.draggables[$e.draggable.id],Jn=At.droppables[$e.droppable.id],Zn={selection:mt,borderBoxCenter:En.client.borderBox.center,offset:$i},kn={client:Zn,page:{selection:Wi(Zn.selection,gt.scroll.initial),borderBoxCenter:Wi(Zn.selection,gt.scroll.initial),offset:Wi(Zn.selection,gt.scroll.diff.value)}},Tn=et(At.droppables).every(function(Xf){return!Xf.isFixedOnPage}),ri=Lh({draggable:En,home:Jn,draggables:At.draggables,viewport:gt}),ki=ri.impact,Fr=ri.afterCritical,Hr={phase:"DRAGGING",isDragging:!0,critical:$e,movementMode:Vt,dimensions:At,initial:kn,current:kn,isWindowScrollAllowed:Tn,impact:ki,afterCritical:Fr,onLiftImpact:ki,viewport:gt,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 no=(0,st.Z)({phase:"COLLECTING"},xe,{phase:"COLLECTING"});return no}if(Ce.type==="PUBLISH_WHILE_DRAGGING")return xe.phase==="COLLECTING"||xe.phase==="DROP_PENDING"||Ft(!1),Bo({state:xe,published:Ce.payload});if(Ce.type==="MOVE"){if(xe.phase==="DROP_PENDING")return xe;Eu(xe)||Ft(!1);var uo=Ce.payload.client;return Si(uo,xe.current.client.selection)?xe:Uu({state:xe,clientSelection:uo,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,Po=Lo.id,Uo=Lo.newScroll,ya=xe.dimensions.droppables[Po];if(!ya)return xe;var Ka=xr(ya,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,st.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,st.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(Si(xe.viewport.scroll.current,fd))return _a(xe);var al=La(xe.viewport,fd);return yl(xe)?Pi({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(Si(Gc,xe.viewport.scroll.max))return xe;var hf=(0,st.Z)({},xe.viewport,{scroll:(0,st.Z)({},xe.viewport.scroll,{max:Gc})});return(0,st.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 Ro=Ce.payload.reason;xe.phase!=="COLLECTING"&&Ft(!1);var Rh=(0,st.Z)({phase:"DROP_PENDING"},xe,{phase:"DROP_PENDING",isWaiting:!0,reason:Ro});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}},wa=function(Ce){return{type:"UPDATE_DROPPABLE_SCROLL",payload:Ce}},Ll=function(Ce){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:Ce}},Ca=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}),Ie={},$e=1;$e<Ce.length;$e++){var mt=Ce[$e],gt=Ce[$e-1];mt!==gt+1&&(Ie[mt]=!0)}if(Object.keys(Ie).length)var At=Ce.map(function(Vt){var En=!!Ie[Vt];return En?"[\u{1F525}"+Vt+"]":""+Vt}).join(", ")}}function ud(xe,Ce){if(0)var Ie}var Fa=function(xe){return function(Ce){var Ie=Ce.getState,$e=Ce.dispatch;return function(mt){return function(gt){if(gt.type!=="LIFT"){mt(gt);return}var At=gt.payload,Vt=At.id,En=At.clientSelection,Jn=At.movementMode,Zn=Ie();Zn.phase==="DROP_ANIMATING"&&$e(sd({completed:Zn.completed})),Ie().phase!=="IDLE"&&Ft(!1),$e(fa()),$e(Xl({draggableId:Vt,movementMode:Jn}));var kn={shouldPublishImmediately:Jn==="SNAP"},Tn={draggableId:Vt,scrollOptions:kn},ri=xe.startPublishing(Tn),ki=ri.critical,Fr=ri.dimensions,Hr=ri.viewport;ud(ki,Fr),$e(du({critical:ki,dimensions:Fr,clientSelection:En,movementMode:Jn,viewport:Hr}))}}}},sc=function(xe){return function(){return function(Ce){return function(Ie){Ie.type==="INITIAL_PUBLISH"&&xe.dragging(),Ie.type==="DROP_ANIMATE"&&xe.dropping(Ie.payload.completed.result.reason),(Ie.type==="FLUSH"||Ie.type==="DROP_COMPLETE")&&xe.resting(),Ce(Ie)}}}},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 Ie=Ce+"s "+Yd.drop;return"transform "+Ie+", opacity "+Ie},outOfTheWay:"transform "+kl,placeholder:"height "+kl+", width "+kl+", margin "+kl},xc=function(Ce){return Si(Ce,$i)?null:"translate("+Ce.x+"px, "+Ce.y+"px)"},Lu={moveTo:xc,drop:function(Ce,Ie){var $e=xc(Ce);return $e?Ie?$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,Ie=xe.destination,$e=xe.reason,mt=cr(Ce,Ie);if(mt<=0)return lc;if(mt>=Ah)return Jd;var gt=mt/Ah,At=lc+of*gt,Vt=$e==="CANCEL"?At*Hf:At;return Number(Vt.toFixed(2))},Oc=function(xe){var Ce=xe.impact,Ie=xe.draggable,$e=xe.dimensions,mt=xe.viewport,gt=xe.afterCritical,At=$e.draggables,Vt=$e.droppables,En=Js(Ce),Jn=En?Vt[En]:null,Zn=Vt[Ie.descriptor.droppableId],kn=en({impact:Ce,draggable:Ie,draggables:At,afterCritical:gt,droppable:Jn||Zn,viewport:mt}),Tn=Xt(kn,Ie.client.borderBox.center);return Tn},dg=function(xe){var Ce=xe.draggables,Ie=xe.reason,$e=xe.lastImpact,mt=xe.home,gt=xe.viewport,At=xe.onLiftImpact;if(!$e.at||Ie!=="DROP"){var Vt=rd({draggables:Ce,impact:At,destination:mt,viewport:gt,forceShouldAnimate:!0});return{impact:Vt,didDropInsideDroppable:!1}}if($e.at.type==="REORDER")return{impact:$e,didDropInsideDroppable:!0};var En=(0,st.Z)({},$e,{displaced:Nr});return{impact:En,didDropInsideDroppable:!0}},pt=function(xe){var Ce=xe.getState,Ie=xe.dispatch;return function($e){return function(mt){if(mt.type!=="DROP"){$e(mt);return}var gt=Ce(),At=mt.payload.reason;if(gt.phase==="COLLECTING"){Ie(zf({reason:At}));return}if(gt.phase!=="IDLE"){var Vt=gt.phase==="DROP_PENDING"&&gt.isWaiting;Vt&&Ft(!1),gt.phase==="DRAGGING"||gt.phase==="DROP_PENDING"||Ft(!1);var En=gt.critical,Jn=gt.dimensions,Zn=Jn.draggables[gt.critical.draggable.id],kn=dg({reason:At,lastImpact:gt.impact,afterCritical:gt.afterCritical,onLiftImpact:gt.onLiftImpact,home:gt.dimensions.droppables[gt.critical.droppable.id],viewport:gt.viewport,draggables:gt.dimensions.draggables}),Tn=kn.impact,ri=kn.didDropInsideDroppable,ki=ri?Or(Tn):null,Fr=ri?wo(Tn):null,Hr={index:En.draggable.index,droppableId:En.droppable.id},no={draggableId:Zn.descriptor.id,type:Zn.descriptor.type,source:Hr,reason:At,mode:gt.movementMode,destination:ki,combine:Fr},uo=Oc({impact:Tn,draggable:Zn,dimensions:Jn,viewport:gt.viewport,afterCritical:gt.afterCritical}),Lo={critical:gt.critical,afterCritical:gt.afterCritical,result:no,impact:Tn},Po=!Si(gt.current.client.offset,uo)||!!no.combine;if(!Po){Ie(sd({completed:Lo}));return}var Uo=Ol({current:gt.current.client.offset,destination:uo,reason:At}),ya={newHomeClientOffset:uo,dropDuration:Uo,completed:Lo};Ie(jf(ya))}}}},xt=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function nn(xe){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(Ie){Ie.target!==window&&Ie.target!==window.document||xe()}}}function ln(xe){var Ce=xe.onWindowScroll;function Ie(){Ce(xt())}var $e=Kt(Ie),mt=nn($e),gt=Rt;function At(){return gt!==Rt}function Vt(){At()&&Ft(!1),gt=ni(window,[mt])}function En(){At()||Ft(!1),$e.cancel(),gt(),gt=Rt}return{start:Vt,stop:En,isActive:At}}var Hn=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},bn=function(xe){var Ce=ln({onWindowScroll:function($e){xe.dispatch(cs({newScroll:$e}))}});return function(Ie){return function($e){!Ce.isActive()&&$e.type==="INITIAL_PUBLISH"&&Ce.start(),Ce.isActive()&&Hn($e)&&Ce.stop(),Ie($e)}}},ai=function(xe){var Ce=!1,Ie=!1,$e=setTimeout(function(){Ie=!0}),mt=function(At){Ce||Ie||(Ce=!0,xe(At),clearTimeout($e))};return mt.wasCalled=function(){return Ce},mt},si=function(){var xe=[],Ce=function(gt){var At=ur(xe,function(Jn){return Jn.timerId===gt});At===-1&&Ft(!1);var Vt=xe.splice(At,1),En=Vt[0];En.callback()},Ie=function(gt){var At=setTimeout(function(){return Ce(At)}),Vt={timerId:At,callback:gt};xe.push(Vt)},$e=function(){if(xe.length){var gt=[].concat(xe);xe.length=0,gt.forEach(function(At){clearTimeout(At.timerId),At.callback()})}};return{add:Ie,flush:$e}},qn=function(Ce,Ie){return Ce==null&&Ie==null?!0:Ce==null||Ie==null?!1:Ce.droppableId===Ie.droppableId&&Ce.index===Ie.index},Mi=function(Ce,Ie){return Ce==null&&Ie==null?!0:Ce==null||Ie==null?!1:Ce.draggableId===Ie.draggableId&&Ce.droppableId===Ie.droppableId},Di=function(Ce,Ie){if(Ce===Ie)return!0;var $e=Ce.draggable.id===Ie.draggable.id&&Ce.draggable.droppableId===Ie.draggable.droppableId&&Ce.draggable.type===Ie.draggable.type&&Ce.draggable.index===Ie.draggable.index,mt=Ce.droppable.id===Ie.droppable.id&&Ce.droppable.type===Ie.droppable.type;return $e&&mt},Ni=function(Ce,Ie){cu(),Ie(),Mu()},gr=function(Ce,Ie){return{draggableId:Ce.draggable.id,type:Ce.droppable.type,source:{droppableId:Ce.droppable.id,index:Ce.draggable.index},mode:Ie}},dr=function(Ce,Ie,$e,mt){if(!Ce){$e(mt(Ie));return}var gt=ai($e),At={announce:gt};Ce(Ie,At),gt.wasCalled()||$e(mt(Ie))},nr=function(xe,Ce){var Ie=si(),$e=null,mt=function(Tn,ri){$e&&Ft(!1),Ni("onBeforeCapture",function(){var ki=xe().onBeforeCapture;if(ki){var Fr={draggableId:Tn,mode:ri};ki(Fr)}})},gt=function(Tn,ri){$e&&Ft(!1),Ni("onBeforeDragStart",function(){var ki=xe().onBeforeDragStart;ki&&ki(gr(Tn,ri))})},At=function(Tn,ri){$e&&Ft(!1);var ki=gr(Tn,ri);$e={mode:ri,lastCritical:Tn,lastLocation:ki.source,lastCombine:null},Ie.add(function(){Ni("onDragStart",function(){return dr(xe().onDragStart,ki,Ce,Hi.onDragStart)})})},Vt=function(Tn,ri){var ki=Or(ri),Fr=wo(ri);$e||Ft(!1);var Hr=!Di(Tn,$e.lastCritical);Hr&&($e.lastCritical=Tn);var no=!qn($e.lastLocation,ki);no&&($e.lastLocation=ki);var uo=!Mi($e.lastCombine,Fr);if(uo&&($e.lastCombine=Fr),!(!Hr&&!no&&!uo)){var Lo=(0,st.Z)({},gr(Tn,$e.mode),{combine:Fr,destination:ki});Ie.add(function(){Ni("onDragUpdate",function(){return dr(xe().onDragUpdate,Lo,Ce,Hi.onDragUpdate)})})}},En=function(){$e||Ft(!1),Ie.flush()},Jn=function(Tn){$e||Ft(!1),$e=null,Ni("onDragEnd",function(){return dr(xe().onDragEnd,Tn,Ce,Hi.onDragEnd)})},Zn=function(){if($e){var Tn=(0,st.Z)({},gr($e.lastCritical,$e.mode),{combine:null,destination:null,reason:"CANCEL"});Jn(Tn)}};return{beforeCapture:mt,beforeStart:gt,start:At,update:Vt,flush:En,drop:Jn,abort:Zn}},Kr=function(xe,Ce){var Ie=nr(xe,Ce);return function($e){return function(mt){return function(gt){if(gt.type==="BEFORE_INITIAL_CAPTURE"){Ie.beforeCapture(gt.payload.draggableId,gt.payload.movementMode);return}if(gt.type==="INITIAL_PUBLISH"){var At=gt.payload.critical;Ie.beforeStart(At,gt.payload.movementMode),mt(gt),Ie.start(At,gt.payload.movementMode);return}if(gt.type==="DROP_COMPLETE"){var Vt=gt.payload.completed.result;Ie.flush(),mt(gt),Ie.drop(Vt);return}if(mt(gt),gt.type==="FLUSH"){Ie.abort();return}var En=$e.getState();En.phase==="DRAGGING"&&Ie.update(En.critical,En.impact)}}}},sr=function(xe){return function(Ce){return function(Ie){if(Ie.type!=="DROP_ANIMATION_FINISHED"){Ce(Ie);return}var $e=xe.getState();$e.phase!=="DROP_ANIMATING"&&Ft(!1),xe.dispatch(sd({completed:$e.completed}))}}},Rr=function(xe){var Ce=null,Ie=null;function $e(){Ie&&(cancelAnimationFrame(Ie),Ie=null),Ce&&(Ce(),Ce=null)}return function(mt){return function(gt){if((gt.type==="FLUSH"||gt.type==="DROP_COMPLETE"||gt.type==="DROP_ANIMATION_FINISHED")&&$e(),mt(gt),gt.type==="DROP_ANIMATE"){var At={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var En=xe.getState();En.phase==="DROP_ANIMATING"&&xe.dispatch(Xd())}};Ie=requestAnimationFrame(function(){Ie=null,Ce=ni(window,[At])})}}}},Tr=function(xe){return function(){return function(Ce){return function(Ie){(Ie.type==="DROP_COMPLETE"||Ie.type==="FLUSH"||Ie.type==="DROP_ANIMATE")&&xe.stopPublishing(),Ce(Ie)}}}},to=function(xe){var Ce=!1;return function(){return function(Ie){return function($e){if($e.type==="INITIAL_PUBLISH"){Ce=!0,xe.tryRecordFocus($e.payload.critical.draggable.id),Ie($e),xe.tryRestoreFocusRecorded();return}if(Ie($e),!!Ce){if($e.type==="FLUSH"){Ce=!1,xe.tryRestoreFocusRecorded();return}if($e.type==="DROP_COMPLETE"){Ce=!1;var mt=$e.payload.completed.result;mt.combine&&xe.tryShiftRecord(mt.draggableId,mt.combine.draggableId),xe.tryRestoreFocusRecorded()}}}}}},mo=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},To=function(xe){return function(Ce){return function(Ie){return function($e){if(mo($e)){xe.stop(),Ie($e);return}if($e.type==="INITIAL_PUBLISH"){Ie($e);var mt=Ce.getState();mt.phase!=="DRAGGING"&&Ft(!1),xe.start(mt);return}Ie($e),xe.scroll(Ce.getState())}}}},Vr=function(xe){return function(Ce){return function(Ie){if(Ce(Ie),Ie.type==="PUBLISH_WHILE_DRAGGING"){var $e=xe.getState();$e.phase==="DROP_PENDING"&&($e.isWaiting||xe.dispatch(wd({reason:$e.reason})))}}}},po=Ge.qC,Xo=function(xe){var Ce=xe.dimensionMarshal,Ie=xe.focusMarshal,$e=xe.styleMarshal,mt=xe.getResponders,gt=xe.announce,At=xe.autoScroller;return(0,Ge.MT)(Hs,po((0,Ge.md)(sc($e),Tr(Ce),Fa(Ce),pt,sr,Rr,Vr,To(At),bn,to(Ie),Kr(mt,gt))))},Jr=function(){return{additions:{},removals:{},modified:{}}};function lo(xe){var Ce=xe.registry,Ie=xe.callbacks,$e=Jr(),mt=null,gt=function(){mt||(Ie.collectionStarting(),mt=requestAnimationFrame(function(){mt=null,cu();var Zn=$e,kn=Zn.additions,Tn=Zn.removals,ri=Zn.modified,ki=Object.keys(kn).map(function(no){return Ce.draggable.getById(no).getDimension($i)}).sort(function(no,uo){return no.descriptor.index-uo.descriptor.index}),Fr=Object.keys(ri).map(function(no){var uo=Ce.droppable.getById(no),Lo=uo.callbacks.getScrollWhileDragging();return{droppableId:no,scroll:Lo}}),Hr={additions:ki,removals:Object.keys(Tn),modified:Fr};$e=Jr(),Mu(),Ie.publish(Hr)}))},At=function(Zn){var kn=Zn.descriptor.id;$e.additions[kn]=Zn,$e.modified[Zn.descriptor.droppableId]=!0,$e.removals[kn]&&delete $e.removals[kn],gt()},Vt=function(Zn){var kn=Zn.descriptor;$e.removals[kn.id]=!0,$e.modified[kn.droppableId]=!0,$e.additions[kn.id]&&delete $e.additions[kn.id],gt()},En=function(){mt&&(cancelAnimationFrame(mt),mt=null,$e=Jr())};return{add:At,remove:Vt,stop:En}}var Qr=function(xe){var Ce=xe.scrollHeight,Ie=xe.scrollWidth,$e=xe.height,mt=xe.width,gt=Xt({x:Ie,y:Ce},{x:mt,y:$e}),At={x:Math.max(0,gt.x),y:Math.max(0,gt.y)};return At},br=function(){var xe=document.documentElement;return xe||Ft(!1),xe},oo=function(){var xe=br(),Ce=Qr({scrollHeight:xe.scrollHeight,scrollWidth:xe.scrollWidth,width:xe.clientWidth,height:xe.clientHeight});return Ce},Mo=function(){var xe=xt(),Ce=oo(),Ie=xe.y,$e=xe.x,mt=br(),gt=mt.clientWidth,At=mt.clientHeight,Vt=$e+gt,En=Ie+At,Jn=Li({top:Ie,left:$e,right:Vt,bottom:En}),Zn={frame:Jn,scroll:{initial:xe,current:xe,max:Ce,diff:{value:$i,displacement:$i}}};return Zn},zo=function(xe){var Ce=xe.critical,Ie=xe.scrollOptions,$e=xe.registry;cu();var mt=Mo(),gt=mt.scroll.current,At=Ce.droppable,Vt=$e.droppable.getAllByType(At.type).map(function(kn){return kn.callbacks.getDimensionAndWatchScroll(gt,Ie)}),En=$e.draggable.getAllByType(Ce.draggable.type).map(function(kn){return kn.getDimension(gt)}),Jn={draggables:Ai(En),droppables:Dr(Vt)};Mu();var Zn={dimensions:Jn,critical:Ce,viewport:mt};return Zn};function Ho(xe,Ce,Ie){if(Ie.descriptor.id===Ce.id||Ie.descriptor.type!==Ce.type)return!1;var $e=xe.droppable.getById(Ie.descriptor.droppableId);return $e.descriptor.mode==="virtual"}var Ur=function(xe,Ce){var Ie=null,$e=lo({callbacks:{publish:Ce.publishWhileDragging,collectionStarting:Ce.collectionStarting},registry:xe}),mt=function(ri,ki){xe.droppable.exists(ri)||Ft(!1),Ie&&Ce.updateDroppableIsEnabled({id:ri,isEnabled:ki})},gt=function(ri,ki){Ie&&(xe.droppable.exists(ri)||Ft(!1),Ce.updateDroppableIsCombineEnabled({id:ri,isCombineEnabled:ki}))},At=function(ri,ki){Ie&&(xe.droppable.exists(ri)||Ft(!1),Ce.updateDroppableScroll({id:ri,newScroll:ki}))},Vt=function(ri,ki){Ie&&xe.droppable.getById(ri).callbacks.scroll(ki)},En=function(){if(Ie){$e.stop();var ri=Ie.critical.droppable;xe.droppable.getAllByType(ri.type).forEach(function(ki){return ki.callbacks.dragStopped()}),Ie.unsubscribe(),Ie=null}},Jn=function(ri){Ie||Ft(!1);var ki=Ie.critical.draggable;ri.type==="ADDITION"&&Ho(xe,ki,ri.value)&&$e.add(ri.value),ri.type==="REMOVAL"&&Ho(xe,ki,ri.value)&&$e.remove(ri.value)},Zn=function(ri){Ie&&Ft(!1);var ki=xe.draggable.getById(ri.draggableId),Fr=xe.droppable.getById(ki.descriptor.droppableId),Hr={draggable:ki.descriptor,droppable:Fr.descriptor},no=xe.subscribe(Jn);return Ie={critical:Hr,unsubscribe:no},zo({critical:Hr,registry:xe,scrollOptions:ri.scrollOptions})},kn={updateDroppableIsEnabled:mt,updateDroppableIsCombineEnabled:gt,scrollDroppable:Vt,updateDroppableScroll:At,startPublishing:Zn,stopPublishing:En};return kn},Yo=function(xe,Ce){return xe.phase==="IDLE"?!0:xe.phase!=="DROP_ANIMATING"||xe.completed.result.draggableId===Ce?!1:xe.completed.result.reason==="DROP"},na=function(xe){window.scrollBy(xe.x,xe.y)},Ta=In(function(xe){return et(xe).filter(function(Ce){return!(!Ce.isEnabled||!Ce.frame)})}),ma=function(Ce,Ie){var $e=ir(Ta(Ie),function(mt){return mt.frame||Ft(!1),Sc(mt.frame.pageMarginBox)(Ce)});return $e},ds=function(xe){var Ce=xe.center,Ie=xe.destination,$e=xe.droppables;if(Ie){var mt=$e[Ie];return mt.frame?mt:null}var gt=ma(Ce,$e);return gt},ja={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(Ce){return Math.pow(Ce,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},ta=function(xe,Ce){var Ie=xe[Ce.size]*ja.startFromPercentage,$e=xe[Ce.size]*ja.maxScrollAtPercentage,mt={startScrollingFrom:Ie,maxScrollValueAt:$e};return mt},Fo=function(xe){var Ce=xe.startOfRange,Ie=xe.endOfRange,$e=xe.current,mt=Ie-Ce;if(mt===0)return 0;var gt=$e-Ce,At=gt/mt;return At},xa=1,hs=function(xe,Ce){if(xe>Ce.startScrollingFrom)return 0;if(xe<=Ce.maxScrollValueAt)return ja.maxPixelScroll;if(xe===Ce.startScrollingFrom)return xa;var Ie=Fo({startOfRange:Ce.maxScrollValueAt,endOfRange:Ce.startScrollingFrom,current:xe}),$e=1-Ie,mt=ja.maxPixelScroll*ja.ease($e);return Math.ceil(mt)},Qa=ja.durationDampening.accelerateAt,Ns=ja.durationDampening.stopDampeningAt,Wo=function(xe,Ce){var Ie=Ce,$e=Ns,mt=Date.now(),gt=mt-Ie;if(gt>=Ns)return xe;if(gt<Qa)return xa;var At=Fo({startOfRange:Qa,endOfRange:$e,current:gt}),Vt=xe*ja.ease(At);return Math.ceil(Vt)},Oo=function(xe){var Ce=xe.distanceToEdge,Ie=xe.thresholds,$e=xe.dragStartTime,mt=xe.shouldUseTimeDampening,gt=hs(Ce,Ie);return gt===0?0:mt?Math.max(Wo(gt,$e),xa):gt},Zo=function(xe){var Ce=xe.container,Ie=xe.distanceToEdges,$e=xe.dragStartTime,mt=xe.axis,gt=xe.shouldUseTimeDampening,At=ta(Ce,mt),Vt=Ie[mt.end]<Ie[mt.start];return Vt?Oo({distanceToEdge:Ie[mt.end],thresholds:At,dragStartTime:$e,shouldUseTimeDampening:gt}):-1*Oo({distanceToEdge:Ie[mt.start],thresholds:At,dragStartTime:$e,shouldUseTimeDampening:gt})},xo=function(xe){var Ce=xe.container,Ie=xe.subject,$e=xe.proposedScroll,mt=Ie.height>Ce.height,gt=Ie.width>Ce.width;return!gt&&!mt?$e:gt&&mt?null:{x:gt?0:$e.x,y:mt?0:$e.y}},Aa=yr(function(xe){return xe===0?0:xe}),vo=function(xe){var Ce=xe.dragStartTime,Ie=xe.container,$e=xe.subject,mt=xe.center,gt=xe.shouldUseTimeDampening,At={top:mt.y-Ie.top,right:Ie.right-mt.x,bottom:Ie.bottom-mt.y,left:mt.x-Ie.left},Vt=Zo({container:Ie,distanceToEdges:At,dragStartTime:Ce,axis:hi,shouldUseTimeDampening:gt}),En=Zo({container:Ie,distanceToEdges:At,dragStartTime:Ce,axis:Ao,shouldUseTimeDampening:gt}),Jn=Aa({x:En,y:Vt});if(Si(Jn,$i))return null;var Zn=xo({container:Ie,subject:$e,proposedScroll:Jn});return Zn?Si(Zn,$i)?null:Zn:null},Jo=yr(function(xe){return xe===0?0:xe>0?1:-1}),ga=function(){var xe=function(Ie,$e){return Ie<0?Ie:Ie>$e?Ie-$e:0};return function(Ce){var Ie=Ce.current,$e=Ce.max,mt=Ce.change,gt=Wi(Ie,mt),At={x:xe(gt.x,$e.x),y:xe(gt.y,$e.y)};return Si(At,$i)?null:At}}(),va=function(Ce){var Ie=Ce.max,$e=Ce.current,mt=Ce.change,gt={x:Math.max($e.x,Ie.x),y:Math.max($e.y,Ie.y)},At=Jo(mt),Vt=ga({max:gt,current:$e,change:At});return!Vt||At.x!==0&&Vt.x===0||At.y!==0&&Vt.y===0},Us=function(Ce,Ie){return va({current:Ce.scroll.current,max:Ce.scroll.max,change:Ie})},Zs=function(Ce,Ie){if(!Us(Ce,Ie))return null;var $e=Ce.scroll.max,mt=Ce.scroll.current;return ga({current:mt,max:$e,change:Ie})},cl=function(Ce,Ie){var $e=Ce.frame;return $e?va({current:$e.scroll.current,max:$e.scroll.max,change:Ie}):!1},ka=function(Ce,Ie){var $e=Ce.frame;return!$e||!cl(Ce,Ie)?null:ga({current:$e.scroll.current,max:$e.scroll.max,change:Ie})},il=function(xe){var Ce=xe.viewport,Ie=xe.subject,$e=xe.center,mt=xe.dragStartTime,gt=xe.shouldUseTimeDampening,At=vo({dragStartTime:mt,container:Ce.frame,subject:Ie,center:$e,shouldUseTimeDampening:gt});return At&&Us(Ce,At)?At:null},Fs=function(xe){var Ce=xe.droppable,Ie=xe.subject,$e=xe.center,mt=xe.dragStartTime,gt=xe.shouldUseTimeDampening,At=Ce.frame;if(!At)return null;var Vt=vo({dragStartTime:mt,container:At.pageMarginBox,subject:Ie,center:$e,shouldUseTimeDampening:gt});return Vt&&cl(Ce,Vt)?Vt:null},Ws=function(xe){var Ce=xe.state,Ie=xe.dragStartTime,$e=xe.shouldUseTimeDampening,mt=xe.scrollWindow,gt=xe.scrollDroppable,At=Ce.current.page.borderBoxCenter,Vt=Ce.dimensions.draggables[Ce.critical.draggable.id],En=Vt.page.marginBox;if(Ce.isWindowScrollAllowed){var Jn=Ce.viewport,Zn=il({dragStartTime:Ie,viewport:Jn,subject:En,center:At,shouldUseTimeDampening:$e});if(Zn){mt(Zn);return}}var kn=ds({center:At,destination:Js(Ce.impact),droppables:Ce.dimensions.droppables});if(kn){var Tn=Fs({dragStartTime:Ie,droppable:kn,subject:En,center:At,shouldUseTimeDampening:$e});Tn&&gt(kn.descriptor.id,Tn)}},uc=function(xe){var Ce=xe.scrollWindow,Ie=xe.scrollDroppable,$e=Kt(Ce),mt=Kt(Ie),gt=null,At=function(Zn){gt||Ft(!1);var kn=gt,Tn=kn.shouldUseTimeDampening,ri=kn.dragStartTime;Ws({state:Zn,scrollWindow:$e,scrollDroppable:mt,dragStartTime:ri,shouldUseTimeDampening:Tn})},Vt=function(Zn){cu(),gt&&Ft(!1);var kn=Date.now(),Tn=!1,ri=function(){Tn=!0};Ws({state:Zn,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:ri,scrollDroppable:ri}),gt={dragStartTime:kn,shouldUseTimeDampening:Tn},Mu(),Tn&&At(Zn)},En=function(){gt&&($e.cancel(),mt.cancel(),gt=null)};return{start:Vt,stop:En,scroll:At}},Ia=function(xe){var Ce=xe.move,Ie=xe.scrollDroppable,$e=xe.scrollWindow,mt=function(Jn,Zn){var kn=Wi(Jn.current.client.selection,Zn);Ce({client:kn})},gt=function(Jn,Zn){if(!cl(Jn,Zn))return Zn;var kn=ka(Jn,Zn);if(!kn)return Ie(Jn.descriptor.id,Zn),null;var Tn=Xt(Zn,kn);Ie(Jn.descriptor.id,Tn);var ri=Xt(Zn,Tn);return ri},At=function(Jn,Zn,kn){if(!Jn||!Us(Zn,kn))return kn;var Tn=Zs(Zn,kn);if(!Tn)return $e(kn),null;var ri=Xt(kn,Tn);$e(ri);var ki=Xt(kn,ri);return ki},Vt=function(Jn){var Zn=Jn.scrollJumpRequest;if(Zn){var kn=Js(Jn.impact);kn||Ft(!1);var Tn=gt(Jn.dimensions.droppables[kn],Zn);if(Tn){var ri=Jn.viewport,ki=At(Jn.isWindowScrollAllowed,ri,Tn);ki&&mt(Jn,ki)}}};return Vt},$a=function(xe){var Ce=xe.scrollDroppable,Ie=xe.scrollWindow,$e=xe.move,mt=uc({scrollWindow:Ie,scrollDroppable:Ce}),gt=Ia({move:$e,scrollWindow:Ie,scrollDroppable:Ce}),At=function(Jn){if(Jn.phase==="DRAGGING"){if(Jn.movementMode==="FLUID"){mt.scroll(Jn);return}Jn.scrollJumpRequest&&gt(Jn)}},Vt={scroll:At,start:mt.start,stop:mt.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(Ie){return"["+Ie+'="'+Ce+'"]'}},dl=function(Ce,Ie){return Ce.map(function($e){var mt=$e.styles[Ie];return mt?$e.selector+" { "+mt+" }":""}).join(" ")},hu="pointer-events: none;",Yl=function(xe){var Ce=_s(xe),Ie=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}}}(),mt={selector:Ce(da.contextId),styles:{always:"overflow-anchor: none;"}},gt={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;
`}},At=[$e,Ie,mt,gt];return{always:dl(At,"always"),resting:dl(At,"resting"),dragging:dl(At,"dragging"),dropAnimating:dl(At,"dropAnimating"),userCancel:dl(At,"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 Ie=document.createElement("style");return Ce&&Ie.setAttribute("nonce",Ce),Ie.type="text/css",Ie};function za(xe,Ce){var Ie=hn(function(){return Yl(xe)},[xe]),$e=(0,ge.useRef)(null),mt=(0,ge.useRef)(null),gt=Mn(In(function(kn){var Tn=mt.current;Tn||Ft(!1),Tn.textContent=kn}),[]),At=Mn(function(kn){var Tn=$e.current;Tn||Ft(!1),Tn.textContent=kn},[]);Ds(function(){!$e.current&&!mt.current||Ft(!1);var kn=Ql(Ce),Tn=Ql(Ce);return $e.current=kn,mt.current=Tn,kn.setAttribute(Oa+"-always",xe),Tn.setAttribute(Oa+"-dynamic",xe),Jl().appendChild(kn),Jl().appendChild(Tn),At(Ie.always),gt(Ie.resting),function(){var ri=function(Fr){var Hr=Fr.current;Hr||Ft(!1),Jl().removeChild(Hr),Fr.current=null};ri($e),ri(mt)}},[Ce,At,gt,Ie.always,Ie.resting,xe]);var Vt=Mn(function(){return gt(Ie.dragging)},[gt,Ie.dragging]),En=Mn(function(kn){if(kn==="DROP"){gt(Ie.dropAnimating);return}gt(Ie.userCancel)},[gt,Ie.dropAnimating,Ie.userCancel]),Jn=Mn(function(){mt.current&&gt(Ie.resting)},[gt,Ie.resting]),Zn=hn(function(){return{dragging:Vt,dropping:En,resting:Jn}},[Vt,En,Jn]);return Zn}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 Ie="["+qa.contextId+'="'+xe+'"]',$e=qi(document.querySelectorAll(Ie));if(!$e.length)return null;var mt=ir($e,function(gt){return gt.getAttribute(qa.draggableId)===Ce});return!mt||!es(mt)?null:mt}function fu(xe){var Ce=(0,ge.useRef)({}),Ie=(0,ge.useRef)(null),$e=(0,ge.useRef)(null),mt=(0,ge.useRef)(!1),gt=Mn(function(Tn,ri){var ki={id:Tn,focus:ri};return Ce.current[Tn]=ki,function(){var Hr=Ce.current,no=Hr[Tn];no!==ki&&delete Hr[Tn]}},[]),At=Mn(function(Tn){var ri=Ya(xe,Tn);ri&&ri!==document.activeElement&&ri.focus()},[xe]),Vt=Mn(function(Tn,ri){Ie.current===Tn&&(Ie.current=ri)},[]),En=Mn(function(){$e.current||mt.current&&($e.current=requestAnimationFrame(function(){$e.current=null;var Tn=Ie.current;Tn&&At(Tn)}))},[At]),Jn=Mn(function(Tn){Ie.current=null;var ri=document.activeElement;ri&&ri.getAttribute(qa.draggableId)===Tn&&(Ie.current=Tn)},[]);Ds(function(){return mt.current=!0,function(){mt.current=!1;var Tn=$e.current;Tn&&cancelAnimationFrame(Tn)}},[]);var Zn=hn(function(){return{register:gt,tryRecordFocus:Jn,tryRestoreFocusRecorded:En,tryShiftRecord:Vt}},[gt,Jn,En,Vt]);return Zn}function Pc(){var xe={draggables:{},droppables:{}},Ce=[];function Ie(kn){return Ce.push(kn),function(){var ri=Ce.indexOf(kn);ri!==-1&&Ce.splice(ri,1)}}function $e(kn){Ce.length&&Ce.forEach(function(Tn){return Tn(kn)})}function mt(kn){return xe.draggables[kn]||null}function gt(kn){var Tn=mt(kn);return Tn||Ft(!1),Tn}var At={register:function(Tn){xe.draggables[Tn.descriptor.id]=Tn,$e({type:"ADDITION",value:Tn})},update:function(Tn,ri){var ki=xe.draggables[ri.descriptor.id];ki&&ki.uniqueId===Tn.uniqueId&&(delete xe.draggables[ri.descriptor.id],xe.draggables[Tn.descriptor.id]=Tn)},unregister:function(Tn){var ri=Tn.descriptor.id,ki=mt(ri);ki&&Tn.uniqueId===ki.uniqueId&&(delete xe.draggables[ri],$e({type:"REMOVAL",value:Tn}))},getById:gt,findById:mt,exists:function(Tn){return!!mt(Tn)},getAllByType:function(Tn){return Yr(xe.draggables).filter(function(ri){return ri.descriptor.type===Tn})}};function Vt(kn){return xe.droppables[kn]||null}function En(kn){var Tn=Vt(kn);return Tn||Ft(!1),Tn}var Jn={register:function(Tn){xe.droppables[Tn.descriptor.id]=Tn},unregister:function(Tn){var ri=Vt(Tn.descriptor.id);ri&&Tn.uniqueId===ri.uniqueId&&delete xe.droppables[Tn.descriptor.id]},getById:En,findById:Vt,exists:function(Tn){return!!Vt(Tn)},getAllByType:function(Tn){return Yr(xe.droppables).filter(function(ri){return ri.descriptor.type===Tn})}};function Zn(){xe.draggables={},xe.droppables={},Ce.length=0}return{draggable:At,droppable:Jn,subscribe:Ie,clean:Zn}}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]),Ie=(0,ge.useRef)(null);(0,ge.useEffect)(function(){var gt=document.createElement("div");return Ie.current=gt,gt.id=Ce,gt.setAttribute("aria-live","assertive"),gt.setAttribute("aria-atomic","true"),(0,st.Z)(gt.style,ql),gu().appendChild(gt),function(){setTimeout(function(){var En=gu();En.contains(gt)&&En.removeChild(gt),gt===Ie.current&&(Ie.current=null)})}},[Ce]);var $e=Mn(function(mt){var gt=Ie.current;if(gt){gt.textContent=mt;return}},[]);return $e}var Bs=0,os={separator:"::"};function ba(){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,Ie=xe.uniqueId;return"rbd-hidden-text-"+Ce+"-"+Ie}function zu(xe){var Ce=xe.contextId,Ie=xe.text,$e=Ts("hidden-text",{separator:"-"}),mt=hn(function(){return Rl({contextId:Ce,uniqueId:$e})},[$e,Ce]);return(0,ge.useEffect)(function(){var At=document.createElement("div");return At.id=mt,At.textContent=Ie,At.style.display="none",gu().appendChild(At),function(){var En=gu();En.contains(At)&&En.removeChild(At)}},[mt,Ie]),mt}var Cd=ge.createContext(null),fn={react:"^16.8.5","react-dom":"^16.8.5"},Rc=/(\d+)\.(\d+)\.(\d+)/,Xu=function(Ce){var Ie=Rc.exec(Ce);Ie==null&&Ft(!1);var $e=Number(Ie[1]),mt=Number(Ie[2]),gt=Number(Ie[3]);return{major:$e,minor:mt,patch:gt,raw:Ce}},af=function(Ce,Ie){return Ie.major>Ce.major?!0:Ie.major<Ce.major?!1:Ie.minor>Ce.minor?!0:Ie.minor<Ce.minor?!1:Ie.patch>=Ce.patch},bd=function(xe,Ce){var Ie=Xu(xe),$e=Xu(Ce);af(Ie,$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(fn.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 Ie(At){return At===xe}function $e(At){xe&&Ft(!1);var Vt={abandon:At};return xe=Vt,Vt}function mt(){xe||Ft(!1),xe=null}function gt(){xe&&(xe.abandon(),mt())}return{isClaimed:Ce,isActive:Ie,claim:$e,release:mt,tryAbandon:gt}}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],Ie=ir(Ce,function($e){return"on"+$e in document});return Ie||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,Ie=xe.completed,$e=xe.getPhase,mt=xe.setPhase;return[{eventName:"mousemove",fn:function(At){var Vt=At.button,En=At.clientX,Jn=At.clientY;if(Vt===nh){var Zn={x:En,y:Jn},kn=$e();if(kn.type==="DRAGGING"){At.preventDefault(),kn.actions.move(Zn);return}kn.type!=="PENDING"&&Ft(!1);var Tn=kn.point;if(zc(Tn,Zn)){At.preventDefault();var ri=kn.actions.fluidLift(Zn);mt({type:"DRAGGING",actions:ri})}}}},{eventName:"mouseup",fn:function(At){var Vt=$e();if(Vt.type!=="DRAGGING"){Ce();return}At.preventDefault(),Vt.actions.drop({shouldBlockNextClick:!0}),Ie()}},{eventName:"mousedown",fn:function(At){$e().type==="DRAGGING"&&At.preventDefault(),Ce()}},{eventName:"keydown",fn:function(At){var Vt=$e();if(Vt.type==="PENDING"){Ce();return}if(At.keyCode===eh){At.preventDefault(),Ce();return}eu(At)}},{eventName:"resize",fn:Ce},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){$e().type==="PENDING"&&Ce()}},{eventName:"webkitmouseforcedown",fn:function(At){var Vt=$e();if(Vt.type==="IDLE"&&Ft(!1),Vt.actions.shouldRespectForcePress()){Ce();return}At.preventDefault()}},{eventName:wc,fn:Ce}]}function $s(xe){var Ce=(0,ge.useRef)(Cl),Ie=(0,ge.useRef)(Rt),$e=hn(function(){return{eventName:"mousedown",fn:function(kn){if(!kn.defaultPrevented&&kn.button===nh&&!(kn.ctrlKey||kn.metaKey||kn.shiftKey||kn.altKey)){var Tn=xe.findClosestDraggableId(kn);if(Tn){var ri=xe.tryGetLock(Tn,At,{sourceEvent:kn});if(ri){kn.preventDefault();var ki={x:kn.clientX,y:kn.clientY};Ie.current(),Jn(ri,ki)}}}}}},[xe]),mt=hn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(kn){if(!kn.defaultPrevented){var Tn=xe.findClosestDraggableId(kn);if(Tn){var ri=xe.findOptionsForDraggable(Tn);ri&&(ri.shouldRespectForcePress||xe.canGetLock(Tn)&&kn.preventDefault())}}}}},[xe]),gt=Mn(function(){var kn={passive:!1,capture:!0};Ie.current=ni(window,[mt,$e],kn)},[mt,$e]),At=Mn(function(){var Zn=Ce.current;Zn.type!=="IDLE"&&(Ce.current=Cl,Ie.current(),gt())},[gt]),Vt=Mn(function(){var Zn=Ce.current;At(),Zn.type==="DRAGGING"&&Zn.actions.cancel({shouldBlockNextClick:!0}),Zn.type==="PENDING"&&Zn.actions.abort()},[At]),En=Mn(function(){var kn={capture:!0,passive:!1},Tn=Th({cancel:Vt,completed:At,getPhase:function(){return Ce.current},setPhase:function(ki){Ce.current=ki}});Ie.current=ni(window,Tn,kn)},[Vt,At]),Jn=Mn(function(kn,Tn){Ce.current.type!=="IDLE"&&Ft(!1),Ce.current={type:"PENDING",point:Tn,actions:kn},En()},[En]);Ds(function(){return gt(),function(){Ie.current()}},[gt])}var Pa;function ls(){}var Sl=(Pa={},Pa[Ld]=!0,Pa[pu]=!0,Pa[Yu]=!0,Pa[lf]=!0,Pa);function Au(xe,Ce){function Ie(){Ce(),xe.cancel()}function $e(){Ce(),xe.drop()}return[{eventName:"keydown",fn:function(gt){if(gt.keyCode===eh){gt.preventDefault(),Ie();return}if(gt.keyCode===th){gt.preventDefault(),$e();return}if(gt.keyCode===jl){gt.preventDefault(),xe.moveDown();return}if(gt.keyCode===Nd){gt.preventDefault(),xe.moveUp();return}if(gt.keyCode===cd){gt.preventDefault(),xe.moveRight();return}if(gt.keyCode===jc){gt.preventDefault(),xe.moveLeft();return}if(Sl[gt.keyCode]){gt.preventDefault();return}eu(gt)}},{eventName:"mousedown",fn:Ie},{eventName:"mouseup",fn:Ie},{eventName:"click",fn:Ie},{eventName:"touchstart",fn:Ie},{eventName:"resize",fn:Ie},{eventName:"wheel",fn:Ie,options:{passive:!0}},{eventName:wc,fn:Ie}]}function Du(xe){var Ce=(0,ge.useRef)(ls),Ie=hn(function(){return{eventName:"keydown",fn:function(gt){if(gt.defaultPrevented||gt.keyCode!==th)return;var At=xe.findClosestDraggableId(gt);if(!At)return;var Vt=xe.tryGetLock(At,Zn,{sourceEvent:gt});if(!Vt)return;gt.preventDefault();var En=!0,Jn=Vt.snapLift();Ce.current();function Zn(){En||Ft(!1),En=!1,Ce.current(),$e()}Ce.current=ni(window,Au(Jn,Zn),{capture:!0,passive:!1})}}},[xe]),$e=Mn(function(){var gt={passive:!1,capture:!0};Ce.current=ni(window,[Ie],gt)},[Ie]);Ds(function(){return $e(),function(){Ce.current()}},[$e])}var Fd={type:"IDLE"},Hc=120,rh=.15;function Hu(xe){var Ce=xe.cancel,Ie=xe.getPhase;return[{eventName:"orientationchange",fn:Ce},{eventName:"resize",fn:Ce},{eventName:"contextmenu",fn:function(mt){mt.preventDefault()}},{eventName:"keydown",fn:function(mt){if(Ie().type!=="DRAGGING"){Ce();return}mt.keyCode===eh&&mt.preventDefault(),Ce()}},{eventName:wc,fn:Ce}]}function Cc(xe){var Ce=xe.cancel,Ie=xe.completed,$e=xe.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(gt){var At=$e();if(At.type!=="DRAGGING"){Ce();return}At.hasMoved=!0;var Vt=gt.touches[0],En=Vt.clientX,Jn=Vt.clientY,Zn={x:En,y:Jn};gt.preventDefault(),At.actions.move(Zn)}},{eventName:"touchend",fn:function(gt){var At=$e();if(At.type!=="DRAGGING"){Ce();return}gt.preventDefault(),At.actions.drop({shouldBlockNextClick:!0}),Ie()}},{eventName:"touchcancel",fn:function(gt){if($e().type!=="DRAGGING"){Ce();return}gt.preventDefault(),Ce()}},{eventName:"touchforcechange",fn:function(gt){var At=$e();At.type==="IDLE"&&Ft(!1);var Vt=gt.touches[0];if(Vt){var En=Vt.force>=rh;if(En){var Jn=At.actions.shouldRespectForcePress();if(At.type==="PENDING"){Jn&&Ce();return}if(Jn){if(At.hasMoved){gt.preventDefault();return}Ce();return}gt.preventDefault()}}}},{eventName:wc,fn:Ce}]}function Wf(xe){var Ce=(0,ge.useRef)(Fd),Ie=(0,ge.useRef)(Rt),$e=Mn(function(){return Ce.current},[]),mt=Mn(function(ri){Ce.current=ri},[]),gt=hn(function(){return{eventName:"touchstart",fn:function(ri){if(!ri.defaultPrevented){var ki=xe.findClosestDraggableId(ri);if(ki){var Fr=xe.tryGetLock(ki,Vt,{sourceEvent:ri});if(Fr){var Hr=ri.touches[0],no=Hr.clientX,uo=Hr.clientY,Lo={x:no,y:uo};Ie.current(),kn(Fr,Lo)}}}}}},[xe]),At=Mn(function(){var ri={capture:!0,passive:!1};Ie.current=ni(window,[gt],ri)},[gt]),Vt=Mn(function(){var Tn=Ce.current;Tn.type!=="IDLE"&&(Tn.type==="PENDING"&&clearTimeout(Tn.longPressTimerId),mt(Fd),Ie.current(),At())},[At,mt]),En=Mn(function(){var Tn=Ce.current;Vt(),Tn.type==="DRAGGING"&&Tn.actions.cancel({shouldBlockNextClick:!0}),Tn.type==="PENDING"&&Tn.actions.abort()},[Vt]),Jn=Mn(function(){var ri={capture:!0,passive:!1},ki={cancel:En,completed:Vt,getPhase:$e},Fr=ni(window,Cc(ki),ri),Hr=ni(window,Hu(ki),ri);Ie.current=function(){Fr(),Hr()}},[En,$e,Vt]),Zn=Mn(function(){var ri=$e();ri.type!=="PENDING"&&Ft(!1);var ki=ri.actions.fluidLift(ri.point);mt({type:"DRAGGING",actions:ki,hasMoved:!1})},[$e,mt]),kn=Mn(function(ri,ki){$e().type!=="IDLE"&&Ft(!1);var Fr=setTimeout(Zn,Hc);mt({type:"PENDING",point:ki,actions:ri,longPressTimerId:Fr}),Jn()},[Jn,$e,mt,Zn]);Ds(function(){return At(),function(){Ie.current();var ki=$e();ki.type==="PENDING"&&(clearTimeout(ki.longPressTimerId),mt(Fd))}},[$e,At,mt]),Ds(function(){var ri=ni(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 Ie=!!$f[Ce.tagName.toLowerCase()];if(Ie)return!0;var $e=Ce.getAttribute("contenteditable");return $e==="true"||$e===""?!0:Ce===xe?!1:Ad(xe,Ce.parentElement)}function hg(xe,Ce){var Ie=Ce.target;return es(Ie)?Ad(xe,Ie):!1}var fg=function(xe){return Li(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"],Ie=ir(Ce,function($e){return $e in Element.prototype});return Ie||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 Ie=Ce.target;if(!gg(Ie))return null;var $e=kh(xe),mt=mg(Ie,$e);return!mt||!es(mt)?null:mt}function vg(xe,Ce){var Ie=oh(xe,Ce);return Ie?Ie.getAttribute(qa.draggableId):null}function Ec(xe,Ce){var Ie="["+As.contextId+'="'+xe+'"]',$e=qi(document.querySelectorAll(Ie)),mt=ir($e,function(gt){return gt.getAttribute(As.id)===Ce});return!mt||!es(mt)?null:mt}function yg(xe){xe.preventDefault()}function ah(xe){var Ce=xe.expected,Ie=xe.phase,$e=xe.isLockActive,mt=xe.shouldWarn;return!(!$e()||Ce!==Ie)}function Sg(xe){var Ce=xe.lockAPI,Ie=xe.store,$e=xe.registry,mt=xe.draggableId;if(Ce.isClaimed())return!1;var gt=$e.draggable.findById(mt);return!(!gt||!gt.options.isEnabled||!Yo(Ie.getState(),mt))}function xg(xe){var Ce=xe.lockAPI,Ie=xe.contextId,$e=xe.store,mt=xe.registry,gt=xe.draggableId,At=xe.forceSensorStop,Vt=xe.sourceEvent,En=Sg({lockAPI:Ce,store:$e,registry:mt,draggableId:gt});if(!En)return null;var Jn=mt.draggable.getById(gt),Zn=Ec(Ie,Jn.descriptor.id);if(!Zn||Vt&&!Jn.options.canDragInteractiveElements&&hg(Zn,Vt))return null;var kn=Ce.claim(At||Rt),Tn="PRE_DRAG";function ri(){return Jn.options.shouldRespectForcePress}function ki(){return Ce.isActive(kn)}function Fr(ya,Ka){ah({expected:ya,phase:Tn,isLockActive:ki,shouldWarn:!0})&&$e.dispatch(Ka())}var Hr=Fr.bind(null,"DRAGGING");function no(ya){function Ka(){Ce.release(),Tn="COMPLETED"}Tn!=="PRE_DRAG"&&(Ka(),Tn!=="PRE_DRAG"&&Ft(!1)),$e.dispatch(Ja(ya.liftActionArgs)),Tn="DRAGGING";function pl(Wa,ol){if(ol===void 0&&(ol={shouldBlockNextClick:!1}),ya.cleanup(),ol.shouldBlockNextClick){var nu=ni(window,[{eventName:"click",fn:yg,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(nu)}Ka(),$e.dispatch(wd({reason:Wa}))}return(0,st.Z)({isActive:function(){return ah({expected:"DRAGGING",phase:Tn,isLockActive:ki,shouldWarn:!1})},shouldRespectForcePress:ri,drop:function(ol){return pl("DROP",ol)},cancel:function(ol){return pl("CANCEL",ol)}},ya.actions)}function uo(ya){var Ka=Kt(function(Wa){Hr(function(){return Va({client:Wa})})}),pl=no({liftActionArgs:{id:gt,clientSelection:ya,movementMode:"FLUID"},cleanup:function(){return Ka.cancel()},actions:{move:Ka}});return(0,st.Z)({},pl,{move:Ka})}function Lo(){var ya={moveUp:function(){return Hr(Na)},moveRight:function(){return Hr(Do)},moveDown:function(){return Hr(ad)},moveLeft:function(){return Hr(Rf)}};return no({liftActionArgs:{id:gt,clientSelection:fg(Zn),movementMode:"SNAP"},cleanup:Rt,actions:ya})}function Po(){var ya=ah({expected:"PRE_DRAG",phase:Tn,isLockActive:ki,shouldWarn:!0});ya&&Ce.release()}var Uo={isActive:function(){return ah({expected:"PRE_DRAG",phase:Tn,isLockActive:ki,shouldWarn:!1})},shouldRespectForcePress:ri,fluidLift:uo,snapLift:Lo,abort:Po};return Uo}var Pg=[$s,Du,Wf];function Wp(xe){var Ce=xe.contextId,Ie=xe.store,$e=xe.registry,mt=xe.customSensors,gt=xe.enableDefaultSensors,At=[].concat(gt?Pg:[],mt||[]),Vt=(0,ge.useState)(function(){return qd()})[0],En=Mn(function(uo,Lo){uo.isDragging&&!Lo.isDragging&&Vt.tryAbandon()},[Vt]);Ds(function(){var uo=Ie.getState(),Lo=Ie.subscribe(function(){var Po=Ie.getState();En(uo,Po),uo=Po});return Lo},[Vt,Ie,En]),Ds(function(){return Vt.tryAbandon},[Vt.tryAbandon]);var Jn=Mn(function(no){return Sg({lockAPI:Vt,registry:$e,store:Ie,draggableId:no})},[Vt,$e,Ie]),Zn=Mn(function(no,uo,Lo){return xg({lockAPI:Vt,registry:$e,contextId:Ce,store:Ie,draggableId:no,forceSensorStop:uo,sourceEvent:Lo&&Lo.sourceEvent?Lo.sourceEvent:null})},[Ce,Vt,$e,Ie]),kn=Mn(function(no){return vg(Ce,no)},[Ce]),Tn=Mn(function(no){var uo=$e.draggable.findById(no);return uo?uo.options:null},[$e.draggable]),ri=Mn(function(){Vt.isClaimed()&&(Vt.tryAbandon(),Ie.getState().phase!=="IDLE"&&Ie.dispatch(fa()))},[Vt,Ie]),ki=Mn(Vt.isClaimed,[Vt]),Fr=hn(function(){return{canGetLock:Jn,tryGetLock:Zn,findClosestDraggableId:kn,findOptionsForDraggable:Tn,tryReleaseLock:ri,isLockClaimed:ki}},[Jn,Zn,kn,Tn,ri,ki]);Gf(At);for(var Hr=0;Hr<At.length;Hr++)At[Hr](Fr)}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,Ie=xe.setCallbacks,$e=xe.sensors,mt=xe.nonce,gt=xe.dragHandleUsageInstructions,At=(0,ge.useRef)(null);Qd();var Vt=Md(xe),En=Mn(function(){return qg(Vt.current)},[Vt]),Jn=rs(Ce),Zn=zu({contextId:Ce,text:gt}),kn=za(Ce,mt),Tn=Mn(function(Wa){Dd(At).dispatch(Wa)},[]),ri=hn(function(){return(0,Ge.DE)({publishWhileDragging:nl,updateDroppableScroll:wa,updateDroppableIsEnabled:Ll,updateDroppableIsCombineEnabled:Ca,collectionStarting:od},Tn)},[Tn]),ki=Nu(),Fr=hn(function(){return Ur(ki,ri)},[ki,ri]),Hr=hn(function(){return $a((0,st.Z)({scrollWindow:na,scrollDroppable:Fr.scrollDroppable},(0,Ge.DE)({move:Va},Tn)))},[Fr.scrollDroppable,Tn]),no=fu(Ce),uo=hn(function(){return Xo({announce:Jn,autoScroller:Hr,dimensionMarshal:Fr,focusMarshal:no,getResponders:En,styleMarshal:kn})},[Jn,Hr,Fr,no,En,kn]);At.current=uo;var Lo=Mn(function(){var Wa=Dd(At),ol=Wa.getState();ol.phase!=="IDLE"&&Wa.dispatch(fa())},[]),Po=Mn(function(){var Wa=Dd(At).getState();return Wa.isDragging||Wa.phase==="DROP_ANIMATING"},[]),Uo=hn(function(){return{isDragging:Po,tryAbort:Lo}},[Po,Lo]);Ie(Uo);var ya=Mn(function(Wa){return Yo(Dd(At).getState(),Wa)},[]),Ka=Mn(function(){return Eu(Dd(At).getState())},[]),pl=hn(function(){return{marshal:Fr,focus:no,contextId:Ce,canLift:ya,isMovementAllowed:Ka,dragHandleUsageInstructionsId:Zn,registry:ki}},[Ce,Fr,Zn,no,ya,Ka,ki]);return Wp({contextId:Ce,store:uo,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:uo},xe.children))}var uf=0;function ep(){uf=0}function Vf(){return hn(function(){return""+uf++},[])}function sh(){ep(),ba()}function wg(xe){var Ce=Vf(),Ie=xe.dragHandleUsageInstructions||Hi.dragHandleUsageInstructions;return ge.createElement(wn,null,function($e){return ge.createElement(Kf,{nonce:xe.nonce,contextId:Ce,setCallbacks:$e,dragHandleUsageInstructions:Ie,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(Ie){return Ce===Ie}},tp=lh("scroll"),Uf=lh("auto"),np=lh("visible"),Ha=function(Ce,Ie){return Ie(Ce.overflowX)||Ie(Ce.overflowY)},Ih=function(Ce,Ie){return Ie(Ce.overflowX)&&Ie(Ce.overflowY)},Bd=function(Ce){var Ie=window.getComputedStyle(Ce),$e={overflowX:Ie.overflowX,overflowY:Ie.overflowY};return Ha($e,tp)||Ha($e,Uf)},xl=function(){return!1;var Ce,Ie,$e,mt},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 Ie=window.getComputedStyle(Ce);return Ie.position==="fixed"?!0:xe(Ce.parentElement)},bg=function(xe){var Ce=tu(xe),Ie=Cg(xe);return{closestScrollable:Ce,isFixedOnPage:Ie}},Eg=function(xe){var Ce=xe.descriptor,Ie=xe.isEnabled,$e=xe.isCombineEnabled,mt=xe.isFixedOnPage,gt=xe.direction,At=xe.client,Vt=xe.page,En=xe.closest,Jn=function(){if(!En)return null;var ri=En.scrollSize,ki=En.client,Fr=Qr({scrollHeight:ri.scrollHeight,scrollWidth:ri.scrollWidth,height:ki.paddingBox.height,width:ki.paddingBox.width});return{pageMarginBox:En.page.marginBox,frameClient:ki,scrollSize:ri,shouldClipSubject:En.shouldClipSubject,scroll:{initial:En.scroll,current:En.scroll,max:Fr,diff:{value:$i,displacement:$i}}}}(),Zn=gt==="vertical"?hi:Ao,kn=eo({page:Vt,withPlaceholder:null,axis:Zn,frame:Jn}),Tn={descriptor:Ce,isCombineEnabled:$e,isFixedOnPage:mt,axis:Zn,isEnabled:Ie,client:At,page:Vt,frame:Jn,subject:kn};return Tn},Mg=function(Ce,Ie){var $e=Oi(Ce);if(!Ie||Ce!==Ie)return $e;var mt=$e.paddingBox.top-Ie.scrollTop,gt=$e.paddingBox.left-Ie.scrollLeft,At=mt+Ie.scrollHeight,Vt=gt+Ie.scrollWidth,En={top:mt,right:Vt,bottom:At,left:gt},Jn=Gi(En,$e.border),Zn=vr({borderBox:Jn,margin:$e.margin,border:$e.border,padding:$e.padding});return Zn},Lg=function(xe){var Ce=xe.ref,Ie=xe.descriptor,$e=xe.env,mt=xe.windowScroll,gt=xe.direction,At=xe.isDropDisabled,Vt=xe.isCombineEnabled,En=xe.shouldClipSubject,Jn=$e.closestScrollable,Zn=Mg(Ce,Jn),kn=Ne(Zn,mt),Tn=function(){if(!Jn)return null;var ki=Oi(Jn),Fr={scrollHeight:Jn.scrollHeight,scrollWidth:Jn.scrollWidth};return{client:ki,page:Ne(ki,mt),scroll:uh(Jn),scrollSize:Fr,shouldClipSubject:En}}(),ri=Eg({descriptor:Ie,isEnabled:!At,isCombineEnabled:Vt,isFixedOnPage:$e.isFixedOnPage,direction:gt,client:Zn,page:kn,closest:Tn});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),Ie=ts(Cd),$e=Ts("droppable"),mt=Ie.registry,gt=Ie.marshal,At=Md(xe),Vt=hn(function(){return{id:xe.droppableId,type:xe.type,mode:xe.mode}},[xe.droppableId,xe.mode,xe.type]),En=(0,ge.useRef)(Vt),Jn=hn(function(){return In(function(Po,Uo){Ce.current||Ft(!1);var ya={x:Po,y:Uo};gt.updateDroppableScroll(Vt.id,ya)})},[Vt.id,gt]),Zn=Mn(function(){var Po=Ce.current;return!Po||!Po.env.closestScrollable?$i:uh(Po.env.closestScrollable)},[]),kn=Mn(function(){var Po=Zn();Jn(Po.x,Po.y)},[Zn,Jn]),Tn=hn(function(){return Kt(kn)},[kn]),ri=Mn(function(){var Po=Ce.current,Uo=ch(Po);Po&&Uo||Ft(!1);var ya=Po.scrollOptions;if(ya.shouldPublishImmediately){kn();return}Tn()},[Tn,kn]),ki=Mn(function(Po,Uo){Ce.current&&Ft(!1);var ya=At.current,Ka=ya.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:Po,direction:ya.direction,isDropDisabled:ya.isDropDisabled,isCombineEnabled:ya.isCombineEnabled,shouldClipSubject:!ya.ignoreContainerClipping}),nu=pl.closestScrollable;return nu&&(nu.setAttribute(Xa.contextId,Ie.contextId),nu.addEventListener("scroll",ri,hd(Wa.scrollOptions))),ol},[Ie.contextId,Vt,ri,At]),Fr=Mn(function(){var Po=Ce.current,Uo=ch(Po);return Po&&Uo||Ft(!1),uh(Uo)},[]),Hr=Mn(function(){var Po=Ce.current;Po||Ft(!1);var Uo=ch(Po);Ce.current=null,Uo&&(Tn.cancel(),Uo.removeAttribute(Xa.contextId),Uo.removeEventListener("scroll",ri,hd(Po.scrollOptions)))},[ri,Tn]),no=Mn(function(Po){var Uo=Ce.current;Uo||Ft(!1);var ya=ch(Uo);ya||Ft(!1),ya.scrollTop+=Po.y,ya.scrollLeft+=Po.x},[]),uo=hn(function(){return{getDimensionAndWatchScroll:ki,getScrollWhileDragging:Fr,dragStopped:Hr,scroll:no}},[Hr,ki,Fr,no]),Lo=hn(function(){return{uniqueId:$e,descriptor:Vt,callbacks:uo}},[uo,Vt,$e]);Ds(function(){return En.current=Lo.descriptor,mt.droppable.register(Lo),function(){Ce.current&&Hr(),mt.droppable.unregister(Lo)}},[uo,Vt,Hr,Lo,gt,mt.droppable]),Ds(function(){Ce.current&&gt.updateDroppableIsEnabled(En.current.id,!xe.isDropDisabled)},[xe.isDropDisabled,gt]),Ds(function(){Ce.current&&gt.updateDroppableIsCombineEnabled(En.current.id,xe.isCombineEnabled)},[xe.isCombineEnabled,gt])}function kd(){}var dh={width:0,height:0,margin:Dn},df=function(Ce){var Ie=Ce.isAnimatingOpenOnMount,$e=Ce.placeholder,mt=Ce.animate;return Ie||mt==="close"?dh:{height:$e.client.borderBox.height,width:$e.client.borderBox.width,margin:$e.client.margin}},ip=function(Ce){var Ie=Ce.isAnimatingOpenOnMount,$e=Ce.placeholder,mt=Ce.animate,gt=df({isAnimatingOpenOnMount:Ie,placeholder:$e,animate:mt});return{display:$e.display,boxSizing:"border-box",width:gt.width,height:gt.height,marginTop:gt.margin.top,marginRight:gt.margin.right,marginBottom:gt.margin.bottom,marginLeft:gt.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:mt!=="none"?Il.placeholder:null}};function hl(xe){var Ce=(0,ge.useRef)(null),Ie=Mn(function(){Ce.current&&(clearTimeout(Ce.current),Ce.current=null)},[]),$e=xe.animate,mt=xe.onTransitionEnd,gt=xe.onClose,At=xe.contextId,Vt=(0,ge.useState)(xe.animate==="open"),En=Vt[0],Jn=Vt[1];(0,ge.useEffect)(function(){return En?$e!=="open"?(Ie(),Jn(!1),kd):Ce.current?kd:(Ce.current=setTimeout(function(){Ce.current=null,Jn(!1)}),Ie):kd},[$e,En,Ie]);var Zn=Mn(function(Tn){Tn.propertyName==="height"&&(mt(),$e==="close"&&gt())},[$e,gt,mt]),kn=ip({isAnimatingOpenOnMount:En,animate:xe.animate,placeholder:xe.placeholder});return ge.createElement(xe.placeholder.tagName,{style:kn,"data-rbd-placeholder-context-id":At,onTransitionEnd:Zn,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(Ie){return Ie(xe)})}var ae=[function(Ce){var Ie=Ce.props;Ie.droppableId||Ft(!1),typeof Ie.droppableId!="string"&&Ft(!1)},function(Ce){var Ie=Ce.props;hh(Ie.isDropDisabled)||Ft(!1),hh(Ie.isCombineEnabled)||Ft(!1),hh(Ie.ignoreContainerClipping)||Ft(!1)},function(Ce){var Ie=Ce.getDroppableRef;Zc(Ie())}],fe=[function(Ce){var Ie=Ce.props,$e=Ce.getPlaceholderRef;if(Ie.placeholder)var mt=$e()}],de=[function(Ce){var Ie=Ce.props;Ie.renderClone||Ft(!1)},function(Ce){var Ie=Ce.getPlaceholderRef;Ie()&&Ft(!1)}];function Se(xe){Gs(function(){ie(xe,ae),xe.props.mode==="standard"&&ie(xe,fe),xe.props.mode==="virtual"&&ie(xe,de)})}var Re=function(xe){Ke(Ce,xe);function Ce(){for(var $e,mt=arguments.length,gt=new Array(mt),At=0;At<mt;At++)gt[At]=arguments[At];return $e=xe.call.apply(xe,[this].concat(gt))||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(mt,gt){return mt.shouldAnimate?mt.on?{isVisible:!0,data:mt.on,animate:"open"}:gt.isVisible?{isVisible:!0,data:gt.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!mt.on,data:mt.on,animate:"none"}};var Ie=Ce.prototype;return Ie.render=function(){if(!this.state.isVisible)return null;var mt={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(mt)},Ce}(ge.PureComponent),Ue={dragging:5e3,dropAnimating:4500},dt=function(Ce,Ie){return Ie?Il.drop(Ie.duration):Ce?Il.snap:Il.fluid},lt=function(Ce,Ie){return Ce?Ie?_u.opacity.drop:_u.opacity.combining:null},Ht=function(Ce){return Ce.forceShouldAnimate!=null?Ce.forceShouldAnimate:Ce.mode==="SNAP"};function Rn(xe){var Ce=xe.dimension,Ie=Ce.client,$e=xe.offset,mt=xe.combineWith,gt=xe.dropping,At=!!mt,Vt=Ht(xe),En=!!gt,Jn=En?Lu.drop($e,At):Lu.moveTo($e),Zn={position:"fixed",top:Ie.marginBox.top,left:Ie.marginBox.left,boxSizing:"border-box",width:Ie.borderBox.width,height:Ie.borderBox.height,transition:dt(Vt,gt),transform:Jn,opacity:lt(At,En),zIndex:En?Ue.dropAnimating:Ue.dragging,pointerEvents:"none"};return Zn}function Qt(xe){return{transform:Lu.moveTo(xe.offset),transition:xe.shouldAnimateDisplacement?null:"none"}}function ci(xe){return xe.type==="DRAGGING"?Rn(xe):Qt(xe)}function oi(xe,Ce,Ie){Ie===void 0&&(Ie=$i);var $e=window.getComputedStyle(Ce),mt=Ce.getBoundingClientRect(),gt=Ei(mt,$e),At=Ne(gt,Ie),Vt={client:gt,tagName:Ce.tagName.toLowerCase(),display:$e.display},En={x:gt.marginBox.width,y:gt.marginBox.height},Jn={descriptor:xe,placeholder:Vt,displaceBy:En,client:gt,page:At};return Jn}function Ji(xe){var Ce=Ts("draggable"),Ie=xe.descriptor,$e=xe.registry,mt=xe.getDraggableRef,gt=xe.canDragInteractiveElements,At=xe.shouldRespectForcePress,Vt=xe.isEnabled,En=hn(function(){return{canDragInteractiveElements:gt,shouldRespectForcePress:At,isEnabled:Vt}},[gt,Vt,At]),Jn=Mn(function(ri){var ki=mt();return ki||Ft(!1),oi(Ie,ki,ri)},[Ie,mt]),Zn=hn(function(){return{uniqueId:Ce,descriptor:Ie,options:En,getDimension:Jn}},[Ie,Jn,En,Ce]),kn=(0,ge.useRef)(Zn),Tn=(0,ge.useRef)(!0);Ds(function(){return $e.draggable.register(kn.current),function(){return $e.draggable.unregister(kn.current)}},[$e.draggable]),Ds(function(){if(Tn.current){Tn.current=!1;return}var ri=kn.current;kn.current=Zn,$e.draggable.update(Zn,ri)},[Zn,$e.draggable])}function lr(xe,Ce,Ie){Gs(function(){function $e(gt){return"Draggable[id: "+gt+"]: "}var mt=xe.draggableId;mt||Ft(!1),typeof mt!="string"&&Ft(!1),bo(xe.index)||Ft(!1),xe.mapped.type!=="DRAGGING"&&(Zc(Ie()),xe.isEnabled&&(Ya(Ce,mt)||Ft(!1)))})}function Pr(xe){}function _r(xe){xe.preventDefault()}function fo(xe){var Ce=(0,ge.useRef)(null),Ie=Mn(function(Wa){Ce.current=Wa},[]),$e=Mn(function(){return Ce.current},[]),mt=ts(Cd),gt=mt.contextId,At=mt.dragHandleUsageInstructionsId,Vt=mt.registry,En=ts(Id),Jn=En.type,Zn=En.droppableId,kn=hn(function(){return{id:xe.draggableId,index:xe.index,type:Jn,droppableId:Zn}},[xe.draggableId,xe.index,Jn,Zn]),Tn=xe.children,ri=xe.draggableId,ki=xe.isEnabled,Fr=xe.shouldRespectForcePress,Hr=xe.canDragInteractiveElements,no=xe.isClone,uo=xe.mapped,Lo=xe.dropAnimationFinished;if(lr(xe,gt,$e),Pr(no),!no){var Po=hn(function(){return{descriptor:kn,registry:Vt,getDraggableRef:$e,canDragInteractiveElements:Hr,shouldRespectForcePress:Fr,isEnabled:ki}},[kn,Vt,$e,Hr,Fr,ki]);Ji(Po)}var Uo=hn(function(){return ki?{tabIndex:0,role:"button","aria-describedby":At,"data-rbd-drag-handle-draggable-id":ri,"data-rbd-drag-handle-context-id":gt,draggable:!1,onDragStart:_r}:null},[gt,At,ri,ki]),ya=Mn(function(Wa){uo.type==="DRAGGING"&&uo.dropping&&Wa.propertyName==="transform"&&Lo()},[Lo,uo]),Ka=hn(function(){var Wa=ci(uo),ol=uo.type==="DRAGGING"&&uo.dropping?ya:null,nu={innerRef:Ie,draggableProps:{"data-rbd-draggable-context-id":gt,"data-rbd-draggable-id":ri,style:Wa,onTransitionEnd:ol},dragHandleProps:Uo};return nu},[gt,Uo,ri,uo,ya,Ie]),pl=hn(function(){return{draggableId:kn.id,type:kn.type,source:{index:kn.index,droppableId:kn.droppableId}}},[kn.droppableId,kn.id,kn.index,kn.type]);return Tn(Ka,uo.snapshot,pl)}var ao=function(xe,Ce){return xe===Ce},Co=function(xe){var Ce=xe.combine,Ie=xe.destination;return Ie?Ie.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=In(function(mt,gt){return{x:mt,y:gt}}),Ce=In(function(mt,gt,At,Vt,En){return{isDragging:!0,isClone:gt,isDropAnimating:!!En,dropAnimation:En,mode:mt,draggingOver:At,combineWith:Vt,combineTargetFor:null}}),Ie=In(function(mt,gt,At,Vt,En,Jn,Zn){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:En,combineWith:Jn,mode:gt,offset:mt,dimension:At,forceShouldAnimate:Zn,snapshot:Ce(gt,Vt,En,Jn,null)}}}),$e=function(gt,At){if(gt.isDragging){if(gt.critical.draggable.id!==At.draggableId)return null;var Vt=gt.current.client.offset,En=gt.dimensions.draggables[At.draggableId],Jn=Js(gt.impact),Zn=so(gt.impact),kn=gt.forceShouldAnimate;return Ie(xe(Vt.x,Vt.y),gt.movementMode,En,At.isClone,Jn,Zn,kn)}if(gt.phase==="DROP_ANIMATING"){var Tn=gt.completed;if(Tn.result.draggableId!==At.draggableId)return null;var ri=At.isClone,ki=gt.dimensions.draggables[At.draggableId],Fr=Tn.result,Hr=Fr.mode,no=Co(Fr),uo=Qo(Fr),Lo=gt.dropDuration,Po={duration:Lo,curve:Yd.drop,moveTo:gt.newHomeClientOffset,opacity:uo?_u.opacity.drop:null,scale:uo?_u.scale.drop:null};return{mapped:{type:"DRAGGING",offset:gt.newHomeClientOffset,dimension:ki,dropping:Po,draggingOver:no,combineWith:uo,mode:Hr,forceShouldAnimate:null,snapshot:Ce(Hr,ri,no,uo,Po)}}}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:$i,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:ws(null)}};function ks(){var xe=In(function(At,Vt){return{x:At,y:Vt}}),Ce=In(ws),Ie=In(function(At,Vt,En){return Vt===void 0&&(Vt=null),{mapped:{type:"SECONDARY",offset:At,combineTargetFor:Vt,shouldAnimateDisplacement:En,snapshot:Ce(Vt)}}}),$e=function(Vt){return Vt?Ie($i,Vt,!0):null},mt=function(Vt,En,Jn,Zn){var kn=Jn.displaced.visible[Vt],Tn=!!(Zn.inVirtualList&&Zn.effected[Vt]),ri=wo(Jn),ki=ri&&ri.draggableId===Vt?En:null;if(!kn){if(!Tn)return $e(ki);if(Jn.displaced.invisible[Vt])return null;var Fr=Ki(Zn.displacedBy.point),Hr=xe(Fr.x,Fr.y);return Ie(Hr,ki,!0)}if(Tn)return $e(ki);var no=Jn.displacedBy.point,uo=xe(no.x,no.y);return Ie(uo,ki,kn.shouldAnimate)},gt=function(Vt,En){if(Vt.isDragging)return Vt.critical.draggable.id===En.draggableId?null:mt(En.draggableId,Vt.critical.draggable.id,Vt.impact,Vt.afterCritical);if(Vt.phase==="DROP_ANIMATING"){var Jn=Vt.completed;return Jn.result.draggableId===En.draggableId?null:mt(En.draggableId,Jn.result.draggableId,Jn.impact,Jn.afterCritical)}return null};return gt}var mu=function(){var Ce=ha(),Ie=ks(),$e=function(gt,At){return Ce(gt,At)||Ie(gt,At)||Pl};return $e},zl={dropAnimationFinished:Xd},fl=Ye(mu,zl,null,{context:Fu,pure:!0,areStatePropsEqual:ao})(fo);function vu(xe){var Ce=ts(Id),Ie=Ce.isUsingCloneFor;return Ie===xe.draggableId&&!xe.isClone?null:ge.createElement(fl,xe)}function Nl(xe){var Ce=typeof xe.isDragDisabled=="boolean"?!xe.isDragDisabled:!0,Ie=!!xe.disableInteractiveElementBlocking,$e=!!xe.shouldRespectForcePress;return ge.createElement(vu,(0,st.Z)({},xe,{isClone:!1,isEnabled:Ce,canDragInteractiveElements:Ie,shouldRespectForcePress:$e}))}function gl(xe){var Ce=(0,ge.useContext)(Cd);Ce||Ft(!1);var Ie=Ce.contextId,$e=Ce.isMovementAllowed,mt=(0,ge.useRef)(null),gt=(0,ge.useRef)(null),At=xe.children,Vt=xe.droppableId,En=xe.type,Jn=xe.mode,Zn=xe.direction,kn=xe.ignoreContainerClipping,Tn=xe.isDropDisabled,ri=xe.isCombineEnabled,ki=xe.snapshot,Fr=xe.useClone,Hr=xe.updateViewportMaxScroll,no=xe.getContainerForClone,uo=Mn(function(){return mt.current},[]),Lo=Mn(function(yu){mt.current=yu},[]),Po=Mn(function(){return gt.current},[]),Uo=Mn(function(yu){gt.current=yu},[]);Se({props:xe,getDroppableRef:uo,getPlaceholderRef:Po});var ya=Mn(function(){$e()&&Hr({maxScroll:oo()})},[$e,Hr]);Ng({droppableId:Vt,type:En,mode:Jn,direction:Zn,isDropDisabled:Tn,isCombineEnabled:ri,ignoreContainerClipping:kn,getDroppableRef:uo});var Ka=ge.createElement(Re,{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:Ie,onTransitionEnd:ya})}),pl=hn(function(){return{innerRef:Lo,placeholder:Ka,droppableProps:{"data-rbd-droppable-id":Vt,"data-rbd-droppable-context-id":Ie}}},[Ie,Vt,Ka,Lo]),Wa=Fr?Fr.dragging.draggableId:null,ol=hn(function(){return{droppableId:Vt,type:En,isUsingCloneFor:Wa}},[Vt,Wa,En]);function nu(){if(!Fr)return null;var yu=Fr.dragging,Wc=Fr.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 Kn.createPortal(Ju,no())}return ge.createElement(Id.Provider,{value:ol},At(pl,ki),nu())}var Za=function(Ce,Ie){return Ce===Ie.droppable.type},Is=function(Ce,Ie){return Ie.draggables[Ce.draggable.id]},bl=function(){var Ce={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},Ie=(0,st.Z)({},Ce,{shouldAnimatePlaceholder:!1}),$e=In(function(At){return{draggableId:At.id,type:At.type,source:{index:At.index,droppableId:At.droppableId}}}),mt=In(function(At,Vt,En,Jn,Zn,kn){var Tn=Zn.descriptor.id,ri=Zn.descriptor.droppableId===At;if(ri){var ki=kn?{render:kn,dragging:$e(Zn.descriptor)}:null,Fr={isDraggingOver:En,draggingOverWith:En?Tn:null,draggingFromThisWith:Tn,isUsingPlaceholder:!0};return{placeholder:Zn.placeholder,shouldAnimatePlaceholder:!1,snapshot:Fr,useClone:ki}}if(!Vt)return Ie;if(!Jn)return Ce;var Hr={isDraggingOver:En,draggingOverWith:Tn,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:Zn.placeholder,shouldAnimatePlaceholder:!0,snapshot:Hr,useClone:null}}),gt=function(Vt,En){var Jn=En.droppableId,Zn=En.type,kn=!En.isDropDisabled,Tn=En.renderClone;if(Vt.isDragging){var ri=Vt.critical;if(!Za(Zn,ri))return Ie;var ki=Is(ri,Vt.dimensions),Fr=Js(Vt.impact)===Jn;return mt(Jn,kn,Fr,Fr,ki,Tn)}if(Vt.phase==="DROP_ANIMATING"){var Hr=Vt.completed;if(!Za(Zn,Hr.critical))return Ie;var no=Is(Hr.critical,Vt.dimensions);return mt(Jn,kn,Co(Hr.result)===Jn,Js(Hr.impact)===Jn,no,Tn)}if(Vt.phase==="IDLE"&&Vt.completed&&!Vt.shouldFlush){var uo=Vt.completed;if(!Za(Zn,uo.critical))return Ie;var Lo=Js(uo.impact)===Jn,Po=!!(uo.impact.at&&uo.impact.at.type==="COMBINE"),Uo=uo.critical.droppable.id===Jn;return Lo?Po?Ce:Ie:Uo?Ce:Ie}return Ie};return gt},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=Ye(bl,Fl,null,{context:Fu,pure:!0,areStatePropsEqual:ao})(gl);Zu.defaultProps=Os},38486:function(Vn,Pn){"use strict";var pe;var ge=60103,Oe=60106,Ke=60107,st=60108,Ge=60114,_e=60109,Le=60110,Tt=60112,Pt=60113,Xe=60120,Et=60115,ct=60116,It=60121,Be=60122,ne=60117,ee=60129,ce=60131;if(typeof Symbol=="function"&&Symbol.for){var se=Symbol.for;ge=se("react.element"),Oe=se("react.portal"),Ke=se("react.fragment"),st=se("react.strict_mode"),Ge=se("react.profiler"),_e=se("react.provider"),Le=se("react.context"),Tt=se("react.forward_ref"),Pt=se("react.suspense"),Xe=se("react.suspense_list"),Et=se("react.memo"),ct=se("react.lazy"),It=se("react.block"),Be=se("react.server.block"),ne=se("react.fundamental"),ee=se("react.debug_trace_mode"),ce=se("react.legacy_hidden")}function he(wt){if(typeof wt=="object"&&wt!==null){var nt=wt.$$typeof;switch(nt){case ge:switch(wt=wt.type,wt){case Ke:case Ge:case st:case Pt:case Xe:return wt;default:switch(wt=wt&&wt.$$typeof,wt){case Le:case Tt:case ct:case Et:case _e:return wt;default:return nt}}case Oe:return nt}}}var ve=_e,be=ge,ke=Tt,Ae=Ke,ze=ct,Ze=Et,ot=Oe,qe=Ge,bt=st,He=Pt;pe=Le,pe=ve,pe=be,pe=ke,pe=Ae,pe=ze,pe=Ze,pe=ot,pe=qe,pe=bt,pe=He,pe=function(){return!1},pe=function(){return!1},Pn.isContextConsumer=function(wt){return he(wt)===Le},pe=function(wt){return he(wt)===_e},pe=function(wt){return typeof wt=="object"&&wt!==null&&wt.$$typeof===ge},pe=function(wt){return he(wt)===Tt},pe=function(wt){return he(wt)===Ke},pe=function(wt){return he(wt)===ct},pe=function(wt){return he(wt)===Et},pe=function(wt){return he(wt)===Oe},pe=function(wt){return he(wt)===Ge},pe=function(wt){return he(wt)===st},pe=function(wt){return he(wt)===Pt},pe=function(wt){return typeof wt=="string"||typeof wt=="function"||wt===Ke||wt===Ge||wt===ee||wt===st||wt===Pt||wt===Xe||wt===ce||typeof wt=="object"&&wt!==null&&(wt.$$typeof===ct||wt.$$typeof===Et||wt.$$typeof===_e||wt.$$typeof===Le||wt.$$typeof===Tt||wt.$$typeof===ne||wt.$$typeof===It||wt[0]===Be)},pe=he},53410:function(Vn,Pn,pe){"use strict";Vn.exports=pe(38486)},32637:function(Vn,Pn,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,Pn,pe){"use strict";pe.d(Pn,{Z:function(){return Tt}});const ge=Pt=>typeof Pt=="object"&&Pt!=null&&Pt.nodeType===1,Oe=(Pt,Xe)=>(!Xe||Pt!=="hidden")&&Pt!=="visible"&&Pt!=="clip",Ke=(Pt,Xe)=>{if(Pt.clientHeight<Pt.scrollHeight||Pt.clientWidth<Pt.scrollWidth){const Et=getComputedStyle(Pt,null);return Oe(Et.overflowY,Xe)||Oe(Et.overflowX,Xe)||(ct=>{const It=(Be=>{if(!Be.ownerDocument||!Be.ownerDocument.defaultView)return null;try{return Be.ownerDocument.defaultView.frameElement}catch(ne){return null}})(ct);return!!It&&(It.clientHeight<ct.scrollHeight||It.clientWidth<ct.scrollWidth)})(Pt)}return!1},st=(Pt,Xe,Et,ct,It,Be,ne,ee)=>Be<Pt&&ne>Xe||Be>Pt&&ne<Xe?0:Be<=Pt&&ee<=Et||ne>=Xe&&ee>=Et?Be-Pt-ct:ne>Xe&&ee<Et||Be<Pt&&ee>Et?ne-Xe+It:0,Ge=Pt=>{const Xe=Pt.parentElement;return Xe==null?Pt.getRootNode().host||null:Xe},_e=(Pt,Xe)=>{var Et,ct,It,Be;if(typeof document=="undefined")return[];const{scrollMode:ne,block:ee,inline:ce,boundary:se,skipOverflowHiddenElements:he}=Xe,ve=typeof se=="function"?se:Nn=>Nn!==se;if(!ge(Pt))throw new TypeError("Invalid target");const be=document.scrollingElement||document.documentElement,ke=[];let Ae=Pt;for(;ge(Ae)&&ve(Ae);){if(Ae=Ge(Ae),Ae===be){ke.push(Ae);break}Ae!=null&&Ae===document.body&&Ke(Ae)&&!Ke(document.documentElement)||Ae!=null&&Ke(Ae,he)&&ke.push(Ae)}const ze=(ct=(Et=window.visualViewport)==null?void 0:Et.width)!=null?ct:innerWidth,Ze=(Be=(It=window.visualViewport)==null?void 0:It.height)!=null?Be:innerHeight,{scrollX:ot,scrollY:qe}=window,{height:bt,width:He,top:wt,right:nt,bottom:Dt,left:ht}=Pt.getBoundingClientRect(),{top:zt,right:Yt,bottom:Ut,left:it}=(Nn=>{const $t=window.getComputedStyle(Nn);return{top:parseFloat($t.scrollMarginTop)||0,right:parseFloat($t.scrollMarginRight)||0,bottom:parseFloat($t.scrollMarginBottom)||0,left:parseFloat($t.scrollMarginLeft)||0}})(Pt);let Ve=ee==="start"||ee==="nearest"?wt-zt:ee==="end"?Dt+Ut:wt+bt/2-zt+Ut,Wt=ce==="center"?ht+He/2-it+Yt:ce==="end"?nt+Yt:ht-it;const Ln=[];for(let Nn=0;Nn<ke.length;Nn++){const $t=ke[Nn],{height:rn,width:An,top:ti,right:xn,bottom:Qn,left:Ot}=$t.getBoundingClientRect();if(ne==="if-needed"&&wt>=0&&ht>=0&&Dt<=Ze&&nt<=ze&&($t===be&&!Ke($t)||wt>=ti&&Dt<=Qn&&ht>=Ot&&nt<=xn))return Ln;const Cn=getComputedStyle($t),Wn=parseInt(Cn.borderLeftWidth,10),We=parseInt(Cn.borderTopWidth,10),Ee=parseInt(Cn.borderRightWidth,10),Pe=parseInt(Cn.borderBottomWidth,10);let De=0,Fe=0;const ye="offsetWidth"in $t?$t.offsetWidth-$t.clientWidth-Wn-Ee:0,Qe="offsetHeight"in $t?$t.offsetHeight-$t.clientHeight-We-Pe:0,vt="offsetWidth"in $t?$t.offsetWidth===0?0:An/$t.offsetWidth:0,Ye="offsetHeight"in $t?$t.offsetHeight===0?0:rn/$t.offsetHeight:0;if(be===$t)De=ee==="start"?Ve:ee==="end"?Ve-Ze:ee==="nearest"?st(qe,qe+Ze,Ze,We,Pe,qe+Ve,qe+Ve+bt,bt):Ve-Ze/2,Fe=ce==="start"?Wt:ce==="center"?Wt-ze/2:ce==="end"?Wt-ze:st(ot,ot+ze,ze,Wn,Ee,ot+Wt,ot+Wt+He,He),De=Math.max(0,De+qe),Fe=Math.max(0,Fe+ot);else{De=ee==="start"?Ve-ti-We:ee==="end"?Ve-Qn+Pe+Qe:ee==="nearest"?st(ti,Qn,rn,We,Pe+Qe,Ve,Ve+bt,bt):Ve-(ti+rn/2)+Qe/2,Fe=ce==="start"?Wt-Ot-Wn:ce==="center"?Wt-(Ot+An/2)+ye/2:ce==="end"?Wt-xn+Ee+ye:st(Ot,xn,An,Wn,Ee+ye,Wt,Wt+He,He);const{scrollLeft:Je,scrollTop:yt}=$t;De=Ye===0?0:Math.max(0,Math.min(yt+De/Ye,$t.scrollHeight-rn/Ye+Qe)),Fe=vt===0?0:Math.max(0,Math.min(Je+Fe/vt,$t.scrollWidth-An/vt+ye)),Ve+=yt-De,Wt+=Je-Fe}Ln.push({el:$t,top:De,left:Fe})}return Ln},Le=Pt=>Pt===!1?{block:"end",inline:"nearest"}:(Xe=>Xe===Object(Xe)&&Object.keys(Xe).length!==0)(Pt)?Pt:{block:"start",inline:"nearest"};function Tt(Pt,Xe){if(!Pt.isConnected||!(It=>{let Be=It;for(;Be&&Be.parentNode;){if(Be.parentNode===document)return!0;Be=Be.parentNode instanceof ShadowRoot?Be.parentNode.host:Be.parentNode}return!1})(Pt))return;const Et=(It=>{const Be=window.getComputedStyle(It);return{top:parseFloat(Be.scrollMarginTop)||0,right:parseFloat(Be.scrollMarginRight)||0,bottom:parseFloat(Be.scrollMarginBottom)||0,left:parseFloat(Be.scrollMarginLeft)||0}})(Pt);if((It=>typeof It=="object"&&typeof It.behavior=="function")(Xe))return Xe.behavior(_e(Pt,Xe));const ct=typeof Xe=="boolean"||Xe==null?void 0:Xe.behavior;for(const{el:It,top:Be,left:ne}of _e(Pt,Le(Xe))){const ee=Be-Et.top+Et.bottom,ce=ne-Et.left+Et.right;It.scroll({top:ee,left:ce,behavior:ct})}}}}]);