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

1402 lines
2.6 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([[5816],{89489:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},59477:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},40001:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},49198:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},87169:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},73331:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},15277:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},52671:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},8657:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},56082:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},33853:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},12893:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},15075:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},32134:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},43531:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},61485:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},38819:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},47472:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function($e,Ft){return ke.createElement(Ge.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me},37036:function(){"use strict"},95625:function(){"use strict"},88010:function(On,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"}},43809:function(On,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"}},42678:function(On,pn,pe){"use strict";var le=pe(59301),ke=Object.defineProperty,We=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ue=(wt,$e,Ft)=>$e in wt?ke(wt,$e,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):wt[$e]=Ft,Me=(wt,$e)=>{for(var Ft in $e||($e={}))ut.call($e,Ft)&&Ue(wt,Ft,$e[Ft]);if(We)for(var Ft of We($e))Ge.call($e,Ft)&&Ue(wt,Ft,$e[Ft]);return wt};const Ct=wt=>React.createElement("svg",Me({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},wt),React.createElement("title",null,"\u7F16\u7EC4 18"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("circle",{fill:"#FCB041",cx:7,cy:7,r:7}),React.createElement("path",{d:"M7.531 9.638a.616.616 0 1 1-1.231 0v-.02a.616.616 0 1 1 1.231 0v.02Zm0-2.25a.616.616 0 1 1-1.231 0V4.117a.616.616 0 1 1 1.231 0v3.273Z",fill:"#FFF",fillRule:"nonzero"})));pn.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},74413:function(){"use strict";function On(Ie,te,ee,de){ee===void 0&&(ee=0),de===void 0&&(de=1/0),this._name=Ie,this._defaultValue=te,this._minimum=ee,this._maximum=de}Object.defineProperty(On.prototype,"name",{get:function(){return this._name},set:function(Ie){if(typeof Ie!="string"||Ie==="")throw new Error("Shape name must be a valid string.");this._name=Ie}}),Object.defineProperty(On.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ie){if(typeof Ie!="number"||isNaN(Ie))throw new Error("The default value must be a real number, not: "+Ie);this._defaultValue=Ie}}),Object.defineProperty(On.prototype,"minimum",{get:function(){return this._minimum},set:function(Ie){if(typeof Ie!="number"||isNaN(Ie))throw new Error("Minimum must be a real number, not: "+Ie);this._minimum=Ie}}),Object.defineProperty(On.prototype,"maximum",{get:function(){return this._maximum},set:function(Ie){if(typeof Ie!="number"||isNaN(Ie))throw new Error("Maximum must be a real number, not: "+Ie);this._maximum=Ie}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ie,te){var ee=go.Shape._FigureParameters[Ie];return ee?ee[te]:null},go.Shape.setFigureParameter=function(Ie,te,ee){if(!(ee instanceof On))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 de=go.Shape._FigureParameters[Ie];de||(de=[],go.Shape._FigureParameters[Ie]=de),de[te]=ee};var pn=[];function pe(Ie,te){var ee=pn.pop();return ee===void 0?new go.Point(Ie,te):(ee.x=Ie,ee.y=te,ee)}function le(){var Ie=pn.pop();return Ie===void 0?new go.Point:Ie}function ke(Ie){pn.push(Ie)}function We(Ie,te,ee,de,se,he,ve,Ee,Be){Be||(Be=new go.Point);var Le=Ie-ee,ze=se-ve,je=NaN,Xe=NaN;if(Le===0)if(ze===0)Ie===ee&&(je=Ie,Xe=te);else{var Ye=(he-Ee)/ze,dt=he-Ye*se;je=Ie,Xe=Ye*je+dt}else if(ze===0){var He=(te-de)/Le,Nt=te-He*Ie;je=se,Xe=He*je+Nt}else{var He=(te-de)/Le,Ye=(he-Ee)/ze,Nt=te-He*Ie,dt=he-Ye*se;je=(dt-Nt)/(He-Ye),Xe=He*je+Nt}return Be.x=je,Be.y=Xe,Be}function ut(Ie,te,ee,de,se,he,ve,Ee,Be,Le,ze,je,Xe,Ye){var dt=1-Be,He=Be,Nt=Ie*dt+ee*He,ot=te*dt+de*He,Tt=ee*dt+se*He,xt=de*dt+he*He,Ot=se*dt+ve*He,Wt=he*dt+Ee*He,Dt=Nt*dt+Tt*He,tt=ot*dt+xt*He,Ve=Tt*dt+Ot*He,_t=xt*dt+Wt*He,vn=Dt*dt+Ve*He,yn=tt*dt+_t*He;Le.x=Nt,Le.y=ot,ze.x=Dt,ze.y=tt,je.x=vn,je.y=yn,Xe.x=Ve,Xe.y=_t,Ye.x=Ot,Ye.y=Wt}var Ge=new go.Spot(.156,.156),Ue=new go.Spot(.844,.844),Me=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new On("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=5),de=Math.min(de,te/3),de=Math.min(de,ee/3);var se=de*Me,he=new go.Geometry().add(new go.PathFigure(de,0,!0).add(new go.PathSegment(go.PathSegment.Line,te-de,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,de,te-se,0,te,se)).add(new go.PathSegment(go.PathSegment.Line,te,ee-de)).add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,ee-se,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,de,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,se,ee,0,ee-se)).add(new go.PathSegment(go.PathSegment.Line,0,de)).add(new go.PathSegment(go.PathSegment.Bezier,de,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(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ie,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=0,de.startY=ee/2,de.endX=te,de.endY=ee/2,de}),go.Shape.defineFigureGenerator("LineV",function(Ie,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=te/2,de.startY=0,de.endX=te/2,de.endY=ee,de}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.25*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.75*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ie,te,ee){var de=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(de*te,(1-de)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,de*ee)).add(new go.PathSegment(go.PathSegment.Move,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ie,te,ee){var de=te/2,se=new go.Geometry().add(new go.PathFigure(te,te/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,de,de,de,de).close()));return se.spot1=Ge,se.spot2=Ue,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Ie,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}),go.Shape.defineFigureGenerator("Line2",function(Ie,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=te,de.startY=0,de.endX=0,de.endY=ee,de}),go.Shape.defineFigureGenerator("Curve1",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Me*te,0,te,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,0,Me*ee,(1-Me)*te,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,Me*ee,Me*te,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Me)*te,0,0,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new On("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)?de=.1:de<-1?de=-1:de>1&&(de=1);var se=Math.abs(de)*te;if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new On("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)?de=10:de<-te?de=-te:de>te&&(de=te);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.setFigureParameter("Trapezoid1",0,new On("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)?de=.2:de<.5?de=-.5:de>.5&&(de=.5);var se=Math.abs(de)*te;if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new On("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)?de=20:de<-te?de=-te/2:de>te&&(de=te/2);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.setFigureParameter("ManualOperation",0,new On("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)?de=10:de<-te?de=-te/2:de>te&&(de=te/2);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())):he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}});var Ct=[];function wt(){var Ie=Ct.pop();return Ie===void 0?[]:Ie}function $e(Ie){Ie.length=0,Ct.push(Ie)}function Ft(Ie){for(var te=wt(),ee=.5,de=.5,se=Math.PI*1.5,he=0,ve=0;ve<Ie;ve++)he=2*Math.PI/Ie*ve+se,te[ve]=new go.Point(de+ee*Math.cos(he),de+ee*Math.sin(he));return te.push(te[0]),te}function lt(Ie){var te=vt(Ie),ee=wt();ee[0]=te[0];for(var de=1,se=1;de<te.length;de+=2,se+=3)ee[se]=te[de],ee[se+1]=te[de],ee[se+2]=te[de+1];return $e(te),ee}function vt(Ie){for(var te=Ft(Ie),ee=wt(),de=Math.floor(te.length/2),se=te.length-1,he=Ie%2===0?2:1,ve=0;ve<se;ve++){var Ee=te[ve],Be=te[ve+1],Le=te[(de+ve-1)%se],ze=te[(de+ve+he)%se];ee[ve*2]=Ee,ee[ve*2+1]=We(Ee.x,Ee.y,Le.x,Le.y,Be.x,Be.y,ze.x,ze.y,new go.Point)}return ee[ee.length]=ee[0],$e(te),ee}go.Shape.defineFigureGenerator("Pentagon",function(Ie,te,ee){var de=Ft(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<5;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Ie,te,ee){var de=Ft(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<6;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Ie,te,ee){var de=Ft(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<7;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Ie,te,ee){var de=Ft(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<8;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Ie,te,ee){var de=Ft(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<9;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Ie,te,ee){var de=Ft(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Ie,te,ee){var de=Ft(12),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ie,te,ee){var de=vt(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ie,te,ee){var de=vt(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ie,te,ee){var de=vt(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<14;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ie,te,ee){var de=vt(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<16;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ie,te,ee){var de=vt(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<18;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ie,te,ee){var de=vt(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<20;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ie,te,ee){var de=lt(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ie,te,ee){var de=lt(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ie,te,ee){var de=lt(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ie,te,ee){var de=lt(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ie,te,ee){var de=lt(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ie,te,ee){var de=lt(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new On("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new On("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN,se=Ie?Ie.parameter2:NaN;isNaN(de)&&(de=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,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de<te/2&&se<ee/2&&(ve.add(new go.PathSegment(go.PathSegment.Move,de,se)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,se).close())),he.setSpots(0,0,1,1,de,se,-de,-se),he}),go.Shape.setFigureParameter("Ring",0,new On("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=8);var se=te/2,he=new go.Geometry,ve=new go.PathFigure(te,te/2,!0);he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var Ee=Math.max(se-de,0);return Ee>0&&(ve.add(new go.PathSegment(go.PathSegment.Move,te/2+Ee,te/2)),ve.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,Ee,Ee).close())),he.spot1=Ge,he.spot2=Ue,he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Cloud",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.08034461*te,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*te,.05349299*ee,-.09239631*te,.07836421*ee,.1406031*te,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*te,.074219*ee,.2450511*te,-.00697547*ee,.3776197*te,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*te,.07004196*ee,.4539471*te,0,.6066018*te,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*te,.08370865*ee,.6914277*te,-.01904177*ee,.8921095*te,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*te,.3194596*ee,1.036446*te,.04105738*ee,1.020377*te,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*te,.562044*ee,1.04448*te,.360238*ee,.992256*te,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*te,.8217117*ee,1.032337*te,.5771781*ee,1.018411*te,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*te,.9156953*ee,1.028411*te,.9571472*ee,.8556702*te,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*te,.9310455*ee,.7431877*te,1.009325*ee,.5624123*te,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*te,.9344623*ee,.4820677*te,1.031761*ee,.3030112*te,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.870098*ee,.2329994*te,1.01518*ee,.03213784*te,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*te,.6545475*ee,-.02812061*te,.9032597*ee,-.01205169*te,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*te,.4265613*ee,-.01812061*te,.6089503*ee,-.00606892*te,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.1944299*ee,-.01606892*te,.3892545*ee,-.01205169*te,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ie,te,ee){var de=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(de*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,te,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)).add(new go.PathSegment(go.PathSegment.Line,de*te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,de*ee).close())).setSpots(de/2,de/2,1-de/2,1-de/2)}),go.Shape.setFigureParameter("Pie",0,new On("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new On("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN,se=Ie?Ie.parameter2:NaN;isNaN(de)&&(de=0),isNaN(se)&&(se=315);var he=de%360;he<0&&(he+=360);var ve=se%360,Ee=Math.min(te,ee)/2;return new go.Geometry().add(new go.PathFigure(Ee,Ee).add(new go.PathSegment(go.PathSegment.Arc,he,ve,Ee,Ee,Ee,Ee).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ie,te,ee){var de=Me/Math.SQRT2*.5,se=Math.SQRT2/2,he=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*te,he*ee,te,(1-de)*ee,(se+de)*te,(he+de)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new On("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=30);var se=Math.min(de,te)/2,he=te/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,te,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,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 On("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=10);var se=Math.min(de,te)/2,he=te/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,te,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,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 On("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;if((isNaN(de)||de<0)&&(de=30),te===0||ee===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=te,se.endY=ee,se}else{var he=te/2,ve=ee/2,Ee=Math.atan2(ee,te),Be=de-Math.min(Math.cos(Ee)*de/2,he),Le=de-Math.min(Math.sin(Ee)*de/2,ve),se=new go.Geometry,ze=new go.PathFigure(Be,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,te-Be,0)),ze.add(new go.PathSegment(go.PathSegment.Line,te,Le)),ze.add(new go.PathSegment(go.PathSegment.Line,.8*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,te,ee-Le)),ze.add(new go.PathSegment(go.PathSegment.Line,te-Be,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,he,.8*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,Be,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,0,ee-Le)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,0,Le).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new On("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=10);var se=new go.Geometry,he=new go.PathFigure(.1*te,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new On("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.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,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+de/2)*te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+de/2)*te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-de/2)*te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-de/2)*te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,de*ee).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new On("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.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,te,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Math.abs(1-de)*te,.25*ee,Math.abs(1-de)*te,.75*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,de*te,.75*ee,de*te,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,Me*te,0,te,(.5-Me/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,(.5+Me/2)*ee,Me*te,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,0,te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*te,.75*ee,.5*te,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*te,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,0,0,.45*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.55*te,0,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.5*ee,.9*te,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*te,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.6*te,.2*ee,te,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.7*ee,te,.8*ee,.6*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,.5*te,.75*ee,.55*te,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.7*ee,.45*te,.95*ee,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*te,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*te,.01*ee,0,.25*ee,.4*te,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.4*te,.6*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.15*te,ee,.5*te,.75*ee,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.6*ee,.55*te,.95*ee,.5*te,.75*ee));var he=.2,ve=.3,Ee=0,Be=he*Me;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Be+Ee)*ee,(.5-Be+ve)*te,(.5+he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*te,(.5+Ee)*ee,(.5+Be+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Be+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve)*te,(.5-Be+Ee)*ee,(.5+Be+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*te,.36771243*ee,(.5-Be+ve)*te,(.5-he+Ee)*ee,(.5-he+ve+.05)*te,(.5-Be+Ee-.02)*ee)),he=.2,ve=0,Ee=-.3,Be=he*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*te,(.5+Ee)*ee,(.5+Be+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Be+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve)*te,(.5-Be+Ee)*ee,(.5+Be+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*te,(.5+Ee)*ee,(.5-Be+ve)*te,(.5-he+Ee)*ee,(.5-he+ve)*te,(.5-Be+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Be+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Be+Ee)*ee,(.5-Be+ve)*te,(.5+he+Ee)*ee)),he=.2,ve=-.3,Ee=0,Be=he*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve-.05)*te,(.5-Be+Ee-.02)*ee,(.5+Be+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*te,(.5+Ee)*ee,(.5-Be+ve)*te,(.5-he+Ee)*ee,(.5-he+ve)*te,(.5-Be+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Be+Ee)*ee,(.5-Be+ve)*te,(.5+he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.6*ee,(.5+Be+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Be+Ee)*ee).close()),de.setSpots(.06,.33,.93,.68),de}),go.Shape.defineFigureGenerator("YinYang",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.5,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*.5,te*.5,te*.5,te*.5)),se.add(new go.PathSegment(go.PathSegment.Arc,90,-180,te*.5,te*.75,te*.25,te*.25)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,te*.5,te*.25,te*.25,te*.25));var he=.1,ve=.5,Ee=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(ve+he)*te,Ee*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,te*ve,ee*Ee,he*te,he*te).close()),se=new go.PathFigure(te*.5,0,!1),de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*.5,te*.5,te*.5,te*.5)),Ee=.75,se=new go.PathFigure((ve+he)*te,Ee*ee,!0),de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,te*ve,ee*Ee,he*te,he*te).close()),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Peace",function(Ie,te,ee){var de=.8535533905932737,se=.5*te,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-de)*te,de*ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,de*te,de*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=.5,Ee=.5,Be=new go.PathFigure(ve*te,(Ee-he)*ee);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),he=.4,se=Me*.4;var Le=le(),ze=le(),je=le(),Xe=le();ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.42,Le,ze,je,Xe,Xe);var Ye=le(),dt=le(),He=le();ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.58,Xe,Xe,He,Ye,dt);var Nt=le(),ot=le(),Tt=le();ut(ve,Ee+he,ve-se,Ee+he,ve-he,Ee+se,ve-he,Ee,.42,Nt,ot,Tt,Xe,Xe);var xt=le(),Ot=le(),Wt=le();return ut(ve,Ee+he,ve-se,Ee+he,ve-he,Ee+se,ve-he,Ee,.58,Xe,Xe,Wt,xt,Ot),Be.add(new go.PathSegment(go.PathSegment.Move,Wt.x*te,Wt.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,xt.x*te,xt.y*ee,Ot.x*te,Ot.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,je.x*te,je.y*ee,Le.x*te,Le.y*ee,ze.x*te,ze.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,Wt.x*te,Wt.y*ee).close()),Be.add(new go.PathSegment(go.PathSegment.Move,Tt.x*te,Tt.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,He.x*te,He.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,Ye.x*te,Ye.y*ee,dt.x*te,dt.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Tt.x*te,Tt.y*ee,Nt.x*te,Nt.y*ee,ot.x*te,ot.y*ee).close()),ke(Le),ke(ze),ke(je),ke(Xe),ke(Ye),ke(dt),ke(He),ke(Nt),ke(ot),ke(Tt),ke(xt),ke(Ot),ke(Wt),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Fragile",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*te,0)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*te,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.5*ee,te,.25*ee,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new On("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=30),de>te&&(de=te);var se=(te-de)/2,he=se+de;return new go.Geometry().add(new go.PathFigure(he,.5*ee).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,se,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*te,0)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ie,te,ee){var de=new go.Geometry,se=Me*.4,he=.4,ve=.5,Ee=.5,Be=le(),Le=le(),ze=le(),je=le(),Xe=new go.PathFigure((ve-he)*te,Ee*ee,!1);de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.44,ze,je,Le,Be,Be),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Le.x*te,Le.y*ee,ze.x*te,ze.y*ee,je.x*te,je.y*ee));var Ye=pe(Le.x,Le.y);ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.56,Be,Be,Le,ze,je);var dt=pe(Le.x,Le.y);Xe.add(new go.PathSegment(go.PathSegment.Line,(Ye.x*.1+.95*.9)*te,Ye.y*.1*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.85*te,Ye.y*.1*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.85*te,0)),Xe.add(new go.PathSegment(go.PathSegment.Line,te,0)),Xe.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,(dt.x*.1+.9)*te,.15*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,(dt.x*.1+.9)*te,(dt.y*.1+.05*.9)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,dt.x*te,dt.y*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,ze.x*te,ze.y*ee,je.x*te,je.y*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),he=.35,se=Me*.35;var He=new go.PathFigure(ve*te,(Ee-he)*ee,!1);de.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee));var Nt=new go.PathFigure((ve-he)*te,Ee*ee,!1);return de.add(Nt),ke(Be),ke(Le),ke(ze),ke(je),ke(Ye),ke(dt),de.spot1=new go.Spot(.202,.257),de.spot2=new go.Spot(.792,.739),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("GenderFemale",function(Ie,te,ee){var de=new go.Geometry,se=.375,he=0,ve=-.125,Ee=se*Me,Be=new go.PathFigure((.525+he)*te,(.5+se+ve)*ee,!1);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+he)*te,(.5+ve)*ee,(.5+Ee+he)*te,(.5+se+ve)*ee,(.5+se+he)*te,(.5+Ee+ve)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*te,(.5-se+ve)*ee,(1-.5+se+he)*te,(.5-Ee+ve)*ee,(.5+Ee+he)*te,(.5-se+ve)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*te,(.5+ve)*ee,(.5-Ee+he)*te,(.5-se+ve)*ee,(.5-se+he)*te,(.5-Ee+ve)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.475+he)*te,(.5+se+ve)*ee,(.5-se+he)*te,(.5+Ee+ve)*ee,(.5-Ee+he)*te,(.5+se+ve)*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.475*te,.85*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.425*te,.85*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.425*te,.9*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.475*te,.9*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.475*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.525*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.525*te,.9*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.575*te,.9*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.575*te,.85*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee).close()),se=.325,he=0,ve=-.125,Ee=se*Me;var Be=new go.PathFigure((1-.5+se+he)*te,(.5+ve)*ee,!1);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*te,(.5+se+ve)*ee,(.5+se+he)*te,(.5+Ee+ve)*ee,(.5+Ee+he)*te,(.5+se+ve)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*te,(.5+ve)*ee,(.5-Ee+he)*te,(.5+se+ve)*ee,(.5-se+he)*te,(.5+Ee+ve)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*te,(.5-se+ve)*ee,(.5-se+he)*te,(.5-Ee+ve)*ee,(.5-Ee+he)*te,(.5-se+ve)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+he)*te,(.5+ve)*ee,(.5+Ee+he)*te,(.5-se+ve)*ee,(1-.5+se+he)*te,(.5-Ee+ve)*ee));var Be=new go.PathFigure((.525+he)*te,(.5+se+ve)*ee,!1);return de.add(Be),de.spot1=new go.Spot(.232,.136),de.spot2=new go.Spot(.682,.611),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("LogicImplies",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;return isNaN(de)&&(de=.2),new go.Geometry().add(new go.PathFigure((1-de)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;return isNaN(de)&&(de=.2),new go.Geometry().add(new go.PathFigure((1-de)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,de*te,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,de*te,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ie,te,ee){var de=new go.Geometry().add(new go.PathFigure(.5*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*te,.5*ee,.5*te,.5*ee)));return de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("LogicTruth",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ie,te,ee){var de=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,de*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,de*te,de*ee,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ie,te,ee){var de=.5;return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,de*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,de*te,de*ee,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new On("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new On("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.3);var se=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=.3);var he=(1-de)*te,ve=(.5-se/2)*ee,Ee=(.5+se/2)*ee,Be=new go.Geometry,Le=new go.PathFigure(0,ve,!0);Be.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Le.add(new go.PathSegment(go.PathSegment.Line,he,0)),Le.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Le.add(new go.PathSegment(go.PathSegment.Line,he,Ee)),Le.add(new go.PathSegment(go.PathSegment.Line,0,Ee).close()),Be.spot1=new go.Spot(0,ve/ee);var ze=We(0,Ee/ee,1,Ee/ee,he/te,1,1,.5,le());return Be.spot2=new go.Spot(ze.x,ze.y),ke(ze),Be}),go.Shape.setFigureParameter("Arrow2",0,new On("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new On("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=30),de>te&&(de=te);var se=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var he=te-de,ve=(ee-se)/2,Ee=ve+se,Be=new go.Geometry,Le=new go.PathFigure(0,ve,!0);Be.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Le.add(new go.PathSegment(go.PathSegment.Line,he,0)),Le.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Le.add(new go.PathSegment(go.PathSegment.Line,he,Ee)),Le.add(new go.PathSegment(go.PathSegment.Line,0,Ee).close()),Be.spot1=new go.Spot(0,ve/ee);var ze=We(0,Ee/ee,1,Ee/ee,he/te,1,1,.5,le());return Be.spot2=new go.Spot(ze.x,ze.y),ke(ze),Be}),go.Shape.defineFigureGenerator("Chevron",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.214*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.786*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),de}),go.Shape.setFigureParameter("DoubleEndArrow",0,new On("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.3);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close());var Be=We(0,.5,.3,0,0,se/ee,.1,se/ee,le());return ve.spot1=new go.Spot(Be.x,Be.y),Be=We(.7,1,1,.5,0,he/ee,1,he/ee,Be),ve.spot2=new go.Spot(Be.x,Be.y),ke(Be),ve}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new On("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new On("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=40);var se=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-de)/2,ve=he+de,Ee=(ee-se)/2,Be=Ee+se;(de>ee||se>ee)&&(se>de?(de=de*ee/se,he=(ee-de)/2,ve=he+de,Ee=0,Be=ee):(he=0,ve=ee,Ee=0,Be=ee));var Le=new go.Geometry,ze=new go.PathFigure(te,.5*ee,!0);Le.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*te,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*te,Ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*te,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,Ee).close());var je=We(0,.5,.3,Ee/ee,0,he/ee,1,he/ee,le());return Le.spot1=new go.Spot(je.x,je.y),je=We(.7,Be/ee,1,.5,0,ve/ee,1,ve/ee,je),Le.spot2=new go.Spot(je.x,je.y),ke(je),Le}),go.Shape.setFigureParameter("IBeamArrow",0,new On("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.3);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(0,se/ee);var Be=We(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Be.x,Be.y),ke(Be),ve}),go.Shape.setFigureParameter("IBeamArrow2",0,new On("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new On("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=40);var se=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-de)/2,ve=he+de,Ee=(ee-se)/2,Be=Ee+se;(de>ee||se>ee)&&(se>de?(de=de*ee/se,he=(ee-de)/2,ve=he+de,Ee=0,Be=ee):(he=0,ve=ee,Ee=0,Be=ee));var Le=new go.Geometry,ze=new go.PathFigure(te,.5*ee,!0);Le.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*te,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,0,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,0,Ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*te,Ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*te,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,Ee).close()),Le.spot1=new go.Spot(0,he/ee);var je=We(.7,Be/ee,1,.5,0,ve/ee,1,ve/ee,le());return Le.spot2=new go.Spot(je.x,je.y),ke(je),Le}),go.Shape.setFigureParameter("Pointer",0,new On("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.1);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(de,.35);var ve=We(.2,.65,1,.65,0,1,1,.5,le());return se.spot2=new go.Spot(ve.x,ve.y),ke(ve),se}),go.Shape.setFigureParameter("RoundedPointer",0,new On("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.3);var se=new go.Geometry,he=new go.PathFigure(te,.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,de*te,.75*ee,de*te,.25*ee).close()),se.spot1=new go.Spot(de,.35);var ve=We(0,.65,1,.65,0,1,1,.5,le());return se.spot2=new go.Spot(ve.x,ve.y),ke(ve),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new On("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.4);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(.2,.3);var Be=We(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Be.x,Be.y),ke(Be),ve}),go.Shape.setFigureParameter("SplitEndArrow2",0,new On("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=50);var se=(ee-de)/2,he=se+de;de>ee&&(se=0,he=ee);var ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(.2,se/ee);var Be=We(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Be.x,Be.y),ke(Be),ve}),go.Shape.setFigureParameter("SquareArrow",0,new On("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.7);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,de*te,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,de*te,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(de,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(0,.9*ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+he)*ee).close()),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.97),de}),go.Shape.defineFigureGenerator("Cone2",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.9*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,ee,.85/.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var he=new go.PathFigure(0,.9*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,.8*ee,.85/.9*te,.8*ee)),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.82),de}),go.Shape.defineFigureGenerator("Cube1",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var he=new go.PathFigure(.5*te,ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(.5,.85),de}),go.Shape.defineFigureGenerator("Cube2",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.3*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0).close());var he=new go.PathFigure(0,.3*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Move,.7*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(.7,1),de}),go.Shape.defineFigureGenerator("Cylinder1",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,ee/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(0,de,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Me*de,(.5-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,1*te,de,(.5+he)*te,0,1*te,Me*de)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,1*ee,1*te,ee-Me*de,(.5+he)*te,1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,(.5-he)*te,1*ee,0,ee-Me*de)),ve.add(new go.PathSegment(go.PathSegment.Line,0,de));var Ee=new go.PathFigure(te,de,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,2*de,1*te,2*de-Me*de,(.5+he)*te,2*de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,de,(.5-he)*te,2*de,0,2*de-Me*de)),se.spot1=new go.Spot(0,0,0,2*de),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,ee/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(0,ee-de,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Me*de,(.5-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,de,(.5+he)*te,0,te,Me*de)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,ee-Me*de,(.5+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,(.5-he)*te,ee,0,ee-Me*de));var Ee=new go.PathFigure(0,ee-de,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee-2*de,0,ee-de-Me*de,(.5-he)*te,ee-2*de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te,ee-de,(.5+he)*te,ee-2*de,te,ee-de-Me*de)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*de),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,te/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(de,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Me*de,0,te,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,(.5+he)*ee,te-Me*de,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*de,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,(.5-he)*ee,Me*de,0));var Ee=new go.PathFigure(de,0,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,2*de,.5*ee,de+Me*de,0,2*de,(.5-he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,de,ee,2*de,(.5+he)*ee,de+Me*de,ee)),se.spot1=new go.Spot(0,0,2*de,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,te/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(te-de,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Me*de,0,te,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,(.5+he)*ee,te-Me*de,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*de,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,(.5-he)*ee,Me*de,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,0));var Ee=new go.PathFigure(te-de,0,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-2*de,.5*ee,te-de-Me*de,0,te-2*de,(.5-he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te-2*de,(.5+he)*ee,te-de-Me*de,ee)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*de,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,.25*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(.25*te,.25*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.408,.172),de.spot2=new go.Spot(.833,.662),de}),go.Shape.defineFigureGenerator("Prism2",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.25*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(0,ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("Pyramid1",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var he=new go.PathFigure(.5*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.25,.367),de.spot2=new go.Spot(.75,.875),de}),go.Shape.defineFigureGenerator("Pyramid2",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var he=new go.PathFigure(.5*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),de.spot1=new go.Spot(.25,.367),de.spot2=new go.Spot(.75,.875),de}),go.Shape.defineFigureGenerator("Actor",function(Ie,te,ee){var de=new go.Geometry,se=.2,he=.1,ve=Me*se,Ee=Me*he,Be=.5,Le=.1,ze=new go.PathFigure(Be*te,(Le+he)*ee,!0);de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Be-se)*te,Le*ee,(Be-ve)*te,(Le+he)*ee,(Be-se)*te,(Le+Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-he)*ee,(Be-se)*te,(Le-Ee)*ee,(Be-ve)*te,(Le-he)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Be+se)*te,Le*ee,(Be+ve)*te,(Le-he)*ee,(Be+se)*te,(Le-Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le+he)*ee,(Be+se)*te,(Le+Ee)*ee,(Be+ve)*te,(Le+he)*ee));var je=.05,Xe=Me*je;Be=.05,Le=.25;var Ye=new go.PathFigure(.5*te,.2*ee,!0);return de.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.95*te,.2*ee)),Be=.95,Le=.25,Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be+je)*te,Le*ee,(Be+Xe)*te,(Le-je)*ee,(Be+je)*te,(Le-Xe)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.85*te,.35*ee)),je=.025,Xe=Me*je,Be=.825,Le=.35,Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-je)*ee,(Be+je)*te,(Le-Xe)*ee,(Be+Xe)*te,(Le-je)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be-je)*te,Le*ee,(Be-Xe)*te,(Le-je)*ee,(Be-je)*te,(Le-Xe)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee)),je=.05,Xe=Me*je,Be=.5,Le=.7,Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-je)*ee,(Be+je)*te,(Le-Xe)*ee,(Be+Xe)*te,(Le-je)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be-je)*te,Le*ee,(Be-Xe)*te,(Le-je)*ee,(Be-je)*te,(Le-Xe)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.45*te,ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*te,.35*ee)),je=.025,Xe=Me*je,Be=.175,Le=.35,Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-je)*ee,(Be+je)*te,(Le-Xe)*ee,(Be+Xe)*te,(Le-je)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be-je)*te,Le*ee,(Be-Xe)*te,(Le-je)*ee,(Be-je)*te,(Le-Xe)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),je=.05,Xe=Me*je,Be=.05,Le=.25,Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-je)*ee,(Be-je)*te,(Le-Xe)*ee,(Be-Xe)*te,(Le-je)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),de.spot1=new go.Spot(.2,.2),de.spot2=new go.Spot(.8,.65),de}),go.Shape.setFigureParameter("Card",0,new On("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.2);var se=new go.Geometry,he=new go.PathFigure(te,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,0).close()),se.spot1=new go.Spot(0,de),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee));var he=new go.PathFigure(.5*te,.5*ee,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),de.spot1=new go.Spot(.25,0),de.spot2=new go.Spot(.75,.25),de}),go.Shape.defineFigureGenerator("CreateRequest",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),de}),go.Shape.defineFigureGenerator("Database",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(te,.1*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,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*te,0,0,(.1-he)*ee,(.5-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-he)*ee));var Ee=new go.PathFigure(te,.1*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+he)*ee,(.5+se)*te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+he)*ee,(.5+se)*te,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.4*ee,te,(.3+he)*ee,(.5+se)*te,.4*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-se)*te,.4*ee,0,(.3+he)*ee)),de.spot1=new go.Spot(0,.4),de.spot2=new go.Spot(1,.9),de}),go.Shape.defineFigureGenerator("DataStorage",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.9*ee,.25*te,.1*ee).close()),de.spot1=new go.Spot(.226,0),de.spot2=new go.Spot(.81,1),de}),go.Shape.defineFigureGenerator("DiskStorage",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(te,.1*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,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*te,0,0,(.1-he)*ee,(.5-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-he)*ee));var Ee=new go.PathFigure(te,.1*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+he)*ee,(.5+se)*te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+he)*ee,(.5+se)*te,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+he)*ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(1,.9),de}),go.Shape.defineFigureGenerator("Display",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),de.spot1=new go.Spot(.25,0),de.spot2=new go.Spot(.75,1),de}),go.Shape.defineFigureGenerator("DividedEvent",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var he=Me*.2,ve=new go.PathFigure(0,.2*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,0,(.2-he)*ee,(.2-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.2*ee,(.8+he)*te,0,te,(.2-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,ee,te,(.8+he)*ee,(.8+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-he)*te,ee,0,(.8+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var Ee=new go.PathFigure(0,se*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),de}),go.Shape.defineFigureGenerator("DividedProcess",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),de}),go.Shape.defineFigureGenerator("Document",function(Ie,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(1,.6),de}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),de}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var he=new go.PathFigure(.1*te,.4*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.9*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.6*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.4*te,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.9*ee)),de.spot1=new go.Spot(.25,.25),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("File",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(.75*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("Interrupt",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee));var he=new go.PathFigure(te,.5*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee));var ve=new go.PathFigure(te,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("InternalStorage",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN,he=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.1);var ve=new go.PathFigure(0,0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var Ee=new go.PathFigure(se*te,0,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,0,he*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he*ee)),de}),go.Shape.defineFigureGenerator("Junction",function(Ie,te,ee){var de=new go.Geometry,se=1/Math.SQRT2,he=(1-1/Math.SQRT2)/2,ve=Me*.5,Ee=.5,Be=new go.PathFigure(te,Ee*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,ee,te,(Ee+ve)*ee,(Ee+ve)*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,0,Ee*ee,(Ee-ve)*te,ee,0,(Ee+ve)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,0,0,(Ee-ve)*ee,(Ee-ve)*te,0)),Be.add(new go.PathSegment(go.PathSegment.Bezier,te,Ee*ee,(Ee+ve)*te,0,te,(Ee-ve)*ee));var Le=new go.PathFigure((he+se)*te,(he+se)*ee,!1);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,he*te,he*ee)),Le.add(new go.PathSegment(go.PathSegment.Move,he*te,(he+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,(he+se)*te,he*ee)),de}),go.Shape.defineFigureGenerator("LinedDocument",function(Ie,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close());var he=new go.PathFigure(.1*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.75*ee)),de.spot1=new go.Spot(.1,0),de.spot2=new go.Spot(1,.6),de}),go.Shape.defineFigureGenerator("LoopLimit",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("MagneticTape",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(.5*te,ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(he+.1)*te,.9*ee,te,(he+se)*ee,(he+se)*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.15,.15),de.spot2=new go.Spot(.85,.8),de}),go.Shape.defineFigureGenerator("ManualInput",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.7);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,se*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,se*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(1,.75),de}),go.Shape.defineFigureGenerator("MultiDocument",function(Ie,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.44*ee,.96*te,.47*ee,.93*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.54*ee,.86*te,.57*ee,.83*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*te,.4*ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0).close());var he=new go.PathFigure(.1*te,.2*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.44*ee)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.8,.77),de}),go.Shape.defineFigureGenerator("MultiProcess",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,.1*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close());var he=new go.PathFigure(.2*te,.1*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.1*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),de.spot1=new go.Spot(0,.2),de.spot2=new go.Spot(.8,1),de}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.1);var he=1-se,ve=new go.PathFigure(0,0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close());var Ee=new go.PathFigure(.5*se*te,se*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*te,se*ee)),de}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(.75,1),de}),go.Shape.defineFigureGenerator("Or",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(te,he*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,ee,te,(he+se)*ee,(he+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee));var Ee=new go.PathFigure(te,.5*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),de}),go.Shape.defineFigureGenerator("PaperTape",function(Ie,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.5*te,.6*ee,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),de.spot1=new go.Spot(0,.49),de.spot2=new go.Spot(1,.75),de}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN,he=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN,he=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("Procedure",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure((1-se)*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,se*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),de}),go.Shape.defineFigureGenerator("Process",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("Sort",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var he=new go.PathFigure(0,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),de.spot1=new go.Spot(.25,.25),de.spot2=new go.Spot(.75,.5),de}),go.Shape.defineFigureGenerator("Start",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(se*te,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee));var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),de.spot1=new go.Spot(se,0),de.spot2=new go.Spot(1-se,1),de}),go.Shape.defineFigureGenerator("Terminator",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee)),de.spot1=new go.Spot(.23,0),de.spot2=new go.Spot(.77,1),de}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*ee).close()),de.spot1=go.Spot.TopLeft,de}),go.Shape.defineFigureGenerator("AndGate",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(.5+se)*te,0,te,(.5-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.5+se)*ee,(.5+se)*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(.55,1),de}),go.Shape.defineFigureGenerator("Buffer",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("Clock",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(te,he*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,ee,te,(he+se)*ee,(he+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee));var Ee=new go.PathFigure(te,he*ee,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he*ee));var Be=new go.PathFigure(.8*te,.75*ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.8*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.6*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.6*te,.75*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.4*te,.75*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.4*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*te,.75*ee)),de}),go.Shape.defineFigureGenerator("Ground",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.3*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),de}),go.Shape.defineFigureGenerator("Inverter",function(Ie,te,ee){var de=new go.Geometry,se=Me*.1,he=.1,ve=.9,Ee=.5,Be=new go.PathFigure(.8*te,.5*ee,!0);de.add(Be),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,.8*te,.5*ee));var Le=new go.PathFigure((ve+he)*te,Ee*ee,!0);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.4,.75),de}),go.Shape.defineFigureGenerator("NandGate",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.4,ve=Me*.1,Ee=.1,Be=.9,Le=.5,ze=new go.PathFigure(.8*te,.5*ee,!0);de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,.8*te,(.5+he)*ee,(.4+se)*te,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*te,0)),ze.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(.4+se)*te,0,.8*te,(.5-he)*ee));var je=new go.PathFigure((Be+Ee)*te,Le*ee,!0);return de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le+Ee)*ee,(Be+Ee)*te,(Le+ve)*ee,(Be+ve)*te,(Le+Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee)*te,Le*ee,(Be-ve)*te,(Le+Ee)*ee,(Be-Ee)*te,(Le+ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-Ee)*ee,(Be-Ee)*te,(Le-ve)*ee,(Be-ve)*te,(Le-Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee)*te,Le*ee,(Be+ve)*te,(Le-Ee)*ee,(Be+Ee)*te,(Le-ve)*ee)),de.spot1=new go.Spot(0,.05),de.spot2=new go.Spot(.55,.95),de}),go.Shape.defineFigureGenerator("NorGate",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=0,Ee=.5,Be=new go.PathFigure(.8*te,.5*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(ve+he)*te,(Ee-se)*ee,.7*te,(Ee-he)*ee)),se=.1,he=Me*.1,ve=.9,Ee=.5;var Le=new go.PathFigure((ve-se)*te,Ee*ee,!0);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),de.spot1=new go.Spot(.2,.25),de.spot2=new go.Spot(.6,.75),de}),go.Shape.defineFigureGenerator("OrGate",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=0,Ee=.5,Be=new go.PathFigure(0,0,!0);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(ve+he+he)*te,(Ee-se)*ee,.8*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*te,(Ee+he)*ee,(ve+he+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee).close()),de.spot1=new go.Spot(.2,.25),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("XnorGate",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=.2,Ee=.5,Be=new go.PathFigure(.1*te,0,!1);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Le=new go.PathFigure(.8*te,.5*ee,!0);de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.7*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(ve+he)*te,(Ee-se)*ee,.7*te,(Ee-he)*ee)),se=.1,he=Me*.1,ve=.9,Ee=.5;var ze=new go.PathFigure((ve-se)*te,Ee*ee,!0);return de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),de.spot1=new go.Spot(.4,.25),de.spot2=new go.Spot(.65,.75),de}),go.Shape.defineFigureGenerator("XorGate",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=.2,Ee=.5,Be=new go.PathFigure(.1*te,0,!1);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Le=new go.PathFigure(.2*te,0,!0);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(ve+he)*te,(Ee-se)*ee,.9*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.9*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee).close()),de.spot1=new go.Spot(.4,.25),de.spot2=new go.Spot(.8,.75),de}),go.Shape.defineFigureGenerator("Capacitor",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("Resistor",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),de}),go.Shape.defineFigureGenerator("Inductor",function(Ie,te,ee){var de=new go.Geometry,se=Me*.1,he=.1,ve=.1,Ee=.5,Be=new go.PathFigure((ve-se*.5)*te,ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.3,Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.5,Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.7,Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.9,Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se*.5)*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),de}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=.5,Ee=.5,Be=new go.PathFigure((ve-he)*te,Ee*ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Move,(ve-he+.1)*te,Ee*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he-.1)*te,Ee*ee,ve*te,(Ee-he)*ee,ve*te,(Ee+he)*ee)),de}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("Diode",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("Wifi",function(Ie,te,ee){var de=new go.Geometry,se=te,he=ee;te=te*.38,ee=ee*.6;var ve=Me*.8,Ee=.8,Be=0,Le=.5,ze=(se-te)/2,je=(he-ee)/2,Xe=new go.PathFigure(Be*te+ze,(Le+Ee)*ee+je,!0);de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee)*te+ze,Le*ee+je,(Be-ve)*te+ze,(Le+Ee)*ee+je,(Be-Ee)*te+ze,(Le+ve)*ee+je)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le-Ee)*ee+je,(Be-Ee)*te+ze,(Le-ve)*ee+je,(Be-ve)*te+ze,(Le-Ee)*ee+je)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee+ve*.5)*te+ze,Le*ee+je,Be*te+ze,(Le-Ee)*ee+je,(Be-Ee+ve*.5)*te+ze,(Le-ve)*ee+je)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le+Ee)*ee+je,(Be-Ee+ve*.5)*te+ze,(Le+ve)*ee+je,Be*te+ze,(Le+Ee)*ee+je).close()),ve=Me*.4,Ee=.4,Be=.2,Le=.5;var Ye=new go.PathFigure(Be*te+ze,(Le+Ee)*ee+je,!0);de.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee)*te+ze,Le*ee+je,(Be-ve)*te+ze,(Le+Ee)*ee+je,(Be-Ee)*te+ze,(Le+ve)*ee+je)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le-Ee)*ee+je,(Be-Ee)*te+ze,(Le-ve)*ee+je,(Be-ve)*te+ze,(Le-Ee)*ee+je)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee+ve*.5)*te+ze,Le*ee+je,Be*te+ze,(Le-Ee)*ee+je,(Be-Ee+ve*.5)*te+ze,(Le-ve)*ee+je)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le+Ee)*ee+je,(Be-Ee+ve*.5)*te+ze,(Le+ve)*ee+je,Be*te+ze,(Le+Ee)*ee+je).close()),ve=Me*.2,Ee=.2,Be=.5,Le=.5;var dt=new go.PathFigure((Be-Ee)*te+ze,Le*ee+je,!0);de.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le-Ee)*ee+je,(Be-Ee)*te+ze,(Le-ve)*ee+je,(Be-ve)*te+ze,(Le-Ee)*ee+je)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee)*te+ze,Le*ee+je,(Be+ve)*te+ze,(Le-Ee)*ee+je,(Be+Ee)*te+ze,(Le-ve)*ee+je)),dt.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le+Ee)*ee+je,(Be+Ee)*te+ze,(Le+ve)*ee+je,(Be+ve)*te+ze,(Le+Ee)*ee+je)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee)*te+ze,Le*ee+je,(Be-ve)*te+ze,(Le+Ee)*ee+je,(Be-Ee)*te+ze,(Le+ve)*ee+je)),ve=Me*.4,Ee=.4,Be=.8,Le=.5;var He=new go.PathFigure(Be*te+ze,(Le-Ee)*ee+je,!0);de.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee)*te+ze,Le*ee+je,(Be+ve)*te+ze,(Le-Ee)*ee+je,(Be+Ee)*te+ze,(Le-ve)*ee+je)),He.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le+Ee)*ee+je,(Be+Ee)*te+ze,(Le+ve)*ee+je,(Be+ve)*te+ze,(Le+Ee)*ee+je)),He.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee-ve*.5)*te+ze,Le*ee+je,Be*te+ze,(Le+Ee)*ee+je,(Be+Ee-ve*.5)*te+ze,(Le+ve)*ee+je)),He.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le-Ee)*ee+je,(Be+Ee-ve*.5)*te+ze,(Le-ve)*ee+je,Be*te+ze,(Le-Ee)*ee+je).close()),ve=Me*.8,Ee=.8,Be=1,Le=.5;var Nt=new go.PathFigure(Be*te+ze,(Le-Ee)*ee+je,!0);return de.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee)*te+ze,Le*ee+je,(Be+ve)*te+ze,(Le-Ee)*ee+je,(Be+Ee)*te+ze,(Le-ve)*ee+je)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le+Ee)*ee+je,(Be+Ee)*te+ze,(Le+ve)*ee+je,(Be+ve)*te+ze,(Le+Ee)*ee+je)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee-ve*.5)*te+ze,Le*ee+je,Be*te+ze,(Le+Ee)*ee+je,(Be+Ee-ve*.5)*te+ze,(Le+ve)*ee+je)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le-Ee)*ee+je,(Be+Ee-ve*.5)*te+ze,(Le-ve)*ee+je,Be*te+ze,(Le-Ee)*ee+je).close()),de}),go.Shape.defineFigureGenerator("Email",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Move,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.55*te,.54*ee)),de}),go.Shape.defineFigureGenerator("Ethernet",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.35*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,0).close());var he=new go.PathFigure(.1*te,ee,!0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var ve=new go.PathFigure(.6*te,ee,!0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee).close());var Ee=new go.PathFigure(0,.5*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.75*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.75*te,.6*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.25*te,.6*ee)),de}),go.Shape.defineFigureGenerator("Power",function(Ie,te,ee){var de=new go.Geometry,se=Me*.4,he=.4,ve=.5,Ee=.5,Be=le(),Le=le(),ze=le(),je=le();ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.5,Be,Be,Le,ze,je);var Xe=pe(Le.x,Le.y),Ye=new go.PathFigure(Le.x*te,Le.y*ee,!0);de.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,ze.x*te,ze.y*ee,je.x*te,je.y*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),ut(ve-he,Ee,ve-he,Ee-se,ve-se,Ee-he,ve,Ee-he,.5,ze,je,Le,Be,Be),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Le.x*te,Le.y*ee,ze.x*te,ze.y*ee,je.x*te,je.y*ee)),se=Me*.3,he=.3,ut(ve-he,Ee,ve-he,Ee-se,ve-se,Ee-he,ve,Ee-he,.5,ze,je,Le,Be,Be),Ye.add(new go.PathSegment(go.PathSegment.Line,Le.x*te,Le.y*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,je.x*te,je.y*ee,ze.x*te,ze.y*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.5,Be,Be,Le,ze,je),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Le.x*te,Le.y*ee,je.x*te,je.y*ee,ze.x*te,ze.y*ee).close());var Ye=new go.PathFigure(.45*te,0,!0);return de.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.55*te,.5*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.55*te,0).close()),ke(Be),ke(Le),ke(ze),ke(je),ke(Xe),de.spot1=new go.Spot(.25,.45),de.spot2=new go.Spot(.75,.8),de}),go.Shape.defineFigureGenerator("Fallout",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee/2,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,te/2,ee/2,te/2,ee/2));function he(ve,Ee,Be){ve.add(new go.PathSegment(go.PathSegment.Move,(.3+Ee)*te,(.8+Be)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.5+Ee)*te,(.5+Be)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.1+Ee)*te,(.5+Be)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.3+Ee)*te,(.8+Be)*ee).close())}return he(se,0,0),he(se,.4,0),he(se,.2,-.3),de}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.2*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),de.spot1=new go.Spot(.3,.3),de.spot2=new go.Spot(.7,.7),de}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.37*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.11*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.04*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.49*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.37*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.63*te,.86*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.91*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,.78*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.44*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.56*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),de}),go.Shape.defineFigureGenerator("FireHazard",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.29*te,0,-.25*te,.63*ee,.45*te,.44*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.51*te,.42*ee,.48*te,.17*ee,.54*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.59*te,.18*ee,.59*te,.29*ee,.58*te,.28*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,.6*ee,.8*te,.34*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.88*te,.31*ee,.87*te,.48*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,1.17*te,.76*ee,.82*te,.8*ee).close()),de.spot1=new go.Spot(.07,.445),de.spot2=new go.Spot(.884,.958),de}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=0,ve=0,Ee=se*Me,Be=.4*Math.SQRT2/2+.5,Le=.5-.5*Math.SQRT2/2,ze=1,je=.5,Xe=.5,Ye=0,dt=new go.PathFigure(Be*te,(1-Le)*ee,!1);return de.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,ze*te,je*ee,ze*te,.7*ee,ze*te,je*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+he)*te,(Ye+he)*ee,(.5+se+he)*te,(.5-Ee+he)*ee,(.5+Ee+he)*te,(.5-se+he)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*te,(.5+ve)*ee,(.5-Ee+he)*te,(.5-se+ve)*ee,(.5-se+he)*te,(.5-Ee+ve)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+he)*te,.9*ee,(.5-se+he)*te,(.5+Ee+ve)*ee,(.5-Ee+he)*te,.9*ee)),dt.add(new go.PathSegment(go.PathSegment.Move,(.25+he)*te,.8*ee)),dt.add(new go.PathSegment(go.PathSegment.Line,(.35+he)*te,.9*ee)),dt.add(new go.PathSegment(go.PathSegment.Line,(.2+he)*te,.95*ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(te,ee,!1);de.add(he);var ve=new go.PathFigure(0,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.2*te,.35*ee,.3*te,.35*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.7*te,.65*ee,.8*te,.65*ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close()),de}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var se=new go.PathFigure(0,.2*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),de}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.7*te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,0,.6*te,.5*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,ee,.4*te,.5*ee,te,.5*ee).close());var he=new go.PathFigure(.45*te,.73*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,.73*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.38*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.63*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.31*te,.27*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.56*te,.27*ee)),de}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(.335*te,(1-.555)*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.68*ee,(1-.12)*te,.46*ee,(1-.02)*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,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*te,(1-.555)*ee,.02*te,.54*ee,.12*te,.46*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.365*te,(1-.595)*ee));var ve=.5-.285,Ee=.5,Be=ve,Le=Math.PI/4,ze=4*(1-Math.cos(Le))/(3*Math.sin(Le)),je=ze*.5,Xe=ve,Ye=ve,dt=ze*Xe,He=ze*Ye;he.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-Xe)*te,Be*ee,(Ee-(dt+Xe)/2)*te,(Be+(Ye+He)/2)*ee,(Ee-Xe)*te,(Be+He)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,(Be-Ye)*ee,(Ee-Xe)*te,(Be-He)*ee,(Ee-dt)*te,(Be-Ye)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+Xe)*te,Be*ee,(Ee+dt)*te,(Be-Ye)*ee,(Ee+Xe)*te,(Be-He)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*te,(1-.595)*ee,(Ee+Xe)*te,(Be+He)*ee,(Ee+(dt+Xe)/2)*te,(Be+(Ye+He)/2)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*te,(1-.595)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee));var Nt=new go.PathFigure(.2*te,ee,!1);de.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,.2*te,.8*ee));var ot=new go.PathFigure(.8*te,ee,!1);return de.add(ot),ot.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var he=new go.PathFigure(.2*te,.2*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(te,ee,!1);de.add(he);var ve=new go.PathFigure(.1*te,ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("Caution",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.05*te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.8*ee,0,ee,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.1*ee,.5*te,0,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.95*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,te,ee,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,ee));var he=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-he)*te,.875*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*te,.875*ee,he*te,he*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.325*ee,.575*te,.725*ee,.625*te,.375*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.75*ee,.375*te,.375*ee,.425*te,.725*ee)),de}),go.Shape.defineFigureGenerator("Recycle",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.45*te,.95*ee,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.185*te,.85*ee,.17*te,.95*ee,.15*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.235*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.625*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.275*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.1875*te,.95*ee,0,.675*ee,0,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.775*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.22*te,.775*ee));var he=new go.PathFigure(.475*te,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.225*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.275*te,.175*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.325*te,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.05*ee,.35*te,0,.375*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.575*te,.375*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.525*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,.475*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.85*te,.315*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.32*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.65*te,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,0,.65*te,.05*ee,.625*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.38*te,.0105*ee));var ve=new go.PathFigure(.675*te,.575*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.875*te,.525*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.85*te,.95*ee,te,.8*ee,te,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.95*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.725*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.7*te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,.675*te,.575*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.775*te,.775*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*.5,ve=new go.PathFigure(te,se*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*te,ee,te,(se+he)*ee,(se+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-he)*te,ee,0,(se+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*te,0,0,(se-he)*ee,(se-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,se*ee,(se+he)*te,0,te,(se-he)*ee));var Ee=new go.PathFigure(se*te,0,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,se*te,.15*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,se*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,se*te,.85*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.15*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.85*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.58*te,.1*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.78*te,.54*ee)),de}),go.Shape.defineFigureGenerator("Package",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.15*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(0,.15*ee,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.65*te,.15*ee).close()),de.spot1=new go.Spot(0,.1),de.spot2=new go.Spot(1,1),de}),go.Shape.defineFigureGenerator("Class",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var ve=new go.PathFigure(0,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("Component",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close());var he=new go.PathFigure(0,.2*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.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 de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.45*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.45*te,.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()),de}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.15*te,.6*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee));var he=new go.PathFigure(.15*te,.6*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),de}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),de}),go.Shape.defineFigureGenerator("Workcell",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("Supermarket",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de}),go.Shape.defineFigureGenerator("TruckShipment",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(te,.8*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee).close());var ve=.1,Ee=Me*.1,Be=.2,Le=.9,ze=new go.PathFigure((Be-ve)*te,Le*ee,!0);de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-ve)*ee,(Be-ve)*te,(Le-Ee)*ee,(Be-Ee)*te,(Le-ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Be+ve)*te,Le*ee,(Be+Ee)*te,(Le-ve)*ee,(Be+ve)*te,(Le-Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le+ve)*ee,(Be+ve)*te,(Le+Ee)*ee,(Be+Ee)*te,(Le+ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Be-ve)*te,Le*ee,(Be-Ee)*te,(Le+ve)*ee,(Be-ve)*te,(Le+Ee)*ee).close()),ve=.1,Ee=Me*.1,Be=.8,Le=.9;var je=new go.PathFigure((Be-ve)*te,Le*ee,!0);return de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-ve)*ee,(Be-ve)*te,(Le-Ee)*ee,(Be-Ee)*te,(Le-ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Be+ve)*te,Le*ee,(Be+Ee)*te,(Le-ve)*ee,(Be+ve)*te,(Le-Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le+ve)*ee,(Be+ve)*te,(Le+Ee)*ee,(Be+Ee)*te,(Le+ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Be-ve)*te,Le*ee,(Be-Ee)*te,(Le+ve)*ee,(Be-ve)*te,(Le+Ee)*ee).close()),de}),go.Shape.defineFigureGenerator("KanbanPost",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.2*te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),de}),go.Shape.defineFigureGenerator("Forklift",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0));var he=new go.PathFigure(0,.5*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ve=new go.PathFigure(.5*te,.8*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee));var Ee=new go.PathFigure(.5*te,.7*ee,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee));var Be=.1,Le=Me*.1,ze=.1,je=.9,Xe=new go.PathFigure((ze-Be)*te,je*ee,!0);de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ze*te,(je-Be)*ee,(ze-Be)*te,(je-Le)*ee,(ze-Le)*te,(je-Be)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Be)*te,je*ee,(ze+Le)*te,(je-Be)*ee,(ze+Be)*te,(je-Le)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ze*te,(je+Be)*ee,(ze+Be)*te,(je+Le)*ee,(ze+Le)*te,(je+Be)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Be)*te,je*ee,(ze-Le)*te,(je+Be)*ee,(ze-Be)*te,(je+Le)*ee)),Be=.1,Le=Me*.1,ze=.4,je=.9;var Ye=new go.PathFigure((ze-Be)*te,je*ee,!0);return de.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,ze*te,(je-Be)*ee,(ze-Be)*te,(je-Le)*ee,(ze-Le)*te,(je-Be)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Be)*te,je*ee,(ze+Le)*te,(je-Be)*ee,(ze+Be)*te,(je-Le)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,ze*te,(je+Be)*ee,(ze+Be)*te,(je+Le)*ee,(ze+Le)*te,(je+Be)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Be)*te,je*ee,(ze-Le)*te,(je+Be)*ee,(ze-Be)*te,(je+Le)*ee)),de}),go.Shape.defineFigureGenerator("RailShipment",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,.4*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.4*ee).close());var he=new go.PathFigure(.45*te,.7*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee));var ve=new go.PathFigure(.55*te,.4*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.4*ee).close());var ze=.05,je=Me*.05,Xe=.175,Ye=.95,Ee=new go.PathFigure((Xe-ze)*te,Ye*ee,!0);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye-ze)*ee,(Xe-ze)*te,(Ye-je)*ee,(Xe-je)*te,(Ye-ze)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+ze)*te,Ye*ee,(Xe+je)*te,(Ye-ze)*ee,(Xe+ze)*te,(Ye-je)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye+ze)*ee,(Xe+ze)*te,(Ye+je)*ee,(Xe+je)*te,(Ye+ze)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-ze)*te,Ye*ee,(Xe-je)*te,(Ye+ze)*ee,(Xe-ze)*te,(Ye+je)*ee));var ze=.05,je=Me*.05,Xe=.375,Ye=.95,Be=new go.PathFigure((Xe-ze)*te,Ye*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye-ze)*ee,(Xe-ze)*te,(Ye-je)*ee,(Xe-je)*te,(Ye-ze)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+ze)*te,Ye*ee,(Xe+je)*te,(Ye-ze)*ee,(Xe+ze)*te,(Ye-je)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye+ze)*ee,(Xe+ze)*te,(Ye+je)*ee,(Xe+je)*te,(Ye+ze)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-ze)*te,Ye*ee,(Xe-je)*te,(Ye+ze)*ee,(Xe-ze)*te,(Ye+je)*ee));var ze=.05,je=Me*.05,Xe=.625,Ye=.95,Le=new go.PathFigure((Xe-ze)*te,Ye*ee,!0);de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye-ze)*ee,(Xe-ze)*te,(Ye-je)*ee,(Xe-je)*te,(Ye-ze)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+ze)*te,Ye*ee,(Xe+je)*te,(Ye-ze)*ee,(Xe+ze)*te,(Ye-je)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye+ze)*ee,(Xe+ze)*te,(Ye+je)*ee,(Xe+je)*te,(Ye+ze)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-ze)*te,Ye*ee,(Xe-je)*te,(Ye+ze)*ee,(Xe-ze)*te,(Ye+je)*ee));var ze=.05,je=Me*.05,Xe=.825,Ye=.95,dt=new go.PathFigure((Xe-ze)*te,Ye*ee,!0);de.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye-ze)*ee,(Xe-ze)*te,(Ye-je)*ee,(Xe-je)*te,(Ye-ze)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+ze)*te,Ye*ee,(Xe+je)*te,(Ye-ze)*ee,(Xe+ze)*te,(Ye-je)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye+ze)*ee,(Xe+ze)*te,(Ye+je)*ee,(Xe+je)*te,(Ye+ze)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-ze)*te,Ye*ee,(Xe-je)*te,(Ye+ze)*ee,(Xe-ze)*te,(Ye+je)*ee).close());var He=new go.PathFigure(0,ee,!1);return de.add(He),He.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),de}),go.Shape.defineFigureGenerator("Warehouse",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var ve=new go.PathFigure(.15*te,ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.15*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee).close());var Ee=.05,Be=Me*.05,Le=.35,ze=.775,je=new go.PathFigure((Le-Ee)*te,ze*ee,!0);return de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(ze-Ee)*ee,(Le-Ee)*te,(ze-Be)*ee,(Le-Be)*te,(ze-Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Le+Ee)*te,ze*ee,(Le+Be)*te,(ze-Ee)*ee,(Le+Ee)*te,(ze-Be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(ze+Ee)*ee,(Le+Ee)*te,(ze+Be)*ee,(Le+Be)*te,(ze+Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Le-Ee)*te,ze*ee,(Le-Be)*te,(ze+Ee)*ee,(Le-Ee)*te,(ze+Be)*ee).close()),de}),go.Shape.defineFigureGenerator("ControlCenter",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee).close()),de}),go.Shape.defineFigureGenerator("Bluetooth",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),de}),go.Shape.defineFigureGenerator("Bookmark",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),de}),go.Shape.defineFigureGenerator("Bookmark",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),de}),go.Shape.defineFigureGenerator("Globe",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.75*te,0,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.75*ee,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*te,ee,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,.25*ee,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,.15*te,.25*ee,.15*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.85*te,.75*ee,.85*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.15*ee,.35*te,.3*ee,.65*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.85*ee,.35*te,.7*ee,.65*te,.7*ee)),de}),go.Shape.defineFigureGenerator("Wave",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.25*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.25*ee,.1*te,0,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.25*ee,.425*te,.5*ee,.575*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.25*ee,.8*te,0,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.75*ee,.1*te,.5*ee,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.75*ee,.425*te,ee,.575*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.75*ee,.8*te,.5*ee,.9*te,.5*ee)),de}),go.Shape.defineFigureGenerator("Operator",function(Ie,te,ee){var de=new go.Geometry,se=.3,he=Me*.3,ve=.5,Ee=.7,Be=new go.PathFigure((ve-se)*te,Ee*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee));var Le=new go.PathFigure(0,.7*ee,!1);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,te,.7*ee,0,0,te,0)),de}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.65*te,.3*ee,.65*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.35*te,.5*ee,.35*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*te,.6*ee,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.2*te,ee,.35*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,.7*te,.6*ee,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.8*te,ee,.65*te,.95*ee)),de}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,0,ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.4*ee,.8*te,ee,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),de}),go.Shape.defineFigureGenerator("Battery",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.1*ee));var he=new go.PathFigure(0,.6*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),de}),go.Shape.defineFigureGenerator("Delete",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*.5,ve=.5,Ee=.5,Be=new go.PathFigure((ve-se)*te,Ee*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee));var Le=new go.PathFigure(.15*te,.5*ee,!1);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,.85*te,.5*ee)),de}),go.Shape.defineFigureGenerator("Flag",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.1*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.1*ee,.15*te,0,.35*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,.65*te,.2*ee,.85*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.85*te,.6*ee,.65*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*te,.4*ee,.15*te,.4*ee).close()),de}),go.Shape.defineFigureGenerator("Help",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*.5,ve=.5,Ee=.5,Be=new go.PathFigure((ve-se)*te,Ee*ee,!1);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee).close()),se=.05,he=Me*.05,ve=.5,Ee=.8;var Le=new go.PathFigure((ve-se)*te,Ee*ee,!1);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee).close()),Le.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,.75*te,.475*ee,.75*te,.225*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.35*ee,.4*te,.2*ee,.3*te,.25*ee)),de}),go.Shape.defineFigureGenerator("Location",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.975*te,.025*ee,.5*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*te,.5*ee,.5*te,0,.025*te,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*te,.3*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var he=new go.PathFigure(.2*te,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.3*ee)),de}),go.Shape.defineFigureGenerator("Unlocked",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var he=new go.PathFigure(.2*te,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.35*ee)),de}),go.Shape.defineFigureGenerator("Gear",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.9375*te,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*te,.3316875*ee,.79840625*te,.39915625*ee,.7834375*te,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*te,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*te,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*te,.19378125*ee,.64228125*te,.2188125*ee,.603875*te,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*te,.239375*ee,.39759375*te,.20190625*ee,.36053125*te,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*te,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*te,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*te,.4375*ee,.21765625*te,.36059375*ee,.201875*te,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*te,.67596875*ee,.20221875*te,.603875*ee,.21884375*te,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*te,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*te,.80621875*ee,.36353125*te,.78340625*ee,.3991875*te,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*te,.760625*ee,.602375*te,.79809375*ee,.63946875*te,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*te,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*te,.56246875*ee,.78234375*te,.63940625*ee,.798125*te,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*te,.5*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.3*ee,0,.375*ee,.05*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.075*ee,.3*te,.225*ee,.4*te,.175*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.525*te,.075*ee,.46*te,.05*ee,.525*te,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.4*ee,.525*te,.275*ee,.475*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.55*ee,te,.4*ee,te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.425*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.7*ee,.675*te,.55*ee,.675*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.575*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,.85*ee,.65*te,.7*ee,.65*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.535*te,ee,.61*te,.85*ee,.61*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*te,ee,0,ee).close()),de}),go.Shape.defineFigureGenerator("Map",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),de}),go.Shape.defineFigureGenerator("Eject",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.7)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var he=new go.PathFigure(0,ee*.6,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close()),de}),go.Shape.defineFigureGenerator("Pencil",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*1,ee*1,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.85).close());var he=new go.PathFigure(.126*te,.85*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.126*te,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*te,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*te,.85*ee).close());var ve=new go.PathFigure(.402*te,.85*ee,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.402*te,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*te,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*te,.85*ee).close());var Ee=new go.PathFigure(.678*te,.85*ee,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.678*te,.45*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.874*te,.45*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.874*te,.85*ee).close());var Be=new go.PathFigure(.5*te,.1*ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*te,.3*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*te,.3*ee).close()),de}),go.Shape.defineFigureGenerator("Staircase",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),de}),go.Shape.defineFigureGenerator("5Bars",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*(1-.184)).close());var he=new go.PathFigure(te*.204,ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.204,ee*(1-.184))),he.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*(1-.184*2))),he.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*1).close());var ve=new go.PathFigure(te*.408,ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.408,ee*(1-.184*2))),ve.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*(1-.184*3))),ve.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*1).close());var Ee=new go.PathFigure(te*.612,ee,!0);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.612,ee*(1-.184*3))),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*(1-.184*4))),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*1).close());var Be=new go.PathFigure(te*.816,ee,!0);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,te*.816,ee*(1-.184*4))),Be.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-.184*5))),Be.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1).close()),de}),go.Shape.defineFigureGenerator("PC",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,0).close());var he=new go.PathFigure(te*.055,.07*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.07)),he.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.1).close());var ve=new go.PathFigure(te*.055,.13*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.13)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.16)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.16).close());var Ee=new go.PathFigure(te*.055,.18*ee,!0);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.18)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.21)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.21).close());var Be=new go.PathFigure(te*1,0,!0);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,te*.4,0)),Be.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.65)),Be.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.65).close()),de}),go.Shape.defineFigureGenerator("Plane",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.55*te,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.35*te,.525*ee,0,.4*ee,.225*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.2*ee,.975*te,0,te,.08*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee).close()),de}),go.Shape.defineFigureGenerator("Key",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*1,ee*.5,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.6*ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.17*te,.425*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*te,.5*ee,.075*te,.075*ee).close()),de}),go.Shape.defineFigureGenerator("FilmTape",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*0,te*.3,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var he=new go.PathFigure(0,0,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*0)),he.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*1,te*.3,te*.055)),he.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var ve=new go.PathFigure(te*.11,ee*.1,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.1)),ve.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.8)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.11,ee*.8).close());var Ee=new go.PathFigure(te*(.11+.24133333*1+.028*1),ee*.1,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.1)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.8)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*1),ee*.8).close());var Be=new go.PathFigure(te*(.11+.24133333*2+.028*2),ee*.1,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.1)),Be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.8)),Be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*2),ee*.8).close()),de}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ie,te,ee){var de=new go.Geometry,se=8,he=se*Me,ve=new go.PathFigure(se,0,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.86,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.14)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-he,te-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 Ee=new go.PathFigure(te*.83,0,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.3)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.3)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*0).close());var Be=new go.PathFigure(te*.83,ee*1,!1);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.5)),Be.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.5)),Be.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*1).close());var Le=new go.PathFigure(te*.78,ee*.05,!1);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.05)),Le.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.25)),Le.add(new go.PathSegment(go.PathSegment.Line,te*.78,ee*.25).close()),de}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=15),de=Math.min(de,te/3),de=Math.min(de,ee/3);var se=de*Me,he=ee*.8,ve=new go.Geometry,Ee=new go.PathFigure(de,0,!0);return ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te-de,0)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te,de,te-se,0,te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he-de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-de,he,te,he-se,te-se,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.7,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.55,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,de,he)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,he-de,se,he,0,he-se)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,de,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(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*.45,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.45).close());var he=new go.PathFigure(te*1,ee*.55,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.55).close()),de}),go.Shape.defineFigureGenerator("Windows",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*te,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*.1,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.9).close());var he=new go.PathFigure(te*.1,ee*.2,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.25)),he.add(new go.PathSegment(go.PathSegment.Line,te*.22,ee*.285)),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.37)),he.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.25).close());var ve=new go.PathFigure(te*.28,ee*.37,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.37)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.41)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.28,ee*.41).close()),de}),go.Shape.defineFigureGenerator("Beaker",function(Ie,te,ee){var de=new go.Geometry,se=15,he=se*Me,ve=new go.PathFigure(te*.62,ee*.475,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-he,te-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,te*.38,ee*.475)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.03)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.62,ee*.03).close()),he>1?(de.spot1=new go.Spot(0,0,he,he),de.spot2=new go.Spot(1,1,-he,-he)):(de.spot1=go.Spot.TopLeft,de.spot2=go.Spot.BottomRight),de}),go.Shape.defineFigureGenerator("Download",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-he)).close());var ve=new go.PathFigure(te*.4,ee*0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.66)),ve.add(new go.PathSegment(go.PathSegment.Line,te*(1-.26),ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*0).close()),de}),go.Shape.defineFigureGenerator("Bin",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.1/.3;return se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-he)).close()),de}),go.Shape.defineFigureGenerator("Upload",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-he)).close());var ve=new go.PathFigure(te*.5,ee*0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.74,ee*.25).close()),de}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close()),de}),go.Shape.defineFigureGenerator("Drink",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close());var he=new go.PathFigure(te*.235,ee*.28,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.765,ee*.28)),he.add(new go.PathSegment(go.PathSegment.Line,te*.655,ee*.97)),he.add(new go.PathSegment(go.PathSegment.Line,te*.345,ee*.97).close()),de}),go.Shape.defineFigureGenerator("4Arrows",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.5,ee*0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.25).close()),de}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var On={},pn="5.0",pe={},le=null,ke=!1,We=!1,ut=null,Ge=!1,Ue=null,Me=null,Ct=0;Ct<arguments.length;Ct++){var wt=arguments[Ct];if(wt!==null)switch(typeof wt){case"number":pn=wt.toFixed(1);break;case"string":wt.match(new RegExp("^[0-9]\\.[0-9]+$"))?pn=wt:ut=wt;break;case"object":typeof wt.is3D!="undefined"?le=wt:pe=wt;break;case"boolean":ke=wt,We=!0;break}}le===null&&(le={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&&!We&&(ke=!0)),ut!==null&&pe.id===void 0&&(pe.id=ut);var $e="",Ft="",lt=!1,vt=null,Ie=null,te=null,ee=!1,de=null,se=null,he=null,ve=null,Ee=null;pe.height!==void 0&&(pe.height=Math.round(pe.height)),pe.width!==void 0&&(pe.width=Math.round(pe.width));var Be=function(zt){return parseFloat(zt)>4?parseFloat(zt):5};On.setHTML5Codebase=function(zt,qt){Me=zt,_t(zt,qt)},On.setJavaCodebase=On.setJavaCodebaseVersion=On.isCompiledInstalled=On.setPreCompiledScriptPath=On.setPreCompiledResourcePath=function(){},On.setHTML5CodebaseVersion=function(zt,qt){var ln=parseFloat(zt);if(ln!==NaN&&ln<5){console.log("The GeoGebra HTML5 codebase version "+ln+" is deprecated. Using version latest instead.");return}Ue=zt,Ve(zt,qt)},On.getHTML5CodebaseVersion=function(){return Ie},On.getParameters=function(){return pe},On.setFontsCSSURL=function(zt){ve=zt},On.setGiacJSURL=function(zt){},On.setJNLPFile=function(zt){$e=zt},On.setJNLPBaseDir=function(zt){},On.inject=function(){function zt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var qt="auto",ln=pe.id,Gn,un=!1,_n=0;_n<arguments.length;_n++){var St=arguments[_n];typeof St=="string"?(St=St.toLowerCase(),St.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?qt=St:ln=arguments[_n]):typeof St=="boolean"?un=St:St instanceof HTMLElement&&(Gn=St)}Zn();function Zn(){if(!Ge){setTimeout(Zn,200);return}qt=Dt(qt);var ci=Gn||document.getElementById(ln);if(!ci){console.log("possibly bug on ajax loading? ");return}if(On.removeExistingApplet(ci,!1),pe.width===void 0&&ci.clientWidth&&(pe.width=ci.clientWidth),pe.height===void 0&&ci.clientHeight&&(pe.height=ci.clientHeight),!(pe.width&&pe.height)&&qt==="html5"&&(delete pe.width,delete pe.height),vt=qt,qt==="screenshot")ot(ci,pe);else{var Ze=!1;pe.hasOwnProperty("playButton")&&pe.playButton||pe.hasOwnProperty("clickToLoad")&&pe.clickToLoad?Ze=!0:pe.hasOwnProperty("playButtonAutoDecide")&&pe.playButtonAutoDecide&&(Ze=(!Le()||zt())&&ze()),Ze?(vt="screenshot",xt(ci,pe,un,qt)):Nt(ci,pe,un)}}};function Le(){try{return window.self!==window.top}catch(zt){return!0}}function ze(){return pe.hasOwnProperty("screenshotGenerator")&&pe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}On.getViews=function(){return le},On.isJavaInstalled=function(){return!1};var je=function(zt){var qt=function(_n){var St=JSON.parse(_n),Zn=function(be){return be.type=="G"||be.type=="E"},ci=St.elements?St.elements.filter(Zn)[0]:St;if(!ci||!ci.url){ln();return}pe.fileName=ci.url,Xe(ci.settings||{}),le.is3D=!0;var Ze="https://www.geogebra.org/images/";On.setPreviewImage(de||ci.previewUrl,Ze+"GeoGebra_loading.png",Ze+"applet_play.png"),zt()},ln=function(){pe.onError&&pe.onError(),vn("Error: Fetching material (id "+pe.material_id+") failed.",pe)},Gn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",un="/materials/"+pe.material_id+"?scope=basic";Ye("https://"+Gn+"/api/proxy.php?path="+encodeURIComponent(un),qt,ln)};function Xe(zt){var qt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ln){zt[ln]=!!zt[ln]}),qt.forEach(function(ln){pe[ln]===void 0&&zt[ln]!==void 0&&(pe[ln]=zt[ln])}),pe.showToolBarHelp===void 0&&(pe.showToolBarHelp=pe.showToolBar)}function Ye(zt,qt,ln){var Gn=new XMLHttpRequest;Gn.open("GET",zt),Gn.onload=function(){qt(Gn.responseText)},Gn.onerror=ln,Gn.send()}On.isHTML5Installed=function(){return!0},On.getLoadedAppletType=function(){return vt},On.setPreviewImage=function(zt,qt,ln){de=zt,se=qt,he=ln},On.removeExistingApplet=function(zt,qt){var ln;typeof zt=="string"&&(zt=document.getElementById(zt)),vt=null;var Gn=null;for(ln=0;ln<zt.childNodes.length;ln++){var un=zt.childNodes[ln],_n=un.className;_n==="applet_screenshot"?qt?(un.style.display="block",vt="screenshot"):un.style.display="none":_n!=="applet_scaler prerender"&&(zt.removeChild(un),Gn=_n&&_n.indexOf("appletParameters")!=-1?un.id:null,ln--)}var St=pe.id!==void 0?pe.id:Gn,Zn=window[St];Zn&&typeof Zn.getBase64=="function"&&(Zn.remove(),window[St]=null)},On.refreshHitPoints=function(){if(Be(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var zt=On.getAppletObject();return zt&&typeof zt.recalculateEnvironments=="function"?(zt.recalculateEnvironments(),!0):!1},On.startAnimation=function(){var zt=On.getAppletObject();return zt&&typeof zt.startAnimation=="function"?(zt.startAnimation(),!0):!1},On.stopAnimation=function(){var zt=On.getAppletObject();return zt&&typeof zt.stopAnimation=="function"?(zt.stopAnimation(),!0):!1},On.getAppletObject=function(){var zt=pe.id!==void 0?pe.id:"ggbApplet";return window[zt]},On.resize=function(){};var dt=function(zt,qt,ln){var Gn=document.createElement("param");Gn.setAttribute("name",qt),Gn.setAttribute("value",ln),zt.appendChild(Gn)},He=function(zt){return zt&&zt!=="false"},Nt=function(zt,qt,ln){Be(Ie)<=4.2&&(ln=!0);var Gn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ie||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Gn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var un=document.createElement("div");un.classList.add("appletParameters","notranslate");var _n=qt.width,St=qt.height;if(qt.disableAutoScale=qt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():qt.disableAutoScale,qt.width!==void 0)if(Be(Ie)<=4.4)He(qt.showToolBar)&&(qt.height-=7),He(qt.showAlgebraInput)&&(qt.height-=37),qt.width<605&&He(qt.showToolBar)&&(qt.width=605,_n=605);else{var Zn=100;(He(qt.showToolBar)||He(qt.showMenuBar))&&(qt.hasOwnProperty("customToolBar")&&(qt.customToolbar=qt.customToolBar),Zn=He(qt.showMenuBar)?245:155),_n<Zn&&(qt.width=Zn,_n=Zn)}un.style.border="none",un.style.display="inline-block";for(var ci in qt)qt.hasOwnProperty(ci)&&ci!=="appletOnLoad"&&un.setAttribute("data-param-"+ci,qt[ci]);ve&&un.setAttribute("data-param-fontscssurl",ve),On.resize=function(){GGBAppletUtils.responsiveResize(zt,qt)},window.addEventListener("resize",function(ft){On.resize()});var Ze=typeof qt.appletOnLoad=="function"?qt.appletOnLoad:function(){};if(!ln&&qt.width!==void 0){qt.hasOwnProperty("showSplash")||un.setAttribute("data-param-showSplash","false");var be=zt.querySelector(".applet_scaler.prerender"),Pe=be!==null;if(Pe)var Ae=be.querySelector(".ggb_preview");else{var Ae=Wt(_n,St,qt.borderColor,!1);be=document.createElement("div"),be.className="applet_scaler",be.style.position="relative",be.style.display="block",be.style.width=_n+"px",be.style.height=St+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(be,"66%"),Be(Ie)>=5?(qt.appletOnLoad=function(ft){var Gt=zt.querySelector(".ggb_preview");Gt&&Gt.parentNode.removeChild(Gt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(be),window.GGBT_wsf_view&&$(window).trigger("resize"),Ze(ft)},Pe||be.appendChild(Ae)):un.appendChild(Ae),be.appendChild(un),Pe||zt.appendChild(be),setTimeout(function(){On.resize()},1)}else{var Oe=document.createElement("div");Oe.className="applet_scaler",Oe.style.position="relative",Oe.style.display="block",Oe.appendChild(un),zt.appendChild(Oe),qt.appletOnLoad=function(ft){On.resize(),Ze(ft)}}function xe(ft,Gt){Gt&&typeof Gt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ft,Gt.appletOnLoad):renderGGBElement(ft),vn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Gt)}function ct(ft,Gt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ft,params:Gt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Sn){xe(Sn.article,Sn.params)}),html5AppletsToProcess=null)},Be(Ie)<5&&(ft.className+=" geogebraweb")):xe(ft,Gt)}if(Gn){scriptLoadStarted=!0;for(var Mt=0;Mt<un.childNodes.length;Mt++){var at=un.childNodes[Mt].tagName;at==="TABLE"&&(un.removeChild(un.childNodes[Mt]),Mt--)}if(ggbHTML5LoadedScript!==null){var qe=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');qe!=null&&qe.parentNode.removeChild(qe)}var Lt=document.createElement("script"),Bt=function(){ct(un,qt)};Lt.src=Ft+te,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=Ie,ggbHTML5LoadedScript=Lt.src,vn("GeoGebra HTML5 codebase loaded: '"+Ft+"'.",qt),!Me&&(!Ue||Ue=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Bt()):Ft.requirejs?__webpack_require__.e(4184).then(function(){var ft=[__webpack_require__(74620)];Bt.apply(null,ft)}.bind(this)).catch(__webpack_require__.oe):(Lt.onload=Bt,zt.appendChild(Lt))}else ct(un,qt);qt.height=St,qt.width=_n},ot=function(zt,qt,ln){var Gn=Wt(qt.width,qt.height,qt.borderColor,ln),un=document.createElement("div");un.style.position="relative",un.style.display="block",un.style.width=qt.width+"px",un.style.height=qt.height+"px",un.className="applet_screenshot applet_scaler"+(ln?" applet_screenshot_play":""),un.appendChild(Gn);var _n=GGBAppletUtils.getScale(qt,zt,ln);ln?(zt.appendChild(Ot()),window.GGBT_wsf_view||(zt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(un,"66%"),zt.appendChild(un),_n!==1&&!isNaN(_n)&&(GGBAppletUtils.scaleElement(un,_n),un.style.width=qt.width+"px",un.style.height=qt.height+"px",un.parentNode.style.width=qt.width*_n+"px",un.parentNode.style.height=qt.height*_n+"px"),On.resize=function(){Tt(zt,Gn,un,ln)},window.addEventListener("resize",function(St){On.resize()}),On.resize()};function Tt(zt,qt,ln,Gn){if(zt.contains(qt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(zt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(zt)}var un=GGBAppletUtils.getScale(pe,zt,Gn);ln.parentNode!==null&&(!isNaN(un)&&un!==1?(GGBAppletUtils.scaleElement(ln,un),ln.parentNode.style.width=pe.width*un+"px",ln.parentNode.style.height=pe.height*un+"px"):(GGBAppletUtils.scaleElement(ln,1),ln.parentNode.style.width=pe.width+"px",ln.parentNode.style.height=pe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(zt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}On.onExitFullscreen=function(zt,qt){qt.appendChild(zt)};var xt=function(zt,qt,ln,Gn){ot(zt,qt,!0);for(var un=function(){var Zn=[];for(St=0;St<zt.childNodes.length;St++)Zn.push(zt.childNodes[St]);if(window.GGBT_wsf_view){var ci=window.GGBT_wsf_view.renderFullScreen(zt,qt.id),Ze=document.getElementById("fullscreencontainer"),be=jQuery(zt).find(".fullscreencontent");be.length>0?(ci.remove(),be.attr("id","fullscreencontent").show(),jQuery(Ze).append(be),window.dispatchEvent(new Event("resize"))):Nt(ci,qt,!1),window.GGBT_wsf_view.launchFullScreen(Ze)}else vt=Gn,Nt(zt,qt,!1);if(!window.GGBT_wsf_view)for(St=0;St<Zn.length;St++)zt.removeChild(Zn[St])},_n=zt.getElementsByClassName("ggb_preview_play"),St=0;St<_n.length;St++)_n[St].addEventListener("click",un,!1),_n[St].addEventListener("ontouchstart",un,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(zt),ze()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ot=function(){var zt=document.createElement("div");if(zt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var qt='.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");}',ln=document.createElement("style");ln.styleSheet?ln.styleSheet.cssText=qt:ln.appendChild(document.createTextNode(qt)),document.getElementsByTagName("head")[0].appendChild(ln)}return zt},Wt=function(zt,qt,ln,Gn){var un=document.createElement("div");un.className="ggb_preview",un.style.position="absolute",un.style.zIndex="90",un.style.width=zt-2+"px",un.style.height=qt-2+"px",un.style.top="0px",un.style.left="0px",un.style.overflow="hidden",un.style.backgroundColor="white";var _n="lightgrey";ln!==void 0&&(ln==="none"?_n="transparent":_n=ln),un.style.border="1px solid "+_n;var St=document.createElement("img");if(St.style.position="relative",St.style.zIndex="1000",St.style.top="-1px",St.style.left="-1px",de!==null&&St.setAttribute("src",de),St.style.opacity=.7,se!==null){var Zn,ci,Ze;if(!Gn){Zn=document.createElement("img"),Zn.style.position="absolute",Zn.style.zIndex="1001",Zn.style.opacity=1,St.style.opacity=.3,ci=360,ci>zt/4*3&&(ci=zt/4*3),Ze=ci/5.8,Zn.setAttribute("src",se),Zn.setAttribute("width",ci),Zn.setAttribute("height",Ze);var be=(zt-ci)/2,Pe=(qt-Ze)/2;Zn.style.left=be+"px",Zn.style.top=Pe+"px",un.appendChild(Zn)}}return un.appendChild(St),un},Dt=function(zt){return zt=zt.toLowerCase(),zt==="html5"||zt==="screenshot"?zt:"html5"},tt=["web","webSimple","web3d","tablet","tablet3d","phone"],Ve=function(zt,qt){if(Ie=zt,qt){_t(Ie,!0);return}var ln=!ke;if(ln){var Gn=Be(Ie);!isNaN(Gn)&&Gn<4.4&&(ln=!1)}var un,_n;window.location.protocol.substr(0,4)==="http"?un=window.location.protocol:un="http:";var St=Ie.indexOf("//");St>0?_n=Ie:St===0?_n=un+Ie:_n="https://www.geogebra.org/apps/5.2.814.0/";for(var Zn in tt)if(Ie.slice(tt[Zn].length*-1)===tt[Zn]||Ie.slice((tt[Zn].length+1)*-1)===tt[Zn]+"/"){_t(_n,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ln&&!le.is3D&&!le.AV&&!le.SV&&!le.CV&&!le.EV2&&!le.CP&&!le.PC&&!le.DA&&!le.FI&&!le.PV&&!He(pe.showToolBar)&&!He(pe.showMenuBar)&&!He(pe.showAlgebraInput)&&!He(pe.enableRightClick)&&(!pe.appName||pe.appName=="classic")?_n+="webSimple/":_n+="web3d/",_t(_n,!1)},_t=function(zt,qt){if(zt.requirejs){Ft=zt;return}zt.slice(-1)!=="/"&&(zt+="/"),Ft=zt,qt===null&&(qt=zt.indexOf("http")===-1),lt=qt,te="web.nocache.js",ee=!1;var ln=Ft.split("/");ln.length>1&&(!qt&&ln[ln.length-2]==="webSimple"?(te="webSimple.nocache.js",ee=!0):tt.indexOf(ln[ln.length-2])>=0&&(te=ln[ln.length-2]+".nocache.js")),ln=zt.split("/"),Ie=ln[ln.length-3],Ie.substr(0,4)==="test"?Ie=Ie.substr(4,1)+"."+Ie.substr(5,1):(Ie.substr(0,3)==="war"||Ie.substr(0,4)==="beta")&&(Ie="5.0");var Gn=parseFloat(Ie);Gn!==NaN&&Gn<5&&zt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Gn+" is deprecated. Using version latest instead."),Ve("5.0",qt))},vn=function(zt,qt){window.console&&window.console.log&&(!qt||typeof qt.showLogging=="undefined"||qt.showLogging&&qt.showLogging!=="false")&&console.log(zt)};pe.material_id!==void 0?je(yn):yn();function yn(){var zt=pn;Ue!==null?zt=Ue:parseFloat(zt)<5&&(zt="5.0"),Ve(zt,!1),Me!==null&&_t(Me,lt),Ge=!0}return On},GGBAppletUtils=function(){"use strict";function On(){return window.GGBT_wsf_edit!==void 0}function pn(Ge,Ue){Ue!=1?(Ge.style.transformOrigin="0% 0% 0px",Ge.style.webkitTransformOrigin="0% 0% 0px",Ge.style.transform="scale("+Ue+","+Ue+")",Ge.style.webkitTransform="scale("+Ue+","+Ue+")",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,Ue,Me,Ct,wt,$e){var Ft=null;if($e!=null&&$e!="")for(var lt=Ge.parentNode;lt!=null;)if((" "+lt.className+" ").indexOf(" "+$e+" ")>-1){Ft=lt;break}else lt=lt.parentNode;var vt=0,Ie=0,te=0,ee=0,de=0,se=0,he=0;if(Ft)vt=Ft.offsetWidth,Ie=Math.max(Ct?Ft.offsetWidth:0,Ft.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(vt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ie=Math.min(window.innerHeight,document.documentElement.clientHeight),te=vt):(vt=window.innerWidth,Ie=window.innerHeight,te=window.innerWidth),Ge){var ve=Ge.getBoundingClientRect();ve.left>0&&ve.left<=vt&&(wt===void 0||!wt)&&(document.dir==="rtl"?(de=vt-ve.width-ve.left,se=te<=480?10:30):(se=ve.left,de=te<=480?10:30),ee=se+de)}if(Ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Ee=Ge.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,he=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,he=40)}}return Ge&&((Me===void 0||!Me)&&Ue>0&&Ue+ee<vt?vt=Ue:vt-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Me===void 0||!Me)&&(Ie-=he)),{width:vt,height:Ie}}function le(Ge,Ue,Me,Ct,wt){if(Ge.isScreenshoGenerator)return 1;var $e=Ct!==void 0&&Ct,Ft=Ge.noScaleMargin!=null&&Ge.noScaleMargin,lt=function(Ee){return Ee&&Ee!=="false"},vt=lt(Ge.autoHeight),Ie=pe(Ue,Ge.width,Me,vt,$e&&window.GGBT_wsf_view||Ft,wt),te=parseInt(Ie.width),ee=Ge.width,de=Ge.height;if(ee===void 0){var se=Ue.querySelector(".appletParameters");se&&(ee=se.offsetWidth,de=se.offsetHeight)}var he=te/ee,ve=$e?1:Ie.height/de;return Me!==void 0&&!Me&&(he=Math.min(1,he),ve=Math.min(1,ve)),Math.min(he,ve)}function ke(Ge,Ue,Me){var Ct=1,wt,$e=!1;if(Ge.hasOwnProperty("allowUpscale")&&($e=Ge.allowUpscale),Ge.hasOwnProperty("scale")&&(Ct=parseFloat(Ge.scale),(isNaN(Ct)||Ct===null||Ct===0)&&(Ct=1),Ct>1&&($e=!0)),Ue&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&($e=!0),!(Ge.hasOwnProperty("disableAutoScale")&&Ge.disableAutoScale))wt=le(Ge,Ue,$e,Me,Ge.scaleContainerClass);else return Ct;return $e&&(!Ge.hasOwnProperty("scale")||Ct===1)?wt:Math.min(Ct,wt)}function We(Ge){var Ue=Math.min(window.innerWidth,document.documentElement.clientWidth),Me=Math.min(window.innerHeight,document.documentElement.clientHeight),Ct=Ge.getBoundingClientRect(),wt=(Ue-Ct.width)/2,$e=(Me-Ct.height)/2;$e<0&&($e=0),Ge.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(wt<40?Ge.style.left="40px":Ge.style.left=wt+"px",Ge.style.top=$e+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&($e<40?Ge.style.top="40px":Ge.style.top=$e+"px",Ge.style.left=wt+"px")}function ut(Ge,Ue){var Me=Ge.querySelector(".appletParameters");if(Me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ue.id!==Me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ge)}if(Me.parentElement&&/fullscreen/.test(Me.parentElement.className))return;var Ct=ke(Ue,Ge);On()&&Me.setAttribute("data-param-scale",Ct);for(var wt=null,$e=0;$e<Ge.childNodes.length;$e++)if(Ge.childNodes[$e].className!==void 0&&Ge.childNodes[$e].className.match(/^applet_scaler/)){wt=Ge.childNodes[$e];break}if(wt!==null&&wt.querySelector(".noscale")!==null)return;var Ft=Ue.id!==void 0?Ue.id:"ggbApplet",lt=window[Ft];(lt==null||!lt.recalculateEnvironments)&&wt!==null&&!wt.className.match(/fullscreen/)&&(wt.parentNode.style.transform="",!isNaN(Ct)&&Ct!==1?(wt.parentNode.style.width=Ue.width*Ct+"px",wt.parentNode.style.height=Ue.height*Ct+"px",pn(wt,Ct)):(pn(wt,1),wt.parentNode.style.width=Ue.width+"px",wt.parentNode.style.height=Ue.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&We(Ge),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Me).parents(".content-added-content"))}}return{responsiveResize:ut,isFlexibleWorksheetEditor:On,positionCenter:We,getScale:ke,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 On=n.location.search;return On.indexOf(J)!=-1||On.indexOf(K)!=-1}function q(On,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(On){var pn=s[L].bindings;s[L].bindings=function(){for(var pe=pn?pn():{},le=On[webModule.__softPermutationId],ke=O;ke<le.length;ke++){var We=le[ke];pe[We[O]]=We[P]}return pe}};var t;function u(){return v(),t}function v(){if(!t){var On=o.createElement(Q);if(On.id=L,On.style.cssText=R+S,On.tabIndex=-1,o.body.appendChild(On),t=On.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var pn=document.compatMode==U?V:W;t.write(pn+X),t.close()}}}function w(On){function pn(le){function ke(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var We=ke();if(We){le();return}function ut(){if(!We){if(!ke())return;We=!0,le(),o.removeEventListener&&o.removeEventListener(Z,ut,!1),Ge&&clearInterval(Ge)}}o.addEventListener&&o.addEventListener(Z,ut,!1);var Ge=setInterval(function(){ut()},$)}function pe(le){var ke=u(),We=ke.body,ut=ke.createElement(_);ut.language=ab,ut.crossOrigin=W,ut.src=le,webModule.__errFn&&(ut.onerror=function(){webModule.__errFn(L,new Error(bb+le))}),We.appendChild(ut)}pn(function(){pe(On)})}webModule.__startLoadingFragment=function(On){return C(On)},webModule.__installRunAsyncCode=function(On){var pn=u(),pe=pn.body,le=pn.createElement(_);le.language=ab,le.text=On,pe.appendChild(le),pe.removeChild(le)};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(On){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(On){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(On){var pn=c[On];return pn==null?null:pn},r=d,webModule.__errFn=e}function B(){function On(Ge){var Ue=Ge.lastIndexOf(rb);Ue==-1&&(Ue=Ge.length);var Me=Ge.indexOf(sb);Me==-1&&(Me=Ge.length);var Ct=Ge.lastIndexOf(tb,Math.min(Me,Ue));return Ct>=O?Ge.substring(O,Ct+P):W}function pn(Ge){if(!Ge.match(/^\w+:\/\//)){var Ue=o.createElement(ub);Ue.src=Ge+vb,Ge=On(Ue.src)}return Ge}function pe(){var Ge=__gwt_getMetaProperty(wb);return Ge!=null?Ge:W}function le(){for(var Ge=o.getElementsByTagName(_),Ue=O;Ue<Ge.length;++Ue)if(Ge[Ue].src.indexOf(xb)!=-1)return On(Ge[Ue].src);return W}function ke(){var Ge=o.getElementsByTagName(yb);return Ge.length>O?Ge[Ge.length-P].href:W}function We(){var Ge=o.location;return Ge.href==Ge.protocol+zb+Ge.host+Ge.pathname+Ge.search+Ge.hash}var ut=pe();return ut==W&&(ut=le()),ut==W&&(ut=ke()),ut==W&&We()&&(ut=On(o.location.href)),ut=pn(ut),ut}function C(On){return On.match(/^\//)||On.match(/^[a-zA-Z]+:\/\//)?On:webModule.__moduleBase+On}function D(){var On=[],pn=O,pe=[],le=[];function ke(Ge){var Ue=le[Ge](),Me=pe[Ge];if(Ue in Me)return Ue;var Ct=[];for(var wt in Me)Ct[Me[wt]]=wt;throw r&&r(Ge,Ct,Ue),null}if(__gwt_isKnownPropertyValue=function(Ge,Ue){return Ue in pe[Ge]},webModule.__getPropMap=function(){var Ge={};for(var Ue in pe)pe.hasOwnProperty(Ue)&&(Ge[Ue]=ke(Ue));return Ge},webModule.__computePropValue=ke,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var We;try{We=Cb;var ut=We.indexOf(Db);ut!=-1&&(pn=parseInt(We.substring(ut+P),$),We=We.substring(O,ut))}catch(Ge){}return webModule.__softPermutationId=pn,C(We+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77903:function(On,pn,pe){"use strict";pe.d(pn,{Ax:function(){return ut},Ds:function(){return Ge},KI:function(){return Me},SI:function(){return We},f1:function(){return ke}});var le=pe(3294);function ke(Ct){let wt=!0;if(Ct.length>0){for(let $e=0;$e<Ct.length;$e++)if(Ct[$e].compile_success==0||!Ct[$e].compile_success){wt=!1;break}}else wt=!1;return wt}function We(Ct,wt=""){let $e=[];for(let Ft=0;Ft<Ct.length;Ft++){let lt=Ct[Ft],vt=wt?`${wt}/${lt.name}`:`${lt.name}`;$e.push({title:lt.name,type:lt.type,isLeaf:lt.type!=="tree",key:vt})}return $e}function ut(Ct,wt,$e){for(let Ft=0;Ft<Ct.length;Ft++){let lt=Ct[Ft];if(lt.key===wt){lt.children=$e;break}lt.children&&ut(lt.children,wt,$e)}return Ct}function Ge(Ct,wt,$e){let Ft;return function(){let lt=this,vt=arguments,Ie=function(){Ft=null,$e||Ct.apply(lt,vt)},te=$e&&!Ft;clearTimeout(Ft),Ft=setTimeout(Ie,wt),te&&Ct.apply(lt,vt)}}const Ue=!0,Me=le.Z.API_SERVER},6021:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ie}});var le=pe(3113),ke=pe(59301),We=Object.defineProperty,ut=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,wt=(te,ee,de)=>ee in te?We(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:de}):te[ee]=de,$e=(te,ee)=>{for(var de in ee||(ee={}))Me.call(ee,de)&&wt(te,de,ee[de]);if(Ue)for(var de of Ue(ee))Ct.call(ee,de)&&wt(te,de,ee[de]);return te},Ft=(te,ee)=>ut(te,Ge(ee)),lt=(te,ee)=>{var de={};for(var se in te)Me.call(te,se)&&ee.indexOf(se)<0&&(de[se]=te[se]);if(te!=null&&Ue)for(var se of Ue(te))ee.indexOf(se)<0&&Ct.call(te,se)&&(de[se]=te[se]);return de},vt=(te,ee,de)=>new Promise((se,he)=>{var ve=Le=>{try{Be(de.next(Le))}catch(ze){he(ze)}},Ee=Le=>{try{Be(de.throw(Le))}catch(ze){he(ze)}},Be=Le=>Le.done?se(Le.value):Promise.resolve(Le.value).then(ve,Ee);Be((de=de.apply(te,ee)).next())});const Ie=te=>{var ee=te,{children:de}=ee,se=lt(ee,["children"]);const[he,ve]=(0,ke.useState)(!1);return ke.createElement(le.ZP,Ft($e({},se),{loading:he,onClick:Ee=>vt(void 0,null,function*(){try{ve(!0),yield se.onClick(Ee),ve(!1)}catch(Be){console.error(Be),ve(!1)}})}),de)}},59155:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return vt}});var le=pe(59301),ke=pe(8591),We=pe(92832),ut={codeBox:"codeBox___WpkVl"},Ge=pe(92310),Ue=pe.n(Ge),Me=Object.defineProperty,Ct=(Ie,te,ee)=>te in Ie?Me(Ie,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Ie[te]=ee,wt=(Ie,te,ee)=>Ct(Ie,typeof te!="symbol"?te+"":te,ee),$e=(Ie,te,ee)=>new Promise((de,se)=>{var he=Be=>{try{Ee(ee.next(Be))}catch(Le){se(Le)}},ve=Be=>{try{Ee(ee.throw(Be))}catch(Le){se(Le)}},Ee=Be=>Be.done?de(Be.value):Promise.resolve(Be.value).then(he,ve);Ee((ee=ee.apply(Ie,te)).next())});class Ft extends le.Component{constructor(te){super(te),wt(this,"canvas"),wt(this,"randomNum",(ee,de)=>Math.floor(Math.random()*(de-ee)+ee)),wt(this,"drawPic",()=>{this.randomCode()}),wt(this,"reloadPic",()=>{this.drawPic()}),wt(this,"changeCode",ee=>{console.log(ee.target.value,222),this.setState({value:ee.target.value,showError:!1})}),wt(this,"onVerify",()=>{let ee;return this.state.value.toLowerCase()!==""&&this.state.value.toLowerCase()!==this.state.code.toLowerCase()?(ee=!0,ke.ZP.error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u9A8C\u8BC1\u7801"),this.reloadPic()):this.state.value.toLowerCase()===""?(ee=!0,ke.ZP.error("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801")):this.state.value.toLowerCase()===this.state.code.toLowerCase()&&(ee=!1),this.setState({showError:ee}),ee}),this.canvas=le.createRef(),this.state={value:"",code:"",codeLength:4,fontSizeMin:20,fontSizeMax:22,backgroundColorMin:240,backgroundColorMax:250,colorMin:10,colorMax:20,lineColorMin:40,lineColorMax:180,contentWidth:96,contentHeight:38,showError:!1}}componentDidMount(){this.drawPic()}randomColor(te,ee){const de=this.randomNum(te,ee),se=this.randomNum(te,ee),he=this.randomNum(te,ee);return`rgb(${de}, ${se}, ${he})`}drawText(te,ee,de){te.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);const se=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);te.font=se+"px SimHei";const he=10,ve=(this.state.contentWidth-40)/(this.state.code.length-1);let Ee=he;de>0&&(Ee=he+de*ve);let Be=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);se>40&&(Be=40);const Le=this.randomNum(-10,10);te.translate(Ee,Be),te.rotate(Le*Math.PI/180),te.fillText(ee,0,0),te.rotate(-Le*Math.PI/180),te.translate(-Ee,-Be)}drawLine(te){for(let ee=0;ee<1;ee++)te.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),te.beginPath(),te.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),te.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),te.stroke()}drawDot(te){for(let ee=0;ee<100;ee++)te.fillStyle=this.randomColor(0,255),te.beginPath(),te.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),te.fill()}randomCode(){let te="";const ee="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890";for(let de=0;de<this.state.codeLength;de++){const se=Math.floor(Math.random()*57);te+=ee[se]}this.setState({code:te},()=>{const se=this.canvas.current.getContext("2d");se.textBaseline="bottom",se.fillStyle=this.randomColor(this.state.backgroundColorMin,this.state.backgroundColorMax),se.fillRect(0,0,this.state.contentWidth,this.state.contentHeight);for(let he=0;he<this.state.code.length;he++)this.drawText(se,this.state.code[he],he);this.drawLine(se),this.drawDot(se)})}render(){const{className:te,width:ee=300}=this.props;return le.createElement("div",{className:Ue()(ut.codeBox,te),style:{width:ee}},le.createElement("aside",null,le.createElement(We.default,{value:this.state.value,onChange:this.changeCode,placeholder:"\u8BF7\u8F93\u5165\u56FE\u7247\u4E2D\u7684\u9A8C\u8BC1\u7801"})),le.createElement("div",null,le.createElement("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),le.createElement("div",{className:"current",onClick:this.reloadPic},"\u770B\u4E0D\u6E05\uFF1F\u6362\u4E00\u5F20")))}}const lt=(Ie,te)=>{let ee;Modal.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:React.createElement("div",null,React.createElement("p",null,te),React.createElement(Ft,{ref:de=>ee=de})),onOk:()=>$e(void 0,null,function*(){if(ee.onVerify())return Promise.reject();Ie()})})};var vt=Ft},10672:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return wt}});var le=pe(59301),ke=pe(92832),We=pe(12563),ut=pe(8591),Ge={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},Ue=pe(62772);const{TextArea:Me}=ke.default;class Ct extends le.Component{constructor(Ft){super(Ft),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:Ft,onAnswerChange:lt,addChildAnswer:vt,exerciseIsPublish:Ie,answers:te,activeOptionErrorIndex:ee,flex:de="0 0 1000px"}=this.props;console.log("----",te);let{inputVisible:se,EditInputIndex:he}=this.state;return le.createElement("div",{className:Ge.flex},le.createElement("div",{className:`${Ge.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",Ft+1,"):"),le.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},te==null?void 0:te.map((ve,Ee)=>le.createElement(le.Fragment,null,he!==Ee?(ve==null?void 0:ve.length)>0?le.createElement(We.default,{className:"edit-tag",key:ve,closable:!((te==null?void 0:te.length)===1&&Ee===0),onClose:Be=>{Be.preventDefault(),(te==null?void 0:te.length)===1&&Ee===0?this.props.deleteChildAnswermain(Ft,Ee):this.props.deleteChildAnswer(Ft,Ee)}},le.createElement("span",{onDoubleClick:Be=>{this.setState({EditInputIndex:Ee}),Be.preventDefault()}},ve)):le.createElement(ke.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Be=>{if(Be.target.value.replaceAll(" ","").length<=0){ut.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}lt(Ft,Ee,Be.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):le.createElement(ke.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Be=>{if(Be.target.value.replaceAll(" ","").length<=0){ut.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}lt(Ft,Ee,Be.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!se&&le.createElement(We.default,{className:"site-tag-plus",onClick:()=>{vt(Ft),this.setState({inputVisible:!0})}},le.createElement(Ue.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var wt=Ct},65158:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ie}});var le=pe(59301),ke=pe(12290),We=Object.defineProperty,ut=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,wt=(te,ee,de)=>ee in te?We(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:de}):te[ee]=de,$e=(te,ee)=>{for(var de in ee||(ee={}))Me.call(ee,de)&&wt(te,de,ee[de]);if(Ue)for(var de of Ue(ee))Ct.call(ee,de)&&wt(te,de,ee[de]);return te},Ft=(te,ee)=>ut(te,Ge(ee)),lt=(te,ee,de)=>wt(te,typeof ee!="symbol"?ee+"":ee,de);const vt="\u2581";class Ie extends le.Component{constructor(){super(...arguments),lt(this,"getChCountBeforeCursor",(ee,de)=>{const se=de.line;let he=0;for(let Ee=0;Ee<se;Ee++)he+=ee.getLine(Ee).split(vt).length-1;const ve=ee.getLine(se).substring(0,de.ch);return he+=ve.split(vt).length-1,he}),lt(this,"onCMBeforeChange",(ee,de)=>{const se=ee.getRange(de.from,de.to);let he=0;if(de.text.forEach(ve=>{he+=ve.split(vt).length-1}),se&&se.indexOf(vt)!=-1){const ve=se.split(vt).length-1,Ee=this.getChCountBeforeCursor(ee,de.from);console.log(`\u5220\u9664${ve}\u4E2A\uFF0C \u4E4B\u524D\u6709${Ee}\u4E2A\uFF0C\u65B0\u589E${he}\u4E2A`),this.props.deleteEmptyDisabled?de.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(Ee,ve,he)}else if(he){const ve=this.getChCountBeforeCursor(ee,de.from);console.log(`\u65B0\u589E${he}\u4E2A\uFF0C\u4E4B\u524D\u6709${ve}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(ve,0,he)}})}render(){return le.createElement(ke.Z,Ft($e({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},23367:function(On,pn,pe){"use strict";pe.d(pn,{d4:function(){return vt},VP:function(){return wt}});var le=pe(59301),ke={digitalLabel:"digitalLabel___hkWuZ",active:"active___jawU1",titleEditor:"titleEditor___wX1lW",title:"title___SuT2h",editIcon:"editIcon___XrTIi",paperTab:"paperTab___GUxeB",tabItem:"tabItem___or0fY",dottedLine:"dottedLine___Ln0Xr"};const We=({number:Ie,active:te,className:ee})=>le.createElement("div",{className:`${ke.digitalLabel} ${te?ke.active:""} ${ee}`},Ie);var ut=pe(6848),Ge=pe(92832),Ue=pe(8591),Me=pe(59301),Ct=(Ie,te,ee)=>new Promise((de,se)=>{var he=Be=>{try{Ee(ee.next(Be))}catch(Le){se(Le)}},ve=Be=>{try{Ee(ee.throw(Be))}catch(Le){se(Le)}},Ee=Be=>Be.done?de(Be.value):Promise.resolve(Be.value).then(he,ve);Ee((ee=ee.apply(Ie,te)).next())});const wt=({defaultValue:Ie,onFinish:te})=>{const[ee,de]=(0,le.useState)(!1),[se,he]=(0,le.useState)(Ie);return(0,le.useEffect)(()=>{he(Ie)},[Ie]),Me.createElement("div",{className:ke.titleEditor},ee?Me.createElement(Ge.default,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:se,onChange:ve=>{he(ve.target.value)},onBlur:()=>Ct(void 0,null,function*(){var ve;if(((ve=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ve.length)<=0){Ue.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield te(se))&&de(!1)}),onPressEnter:()=>Ct(void 0,null,function*(){var ve;if(((ve=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ve.length)<=0){Ue.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield te(se))&&de(!1)})}):Me.createElement("div",{className:ke.title,onDoubleClick:()=>de(!0)},se,Me.createElement(ut.Z,{title:"\u7F16\u8F91\u8BD5\u5377\u540D\u79F0"},Me.createElement("i",{className:`${ke.editIcon} iconfont icon-bianji_Hover`,onClick:()=>de(!0)}))))};var $e=pe(95237),Ft=pe(43604),lt=(Ie,te,ee)=>new Promise((de,se)=>{var he=Be=>{try{Ee(ee.next(Be))}catch(Le){se(Le)}},ve=Be=>{try{Ee(ee.throw(Be))}catch(Le){se(Le)}},Ee=Be=>Be.done?de(Be.value):Promise.resolve(Be.value).then(he,ve);Ee((ee=ee.apply(Ie,te)).next())});const vt=({onChange:Ie=()=>lt(void 0,null,function*(){}),tabs:te,activeKey:ee,defaultActiveKey:de,className:se=""})=>{var he,ve,Ee,Be,Le,ze,je;const[Xe,Ye]=(0,le.useState)(de===void 0?(he=te[0])==null?void 0:he.key:de);return(0,le.useEffect)(()=>{ee!==void 0&&Ye(ee)},[ee]),le.createElement($e.Z,{justify:"center",align:"middle",className:`${ke.paperTab} ${se}`},le.createElement(Ft.Z,{className:`${ke.tabItem} ${Xe===((ve=te[0])==null?void 0:ve.key)?ke.active:""}`,onClick:()=>lt(void 0,null,function*(){var dt;yield Ie(te[0].key),Ye((dt=te[0])==null?void 0:dt.key)})},le.createElement(We,{number:1,active:Xe===((Ee=te[0])==null?void 0:Ee.key),className:"mr10"}),le.createElement("span",null,(Be=te[0])==null?void 0:Be.label)),le.createElement(Ft.Z,{flex:"188px",className:`${ke.dottedLine} ml30 mr30`}),le.createElement(Ft.Z,{className:`${ke.tabItem} ${Xe===((Le=te[1])==null?void 0:Le.key)?ke.active:""}`,onClick:()=>lt(void 0,null,function*(){var dt,He;yield Ie((dt=te[1])==null?void 0:dt.key),Ye((He=te[1])==null?void 0:He.key)})},le.createElement(We,{number:2,active:Xe===((ze=te[1])==null?void 0:ze.key),className:"mr10"}),le.createElement("span",null,(je=te[1])==null?void 0:je.label)))}},32570:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ue}});var le=pe(60324),ke={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},We=pe(32637),ut=pe(59301),Ue=({type:Me,style:Ct})=>{const wt=ut.createElement("div",{className:ke.wrap,onClick:$e=>{$e.preventDefault(),$e.stopPropagation()}},ut.createElement("p",null,Me==="shixun"||Me==="paths"?"\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u662F\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002":"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",ut.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Me==="paths"?"\u53D1\u9001\u5230\u8BFE\u5802":"\u53D1\u5E03","\u4F7F\u7528\u4E4B\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),ut.createElement("div",{className:ke.contact},ut.createElement("div",{className:ke.img},ut.createElement("img",{src:We,width:"124px",height:"124px"})),ut.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return ut.createElement(le.Z,{content:wt},ut.createElement("span",{className:ke.text,style:Ct},"\u9AD8\u6D88\u8017"))}},73524:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ft}});var le=pe(59301),ke={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},We=pe(92310),ut=pe.n(We),Ge=pe(71418),Ue=pe(2859),Me=pe(99064),Ct=pe(955),wt=(lt,vt,Ie)=>new Promise((te,ee)=>{var de=ve=>{try{he(Ie.next(ve))}catch(Ee){ee(Ee)}},se=ve=>{try{he(Ie.throw(ve))}catch(Ee){ee(Ee)}},he=ve=>ve.done?te(ve.value):Promise.resolve(ve.value).then(de,se);he((Ie=Ie.apply(lt,vt)).next())}),Ft=({data:lt,className:vt,fullWidth:Ie,style:te={},onClose:ee,onOk:de,showFullTools:se,noAssociationId:he})=>{const ve=(0,le.useRef)(null),Ee=(0,le.useRef)(null),Be=(0,le.useRef)(null),Le=(0,le.useRef)(null),[ze,je]=(0,le.useState)(!1),[Xe,Ye]=(0,le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,le.useEffect)(()=>(Be.current||(Be.current=document.createElement("style"),document.head.appendChild(Be.current)),lt!=null&&lt.visible?(document.body.setAttribute("data-custom","y-hidden"),Be.current.innerHTML=" html { overflow-y: hidden; }",lt!=null&&lt.src&&dt()):(document.body.removeAttribute("data-custom"),Be.current&&(document.head.removeChild(Be.current),Be.current=null)),()=>{document.body.removeAttribute("data-custom"),Be.current&&(document.head.removeChild(Be.current),Be.current=null)}),[lt==null?void 0:lt.visible]);const dt=()=>wt(void 0,null,function*(){je(!0),Ye("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Tt=yield(0,Ct.ZJ)(lt==null?void 0:lt.src);ve.current.src="",ve.current.src=Tt,ve.current.onload=function(){ot()},je(!1),Ye("")}),He=Tt=>wt(void 0,null,function*(){je(!0),Ye("\u6B63\u5728\u4FDD\u5B58\u4E2D");const xt=yield(0,Me.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:lt.title,file:Tt.dataUrl}});xt!=null&&xt.id&&!he?(yield(0,Me.ZP)(`/api/attachments/${lt.id}/add_subitem.json`,{method:"post",body:{subitem_id:xt==null?void 0:xt.id,settings:JSON.stringify(Tt.state)}})).status===0&&de():xt!=null&&xt.id&&de(xt),je(!1),Ye("")}),Nt=()=>{const Tt=document.querySelector('a[href="https://markerjs.com/"]');Tt&&Tt.parentNode&&(Tt.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(Ot=>{const Wt=document.querySelector(Ot.name);Wt&&Wt.setAttribute("title",Ot.title)})},ot=()=>{Ee.current=new Ue.hP(ve.current),Ee.current.targetRoot=Le.current,Ee.current.addEventListener("render",He),Ee.current.addEventListener("beforeclose",ee),se&&(Ee.current.availableMarkerTypes=Ee.current.ALL_MARKER_TYPES,Ee.current.uiStyleSettings.redoButtonVisible=!0,Ee.current.uiStyleSettings.notesButtonVisible=!0,Ee.current.uiStyleSettings.zoomButtonVisible=!0,Ee.current.uiStyleSettings.zoomOutButtonVisible=!0,Ee.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Ee.current.uiStyleSettings,Ee.current.show(),lt!=null&&lt.snapshotData&&Ee.current.restoreState(lt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Nt()},300)};return le.createElement(le.Fragment,null,(lt==null?void 0:lt.visible)&&le.createElement(Ge.Z,{spinning:ze,tip:Xe,style:{position:"absolute",width:"100vw"}},le.createElement("div",{ref:Le,className:ut()(ke.imageDimensions,vt,Ie?ke.fullWidth:""),style:te},le.createElement("img",{className:ke.img,ref:ve}))))}},59879:function(On,pn,pe){"use strict";var le=pe(59301),ke=pe(88010),We=pe(48136),ut=pe(41588),Ge=pe(43418),Ue=pe(59301);const Me=(0,le.forwardRef)(({callback:Ct,width:wt,onChange:$e,disabled:Ft,readOnly:lt,type:vt="",value:Ie="",style:te={}},ee)=>{const de=(0,le.useRef)(),se=(0,le.useRef)(),[he,ve]=(0,le.useState)(0),[Ee,Be]=(0,le.useState)(0),[Le,ze]=(0,le.useState)(!1),je=()=>{var He=document.createElement("div");He.innerHTML=de.current.getValue();var Nt=He.innerText;return Ct&&Ct(Nt),Nt};(0,le.useImperativeHandle)(ee,()=>({getData:je}));const Xe=He=>{He.preventDefault();const Nt=He.clientX-he,ot=He.clientY-Ee;document.body.onmousemove=Tt=>{let xt=Tt.clientX-Nt,Ot=Tt.clientY-ot;const Wt=document.getElementsByClassName("markdown-popup-form")[0],Dt=window.innerWidth-Wt.offsetWidth,tt=window.innerHeight-Wt.offsetHeight;xt=Math.max(0,Math.min(xt,Dt)),Ot=Math.max(0,Math.min(Ot,tt)),Ye(Tt.clientX,Tt.clientY,Nt,ot)&&(ve(xt),Be(Ot))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ye=(He,Nt,ot,Tt)=>{const xt=document.body.clientHeight,Ot=document.body.clientWidth;return He<20&&ot>He||He>Ot-20&&ot<He||Nt<20&&Tt>Nt||Nt>xt-20&&Tt<Nt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,le.useEffect)(()=>{Le&&setTimeout(()=>{const He=document.getElementsByClassName("markdown-popup-form")[0],Nt=window.innerWidth/2-He.offsetWidth/2,ot=window.innerHeight/2-He.offsetHeight/2;ve(Nt),Be(ot)},0)},[Le]);const dt=()=>{Ft||lt||ze(!0)};return Ue.createElement("div",{style:te},Ue.createElement("div",{style:{width:wt||"100%",position:"relative"},className:`${ke.Z.mathFillWrap} ${Ft||lt?"cursorDefault":""}`,onClick:()=>dt()},Ue.createElement("math-field",{disabled:Ft,locale:"zh_cn",class:`${ke.Z.mathField} ${vt}`,readOnly:lt,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:de,style:{width:"100%",fontSize:Ie?18:14},value:Ie||""})),Ue.createElement(Ge.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:he,top:Ee},title:Ue.createElement("div",{style:{cursor:"move"},onMouseDown:Xe},"\u8F93\u5165\u516C\u5F0F"),open:Le,onOk:()=>{const He=se.current.getData();de.current.setValue(He),$e(He),ze(!1)},onCancel:()=>{ze(!1)},destroyOnClose:!0,className:"markdown-popup-form"},Ue.createElement(ut.Z,{value:Ie,ref:se,onChange:$e,showSaveButton:!1})))});pn.Z=Me},41588:function(On,pn,pe){"use strict";var le=pe(59301),ke=pe(95237),We=pe(43604),ut=pe(99313),Ge=pe(3113),Ue=pe(85149),Me=pe(88010),Ct=pe(48136),wt=pe(59301);const $e=(0,le.forwardRef)(({callback:Ft,showSaveButton:lt,value:vt=""},Ie)=>{const te=(0,le.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 "}]}]}],de=[{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=Ee=>{te.current.setValue(te.current.getValue()+" "+Ee.value+" ")},he=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:wt.createElement(ke.Z,{className:Me.Z.lists,gutter:[10,10]},ee.map((Ee,Be)=>wt.createElement(We.Z,{flex:"110px",className:Me.Z.item},wt.createElement("div",null,wt.createElement(Ue.Z,{value:`$$${Ee.value}$$`}),Ee.name),wt.createElement("div",{className:Me.Z.children},Ee.children.map((Le,ze)=>wt.createElement("div",{key:ze},wt.createElement("h1",null,Le.name),wt.createElement(ke.Z,{gutter:[10,10]},Le.data.map((je,Xe)=>wt.createElement(We.Z,{key:Xe,onClick:()=>se(je),className:Me.Z.diamond},wt.createElement(Ue.Z,{value:"`$$"+je.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:wt.createElement(ke.Z,{className:Me.Z.lists,gutter:[10,10]},de.map((Ee,Be)=>wt.createElement(We.Z,{flex:"110px",className:Me.Z.item},wt.createElement("div",null,wt.createElement(Ue.Z,{value:"`$$"+Ee.value+"$$`"}),Ee.name),wt.createElement("div",{className:Me.Z.children},Ee.children.map((Le,ze)=>wt.createElement("div",{key:ze},Le.name&&wt.createElement("h1",null,Le.name),wt.createElement(ke.Z,{gutter:[10,10]},Le.data.map((je,Xe)=>wt.createElement(We.Z,{key:Xe,onClick:()=>se(je),className:Me.Z.diamond},wt.createElement(Ue.Z,{value:"`$$"+je.value+"$$`"}))))))))))}],ve=()=>{var Ee=document.createElement("div");Ee.innerHTML=te.current.getValue();var Be=Ee.innerText;return Ft&&Ft(Be),Be};return(0,le.useImperativeHandle)(Ie,()=>({getData:ve})),wt.createElement("div",{className:Me.Z.mathWrap},wt.createElement(ut.default,{defaultActiveKey:"1",items:he}),wt.createElement("math-field",{locale:"zh_cn",className:Me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:te,style:{width:800,marginTop:30,fontSize:18}},vt||""),lt&&wt.createElement("div",{className:Me.Z.button},wt.createElement(Ge.ZP,{size:"large",onClick:ve,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});pn.Z=$e},8797:function(On,pn,pe){"use strict";var le=pe(59301),ke=pe(93314),We=pe(3113),ut=Object.defineProperty,Ge=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,$e=(Ie,te,ee)=>te in Ie?ut(Ie,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Ie[te]=ee,Ft=(Ie,te)=>{for(var ee in te||(te={}))Ct.call(te,ee)&&$e(Ie,ee,te[ee]);if(Me)for(var ee of Me(te))wt.call(te,ee)&&$e(Ie,ee,te[ee]);return Ie},lt=(Ie,te)=>Ge(Ie,Ue(te));const vt=({img:Ie,buttonProps:te={},styles:ee={},customText:de,ButtonText:se,ButtonClick:he,Buttonclass:ve,ButtonTwo:Ee,imgStyles:Be,loading:Le=!1})=>le.createElement("section",{className:"tc animated fadeIn",style:Ft(Ft({},{color:"#999",margin:"100px auto",visibility:Le?"hidden":"visible"}),ee)},le.createElement("img",{src:Ie||ke,style:lt(Ft({},Be),{pointerEvents:"none",userSelect:"none"})}),le.createElement("p",{className:"mt20 font14"},de||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&le.createElement(We.ZP,Ft({className:ve,onClick:he},te),se),Ee&&Ee);pn.Z=vt},23210:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ve}});var le=pe(59301),ke={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},We=pe(3113),ut=pe(70557),Ge=pe(23954),Ue=pe(6848),Me=pe(955),Ct=pe(94941),wt=pe(8797),$e=pe(3294),Ft=pe(19381),lt=pe(59301),vt=Object.defineProperty,Ie=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,de=(Ee,Be,Le)=>Be in Ee?vt(Ee,Be,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ee[Be]=Le,se=(Ee,Be)=>{for(var Le in Be||(Be={}))te.call(Be,Le)&&de(Ee,Le,Be[Le]);if(Ie)for(var Le of Ie(Be))ee.call(Be,Le)&&de(Ee,Le,Be[Le]);return Ee},he=(Ee,Be,Le)=>new Promise((ze,je)=>{var Xe=He=>{try{dt(Le.next(He))}catch(Nt){je(Nt)}},Ye=He=>{try{dt(Le.throw(He))}catch(Nt){je(Nt)}},dt=He=>He.done?ze(He.value):Promise.resolve(He.value).then(Xe,Ye);dt((Le=Le.apply(Ee,Be)).next())}),ve=({editOffice:Ee="view",data:Be,theme:Le,type:ze,filename:je,monacoEditor:Xe,className:Ye,style:dt,close:He,onClose:Nt,hasMask:ot,disabledDownload:Tt,onImgDimensions:xt,showNodata:Ot,recordInfo:Wt})=>{const[Dt,tt]=(0,le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ve,_t]=(0,le.useState)(""),[vn,yn]=(0,le.useState)(),zt=window.ENV==="build"?"/react/build":"",qt=location.host.startsWith("localhost")?$e.Z.PROXY_SERVER:$e.Z.API_SERVER,Gn=10*(1024*1024),un=(0,le.useRef)();Be!=null&&Be.startsWith("/api")&&ze!=="txt"&&(Be=$e.Z.API_SERVER+Be);const _n=Ze=>Ze.substring(Ze.lastIndexOf("/")+1).split(".").pop();je&&Xe&&(Xe.filename=je),(0,le.useEffect)(()=>{var Ze,be;const Pe=(be=(Ze=document.cookie)==null?void 0:Ze.replace(/\s/g,""))==null?void 0:be.split(";");Pe==null||Pe.map(Ae=>{let Oe=Ae.split("=");Oe[0]==="_educoder_session"&&_t(Oe[1])})},[]),(0,le.useEffect)(()=>{ze==="office"&&(Be.indexOf("bigfilescdn.")>-1||Be.indexOf("bigfiles1")>-1?yn({url:Be,fileType:_n(Be),model:Be.indexOf("model=edit")?"edit":"view"}):St())},[ze,Be]);const St=()=>he(void 0,null,function*(){console.log("data:",Be);let Ze=Be;Be.startsWith("http")||(Ze=location.origin+Ze);let be=new URL(Ze).pathname.split("/").pop();const Pe=yield(0,Ct.gJ)({attachment_id:be});Pe.url=qt+Pe.url,yn(Pe)}),Zn=()=>{if(Be.startsWith("http")||Be.startsWith("blob:")){ci();return}(0,Me.Sv)(je||"educoder",Be,je)},ci=()=>{Wt&&(0,Ft.fc)({id:Wt==null?void 0:Wt.id,watch_type:1,course_id:Wt==null?void 0:Wt.course_id}),(0,Me.Nd)(je||"educoder",decodeURIComponent(Be))};return lt.createElement("div",{style:se({},dt||{}),className:`${ot&&ke.bgBlack} ${ze?ke.wrp:"hide"}`},He&&lt.createElement("div",{className:ke.close,ref:un},!!xt&&lt.createElement(Ue.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>un.current},lt.createElement("span",{onClick:()=>{Nt(),xt()}},lt.createElement("i",{className:"icon-yulanpizhu"}))),!Tt&&lt.createElement(Ue.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>un.current},lt.createElement("span",{onClick:ci},lt.createElement("i",{className:"icon-quxiaozhiding"}))),lt.createElement(Ue.Z,{title:"\u5173\u95ED",getPopupContainer:()=>un.current},lt.createElement("span",{className:"",onClick:Nt},lt.createElement("i",{className:"icon-guanbi1"})))),lt.createElement("div",{className:`${ke[Ye]} ${Ye} ${ke.monaco} ${ze==="txt"?"show":"hide"}`},ze==="txt"&&lt.createElement(lt.Fragment,null,lt.createElement(Ge.ZP,se({},Xe)))),ze==="audio"&&lt.createElement("audio",{src:`${(Be==null?void 0:Be.indexOf("http://"))>-1||(Be==null?void 0:Be.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Be}`,autoPlay:!0}),ze==="video"&&lt.createElement(lt.Fragment,null,(Be==null?void 0:Be.indexOf("http"))>-1?lt.createElement("video",{controls:!0,src:`${Be}`,autoPlay:!0}):lt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Be}`,autoPlay:!0})),ze==="office"&&vn&&lt.createElement("iframe",{src:`${zt}/office.html?key=${vn.key}&url=${btoa(vn.url)}&callbackUrl=${qt+(vn.callbackUrl||"")}&fileType=${vn.fileType}&title=${vn.title||""}&model=${Ee}&officeServer=${$e.Z.ONLYOFFICE}&disabledDownload=${!!Tt}`}),ze==="html"&&lt.createElement("iframe",{src:Be+"&disposition=inline"}),ze==="pdf"&&lt.createElement("iframe",{src:`${zt}/js/pdfview/index.html?filename=${je||"educoder.pdf"}&url=${encodeURIComponent(Be)}&disabledDownload=${!!Tt}`}),ze==="image"&&lt.createElement("img",{src:`${(Be==null?void 0:Be.indexOf("http://"))>-1||(Be==null?void 0:Be.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Be}`}),(ze==="other"||ze==="download")&&lt.createElement(lt.Fragment,null,Ot?lt.createElement(wt.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:lt.createElement(We.ZP,{icon:lt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Zn,disabled:Tt},"\u4E0B\u8F7D")}):lt.createElement(We.ZP,{type:"primary",size:"middle",onClick:Zn,disabled:Tt},lt.createElement(ut.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},90502:function(On,pn,pe){"use strict";pe.d(pn,{t:function(){return Pe}});var le=pe(59301),ke=pe(92832),We=pe(78241),ut=pe(43418),Ge=pe(95237),Ue=pe(43604),Me=pe(5871),Ct=pe(57809),wt=pe(5112),$e=pe(41984),Ft=pe(89070),lt=pe(43809),vt=pe(8591),Ie=pe(3113),te=pe(71418),ee=pe(24334),de={flex_box_center:"flex_box_center___kOQ8P",flex_space_between:"flex_space_between___fY6jt",flex_box_vertical_center:"flex_box_vertical_center___bDSSI",flex_box_center_end:"flex_box_center_end___mQ6mU",flex_box_column:"flex_box_column___F15G0",result:"result___UYRo8",left:"left___TRaH5",right:"right___twp9s",box:"box___vwndt",li:"li___hRe2d"},se=pe(99064),he=pe(88264),ve=pe(12290),Ee=pe(56102),Be=pe(74440),Le=pe(59301),ze=Object.defineProperty,je=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Nt=(Ae,Oe,xe)=>Oe in Ae?ze(Ae,Oe,{enumerable:!0,configurable:!0,writable:!0,value:xe}):Ae[Oe]=xe,ot=(Ae,Oe)=>{for(var xe in Oe||(Oe={}))dt.call(Oe,xe)&&Nt(Ae,xe,Oe[xe]);if(Ye)for(var xe of Ye(Oe))He.call(Oe,xe)&&Nt(Ae,xe,Oe[xe]);return Ae},Tt=(Ae,Oe)=>je(Ae,Xe(Oe)),xt=(Ae,Oe,xe)=>new Promise((ct,Mt)=>{var at=Bt=>{try{Lt(xe.next(Bt))}catch(ft){Mt(ft)}},qe=Bt=>{try{Lt(xe.throw(Bt))}catch(ft){Mt(ft)}},Lt=Bt=>Bt.done?ct(Bt.value):Promise.resolve(Bt.value).then(at,qe);Lt((xe=xe.apply(Ae,Oe)).next())}),Wt=({buttonProps:Ae,buttonText:Oe,form:xe,hackIdentifier:ct="",answerKey:Mt,data:at})=>{const[qe,Lt]=(0,le.useState)(!1),[Bt,ft]=(0,le.useState)(!1),[Gt,Sn]=(0,le.useState)(!1),[an,rn]=(0,le.useState)({}),[zn,kn]=(0,le.useState)(""),[mn,ei]=(0,le.useState)(""),Pi=(0,le.useRef)(ct),Hn=(0,le.useRef)(""),bn=(0,le.useRef)(!1);(0,le.useEffect)(()=>{Gt&&rr()},[Gt]),(0,le.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const wi=()=>new Date().getTime(),Zi=at==null?void 0:at.code,Hi=()=>{var di,xi;let $i=Zi?at==null?void 0:at.code:(di=xe.getFieldValue("hack_codes"))==null?void 0:di.code,Ri=Zi?at==null?void 0:at.answer_content:xe.getFieldValue(Mt),Kr=Zi?at==null?void 0:at.input:(xi=xe.getFieldValue("hack_sets"))==null?void 0:xi.input;Ri==null||Ri.forEach(Sr=>{const Ne=Sr.value||Sr.answer_text||"";$i=$i.replace(/(@▁@|@▁▁@)/,Ne)}),ei(Kr),kn($i),rn({}),Sn(!0)},rr=()=>xt(void 0,null,function*(){var di,xi,$i,Ri;const Kr=wi(),Sr=Zi?at==null?void 0:at.time_limit:(di=xe.getFieldsValue())==null?void 0:di.hack.time_limit,Ne=Zi?(xi=at==null?void 0:at.answer_content)==null?void 0:xi.length:(Ri=($i=xe.getFieldsValue())==null?void 0:$i.standard_answers)==null?void 0:Ri.length;Lt(!0),yield(0,he.bM)(Hn.current,{test_hack_code:zn,test_input:mn});function Ci(){return xt(this,null,function*(){const{status:wr,data:Pn}=yield(0,he.rX)(Hn.current,"submit"),Wi=wi()-Kr>(Sr+3)*1e3*Ne;if(bn.current){if(Wi){vt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),Lt(!1);return}if(wr===0){Lt(!1),rn(Tt(ot({},Pn),{showText:!0}));return}setTimeout(Ci,1e3)}})}Ci()}),_r=()=>xt(void 0,null,function*(){var di,xi,$i,Ri,Kr,Sr,Ne;if(!at){try{yield xe.validateFields()}catch(Si){($i=(xi=(di=Si==null?void 0:Si.errorFields)==null?void 0:di[0])==null?void 0:xi.name)!=null&&$i.includes("standard_answers")?vt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):vt.ZP.error(Si.errorFields[0].errors[0]),xe.scrollToField(Si.errorFields[0].name,{behavior:"smooth",block:"center"});return}ft(!0);let wr="";const Pn=xe.getFieldsValue();Pi.current?wr=yield(0,se.ZP)(`/api/problems/${Pi.current}.json`,{method:"put",body:Tt(ot({},Pn),{hack:Tt(ot({},Pn==null?void 0:Pn.hack),{sub_discipline_id:(Ne=(Sr=Pn==null?void 0:Pn.hack)==null?void 0:Sr.sub_discipline_id)==null?void 0:Ne[1],difficult:Pn.difficulty,item_banks_group_id:Pn.item_banks_group_id}),hack_codes:Tt(ot({},Pn.hack_codes),{code:ee.Base64.encode(Pn.hack_codes.code)}),update_hack_sets:[ot({},Pn.hack_sets)],is_blank:!0})}):(wr=yield(0,se.ZP)("/api/problems.json",{method:"post",body:Tt(ot({},Pn),{hack:Tt(ot({},Pn==null?void 0:Pn.hack),{sub_discipline_id:(Kr=(Ri=Pn==null?void 0:Pn.hack)==null?void 0:Ri.sub_discipline_id)==null?void 0:Kr[1],difficult:Pn.difficulty,item_banks_group_id:Pn.item_banks_group_id}),hack_codes:Tt(ot({},Pn.hack_codes),{code:ee.Base64.encode(Pn.hack_codes.code)}),hack_sets:[ot({},Pn.hack_sets)],is_blank:!0})}),Pi.current=wr==null?void 0:wr.identifier,sessionStorage.projectFill=wr==null?void 0:wr.identifier)}const Ci=yield(0,se.ZP)(`/api/problems/${Pi.current}/start.json`,{method:"get"});if((Ci==null?void 0:Ci.status)===0){Hn.current=Ci==null?void 0:Ci.identifier,bn.current=!0,ft(!1),Hi();return}ft(!1)}),gi=di=>{const{status:xi,error_msg:$i,execute_time:Ri,output:Kr,input:Sr,expected_output:Ne}=di;let Ci=null;switch(xi){case Be.h.OK:Ci=Le.createElement(Le.Fragment,null,Le.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Ri/1e3,"\u79D2"),Le.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Be.h.NOMATCH:Ci=Le.createElement(Le.Fragment,null,Le.createElement("div",null,"\u8F93\u5165\uFF1A"),Le.createElement("pre",{style:{fontFamily:"initial"}},Sr),Le.createElement("div",null,"\u8F93\u51FA\uFF1A"),Le.createElement("pre",{style:{fontFamily:"initial"}},Kr&&ee.Base64.decode(Kr)),Le.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Le.createElement("pre",{style:{fontFamily:"initial"}},Ne&&ee.Base64.decode(Ne)));break;case Be.h.EXECUTEFAILURE:Ci=Le.createElement(Le.Fragment,null,Le.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Le.createElement("pre",null,Sr)),Le.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Le.createElement("pre",{className:"error"},ee.Base64.decode($i)));break;case Be.h.COMPILEFAILURE:Ci=Le.createElement(Le.Fragment,null,Le.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Le.createElement("pre",null,Sr)),Le.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Le.createElement("pre",{className:"error"},ee.Base64.decode($i)));break;case Be.h.PODFAILURE:Ci=Le.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Be.h.TIMEOUT:Ci=Le.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Le.createElement(Le.Fragment,null," ",Ci," ")};return Le.createElement("div",null,Le.createElement(Ie.ZP,Tt(ot({loading:Bt},Ae),{onClick:_r}),Oe),Le.createElement(ut.default,{open:Gt,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:qe,cancelButtonProps:{style:{display:"none"}},onOk:()=>rr(),onCancel:()=>{bn.current=!1,Sn(!1)}},Le.createElement("div",{className:de.result},Le.createElement("div",{className:de.left},Le.createElement("div",{className:"mb20"},Le.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!at&&Le.createElement(Ee.CopyToClipboard,{text:zn,onCopy:()=>vt.ZP.success("\u590D\u5236\u6210\u529F")},Le.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Le.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Le.createElement(ve.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:zn,onChange:di=>kn(di)})),Le.createElement("div",{className:de.right},Le.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Le.createElement("div",{className:de.box},Le.createElement("div",{className:de.li},Le.createElement(ke.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:mn,onChange:di=>ei(di.target.value),bordered:!1,style:{height:180}}))),Le.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Le.createElement("div",{className:de.box},Le.createElement(te.Z,{spinning:qe,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Le.createElement("div",{className:de.li,style:{height:196,overflow:"auto",padding:10}},gi(an))))))))},Dt=pe(87169),tt=pe(59301),Ve=Object.defineProperty,_t=Object.defineProperties,vn=Object.getOwnPropertyDescriptors,yn=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,ln=(Ae,Oe,xe)=>Oe in Ae?Ve(Ae,Oe,{enumerable:!0,configurable:!0,writable:!0,value:xe}):Ae[Oe]=xe,Gn=(Ae,Oe)=>{for(var xe in Oe||(Oe={}))zt.call(Oe,xe)&&ln(Ae,xe,Oe[xe]);if(yn)for(var xe of yn(Oe))qt.call(Oe,xe)&&ln(Ae,xe,Oe[xe]);return Ae},un=(Ae,Oe)=>_t(Ae,vn(Oe)),_n=(Ae,Oe)=>{var xe={};for(var ct in Ae)zt.call(Ae,ct)&&Oe.indexOf(ct)<0&&(xe[ct]=Ae[ct]);if(Ae!=null&&yn)for(var ct of yn(Ae))Oe.indexOf(ct)<0&&qt.call(Ae,ct)&&(xe[ct]=Ae[ct]);return xe};const{TextArea:St}=ke.default,Zn=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],ci=({value:Ae,onChange:Oe})=>tt.createElement(Switch,{checked:Ae,onChange:xe=>{Oe(xe)}}),Ze="@\u2581@",be="@\u2581\u2581@",Pe=({questionTitlePlaceholder:Ae,form:Oe,scoreByBlank:xe=!1,hackidentifier:ct,answerKey:Mt})=>{const[at,qe]=(0,le.useState)(!1),[Lt,Bt]=(0,le.useState)(!1),Gt=(0,Ft.useParams)().type==="edit",Sn=(Hn,bn)=>{const wi=bn.line;let Zi=0;for(let rr=0;rr<wi;rr++)Zi+=Hn.getLine(rr).split(Ze).length-1;for(let rr=0;rr<wi;rr++)Zi+=Hn.getLine(rr).split(be).length-1;const Hi=Hn.getLine(wi).substring(0,bn.ch);return Zi+=Hi.split(Ze).length-1,Zi+=Hi.split(be).length-1,Zi},an=(Hn,bn,wi,Zi)=>{const Hi=Hn.getRange(bn.from,bn.to);let rr=0;if(bn.text.forEach(_r=>{rr+=_r.split(Ze).length-1}),bn.text.forEach(_r=>{rr+=_r.split(be).length-1}),bn.origin!=="setValue"){if(Hi&&(Hi.indexOf(Ze)!==-1||Hi.indexOf(be)!==-1)){const _r=Hi.split(Ze).length-1+Hi.split(be).length-1,gi=Sn(Hn,bn.from);if(console.log(`\u5220\u9664${_r}\u4E2A\uFF0C \u524D\u9762\u6709${gi}\u4E2A\uFF0C\u65B0\u589E${rr}\u4E2A`),_r>1){const di=Array.from({length:_r},(xi,$i)=>gi+$i);Zi(di)}else Zi(gi)}else if(rr>0){const _r=Sn(Hn,bn.from);console.log(`\u65B0\u589E${rr}\u4E2A\uFF0C\u4E4B\u524D\u6709${_r}\u4E2A`),wi(rr,_r)}}},rn=()=>{const Hn=Oe.getFieldValue(Mt);Oe.setFieldsValue({[Mt]:Hn==null?void 0:Hn.map((bn,wi)=>un(Gn({},bn),{position:wi+1}))})},zn=(0,le.useRef)(),kn=(Hn,bn)=>{for(let wi=0;wi<Hn;wi++)zn.current({position:null,answer_text:""},bn+wi);rn()},mn=(0,le.useRef)(),ei=Hn=>{mn.current(Hn),rn()},Pi=We.default.useWatch(Mt,Oe);return tt.createElement("div",{className:lt.Z.wrap},tt.createElement(We.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},tt.createElement($e.h,{scrollId:"name",watch:!0,height:140})),tt.createElement("div",{className:lt.Z.questionTitleEditorWrap},tt.createElement(We.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},tt.createElement($e.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(Hn,bn)=>{const wi=Oe.getFieldValue(Mt);console.log("--preAnswerData",wi,bn),Oe.setFieldsValue({[Mt]:wi==null?void 0:wi.map((Zi,Hi)=>{var rr;return un(Gn({},Zi),{position:Hi+1,multi_line:(rr=bn==null?void 0:bn[Hi])==null?void 0:rr.multiLine})})})},placeholder:Ae,onCMBeforeChange:(Hn,bn)=>{an(Hn,bn,kn,ei)}}))),tt.createElement(We.default.List,{name:Mt,rules:[{validator(Hn,bn){if(!(bn!=null&&bn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const wi of bn){const{answer_text:Zi}=wi||{};if((Zi==null?void 0:Zi.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Hn,{add:bn,remove:wi},{errors:Zi})=>(zn.current=bn,mn.current=wi,tt.createElement(tt.Fragment,null,tt.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},tt.createElement(We.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),tt.createElement("div",{onClick:()=>{ut.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:tt.createElement("div",null,tt.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",tt.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),tt.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"}},tt.createElement(Dt.Z,{style:{marginRight:3,color:"#3061D0"}}),tt.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),Hn.map((Hi,rr)=>{var _r=Hi,{key:gi,name:di}=_r,xi=_n(_r,["key","name"]),$i,Ri;return tt.createElement(Ge.Z,{className:"mb20",key:gi,align:"middle",wrap:!1},tt.createElement(Ue.Z,{flex:"0 0 auto",className:`${lt.Z.blankIndex}`},"\u586B\u7A7A\u9879",rr+1),tt.createElement(Ue.Z,{flex:1},tt.createElement(Ge.Z,{align:"top",justify:"space-between",wrap:!1},tt.createElement(Ue.Z,null,tt.createElement(We.default.Item,un(Gn({},xi),{name:[di,"answer_text"],noStyle:!0}),($i=Pi==null?void 0:Pi[di])!=null&&$i.multi_line||(Ri=Pi==null?void 0:Pi[di])!=null&&Ri.multiLine?tt.createElement(St,{spellCheck:!1,style:{marginLeft:10,width:550}}):tt.createElement(ke.default,{style:{marginLeft:10,width:550},className:lt.Z.blankInput,size:"large",maxLength:1e3,onBlur:Kr=>{}}))),xe&&tt.createElement(Ue.Z,{flex:"224px"},tt.createElement(We.default.Item,un(Gn({},xi),{name:[di,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),tt.createElement(Me.Z,{size:"large",className:lt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),tt.createElement("div",{onClick:()=>qe(!0)},tt.createElement(We.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},tt.createElement($e.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:at}))),tt.createElement(We.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"}]},tt.createElement(Ct.default,{size:"large"},Zn.map(Hn=>tt.createElement(Ct.default.Option,{key:Hn.title,value:Hn.key}," ",Hn.title)))),tt.createElement(We.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},tt.createElement(We.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},tt.createElement(Me.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),tt.createElement("span",{className:"ml10 font14"},"\u79D2")),tt.createElement(We.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"}]},tt.createElement(wt.ZP.Group,{style:{marginTop:-10}},tt.createElement(wt.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),tt.createElement(wt.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),tt.createElement(wt.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),tt.createElement(We.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),tt.createElement("div",{style:{background:"#F6F7F9",padding:15}},tt.createElement(We.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},tt.createElement(St,{rows:4})),tt.createElement(We.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},tt.createElement(St,{rows:4}))),tt.createElement(Wt,{form:Oe,answerKey:Mt,hackIdentifier:ct,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:tt.createElement("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}}))}},65357:function(On,pn,pe){"use strict";pe.d(pn,{u:function(){return Le}});var le=pe(59301),ke=pe(95237),We=pe(43604),ut=pe(6848),Ge=pe(78241),Ue=pe(43809),Me=pe(32134),Ct=pe(12893),wt=pe(41984),$e=pe(59301),Ft=Object.defineProperty,lt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,de=(ze,je,Xe)=>je in ze?Ft(ze,je,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ze[je]=Xe,se=(ze,je)=>{for(var Xe in je||(je={}))te.call(je,Xe)&&de(ze,Xe,je[Xe]);if(Ie)for(var Xe of Ie(je))ee.call(je,Xe)&&de(ze,Xe,je[Xe]);return ze},he=(ze,je)=>lt(ze,vt(je)),ve=(ze,je)=>{var Xe={};for(var Ye in ze)te.call(ze,Ye)&&je.indexOf(Ye)<0&&(Xe[Ye]=ze[Ye]);if(ze!=null&&Ie)for(var Ye of Ie(ze))je.indexOf(Ye)<0&&ee.call(ze,Ye)&&(Xe[Ye]=ze[Ye]);return Xe};const Ee=["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"],Be=({value:ze,onChange:je,choiceTextKey:Xe,answerKey:Ye,index:dt,isEdit:He,setInputActive:Nt,form:ot,choiceOptionsPath:Tt,allowChangeMode:xt,showAddIcon:Ot,addItem:Wt,deleteItem:Dt})=>{console.log(ze,"value");const tt=(ze==null?void 0:ze[Ye])===1,Ve=()=>{const vn=ot.getFieldValue(Tt);ot.setFieldValue(Tt,vn.map(yn=>he(se({},yn),{[Ye]:0})))},_t=()=>{tt?je(he(se({},ze),{[Ye]:0})):(xt||Ve(),je(he(se({},ze),{[Ye]:1})))};return $e.createElement(ke.Z,{className:Ue.Z.choiceWrap,align:"middle",wrap:!1},$e.createElement(We.Z,{onClick:_t,className:`${Ue.Z.choiceIndex} ${tt?Ue.Z.activeAnswer:""}`},Ee[dt]),$e.createElement(We.Z,{flex:1,className:`${Ue.Z.editorWrap} ml15`,onClick:Nt},$e.createElement(wt.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:He,value:ze==null?void 0:ze[Xe],onChange:vn=>{je(he(se({},ze),{[Xe]:vn}))}})),$e.createElement(We.Z,{flex:"0 0 auto",className:"ml15"},$e.createElement("div",{onClick:_t,className:`${Ue.Z.setAnswerBtn} ${tt?Ue.Z.activeAnswer:""}`},tt?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),$e.createElement(We.Z,{className:Ue.Z.actionWrapper},$e.createElement(ut.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},$e.createElement(Me.Z,{className:Ue.Z.addIcon,onClick:Wt,style:{visibility:Ot?"visible":"hidden"}})),$e.createElement(ut.Z,{title:"\u5220\u9664"},$e.createElement(Ct.Z,{className:Ue.Z.deleteIcon,onClick:Dt,style:{visibility:dt>1?"visible":"hidden"}}))))},Le=({questionTitlePlaceholder:ze,titleKey:je,choiceKey:Xe,analysisKey:Ye,choiceTextKey:dt,answerKey:He,choiceOptionsPath:Nt,allowChangeMode:ot=!0,form:Tt,showAnalysis:xt=!0})=>{const[Ot,Wt]=(0,le.useState)(),[Dt,tt]=(0,le.useState)(!1);return $e.createElement("div",{className:Ue.Z.wrap},$e.createElement("div",{className:Ue.Z.questionTitleEditorWrap},$e.createElement(Ge.default.Item,{label:"\u9898\u5E72",name:je,labelCol:{span:24},rules:[{required:!0}]},$e.createElement(wt.h,{scrollId:Array.isArray(je)?je.join("_"):`${je}`,watch:!0,height:140,placeholder:ze}))),$e.createElement(Ge.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),$e.createElement(Ge.default.List,{name:Xe,rules:[{validator(Ve,_t){const vn=_t.some(zt=>zt[He]===1),yn=_t.findIndex(zt=>{var qt;return((qt=zt[dt])==null?void 0:qt.length)<=0});return yn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ee[yn]}\u9009\u9879\u7684\u5185\u5BB9`)):vn?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ve,{add:_t,remove:vn})=>$e.createElement("div",{id:Array.isArray(Nt)?Nt.join("_"):`${Nt}`},Ve.map((yn,zt)=>{var qt=yn,{key:ln,name:Gn}=qt,un=ve(qt,["key","name"]);const _n=Ot===ln,St=()=>{Wt(ln)},Zn=zt<7&&zt===Ve.length-1,ci=()=>_t({[dt]:"",[He]:0}),Ze=()=>vn(Gn);return $e.createElement(Ge.default.Item,he(se({},un),{key:ln,name:Gn,className:Ue.Z.choiceListWrap,rules:[{validator(be,Pe){return Pe!=null&&Pe.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ee[zt]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),$e.createElement(Be,{choiceTextKey:dt,answerKey:He,index:zt,isEdit:_n,setInputActive:St,form:Tt,choiceOptionsPath:Nt,allowChangeMode:ot,showAddIcon:Zn,addItem:ci,deleteItem:Ze}))}),Ve.length<8&&$e.createElement("div",{className:`${Ue.Z.addBtn} mb30`,onClick:()=>_t({[dt]:"",[He]:0})},"\u6DFB\u52A0\u9009\u9879"))),xt&&$e.createElement("div",{onClick:()=>tt(!0)},$e.createElement(Ge.default.Item,{name:Ye,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},$e.createElement(wt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Dt}))))}},70472:function(On,pn,pe){"use strict";pe.d(pn,{u:function(){return ot}});var le=pe(59301),ke=pe(43418),We=pe(95237),ut=pe(43604),Ge=pe(92832),Ue=pe(6848),Me=pe(78673),Ct=pe(78241),wt=pe(5112),$e=pe(5871),Ft=pe(41984),lt=pe(12893),vt=pe(61485),Ie=pe(43809),te=pe(59879),ee=pe(59301),de=Object.defineProperty,se=Object.defineProperties,he=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,Le=(Tt,xt,Ot)=>xt in Tt?de(Tt,xt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):Tt[xt]=Ot,ze=(Tt,xt)=>{for(var Ot in xt||(xt={}))Ee.call(xt,Ot)&&Le(Tt,Ot,xt[Ot]);if(ve)for(var Ot of ve(xt))Be.call(xt,Ot)&&Le(Tt,Ot,xt[Ot]);return Tt},je=(Tt,xt)=>se(Tt,he(xt)),Xe=(Tt,xt)=>{var Ot={};for(var Wt in Tt)Ee.call(Tt,Wt)&&xt.indexOf(Wt)<0&&(Ot[Wt]=Tt[Wt]);if(Tt!=null&&ve)for(var Wt of ve(Tt))xt.indexOf(Wt)<0&&Be.call(Tt,Wt)&&(Ot[Wt]=Tt[Wt]);return Ot};const Ye=({value:Tt,onChange:xt})=>{const Ot=Dt=>{ke.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Ie.Z.modal,onOk:()=>{const tt=[...Tt];tt.splice(Dt,1),xt(tt)}})},Wt=()=>{const Dt=[...Tt];Dt.push(""),xt(Dt)};return ee.createElement(We.Z,{className:"ml20"},ee.createElement(ut.Z,{flex:1},Tt==null?void 0:Tt.map((Dt,tt)=>ee.createElement(We.Z,{key:`${Dt}_${tt}`,className:"mb20"},ee.createElement(Ge.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Dt,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ve=>{const _t=[...Tt],vn=Ve.target.value.trim();_t[tt]=vn,xt(_t)}}),ee.createElement(Ue.Z,{title:"\u5220\u9664"},ee.createElement(lt.Z,{className:Ie.Z.deleteIcon,style:{marginLeft:15,visibility:tt>0?"visible":"hidden"},onClick:()=>Ot(tt)}))))),ee.createElement(ut.Z,null,ee.createElement("div",{className:`${Ie.Z.addBtn}`,onClick:()=>{Wt()}},"\u65B0\u589E\u7B54\u6848")))},dt=({value:Tt,onChange:xt})=>{const Ot=Dt=>{ke.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Ie.Z.modal,onOk:()=>{const tt=[...Tt];tt.splice(Dt,1),xt(tt)}})},Wt=()=>{const Dt=[...Tt];Dt.push(""),xt(Dt)};return ee.createElement(We.Z,{className:"ml20"},ee.createElement(ut.Z,{flex:1},Tt==null?void 0:Tt.map((Dt,tt)=>ee.createElement(We.Z,{key:`${Dt}_${tt}`,align:"middle",className:"mb20"},ee.createElement(te.Z,{value:Dt,style:{flex:1},onChange:Ve=>{const _t=[...Tt];_t[tt]=Ve,xt(_t)}}),ee.createElement(Ue.Z,{title:"\u5220\u9664"},ee.createElement(lt.Z,{className:Ie.Z.deleteIcon,style:{marginLeft:15,visibility:tt>0?"visible":"hidden"},onClick:()=>Ot(tt)}))))),ee.createElement(ut.Z,null,ee.createElement("div",{className:`${Ie.Z.addBtn}`,onClick:()=>{Wt()}},"\u65B0\u589E\u7B54\u6848")))},He=({value:Tt=!0,onChange:xt})=>ee.createElement(Me.Z,{checked:!Tt,onChange:Ot=>{xt(!Ot)}}),Nt="\u2581",ot=({questionTitlePlaceholder:Tt,form:xt,scoreByBlank:Ot=!1,answerKey:Wt})=>{const[Dt,tt]=(0,le.useState)(!1),Ve=(un,_n)=>{const St=_n.line;let Zn=0;for(let Ze=0;Ze<St;Ze++)Zn+=un.getLine(Ze).split(Nt).length-1;const ci=un.getLine(St).substring(0,_n.ch);return Zn+=ci.split(Nt).length-1,Zn},_t=(un,_n,St,Zn)=>{const ci=un.getRange(_n.from,_n.to);let Ze=0;if(_n.text.forEach(be=>{Ze+=be.split(Nt).length-1}),_n.origin!=="setValue"){if(ci&&ci.indexOf(Nt)!==-1){const be=ci.split(Nt).length-1,Pe=Ve(un,_n.from);if(console.log(`\u5220\u9664${be}\u4E2A\uFF0C \u524D\u9762\u6709${Pe}\u4E2A\uFF0C\u65B0\u589E${Ze}\u4E2A`),be>1){const Ae=Array.from({length:be},(Oe,xe)=>Pe+xe);Zn(Ae)}else Zn(Pe)}else if(Ze>0){const be=Ve(un,_n.from);console.log(`\u65B0\u589E${Ze}\u4E2A\uFF0C\u4E4B\u524D\u6709${be}\u4E2A`),St(Ze,be)}}},vn=()=>{const un=xt.getFieldValue(Wt);xt.setFieldsValue({[Wt]:un.map((_n,St)=>je(ze({},_n),{position:St+1}))})},yn=(0,le.useRef)(),zt=(un,_n)=>{for(let St=0;St<un;St++)yn.current({position:null,answer_text:[""],model:1},_n+St);vn()},qt=(0,le.useRef)(),ln=un=>{qt.current(un),vn()},Gn=Ct.default.useWatch(Wt,xt);return ee.createElement("div",{className:Ie.Z.wrap},ee.createElement("div",{className:Ie.Z.questionTitleEditorWrap},ee.createElement(Ct.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(Ft.h,{scrollId:"name",watch:!0,height:140,placeholder:Tt,showNullButton:!0,onCMBeforeChange:(un,_n)=>{_t(un,_n,zt,ln)}}))),ee.createElement(Ct.default.List,{name:Wt,rules:[{validator(un,_n){if(!(_n!=null&&_n.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const St of _n){const{answer_text:Zn}=St||{};if(Zn!=null&&Zn.some(ci=>(ci==null?void 0:ci.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(un,{add:_n,remove:St},{errors:Zn})=>(yn.current=_n,qt.current=St,ee.createElement(ee.Fragment,null,ee.createElement(Ct.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(un!=null&&un.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}}),un.map((ci,Ze)=>{var be=ci,{key:Pe,name:Ae}=be,Oe=Xe(be,["key","name"]),xe,ct;return ee.createElement("div",{style:{marginBottom:10},key:Pe},ee.createElement(We.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(ut.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Ie.Z.blankIndex}`},"\u586B\u7A7A\u9879",Ze+1),ee.createElement(Ct.default.Item,je(ze({},Oe),{name:[Ae,"model"],noStyle:!0}),ee.createElement(wt.ZP.Group,{onChange:()=>{const Mt=xt.getFieldValue(Wt);xt.setFieldsValue({[Wt]:Mt.map((at,qe)=>je(ze({},at),{answer_text:Ae===qe?[""]:at.answer_text}))})}},ee.createElement(wt.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(Ue.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(vt.Z,null))),ee.createElement(wt.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(Ue.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(vt.Z,null)))))),ee.createElement(We.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(ut.Z,{flex:1},ee.createElement(We.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(ut.Z,{flex:1},ee.createElement(Ct.default.Item,je(ze({},Oe),{name:[Ae,"answer_text"],noStyle:!0}),((ct=(xe=xt.getFieldValue(Wt))==null?void 0:xe[Ae])==null?void 0:ct.model)===1?ee.createElement(Ye,null):ee.createElement(dt,null))),Ot&&ee.createElement(ut.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(Ct.default.Item,je(ze({},Oe),{name:[Ae,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ie.Z.blankInputNumberWrapper}),ee.createElement($e.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(Ct.default.Item,je(ze({},Oe),{name:[Ae,"position"],noStyle:!0}),ee.createElement(Ge.default,{type:"hidden"})))))})))),ee.createElement(We.Z,{align:"middle"},ee.createElement(Ct.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(ut.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ee.createElement(We.Z,{align:"middle"},ee.createElement(Ct.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(ut.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Gn==null?void 0:Gn.length)>1&&ee.createElement(We.Z,{align:"middle",className:(Gn==null?void 0:Gn.length)>1?"mb30":`${Ie.Z.hide}`},ee.createElement(Ct.default.Item,{name:"is_ordered"},ee.createElement(He,null)),ee.createElement(ut.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:()=>tt(!0)},ee.createElement(Ct.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(Ft.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Dt}))))}},11832:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ve}});var le=pe(59301),ke=pe(95237),We=pe(43604),ut=pe(78241),Ge=pe(43809),Ue=pe(41984),Me=pe(59301),Ct=Object.defineProperty,wt=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Ie=(Ee,Be,Le)=>Be in Ee?Ct(Ee,Be,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ee[Be]=Le,te=(Ee,Be)=>{for(var Le in Be||(Be={}))lt.call(Be,Le)&&Ie(Ee,Le,Be[Le]);if(Ft)for(var Le of Ft(Be))vt.call(Be,Le)&&Ie(Ee,Le,Be[Le]);return Ee},ee=(Ee,Be)=>wt(Ee,$e(Be)),de=(Ee,Be)=>{var Le={};for(var ze in Ee)lt.call(Ee,ze)&&Be.indexOf(ze)<0&&(Le[ze]=Ee[ze]);if(Ee!=null&&Ft)for(var ze of Ft(Ee))Be.indexOf(ze)<0&&vt.call(Ee,ze)&&(Le[ze]=Ee[ze]);return Le};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},he=({value:Ee,onChange:Be,form:Le})=>{const ze=(Ee==null?void 0:Ee.is_answer)===1,je=Ee==null?void 0:Ee.choice_text,Xe=()=>{const Ye=Le.getFieldsValue().choices.map(dt=>({choice_text:dt.choice_text,is_answer:0}));Le.setFieldsValue({choices:Ye}),Be(ee(te({},Ee),{is_answer:1}))};return Me.createElement(ke.Z,{className:Ge.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Me.createElement(We.Z,{onClick:Xe,className:`${Ge.Z.choiceIndex} ${Ge.Z.judgementIndex} ${ze?Ge.Z.activeAnswer:""}`},se[je]),Me.createElement(We.Z,{flex:1,className:`${Ge.Z.editorWrap} ml15`},Me.createElement("div",{className:`${Ge.Z.inputBorder} ${Ge.Z.placeholder} ${ze?Ge.Z.activeJudgementAnswer:""}`},je)),Me.createElement(We.Z,{flex:"0 0 auto",className:"ml15"},Me.createElement("div",{onClick:Xe,className:`${Ge.Z.setAnswerBtn} ${ze?Ge.Z.activeAnswer:""}`},ze?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ve=({questionTitlePlaceholder:Ee,choiceKey:Be,form:Le})=>{const[ze,je]=(0,le.useState)(!1);return Me.createElement("div",{className:Ge.Z.wrap},Me.createElement("div",{className:Ge.Z.questionTitleEditorWrap},Me.createElement(ut.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Me.createElement(Ue.h,{scrollId:"name",watch:!0,height:140,placeholder:Ee}))),Me.createElement(ut.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Me.createElement(ut.default.List,{name:"choices",rules:[{validator(Xe,Ye){return Ye.some(He=>(He==null?void 0:He.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Xe=>Me.createElement("div",{id:"choices"},Xe.map(Ye=>{var dt=Ye,{key:He,name:Nt}=dt,ot=de(dt,["key","name"]);return Me.createElement(ut.default.Item,ee(te({},ot),{key:He,name:Nt,noStyle:!0}),Me.createElement(he,{form:Le}))})))),Me.createElement("div",{onClick:()=>je(!0)},Me.createElement(ut.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Me.createElement(Ue.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ze}))))}},41984:function(On,pn,pe){"use strict";pe.d(pn,{h:function(){return te},x:function(){return ee}});var le=pe(12290),ke=pe(43809),We=pe(85149),ut=pe(59301),Ge=Object.defineProperty,Ue=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,Ft=(de,se,he)=>se in de?Ge(de,se,{enumerable:!0,configurable:!0,writable:!0,value:he}):de[se]=he,lt=(de,se)=>{for(var he in se||(se={}))wt.call(se,he)&&Ft(de,he,se[he]);if(Ct)for(var he of Ct(se))$e.call(se,he)&&Ft(de,he,se[he]);return de},vt=(de,se)=>Ue(de,Me(se)),Ie=(de,se)=>{var he={};for(var ve in de)wt.call(de,ve)&&se.indexOf(ve)<0&&(he[ve]=de[ve]);if(de!=null&&Ct)for(var ve of Ct(de))se.indexOf(ve)<0&&$e.call(de,ve)&&(he[ve]=de[ve]);return he};const te=de=>{var se=de,{value:he,onChange:ve,scrollId:Ee}=se,Be=Ie(se,["value","onChange","scrollId"]);return ut.createElement("div",{id:Ee||""},ut.createElement(le.Z,vt(lt({},Be),{defaultValue:he,onChange:(Le,ze)=>{ze!=null&&ze.length?ve(Le,ze):ve(Le)}})))},ee=({value:de,onChange:se,placeholder:he,height:ve=140,isEdit:Ee,miniToolbar:Be,watch:Le=!0})=>Ee?ut.createElement(le.Z,{watch:Le,isFocus:!0,height:ve||void 0,placeholder:he,defaultValue:de,onChange:se,miniToolbar:Be}):ut.createElement("div",{style:{cursor:"pointer"}},de?ut.createElement(We.Z,{className:ke.Z.inputBorder,value:de}):ut.createElement("div",{className:`${ke.Z.inputBorder} ${ke.Z.placeholder} inputBorderError`},he))},35173:function(On,pn,pe){"use strict";pe.d(pn,{W:function(){return dt}});var le=pe(59301),ke=pe(8591),We=pe(12563),ut=pe(78241),Ge=pe(78673),Ue=pe(95237),Me=pe(43604),Ct=pe(6848),wt=pe(92832),$e=pe(5871),Ft=pe(43809),lt=pe(41984),vt=pe(12290),Ie=pe(61485),te=Object.defineProperty,ee=Object.defineProperties,de=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,Ee=(He,Nt,ot)=>Nt in He?te(He,Nt,{enumerable:!0,configurable:!0,writable:!0,value:ot}):He[Nt]=ot,Be=(He,Nt)=>{for(var ot in Nt||(Nt={}))he.call(Nt,ot)&&Ee(He,ot,Nt[ot]);if(se)for(var ot of se(Nt))ve.call(Nt,ot)&&Ee(He,ot,Nt[ot]);return He},Le=(He,Nt)=>ee(He,de(Nt)),ze=(He,Nt)=>{var ot={};for(var Tt in He)he.call(He,Tt)&&Nt.indexOf(Tt)<0&&(ot[Tt]=He[Tt]);if(He!=null&&se)for(var Tt of se(He))Nt.indexOf(Tt)<0&&ve.call(He,Tt)&&(ot[Tt]=He[Tt]);return ot};const je=He=>{var Nt=He,{value:ot,onChange:Tt}=Nt,xt=ze(Nt,["value","onChange"]);const Ot=Wt=>{Tt([Wt])};return le.createElement(vt.Z,Le(Be({},xt),{defaultValue:ot==null?void 0:ot[0],onChange:Ot}))},Xe=He=>{if(!He)return!1;if(/^s*$/.test(He)||He.trim()===""){ke.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Nt=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==="|"?(ke.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Ye=({value:He=[],onClose:Nt})=>le.createElement(We.default,{closable:!0,onClose:Nt,className:Ft.Z.keywordTag},le.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},He.join(" \u6216 "))),dt=({questionTitlePlaceholder:He,form:Nt,showKeywords:ot,isMustKeyWords:Tt=ot})=>{const[xt,Ot]=(0,le.useState)(!1),[Wt,Dt]=(0,le.useState)(""),tt=ut.default.useWatch("use_keywords",Nt),Ve=ut.default.useWatch("question_score",Nt);return le.createElement("div",{className:Ft.Z.wrap},le.createElement("div",{className:Ft.Z.questionTitleEditorWrap},le.createElement(ut.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},le.createElement(lt.h,{scrollId:"name",watch:!0,height:140,placeholder:He}))),le.createElement(ut.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},le.createElement(je,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),ot&&!Tt&&le.createElement(ut.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},le.createElement(Ge.Z,{defaultChecked:!0})),ot&&Tt&&le.createElement(Ue.Z,{align:"middle",className:"mb30"},le.createElement(ut.default.Item,{name:"use_keywords",valuePropName:"checked"},le.createElement(Ge.Z,null)),le.createElement(Me.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),le.createElement(Me.Z,null,le.createElement(Ct.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},le.createElement(Ie.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(tt||!Tt)&&le.createElement(ut.default.List,{name:"keywords",rules:[{validator(_t,vn){return Tt?vn!=null&&vn.length?(vn==null?void 0:vn.reduce((zt,qt)=>zt+qt.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()}}]},(_t,{add:vn,remove:yn})=>le.createElement(le.Fragment,null,le.createElement("div",{className:`${Ft.Z.title} mb10`},Tt?"\u5173\u952E\u8BCD":le.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),le.createElement(Ue.Z,{align:"middle",className:"font14 mb30"},le.createElement(Me.Z,{flex:1},le.createElement(wt.default,{value:Wt,onChange:zt=>{Dt(zt.target.value)},maxLength:50,allowClear:!0,onPressEnter:zt=>{var qt,ln,Gn,un;const _n=`${(qt=zt.target)==null?void 0:qt.value}`,St=(Gn=(ln=_n==null?void 0:_n.split("|"))==null?void 0:ln.filter(Ze=>!!Ze))==null?void 0:Gn.map(Ze=>Ze==null?void 0:Ze.trim()),Zn=Nt.getFieldValue("keywords"),ci=((un=Zn==null?void 0:Zn.map(Ze=>Ze==null?void 0:Ze.keyword))==null?void 0:un.flat())||[];for(const Ze of St)if(ci.includes(Ze)){ke.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Xe(_n)&&(vn({keyword:St,score:1}),Dt(""))},className:Ft.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"})),le.createElement(Me.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),_t.map(zt=>{var qt=zt,{key:ln,name:Gn}=qt,un=ze(qt,["key","name"]);return le.createElement(Ue.Z,{key:ln,className:"mb20",style:{marginRight:148}},le.createElement(Me.Z,{flex:1},le.createElement(Ue.Z,{align:"middle",justify:"space-between"},le.createElement(ut.default.Item,Le(Be({},un),{name:[Gn,"keyword"]}),le.createElement(Ye,{onClose:()=>yn(Gn)})),Tt&&le.createElement(ut.default.Item,Le(Be({},un),{name:[Gn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ft.Z.blankInputNumberWrapper}),le.createElement($e.Z,{className:Ft.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),le.createElement("div",{onClick:()=>Ot(!0)},le.createElement(ut.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(lt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:xt}))))}},94734:function(On,pn,pe){"use strict";pe.d(pn,{tc:function(){return _r.t},uh:function(){return le.u},rL:function(){return rr},u8:function(){return We.u},ZZ:function(){return ke.Z},Wk:function(){return ut.W}});var le=pe(65357),ke=pe(11832),We=pe(70472),ut=pe(35173),Ge=pe(59301),Ue=pe(36381),Me=pe(78241),Ct=pe(95237),wt=pe(43604),$e=pe(5871),Ft=pe(6848),lt=pe(38854),vt=pe(43809),Ie=pe(12893),te=pe(41984),ee=pe(43418),de=pe(92832),se=pe(78673),he=pe(59301),ve=Object.defineProperty,Ee=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Xe=(gi,di,xi)=>di in gi?ve(gi,di,{enumerable:!0,configurable:!0,writable:!0,value:xi}):gi[di]=xi,Ye=(gi,di)=>{for(var xi in di||(di={}))ze.call(di,xi)&&Xe(gi,xi,di[xi]);if(Le)for(var xi of Le(di))je.call(di,xi)&&Xe(gi,xi,di[xi]);return gi},dt=(gi,di)=>Ee(gi,Be(di)),He=(gi,di)=>{var xi={};for(var $i in gi)ze.call(gi,$i)&&di.indexOf($i)<0&&(xi[$i]=gi[$i]);if(gi!=null&&Le)for(var $i of Le(gi))di.indexOf($i)<0&&je.call(gi,$i)&&(xi[$i]=gi[$i]);return xi};const Nt=({value:gi,onChange:di})=>{const xi=Ri=>{ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:vt.Z.modal,onOk:()=>{const Kr=[...gi];Kr.splice(Ri,1),di(Kr)}})},$i=()=>{const Ri=[...gi];Ri.push(""),di(Ri)};return he.createElement(Ct.Z,{className:"ml20"},he.createElement(wt.Z,{flex:1},gi==null?void 0:gi.map((Ri,Kr)=>he.createElement(Ct.Z,{key:`${Ri}_${Kr}`,align:"middle",className:"mb20"},he.createElement(de.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Ri,autoSize:{maxRows:3},maxLength:1e3,onBlur:Sr=>{const Ne=[...gi],Ci=Sr.target.value.trim();Ne[Kr]=Ci,di(Ne)}}),he.createElement(Ft.Z,{title:"\u5220\u9664"},he.createElement(Ie.Z,{className:vt.Z.deleteIcon,style:{marginLeft:15,visibility:Kr>0?"visible":"hidden"},onClick:()=>xi(Kr)}))))),he.createElement(wt.Z,null,he.createElement("div",{className:`${vt.Z.addBtn}`,onClick:()=>{$i()}},"\u65B0\u589E\u7B54\u6848")))},ot=({value:gi=!0,onChange:di})=>he.createElement(se.Z,{checked:!gi,onChange:xi=>{di(!xi)}}),Tt="\u2581",xt=({questionTitlePlaceholder:gi,form:di,name:xi,scoreByBlank:$i=!1,answerKey:Ri,titleKey:Kr="name",analysisKey:Sr="analysis",isOrdered:Ne="is_ordered"})=>{var Ci,wr;const[Pn,Si]=(0,Ge.useState)(!1),Wi=(cn,At)=>{const ht=At.line;let en=0;for(let Rn=0;Rn<ht;Rn++)en+=cn.getLine(Rn).split(Tt).length-1;const fn=cn.getLine(ht).substring(0,At.ch);return en+=fn.split(Tt).length-1,en},qi=(cn,At,ht,en)=>{const fn=cn.getRange(At.from,At.to);let Rn=0;if(At.text.forEach(Qn=>{Rn+=Qn.split(Tt).length-1}),At.origin!=="setValue"){if(fn&&fn.indexOf(Tt)!==-1){const Qn=fn.split(Tt).length-1,Et=Wi(cn,At.from);if(console.log(`\u5220\u9664${Qn}\u4E2A\uFF0C \u524D\u9762\u6709${Et}\u4E2A\uFF0C\u65B0\u589E${Rn}\u4E2A`),Qn>1){const wn=Array.from({length:Qn},(Kn,Ei)=>Et+Ei);en(wn)}else en(Et)}else if(Rn>0){const Qn=Wi(cn,At.from);console.log(`\u65B0\u589E${Rn}\u4E2A\uFF0C\u4E4B\u524D\u6709${Qn}\u4E2A`),ht(Rn,Qn)}}},$n=()=>{const cn=di.getFieldValue(["sub_item_banks",...Ri]);di.setFieldValue(["sub_item_banks",...Ri],cn==null?void 0:cn.map((At,ht)=>dt(Ye({},At),{position:ht+1})))},qn=(0,Ge.useRef)(),Zt=(cn,At)=>{for(let ht=0;ht<cn;ht++)qn.current({position:null,answer_text:[""]},At+ht);$n()},$t=(0,Ge.useRef)(),Qe=cn=>{$t.current(cn),$n()},on=(wr=(Ci=di.getFieldValue("sub_item_banks"))==null?void 0:Ci[Ri==null?void 0:Ri[0]])==null?void 0:wr[Ri==null?void 0:Ri[1]];return(0,Ge.useEffect)(()=>{console.log("========",di.getFieldsValue())},[di]),he.createElement("div",{className:vt.Z.wrap},he.createElement("div",{className:vt.Z.questionTitleEditorWrap},he.createElement(Me.default.Item,{label:"\u9898\u5E72",name:Kr,labelCol:{span:24},rules:[{required:!0}]},he.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:gi,showNullButton:!0,onCMBeforeChange:(cn,At)=>{qi(cn,At,Zt,Qe)}}))),he.createElement(Me.default.List,{name:Ri,rules:[{validator(cn,At){if((At==null?void 0:At.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const ht of At){const{answer_text:en}=ht||{};if(en!=null&&en.some(fn=>(fn==null?void 0:fn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(cn,{add:At,remove:ht},{errors:en})=>(qn.current=At,$t.current=ht,he.createElement(he.Fragment,null,he.createElement(Me.default.Item,{label:he.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(cn!=null&&cn.length)&&he.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),cn.map((fn,Rn)=>{var Qn=fn,{key:Et,name:wn}=Qn,Kn=He(Qn,["key","name"]);return he.createElement(Ct.Z,{align:"top",key:Et},he.createElement(wt.Z,{className:`${vt.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",Rn+1),he.createElement(wt.Z,{flex:1},he.createElement(Ct.Z,{align:"top",justify:"space-between"},he.createElement(wt.Z,{flex:1},he.createElement(Me.default.Item,dt(Ye({},Kn),{name:[wn,"answer_text"],noStyle:!0}),he.createElement(Nt,null))),$i&&he.createElement(wt.Z,{flex:"224px"},he.createElement(Me.default.Item,dt(Ye({},Kn),{name:[wn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:vt.Z.blankInputNumberWrapper}),he.createElement($e.Z,{className:vt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),he.createElement(Me.default.Item,dt(Ye({},Kn),{name:[wn,"position"],noStyle:!0}),he.createElement(de.default,{type:"hidden"}))))})))),he.createElement(Ct.Z,{align:"middle"},he.createElement(Me.default.Item,{name:[xi,"downcase"],valuePropName:"checked"},he.createElement(se.Z,null)),he.createElement(wt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),he.createElement(Ct.Z,{align:"middle"},he.createElement(Me.default.Item,{name:[xi,"no_space"],valuePropName:"checked"},he.createElement(se.Z,null)),he.createElement(wt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(on==null?void 0:on.length)>1&&he.createElement(Ct.Z,{align:"middle",className:(on==null?void 0:on.length)>1?"mb30":`${vt.Z.hide}`},he.createElement(Me.default.Item,{name:Ne},he.createElement(ot,null)),he.createElement(wt.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")),he.createElement("div",{className:"mt30",onClick:()=>Si(!0)},he.createElement(Me.default.Item,{name:Sr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},he.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Pn}))))};var Ot=pe(59301),Wt=Object.defineProperty,Dt=Object.defineProperties,tt=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,yn=(gi,di,xi)=>di in gi?Wt(gi,di,{enumerable:!0,configurable:!0,writable:!0,value:xi}):gi[di]=xi,zt=(gi,di)=>{for(var xi in di||(di={}))_t.call(di,xi)&&yn(gi,xi,di[xi]);if(Ve)for(var xi of Ve(di))vn.call(di,xi)&&yn(gi,xi,di[xi]);return gi},qt=(gi,di)=>Dt(gi,tt(di)),ln=(gi,di)=>{var xi={};for(var $i in gi)_t.call(gi,$i)&&di.indexOf($i)<0&&(xi[$i]=gi[$i]);if(gi!=null&&Ve)for(var $i of Ve(gi))di.indexOf($i)<0&&vn.call(gi,$i)&&(xi[$i]=gi[$i]);return xi};const Gn={\u6B63\u786E:"T",\u9519\u8BEF:"F"},un=({value:gi,onChange:di,form:xi,choiceKey:$i})=>{const Ri=(gi==null?void 0:gi.is_answer)===1,Kr=gi==null?void 0:gi.choice_text,Sr=()=>{var Ne;const Ci=(Ne=xi==null?void 0:xi.getFieldValue(["sub_item_banks",...$i]))==null?void 0:Ne.map(wr=>({choice_text:wr.choice_text,is_answer:0}));xi==null||xi.setFieldValue(["sub_item_banks",...$i],Ci),di(qt(zt({},gi),{is_answer:1}))};return Ot.createElement(Ct.Z,{className:vt.Z.choiceWrap,align:"middle",wrap:!1},Ot.createElement(wt.Z,{onClick:Sr,className:`${vt.Z.choiceIndex} ${vt.Z.judgementIndex} ${Ri?vt.Z.activeAnswer:""}`},Gn[Kr]),Ot.createElement(wt.Z,{flex:1,className:`${vt.Z.editorWrap} ml15`},Ot.createElement("div",{className:`${vt.Z.inputBorder} ${vt.Z.placeholder} ${Ri?vt.Z.activeJudgementAnswer:""}`},Kr)),Ot.createElement(wt.Z,{flex:"0 0 auto",className:"ml15"},Ot.createElement("div",{onClick:Sr,className:`${vt.Z.setAnswerBtn} ${Ri?vt.Z.activeAnswer:""}`},Ri?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},_n=({questionTitlePlaceholder:gi,choiceKey:di="choices",form:xi,titleKey:$i="name",analysisKey:Ri="analysis"})=>{const[Kr,Sr]=(0,Ge.useState)(!1);return Ot.createElement("div",{className:vt.Z.wrap},Ot.createElement("div",{className:vt.Z.questionTitleEditorWrap},Ot.createElement(Me.default.Item,{label:"\u9898\u5E72",name:$i,labelCol:{span:24},rules:[{required:!0}]},Ot.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:gi}))),Ot.createElement(Me.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Ot.createElement(Me.default.List,{name:di,rules:[{validator(Ne,Ci){return Ci.some(Pn=>(Pn==null?void 0:Pn.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Ne=>Ot.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},Ne.map(Ci=>{var wr=Ci,{key:Pn,name:Si}=wr,Wi=ln(wr,["key","name"]);return Ot.createElement(Me.default.Item,qt(zt({},Wi),{key:Pn,name:Si,noStyle:!0}),Ot.createElement(un,{form:xi,choiceKey:di}))})))),Ot.createElement("div",{className:"mt30",onClick:()=>Sr(!0)},Ot.createElement(Me.default.Item,{name:Ri,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ot.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Kr}))))};var St=pe(8591),Zn=pe(12563),ci=pe(12290),Ze=pe(61485),be=Object.defineProperty,Pe=Object.defineProperties,Ae=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,Mt=(gi,di,xi)=>di in gi?be(gi,di,{enumerable:!0,configurable:!0,writable:!0,value:xi}):gi[di]=xi,at=(gi,di)=>{for(var xi in di||(di={}))xe.call(di,xi)&&Mt(gi,xi,di[xi]);if(Oe)for(var xi of Oe(di))ct.call(di,xi)&&Mt(gi,xi,di[xi]);return gi},qe=(gi,di)=>Pe(gi,Ae(di)),Lt=(gi,di)=>{var xi={};for(var $i in gi)xe.call(gi,$i)&&di.indexOf($i)<0&&(xi[$i]=gi[$i]);if(gi!=null&&Oe)for(var $i of Oe(gi))di.indexOf($i)<0&&ct.call(gi,$i)&&(xi[$i]=gi[$i]);return xi};const Bt=gi=>{var di=gi,{value:xi,onChange:$i}=di,Ri=Lt(di,["value","onChange"]);const Kr=Sr=>{$i([Sr])};return Ge.createElement(ci.Z,qe(at({},Ri),{defaultValue:xi==null?void 0:xi[0],onChange:Kr}))},ft=gi=>{if(!gi)return!1;let di=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 gi==="|"?(St.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Gt=({value:gi=[],onClose:di})=>Ge.createElement(Zn.default,{closable:!0,onClose:di,className:vt.Z.keywordTag},Ge.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},gi.join(" \u6216 "))),Sn=({questionTitlePlaceholder:gi,form:di,showKeywords:xi,isMustKeyWords:$i=xi,titleKey:Ri="name",analysisKey:Kr="analysis",answerTexts:Sr="answer_texts",keywords:Ne="keywords",useKeywords:Ci="use_keywords",indexs:wr})=>{const[Pn,Si]=(0,Ge.useState)(!1),[Wi,qi]=(0,Ge.useState)(""),[$n,qn]=(0,Ge.useState)(!1),Zt=Me.default.useWatch("question_score",di);return Ge.createElement("div",{className:vt.Z.wrap},Ge.createElement("div",{className:vt.Z.questionTitleEditorWrap},Ge.createElement(Me.default.Item,{label:"\u9898\u5E72",name:Ri,labelCol:{span:24},rules:[{required:!0}]},Ge.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:gi}))),Ge.createElement(Me.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:Sr,labelCol:{span:24}},Ge.createElement(Bt,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),xi&&!$i&&Ge.createElement(Me.default.Item,{hidden:!0,name:Ci,valuePropName:"checked"},Ge.createElement(se.Z,{defaultChecked:!0})),xi&&$i&&Ge.createElement(Ct.Z,{align:"middle",className:"mb30"},Ge.createElement(Me.default.Item,{name:Ci,valuePropName:"checked"},Ge.createElement(se.Z,{onChange:()=>{var $t,Qe,on,cn,At,ht;console.log(di.getFieldsValue()),qn((on=(Qe=($t=di.getFieldsValue())==null?void 0:$t.sub_item_banks)==null?void 0:Qe[wr])==null?void 0:on.use_keywords),console.log((ht=(At=(cn=di.getFieldsValue())==null?void 0:cn.sub_item_banks)==null?void 0:At[wr])==null?void 0:ht.use_keywords),console.log($n)}})),Ge.createElement(wt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),Ge.createElement(wt.Z,null,Ge.createElement(Ft.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(Ze.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),($n||!$i)&&Ge.createElement(Me.default.List,{name:Ne,rules:[{validator($t,Qe){return $i?Qe!=null&&Qe.length?(Qe==null?void 0:Qe.reduce((cn,At)=>cn+At.score,0))>parseFloat(Zt)?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()}}]},($t,{add:Qe,remove:on})=>Ge.createElement(Ge.Fragment,null,Ge.createElement("div",{className:`${vt.Z.title} mb10`},$i?"\u5173\u952E\u8BCD":Ge.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),Ge.createElement(Ct.Z,{align:"middle",className:"font14 mb30"},Ge.createElement(wt.Z,{flex:1},Ge.createElement(de.default,{value:Wi,onChange:cn=>{qi(cn.target.value)},maxLength:50,allowClear:!0,onPressEnter:cn=>{var At,ht,en,fn;const Rn=`${(At=cn.target)==null?void 0:At.value}`,Qn=(en=(ht=Rn==null?void 0:Rn.split("|"))==null?void 0:ht.filter(Kn=>!!Kn))==null?void 0:en.map(Kn=>Kn==null?void 0:Kn.trim()),Et=di.getFieldValue(["sub_item_banks",...Ne]),wn=((fn=Et==null?void 0:Et.map(Kn=>Kn==null?void 0:Kn.keyword))==null?void 0:fn.flat())||[];for(const Kn of Qn)if(wn.includes(Kn)){St.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}ft(Rn)&&(Qe({keyword:Qn,score:1}),qi(""))},className:vt.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(wt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),$t.map(cn=>{var At=cn,{key:ht,name:en}=At,fn=Lt(At,["key","name"]);return Ge.createElement(Ct.Z,{key:ht,className:"mb20",style:{marginRight:148}},Ge.createElement(wt.Z,{flex:1},Ge.createElement(Ct.Z,{align:"middle",justify:"space-between"},Ge.createElement(Me.default.Item,qe(at({},fn),{name:[en,"keyword"]}),Ge.createElement(Gt,{onClose:()=>on(en)})),$i&&Ge.createElement(Me.default.Item,qe(at({},fn),{name:[en,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:vt.Z.blankInputNumberWrapper}),Ge.createElement($e.Z,{className:vt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),Ge.createElement("div",{onClick:()=>Si(!0)},Ge.createElement(Me.default.Item,{name:Kr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ge.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Pn}))))};var an=pe(59301),rn=Object.defineProperty,zn=Object.defineProperties,kn=Object.getOwnPropertyDescriptors,mn=Object.getOwnPropertySymbols,ei=Object.prototype.hasOwnProperty,Pi=Object.prototype.propertyIsEnumerable,Hn=(gi,di,xi)=>di in gi?rn(gi,di,{enumerable:!0,configurable:!0,writable:!0,value:xi}):gi[di]=xi,bn=(gi,di)=>{for(var xi in di||(di={}))ei.call(di,xi)&&Hn(gi,xi,di[xi]);if(mn)for(var xi of mn(di))Pi.call(di,xi)&&Hn(gi,xi,di[xi]);return gi},wi=(gi,di)=>zn(gi,kn(di)),Zi=(gi,di)=>{var xi={};for(var $i in gi)ei.call(gi,$i)&&di.indexOf($i)<0&&(xi[$i]=gi[$i]);if(gi!=null&&mn)for(var $i of mn(gi))di.indexOf($i)<0&&Pi.call(gi,$i)&&(xi[$i]=gi[$i]);return xi};const{Panel:Hi}=Ue.default,rr=({questionTitlePlaceholder:gi,choiceKey:di,form:xi,withScore:$i})=>{const[Ri,Kr]=(0,Ge.useState)([]),Sr=Ne=>{Kr(Ne)};return an.createElement("div",{className:vt.Z.wrap},an.createElement("div",{className:vt.Z.questionTitleEditorWrap},an.createElement(Me.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},an.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:gi}))),an.createElement(Me.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),an.createElement(Me.default.List,{name:"sub_item_banks",rules:[{validator(Ne,Ci){return Ci?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Ne,{add:Ci,remove:wr,move:Pn})=>{const Si=xi.getFieldValue("sub_item_banks");return an.createElement(an.Fragment,null,an.createElement(Ue.default,{className:Ne.length>0?vt.Z.collapseWrapper:"",bordered:!1,activeKey:Ri,onChange:Sr,expandIcon:({isActive:Wi})=>an.createElement("i",{className:`iconfont icon-weizhankai ${Wi?vt.Z.open:vt.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},Ne.map((Wi,qi)=>{var $n=Wi,{key:qn,name:Zt}=$n,$t=Zi($n,["key","name"]),Qe,on,cn,At,ht,en,fn,Rn,Qn,Et;return an.createElement(Hi,{className:vt.Z.panel,forceRender:!0,header:an.createElement("div",{className:vt.Z.panelHeader},"\u7B2C",qi+1,"\u5C0F\u9898",an.createElement("span",null,"\uFF08",((Qe=Si==null?void 0:Si[Zt])==null?void 0:Qe.item_type)=="SINGLE"?"\u5355\u9009\u9898":((on=Si==null?void 0:Si[Zt])==null?void 0:on.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((cn=Si==null?void 0:Si[Zt])==null?void 0:cn.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((At=Si==null?void 0:Si[Zt])==null?void 0:At.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:Zt,extra:an.createElement(Ct.Z,{align:"middle",onClick:wn=>wn.stopPropagation()},$i&&an.createElement(wt.Z,null,an.createElement(Me.default.Item,wi(bn({},$t),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[Zt,"question_score"],className:vt.Z.blankInputNumberWrapper}),an.createElement($e.Z,{className:vt.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),an.createElement(wt.Z,null,an.createElement(Ct.Z,{align:"middle",className:"pl40",justify:"end"},qi!==0&&an.createElement("div",{onClick:()=>{var wn;Pn(qi,qi-1);const Kn=(wn=xi.getFieldValue("sub_item_banks"))==null?void 0:wn.map((Ei,tn)=>(Ne.map((sn,In)=>{tn===In&&(Ei.q_position=Number(sn.name)+1)}),Ei));xi.setFieldValue("sub_item_banks",Kn)}},an.createElement(Ft.Z,{title:"\u4E0A\u79FB"},an.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),qi<Ne.length-1&&an.createElement("div",{onClick:()=>{var wn;Pn(qi,qi+1);const Kn=(wn=xi.getFieldValue("sub_item_banks"))==null?void 0:wn.map((Ei,tn)=>(Ne.map((sn,In)=>{tn===In&&(Ei.q_position=Number(sn.name)+1)}),Ei));xi.setFieldValue("sub_item_banks",Kn)},className:qi===0?"":"ml15"},an.createElement(Ft.Z,{title:"\u4E0B\u79FB"},an.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),an.createElement(wt.Z,null,an.createElement(Ft.Z,{title:"\u5220\u9664"},an.createElement(Ie.Z,{className:`${vt.Z.deleteIcon} ml15`,onClick:()=>wr(Zt)}))))},an.createElement(Me.default.Item,wi(bn({},$t),{name:Zt}),(((ht=Si==null?void 0:Si[Zt])==null?void 0:ht.item_type)=="SINGLE"||((en=Si==null?void 0:Si[Zt])==null?void 0:en.item_type)=="MULTIPLE")&&an.createElement(le.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((fn=Si==null?void 0:Si[Zt])==null?void 0:fn.item_type)=="MULTIPLE",form:xi,choiceKey:[Zt,"choices"],titleKey:[Zt,"name"],analysisKey:[Zt,"analysis"],choiceOptionsPath:["sub_item_banks",Zt,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((Rn=Si==null?void 0:Si[Zt])==null?void 0:Rn.item_type)=="COMPLETION"&&an.createElement(xt,{form:xi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,name:Zt,titleKey:[Zt,"name"],analysisKey:[Zt,"analysis"],isOrdered:[Zt,"is_ordered"],answerKey:[Zt,"standard_answers"]}),((Qn=Si==null?void 0:Si[Zt])==null?void 0:Qn.item_type)=="JUDGMENT"&&an.createElement(_n,{form:xi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Zt,"name"],analysisKey:[Zt,"analysis"],choiceKey:[Zt,"choices"]}),((Et=Si==null?void 0:Si[Zt])==null?void 0:Et.item_type)=="SUBJECTIVE"&&an.createElement(Sn,{showKeywords:!0,isMustKeyWords:!1,form:xi,titleKey:[Zt,"name"],analysisKey:[Zt,"analysis"],answerTexts:[Zt,"answer_texts"],useKeywords:[Zt,"use_keywords"],keywords:[Zt,"keywords"],indexs:Zt,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})),Ne.length<20&&an.createElement(lt.Z,{menu:{items:[{label:an.createElement("div",{onClick:()=>{Ci({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),Kr([Ne==null?void 0:Ne.length,...Ri])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:an.createElement("div",{onClick:()=>{Ci({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),Kr([Ne==null?void 0:Ne.length,...Ri])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:an.createElement("div",{onClick:()=>{Ci({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),Kr([Ne==null?void 0:Ne.length,...Ri])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:an.createElement("div",{onClick:()=>{Ci({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),Kr([Ne==null?void 0:Ne.length,...Ri])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:an.createElement("div",{onClick:()=>{Ci({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),Kr([Ne==null?void 0:Ne.length,...Ri])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter(Wi=>Wi.show).map(Wi=>({label:Wi.label,key:Wi.key}))}},an.createElement("div",{className:`${vt.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var _r=pe(90502)},85149:function(On,pn,pe){"use strict";pe.d(pn,{z:function(){return ze},Z:function(){return je}});var le=pe(59301),ke=pe(50304),We=pe(24768),ut=pe(64018),Ge=pe(40846),Ue=pe(3294),Me=pe(955),Ct=pe(15342),wt=pe(1012),$e=pe(23210),Ft=pe(59301),vt=({html:Xe})=>{const Ye=(0,le.useRef)(null),dt=(0,le.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,le.useEffect)(()=>{const Nt=Ye.current.attachShadow({mode:"open"});dt.current=document.createElement("div"),dt.current.className="markdown-body",dt.current.innerHTML=Xe,Nt.appendChild(dt.current);const ot=document.createElement("style");return ot.textContent=He,Nt.appendChild(ot),()=>{Nt.innerHTML=""}},[]),(0,le.useEffect)(()=>{dt.current&&(dt.current.innerHTML=Xe)},[Xe]),Ft.createElement("div",{ref:Ye})},Ie=Object.defineProperty,te=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,se=(Xe,Ye,dt)=>Ye in Xe?Ie(Xe,Ye,{enumerable:!0,configurable:!0,writable:!0,value:dt}):Xe[Ye]=dt,he=(Xe,Ye)=>{for(var dt in Ye||(Ye={}))ee.call(Ye,dt)&&se(Xe,dt,Ye[dt]);if(te)for(var dt of te(Ye))de.call(Ye,dt)&&se(Xe,dt,Ye[dt]);return Xe};const ve="@\u2581\u2581@",Ee="@\u2581@",Be=/<pre[^>]*>/g;function Le(Xe){let Ye=document.createElement("div");return Ye.innerHTML=Xe,Ye.childNodes.length===0?"":Ye.childNodes[0].nodeValue}const ze=(Xe,Ye)=>{Xe=Xe||"";const dt=/(?: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,Nt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ot=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ye?Xe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(dt,(Tt,xt,Ot,Wt,Dt,tt,Ve)=>{const _t=xt||Wt||tt,vn=Ot||Dt||Ve||"?";return Ue.Z.API_SERVER+"/api/attachments/"+_t+vn+"&t="+(0,Me.Jn)(_t,Date.now())+(Tt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Xe=Xe.replace(ot,(Tt,xt,Ot,Wt,Dt,tt,Ve)=>{const _t=xt||Wt||tt,vn=Ot||Dt||Ve||"?";return Ue.Z.API_SERVER+"/attachments/download/"+_t+vn+"&t="+(0,Me.Jn)(_t,Date.now())+(Tt.indexOf(")")>-1?")":"&")}).replace(dt,(Tt,xt,Ot,Wt,Dt,tt,Ve)=>{const _t=xt||Wt||tt,vn=Ot||Dt||Ve||"?";return Ue.Z.API_SERVER+"/api/attachments/"+_t+vn+"&t="+(0,Me.Jn)(_t,Date.now())+(Tt.indexOf(")")>-1?")":"&")}).replace(He,(Tt,xt,Ot,Wt,Dt)=>{const tt=xt||Wt,Ve=Ot||Dt||"";return'"'+Ue.Z.API_SERVER+"/api/attachments/"+tt+Ve+tt+Ve+"&t="+(0,Me.Jn)(tt,Date.now())}).replace(Nt,(Tt,xt,Ot,Wt,Dt)=>{const tt=xt||Wt,Ve=Ot||Dt||"";return"("+Ue.Z.API_SERVER+"/files/uploads/"+tt+Ve+tt+Ve+"&t="+(0,Me.Jn)(tt,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,`
`),Xe)};var je=({value:Xe="",className:Ye,showTextOnly:dt,showLines:He,style:Nt={},stylesPrev:ot={},highlightKeywords:Tt,showProgramFill:xt,isProgramFill:Ot,disabledFill:Wt=!1,programFillValue:Dt,onFillChange:tt=vn=>{},onFillBlur:Ve=()=>{},onFillFocus:_t=()=>{}})=>{let vn=String(Xe);const[yn,zt]=(0,le.useState)(""),[qt,ln]=(0,le.useState)("office"),[Gn,un]=(0,le.useState)([]),_n=(0,le.useRef)("a"+(0,wt.Z)()),St={},Zn=(Lt,Bt,ft)=>{const Gt=document.createElement(Lt===Ee?"input":"textarea");Gt.style.width="100%",Gt.style.height=Lt===Ee?"40px":"151px",Gt.rows=5,Gt.spellcheck=!1,Gt.name="edu-program-fill",Gt.placeholder="\u8BF7\u8F93\u5165",Gt.dataset.id=Bt;const Sn=Object.keys(St).length;return St[Sn]=Gt,`<span class="edu-program-fill-wrap ${Lt===Ee?"":"show"}" style="width:${Lt===Ee?"400px":"100%"}" title=${ft||""}><span>${Gt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function ci(Lt){return Lt=Lt.replace(/!\[.*?\]\(.*?\)/g,""),Lt=Lt.replace(/\[.*?\]\(.*?\)/g,""),Lt=Lt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Lt=Lt.replace(/<embed.*?>/g,""),Lt=Lt.replace(/<img.*?>/g,""),Lt=Lt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Lt=Lt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Lt=Lt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Lt=Lt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Lt}const Ze=Lt=>Lt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Bt,ft){let Gt=ft.replace(/(\n|\r)/g,"").split("}"),Sn=[];return Gt.map(an=>{an!=""&&Sn.push(`.${_n.current} ${an}`)}),`<style>${Sn.join("}")}</style>`}),be=(0,le.useMemo)(()=>{try{const Gt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Sn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,an=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,rn=/\(\/attachments\/download\//g;vn=vn.replace(rn,"("+Ue.Z.API_SERVER+"/attachments/download/").replace(Gt,"("+Ue.Z.API_SERVER+"/api/attachments/").replace(Sn,'"'+Ue.Z.API_SERVER+"/api/attachments/").replace(an,'"'+Ue.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(Gt){}if(xt){let Gt=-1;return vn=vn.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Sn,an,rn){var zn;return++Gt,Zn(Sn,Gt,(zn=Dt==null?void 0:Dt[Gt])==null?void 0:zn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ze(vn||"")}</pre>`}let Lt=Ze(vn);Lt=(0,We.ZP)(Lt);const Bt=(0,We.ez)();vn.match(/\[TOC\]/)&&(Lt=Lt.replace("<p>[TOC]</p>",(0,We.Qv)()),(0,We.Iy)()),Lt=Lt.replace(/(__special_katext_id_\d+__)/g,(Gt,Sn)=>{const{type:an,expression:rn}=Bt[Sn];return(0,Ct.renderToString)(Le(rn)||"",{displayMode:an==="block",throwOnError:!1,output:"html"})}),Lt=Lt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,We.AL)();const ft=document.createElement("div");if(ft.innerHTML=Lt,dt)return ft.innerText;if(Tt){const Gt=Tt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return xe(ft,Gt),ft.innerHTML}return setTimeout(()=>at(),500),ft.innerHTML},[vn,Tt]);(0,le.useEffect)(()=>{ct.current&&ct.current.querySelectorAll(["input","textarea"]).forEach(Bt=>{Bt.oninput=Pe,Bt.onblur=Ae,Bt.onfocus=Oe})},[Gn]),(0,le.useEffect)(()=>{var Lt,Bt,ft,Gt,Sn;if(Dt!=null&&Dt.length)try{const an=ct.current.querySelectorAll(".edu-program-fill-score"),rn=ct.current.querySelectorAll('[name="edu-program-fill"]');for(const[zn,kn]of rn.entries())kn.value=((Lt=Dt==null?void 0:Dt[zn])==null?void 0:Lt.value)||"",((Bt=Dt==null?void 0:Dt[zn])==null?void 0:Bt.type)==="warning"?kn.className="program-fill-warning":((ft=Dt==null?void 0:Dt[zn])==null?void 0:ft.type)==="success"?kn.className="program-fill-success":kn.className="";for(const[zn,kn]of an.entries())kn.innerHTML=(Gt=Dt==null?void 0:Dt[zn])!=null&&Gt.score?`${(Sn=Dt==null?void 0:Dt[zn])==null?void 0:Sn.score}\u5206`:"";un(Dt)}catch(an){console.log(an,"error")}},[Dt]);const Pe=Lt=>{Gn[Lt.target.dataset.id]=Gn[Lt.target.dataset.id]||{},Gn[Lt.target.dataset.id].value=Lt.target.value,un([...Gn]),tt(Gn,Lt.target.dataset.id)},Ae=Lt=>{Gn[Lt.target.dataset.id]=Gn[Lt.target.dataset.id]||{},Gn[Lt.target.dataset.id].value=Lt.target.value,un([...Gn]),Ve(Gn,Lt.target.dataset.id)},Oe=Lt=>{Gn[Lt.target.dataset.id]=Gn[Lt.target.dataset.id]||{},Gn[Lt.target.dataset.id].value=Lt.target.value,un([...Gn]),_t(Gn,Lt.target.dataset.id)};function xe(Lt,Bt){return Lt.childNodes.forEach(ft=>{var Gt;if(ft.childNodes.length>0)xe(ft,Bt);else if(ft.nodeName!=="IMG")if(ft.innerHTML)ft.innerHTML=(Gt=ft.innerHTML)==null?void 0:Gt.replace(new RegExp(Bt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Sn=document.createElement("span");Sn.innerHTML=ft.textContent.replace(new RegExp(Bt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ft.replaceWith(Sn)}})}const ct=(0,le.useRef)();We.jb.WebkitLineClamp=He,He&&(Nt=he(he({},Nt),We.jb));function Mt(Lt){let Bt=Lt.target;if(Bt.tagName.toUpperCase()==="A"){let ft=Bt.getAttribute("href");if(ft.indexOf("office")>-1)Lt.preventDefault(),zt(ft),ln("office");else if(ft.indexOf("application/pdf")>-1)Lt.preventDefault(),zt(ft),ln("pdf");else if(ft.indexOf("text/html")>-1)Lt.preventDefault(),zt(ft),ln("html");else if(ft.startsWith("#")){Lt.preventDefault();let Gt=document.getElementById(ft.replace("#",""));Gt&&Gt.scrollIntoView(!0)}}}const at=()=>{var Lt;const Bt=(Lt=ct.current)==null?void 0:Lt.querySelectorAll("video");Bt==null||Bt.forEach(ft=>{if(ft.oncontextmenu=()=>!1,ft.src.indexOf(".m3u8")>-1&&!ft.canPlayType("application/vnd.apple.mpegurl")){if(Ge.ZP.isSupported()){var Gt=new Ge.ZP;Gt.loadSource(ft.src),Gt.attachMedia(ft)}}})};(0,le.useEffect)(()=>{if(ct.current&&be&&be.match(Be)&&window.PR.prettyPrint(),ct.current)return ct.current.addEventListener("click",Mt),()=>{var Lt;(Lt=ct.current)==null||Lt.removeEventListener("click",Mt),(0,We.AL)(),(0,We.Iy)()}},[be,ct.current,Mt]),(0,le.useEffect)(()=>{var Lt;const Bt=ft=>{ft.preventDefault(),ft.clipboardData.setData("text",window.getSelection().toString())};return(Lt=ct.current)==null||Lt.addEventListener("copy",Bt),()=>{var ft;(ft=ct.current)==null||ft.removeEventListener("copy",Bt)}},[ct.current]);const qe=Lt=>/<style[\s\S]*?>/i.test(Lt||"");return le.createElement(le.Fragment,null,dt&&le.createElement("div",{ref:ct},be),!dt&&!qe(be)&&le.createElement("div",{ref:ct,style:he({},Nt),className:`${Ye||""} ${Wt?"disabled-fill":""} markdown-body ${_n.current}`,dangerouslySetInnerHTML:{__html:be}}),!dt&&qe(be)&&le.createElement(vt,{html:be}),le.createElement($e.Z,{close:!0,data:yn,type:yn!=null&&yn.length?qt:"",style:he({},ot),onClose:()=>zt("")}))}},68042:function(On,pn,pe){"use strict";pe.d(pn,{C:function(){return xt}});var le=pe(59301),ke={recalculation:"recalculation____i9AE",tips:"tips___GoMu8",filter:"filter___Vx7VO",input:"input___OEMMv",operating:"operating___TS9iA",operatingItem:"operatingItem___AT84q"},We=pe(92310),ut=pe.n(We),Ge=pe(24905),Ue=pe(95237),Me=pe(8591),Ct=pe(6848),wt=pe(3113),$e=pe(43418),Ft=pe(1710),lt=pe(5871),vt=pe(78241),Ie=pe(71418),te=pe(955),ee=pe(99064),de=pe(24065),se=pe(59155),he=pe(85057),ve=Object.defineProperty,Ee=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Xe=(Ot,Wt,Dt)=>Wt in Ot?ve(Ot,Wt,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):Ot[Wt]=Dt,Ye=(Ot,Wt)=>{for(var Dt in Wt||(Wt={}))ze.call(Wt,Dt)&&Xe(Ot,Dt,Wt[Dt]);if(Le)for(var Dt of Le(Wt))je.call(Wt,Dt)&&Xe(Ot,Dt,Wt[Dt]);return Ot},dt=(Ot,Wt)=>Ee(Ot,Be(Wt)),He=(Ot,Wt,Dt)=>new Promise((tt,Ve)=>{var _t=zt=>{try{yn(Dt.next(zt))}catch(qt){Ve(qt)}},vn=zt=>{try{yn(Dt.throw(zt))}catch(qt){Ve(qt)}},yn=zt=>zt.done?tt(zt.value):Promise.resolve(zt.value).then(_t,vn);yn((Dt=Dt.apply(Ot,Wt)).next())});const Nt=Ge.default.Group,ot=({className:Ot,title:Wt,items:Dt=[],value:tt,onChange:Ve})=>{const _t=(Dt==null?void 0:Dt.length)===(tt==null?void 0:tt.length),vn=(tt==null?void 0:tt.length)>0&&(tt==null?void 0:tt.length)<(Dt==null?void 0:Dt.length),yn=zt=>{const qt=Dt.map(ln=>ln.id);Ve(zt.target.checked?qt:[])};return le.createElement(Ue.Z,{align:"middle",className:Ot},!!Wt&&le.createElement("div",{className:"mr20",style:{color:"#5F6368"}},Wt),le.createElement(Ge.default,{indeterminate:vn,onChange:yn,checked:_t},"\u5168\u90E8"),le.createElement(Nt,{value:tt,onChange:Ve},Dt.map(zt=>le.createElement(Ge.default,{className:"ml30 c-black",key:zt.id,value:zt.id},zt.name,le.createElement("span",null,`(${zt.count})`)))))};var xt=({className:Ot,style:Wt,dataSource:Dt})=>{var tt,Ve,_t,vn,yn,zt,qt;const[ln,Gn]=(0,le.useState)({}),[un,_n]=(0,le.useState)(!0),[St,Zn]=(0,le.useState)(!1),[ci,Ze]=(0,le.useState)(!1),[be,Pe]=(0,le.useState)(null),[Ae,Oe]=(0,le.useState)(0),[xe,ct]=(0,le.useState)({}),[Mt,at]=(0,le.useState)(!0),[qe,Lt]=(0,le.useState)(0),[Bt,ft]=(0,le.useState)(0),[Gt,Sn]=(0,le.useState)(!1),an=(0,le.useRef)(null),[rn,zn]=(0,le.useState)(!1),[kn,mn]=(0,le.useState)(!0),[ei,Pi]=(0,le.useState)([]),Hn={page:1,per_page:5,keyword:"",review:[],question_status:[],success_status:[],sort_by:null,direction:null},[bn,wi]=(0,le.useState)(Ye({},Hn));(0,le.useEffect)(()=>{Dt!=null&&Dt.question_id&&Gn(Dt)},[Dt==null?void 0:Dt.question_id]),(0,le.useEffect)(()=>{var Ci;if(((Ci=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ci.status)==="running"){const wr=setInterval(()=>{rr()},3e3);return()=>clearInterval(wr)}},[(tt=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:tt.status]),(0,le.useEffect)(()=>{var Ci;ci&&(ci===1&&(bn.question_status=_r.map(wr=>wr.value),bn.review=gi.map(wr=>wr.value)),ci===2&&(bn.exercise_question_resubmit_id=(Ci=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ci.id,be===1&&(bn.success_status=[1]),be===2&&(bn.success_status=[0])),wi(Ye({},bn)),Zi(bn),ft(ln!=null&&ln.is_mirror?3:10),Lt(ln!=null&&ln.is_mirror?1:5))},[ci]),(0,le.useEffect)(()=>{rn&&Hi()},[rn]);const Zi=Ci=>He(void 0,null,function*(){_n(!0);const wr=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_student_list.json`,{method:"get",params:Ci});(wr==null?void 0:wr.status)==0&&(ct(wr||[]),Oe(wr==null?void 0:wr.count)),_n(!1)}),Hi=()=>He(void 0,null,function*(){mn(!0);const Ci=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_history.json`,{method:"get"});(Ci==null?void 0:Ci.status)==0&&Pi((Ci==null?void 0:Ci.data)||[]),mn(!1)}),rr=()=>He(void 0,null,function*(){const Ci=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_status.json`,{method:"get"});(Ci==null?void 0:Ci.status)==0&&Gn(dt(Ye({},ln),{show_resubmit_history:!0,exercise_question_resubmit:(Ci==null?void 0:Ci.data)||{}}))}),_r=[{label:"\u672A\u8BC4\u6D4B",value:2,color:"#9096A3"},{label:"\u672A\u901A\u5173",value:0,color:"#E30000"},{label:"\u5DF2\u901A\u5173",value:1,color:"#00B187"}],gi=[{label:"\u672A\u8BC4\u9605",value:0,color:"#9096A3"},{label:"\u8BC4\u9605\u4E2D",value:2,color:"#FF9D18"},{label:"\u5DF2\u8BC4\u9605",value:1,color:"#3061D0"}],di=[{label:"\u6210\u529F",value:1,color:"#00B187"},{label:"\u5931\u8D25",value:0,color:"#E30000"}],xi=[{title:"\u5E8F\u53F7",dataIndex:"key",render:(Ci,wr,Pn)=>le.createElement("span",{className:"c-black"},Pn+1+(bn.page-1)*bn.per_page)},{title:"\u59D3\u540D",dataIndex:"user_name",render:Ci=>le.createElement("span",{className:"c-black"},Ci)},{title:"\u5B66\u53F7",dataIndex:"student_id",sorter:!0,render:Ci=>le.createElement("span",{className:"c-grey-666"},Ci||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",render:Ci=>le.createElement("span",{className:"c-black"},Ci)},{title:"\u9898\u76EE\u72B6\u6001",dataIndex:"question_status",render:Ci=>{const{label:wr,color:Pn}=_r.find(Si=>Si.value===Ci)||{};return le.createElement("span",{style:{color:Pn}},wr)}},{title:"\u9898\u76EE\u5F97\u5206",dataIndex:"question_score",sorter:!0,render:Ci=>le.createElement("span",{className:"c-black"},Ci)},{title:"\u6700\u7EC8\u6210\u7EE9",dataIndex:"score",sorter:!0,render:Ci=>le.createElement("span",{className:"c-black"},Ci)},{title:"\u8BC4\u9605\u72B6\u6001",dataIndex:"review",render:Ci=>{const{label:wr,color:Pn}=gi.find(Si=>Si.value===Ci)||{};return le.createElement("span",{style:{color:Pn}},wr)}},ci===2&&{title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"success_status",render:Ci=>{const{label:wr,color:Pn}=di.find(Si=>Si.value===Ci)||{};return le.createElement("span",{style:{color:Pn}},wr)}}].filter(Boolean),$i=(Ci,wr,Pn)=>{bn.page=Ci==null?void 0:Ci.current,bn.per_page=Ci==null?void 0:Ci.pageSize,Pn!=null&&Pn.order?(bn.sort_by=Pn==null?void 0:Pn.field,bn.direction=(Pn==null?void 0:Pn.order)==="ascend"?"asc":"desc"):(bn.sort_by=null,bn.direction=null),wi(Ye({},bn)),Zi(bn)},Ri=()=>{if(!qe){Me.ZP.warning("\u8BF7\u8F93\u5165\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570");return}Sn(!0)},Kr=()=>He(void 0,null,function*(){var Ci,wr;if((Ci=an.current)!=null&&Ci.onVerify())return;Zn(!0);const Pn=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit.json`,{method:"post",body:{keyword:bn.keyword,question_status:bn.question_status,review:bn.review_status,success_status:bn.success_status,use_max_score:Mt,permits:qe,exercise_question_resubmit_id:ci===1?null:(wr=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:wr.id}});(Pn==null?void 0:Pn.status)==0&&(yield rr(),Me.ZP.success("\u64CD\u4F5C\u6210\u529F"),Sn(!1),Ze(!1)),Zn(!1)}),Sr=(Ci,wr)=>{bn.page=1,bn[wr]=Ci,wi(Ye({},bn)),Zi(bn)},Ne=["","\u5F53\u524D\u9898\u76EE\u7684\u5B9E\u9A8C\u8D44\u6E90\u4E3A\u4E13\u6709\u4E91\uFF0C\u4E0D\u652F\u6301\u91CD\u65B0\u8BC4\u6D4B~","\u8BE5\u529F\u80FD\u4EC5\u8BFE\u5802\u7BA1\u7406\u5458\u548C\u8003\u8BD5\u7684\u521B\u5EFA\u8005\u53EF\u4EE5\u64CD\u4F5C~"];return le.createElement(le.Fragment,null,le.createElement("div",{className:ut()(ke.recalculation,Ot),style:Wt},le.createElement(Ct.Z,{title:Ne[(ln==null?void 0:ln.disable_resubmit_reason)||0]},le.createElement(wt.ZP,{disabled:(ln==null?void 0:ln.disable_resubmit)||((Ve=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ve.status)==="running",onClick:()=>Ze(1),icon:le.createElement("i",{className:"iconfont icon-zhongxinpingce font14"}),type:"primary",ghost:!0},"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206")),(ln==null?void 0:ln.show_resubmit_history)&&le.createElement(le.Fragment,null,((_t=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:_t.status)==="running"?le.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",le.createElement("span",{className:"c-light-primary ml3"},(vn=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:vn.rate)):le.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",le.createElement("span",{onClick:()=>{Ze(2),Pe(1)},className:"current",style:{color:"#3061D0",textDecoration:"underline",margin:"0 3px"}},(yn=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:yn.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",le.createElement("span",{onClick:()=>{Ze(2),Pe(2)},className:"current",style:{color:"#E30000",textDecoration:"underline",margin:"0 3px"}},(zt=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:zt.fail_count),"\u4EBA"),le.createElement(Ct.Z,{title:"\u64CD\u4F5C\u8BB0\u5F55"},le.createElement("i",{onClick:()=>zn(!0),className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})))),le.createElement($e.default,{centered:!0,open:!!ci,title:`\u91CD\u65B0\u8BC4\u6D4B${ci===1?"\u7B97\u5206":"\u7ED3\u679C"}`,width:870,okText:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",onCancel:()=>Ze(!1),onOk:Ri,afterClose:()=>{at(!0),Pe(null),wi(Ye({},Hn))}},le.createElement("div",{className:ke.filter},ci===1&&le.createElement(le.Fragment,null,le.createElement("div",{className:ke.tips},le.createElement("div",{className:"mb5",style:{color:"#FF9D18"}},le.createElement("i",{className:"iconfont icon-tishi9 mr10 font14"}),"\u6E29\u99A8\u63D0\u793A"),le.createElement("div",null,"1.\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206\u6D41\u7A0B\uFF1A \u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6\u5B66\u751F\u5728\u8003\u8BD5\u9875\u9762\u4FDD\u5B58\u7684\u6700\u65B0\u4EE3\u7801\uFF0C\u5E76\u8FDB\u884C\u91CD\u65B0\u8BC4\u6D4B\uFF0C\u4ECE\u800C\u7CBE\u51C6\u8BA1\u7B97\u51FA\u5B66\u751F\u7684\u6700\u7EC8\u5F97\u5206\uFF1B"),le.createElement("div",{style:{margin:"2px 0"}},"2.\u91CD\u65B0\u8BC4\u6D4B\u6761\u4EF6\uFF1A \u8003\u8BD5\u7ED3\u675F\u540E\uFF0C\u4EC5\u5BF9\u5DF2\u63D0\u4EA4\u8BD5\u5377\u4E14\u5DF2\u4F5C\u7B54\u8BE5\u9898\u76EE\u7684\u5B66\u751F\u8FDB\u884C\u91CD\u65B0\u8BC4\u6D4B\u4E0E\u7B97\u5206\uFF1B"),le.createElement("div",null,"3.\u91CD\u65B0\u8BC4\u6D4B\u65F6\uFF0C\u8BF7\u786E\u4FDD\u5B9E\u9A8C\u73AF\u5883\u80FD\u6B63\u5E38\u542F\u52A8\u5E76\u53EF\u8FD0\u884C\u8BC4\u6D4B\u3002")),le.createElement(ot,{className:"mt10",title:"\u9898\u76EE\u72B6\u6001",items:(xe==null?void 0:xe.question_status)||[],value:bn.question_status,onChange:Ci=>Sr(Ci,"question_status")}),le.createElement(ot,{className:"mt10",title:"\u8BC4\u9605\u72B6\u6001",items:(xe==null?void 0:xe.review_status)||[],value:bn.review,onChange:Ci=>Sr(Ci,"review")})),ci===2&&le.createElement(le.Fragment,null,le.createElement(ot,{className:"mt10",title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",items:(xe==null?void 0:xe.success_status)||[],value:bn.success_status,onChange:Ci=>Sr(Ci,"success_status")})),le.createElement(he.t7,{className:ke.input,style:{bottom:ci===1?10:-5},value:bn.keyword,onChange:Ci=>Sr(Ci,"keyword"),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22"})),le.createElement(Ft.default,{className:"mt20",columns:xi,scroll:((qt=xe==null?void 0:xe.data)==null?void 0:qt.length)>7?{y:300}:{},dataSource:(xe==null?void 0:xe.data)||[],loading:un,onChange:$i,pagination:{total:Ae,pageSize:bn.per_page,current:bn.page,hideOnSinglePage:!Ae,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100"],showQuickJumper:!0,size:"default",showTotal:te.rU}}),le.createElement(Ue.Z,{justify:"space-between",align:"middle",className:"mt10"},le.createElement(Ge.default,{className:"c-black",checked:Mt,onChange:Ci=>at(Ci.target.checked)},"\u91CD\u65B0\u8BC4\u6D4B\u540E\u7684\u5206\u6570\u5927\u4E8E\u539F\u6765\u7684\u5206\u6570\u624D\u66F4\u65B0\u6210\u7EE9"),(0,de.Ny)()&&le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570",le.createElement(lt.Z,{className:"ml10 mr10",value:qe,max:Bt,min:1,precision:0,onChange:Ci=>Lt(Ci)}),"\u4EBA",le.createElement(Ct.Z,{overlayStyle:{maxWidth:450},title:"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A20\u4EBA\uFF08\u81EA\u5B9A\u4E49\u955C\u50CF\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A3\u4EBA\uFF09\u3002"},le.createElement("i",{style:{color:"#9096A3"},className:"iconfont icon-tishi5 font13 ml10"}))))),le.createElement($e.default,{centered:!0,title:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",open:Gt,width:494,zIndex:1001,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:St,destroyOnClose:!0,onOk:Kr,onCancel:()=>Sn(!1)},le.createElement(vt.default.Item,{className:"mb0",colon:!1,label:"\u9A8C\u8BC1\u7801",name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},le.createElement(se.Z,{ref:Ci=>an.current=Ci}))),le.createElement($e.default,{centered:!0,title:"\u64CD\u4F5C\u8BB0\u5F55",open:rn,width:710,onCancel:()=>zn(!1),footer:null},le.createElement(Ie.Z,{spinning:kn},le.createElement("div",{className:ke.operating},ei.map((Ci,wr)=>le.createElement("div",{key:wr,className:ke.operatingItem},le.createElement("div",{style:{flex:"0 0 180px"},className:"c-grey-666"},Ci==null?void 0:Ci.created_at),le.createElement("div",{className:"c-black"},Ci==null?void 0:Ci.user_name,"\u64CD\u4F5C\u4E86\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206"),(Ci==null?void 0:Ci.status)==="running"?le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",le.createElement("span",{className:"c-light-primary ml3"},Ci==null?void 0:Ci.rate)):le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",le.createElement("span",{style:{color:"#3061D0",margin:"0 3px"}},Ci==null?void 0:Ci.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",le.createElement("span",{style:{color:"#E30000",margin:"0 3px"}},Ci==null?void 0:Ci.fail_count),"\u4EBA")))),le.createElement("div",{style:{height:20}}))))}},82438:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(59301),ke={flex_box_center:"flex_box_center___rQJfc",flex_space_between:"flex_space_between___MDW24",flex_box_vertical_center:"flex_box_vertical_center___RZbAv",flex_box_center_end:"flex_box_center_end___ILhJA",flex_box_column:"flex_box_column___Fmij7",orangeColor:"orangeColor___U5vU6",redColor:"redColor___qYa6X",statustitle:"statustitle___pTBLm",statusbody:"statusbody___qUPQx",flex:"flex___VtL45"},We=pe(43418),ut="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",Ge="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",Ue=(wt,$e,Ft)=>new Promise((lt,vt)=>{var Ie=de=>{try{ee(Ft.next(de))}catch(se){vt(se)}},te=de=>{try{ee(Ft.throw(de))}catch(se){vt(se)}},ee=de=>de.done?lt(de.value):Promise.resolve(de.value).then(Ie,te);ee((Ft=Ft.apply(wt,$e)).next())}),Ct=({type:wt,resdata:$e,onok:Ft,oktext:lt,okloading:vt})=>{const[Ie,te]=(0,le.useState)(!1),{can_copy_list:ee,can_copy_num:de,challenge_type:se,course_data_list:he,no_copy_list:ve,no_copy_num:Ee,no_use_list:Be,no_use_num:Le,repeat_shixun_num:ze,student_count:je,total_num:Xe,use_num:Ye}=$e;let dt=de>0||wt==="exercise";(0,le.useEffect)(()=>{($e==null?void 0:$e.student_count)>0&&te(!0)},[$e]),console.log("---11",vt),(0,le.useEffect)(()=>{vt||te(!1)},[vt]);const He=()=>{if(wt==="exercise"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:ke.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:ke.orangeColor},Ye),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:ke.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u4F5C\u7B54\u5DF2\u6311\u6218\u8FC7\u7684\u5B9E\u8BAD\u9898\u3002"));if(wt==="exercise"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:ke.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:ke.orangeColor},Ye),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",le.createElement("span",{className:ke.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(wt==="shixun"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:ke.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:ke.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(wt==="shixun"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:ke.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",le.createElement("span",{className:ke.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(wt==="subject"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:ke.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:ke.orangeColor},Ye),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:ke.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(wt==="subject"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",le.createElement("span",{className:ke.orangeColor},je)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",le.createElement("span",{className:ke.orangeColor},Ye)," \u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",le.createElement("span",{className:ke.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(wt==="exercisepush")return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:ke.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",le.createElement("span",{className:ke.orangeColor},Ye),"\u4E2A\u5B9E\u8DF5\u9879\u76EE \uFF0C",le.createElement("span",{className:ke.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u5728\u5F53\u524D\u8003\u8BD5\u4E2D\u8FDB\u884C\u4F5C\u7B54\u3002"));if(wt==="shixunpush"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:ke.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:ke.orangeColor},Ye),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:ke.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(wt==="shixunpush"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:ke.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",le.createElement("span",{className:ke.orangeColor},Ye),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",le.createElement("span",{className:ke.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"))},Nt=()=>{if(wt==="exercise"||wt==="subject"||wt==="exercisepush"||wt==="shixunpush")return le.createElement("div",{style:{marginTop:20}},Ee>0&&le.createElement("div",null,le.createElement("span",{className:ke.flex},le.createElement("img",{src:Ge,style:{width:14}}),le.createElement("span",{className:ke.statustitle},"\u4E0D\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),le.createElement("div",{className:ke.statusbody},wt==="exercise"&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:ke.redColor},"\u4EE5\u4E0B\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u53D1\u9001\u81F3\u8BFE\u5802\u4E2D\u3002"),"\u60A8\u4E5F\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),(wt==="subject"||wt==="exercisepush")&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",dt&&le.createElement("span",{className:ke.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),wt==="shixunpush"&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",dt&&le.createElement("span",{className:ke.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u5EFA\u8BAE\u60A8\u91CD\u65B0\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE\u518D\u53D1\u5E03\u4F5C\u4E1A\uFF0C\u4E5F\u53EF\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),le.createElement("div",null,ve==null?void 0:ve.map((ot,Tt)=>le.createElement("a",{href:`/shixuns/${ot.identifier}/challenges`,target:"_blank"},"\u300A",ot==null?void 0:ot.name,"\u300B",Tt+1!==Ee&&"\u3001"))))),de>0&&le.createElement("div",{style:{marginTop:20}},le.createElement("span",{className:ke.flex},le.createElement("img",{src:ut,style:{width:14}}),le.createElement("span",{className:ke.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),le.createElement("div",{className:ke.statusbody},wt==="exercise"&&le.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u8BD5\u5377\u4E2D\u7684\u539F\u8BD5\u9898\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),(wt==="subject"||wt==="exercisepush")&&le.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),wt==="shixunpush"&&le.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u5F53\u524D\u4F5C\u4E1A\u4E2D\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),le.createElement("div",null,ee==null?void 0:ee.map((ot,Tt)=>le.createElement("a",{href:`/shixuns/${ot.identifier}/challenges`,target:"_blank"},"\u300A",ot==null?void 0:ot.name,"\u300B",Tt+1!==de&&"\u3001"))))));if(wt==="shixun")return le.createElement("div",{style:{marginTop:20}},de>0?"\u8BE5\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002":"\u8BE5\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236\uFF0C\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002")};return le.createElement(We.default,{open:Ie,onCancel:()=>{te(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!dt&&"none"}},zIndex:1003,confirmLoading:vt,okText:dt?lt:"\u6211\u77E5\u9053\u4E86",onOk:()=>Ue(void 0,null,function*(){dt?yield Ft([...ee,...Be]):te(!1)})},le.createElement("div",{style:{maxHeight:600,overflow:"auto"}},He(),Nt()))}},69304:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ue}});var le=pe(59301),ke={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},We=pe(92310),ut=pe.n(We),Ue=({className:Me,style:Ct,state:wt,onClick:$e})=>{var Ft,lt;return le.createElement("div",{onClick:$e,className:ut()(wt?(Ft=ke)==null?void 0:Ft.redBtn:(lt=ke)==null?void 0:lt.btn,Me),style:Ct},wt?le.createElement(le.Fragment,null,le.createElement("i",{className:"iconfont icon-biaoji1"}),le.createElement("span",null,"\u53D6\u6D88\u6807\u8BB0\u9519\u9898")):le.createElement(le.Fragment,null,le.createElement("i",{className:"iconfont icon-biaojigaiti"}),le.createElement("span",null,"\u6807\u8BB0\u9519\u9898")))}},97692:function(On,pn,pe){"use strict";pe.d(pn,{h:function(){return Ee}});var le=pe(59301),ke=pe(57809),We=pe(78241),ut=pe(3113),Ge=pe(89780),Ue=pe.n(Ge),Me=pe(37036),Ct=pe(95625),wt=Object.defineProperty,$e=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,te=(Be,Le,ze)=>Le in Be?wt(Be,Le,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Be[Le]=ze,ee=(Be,Le)=>{for(var ze in Le||(Le={}))vt.call(Le,ze)&&te(Be,ze,Le[ze]);if(lt)for(var ze of lt(Le))Ie.call(Le,ze)&&te(Be,ze,Le[ze]);return Be},de=(Be,Le)=>$e(Be,Ft(Le));const se=ke.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:Be,onCancel:Le})=>{const[ze,je]=(0,le.useState)("python");function Xe(dt){je(ve[dt][1])}function Ye(dt){Be(dt)}return le.createElement(We.default,de(ee({},he),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ye,style:{width:500}}),le.createElement(We.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},le.createElement(ke.default,{getPopupContainer:dt=>dt.parentNode,onChange:Xe},Object.keys(ve).map(dt=>le.createElement(se,{key:dt,value:dt},ve[dt][0])))),le.createElement(We.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},le.createElement(Ee,{mode:ze})),le.createElement("div",{className:"flex-container flex-end"},le.createElement(ut.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(ut.ZP,{type:"ghost",onClick:Le},"\u53D6\u6D88")))};function Ee({value:Be,onChange:Le,mode:ze,options:je={}}){const Xe=(0,le.useRef)(),[Ye,dt]=(0,le.useState)();return(0,le.useEffect)(()=>{if(Ye){let He=function(Nt){const ot=Nt.getValue();Le&&Le(ot)};return Ye.on("change",He),()=>{Ye.off("change",He)}}},[Ye,Le]),(0,le.useEffect)(()=>{Ye&&Ye.setOption("mode",ze)},[Ye,ze]),(0,le.useEffect)(()=>{Ye&&(Be!==Ye.getValue()||Be==="")&&setTimeout(()=>{Ye.setValue(Be||"")},300)},[Ye,Be]),(0,le.useEffect)(()=>{if(Xe.current&&!Ye){const He=Ue().fromTextArea(Xe.current,ee({mode:ze,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},je));dt(He)}},[Xe.current,Ye]),le.createElement("div",{className:"my-codemirror-container"},le.createElement("textarea",{ref:Xe}))}},12290:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return qn}});var le=pe(59301),ke=pe(89780),We=pe.n(ke),ut=pe(76374),Ge=pe(37036),Ue=pe(6313),Me=pe(25717),Ct=pe(99498),wt=pe(25419),$e=pe(67549),Ft=pe(85149),lt=({value:Zt="",className:$t,showTextOnly:Qe,showLines:on,style:cn={}})=>{const At=(0,le.useMemo)(()=>"",[Zt]);return le.createElement(le.Fragment,null,le.createElement("div",{dangerouslySetInnerHTML:{__html:At}}))},vt=pe(59301),Ie=Object.defineProperty,te=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(Zt,$t,Qe)=>$t in Zt?Ie(Zt,$t,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Zt[$t]=Qe,Ee=(Zt,$t)=>{for(var Qe in $t||($t={}))se.call($t,Qe)&&ve(Zt,Qe,$t[Qe]);if(de)for(var Qe of de($t))he.call($t,Qe)&&ve(Zt,Qe,$t[Qe]);return Zt},Be=(Zt,$t)=>te(Zt,ee($t));let Le=[{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:Zt,title:$t,icon:Qe,actionName:on,className:cn="",children:At}){function ht(){Zt(on)}return vt.createElement("a",{title:$t,className:cn,onClick:ht},vt.createElement("i",{className:`${Qe}`}),At)}var je=({watch:Zt,showNullButton:$t,showNullProgramButton:Qe,onActionCallback:on,fullScreen:cn,insertTemp:At,hidetoolBar:ht,extraUse:en})=>{const fn=[...Le,{title:`${Zt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Zt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return vt.createElement("ul",{className:"markdown-toolbar-container"},!ht&&fn.map((Rn,Qn)=>vt.createElement("li",{key:Qn},Rn.actionName?vt.createElement(ze,Be(Ee({},Rn),{onActionCallback:on})):vt.createElement("span",{className:"v-line"}))),$t?vt.createElement("li",null,vt.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:on},vt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Qe?vt.createElement(vt.Fragment,null,vt.createElement("li",null,vt.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:on},vt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),vt.createElement("li",null,vt.createElement(ze,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:on},vt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,At&&vt.createElement("li",null,vt.createElement(ze,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${At}`,onActionCallback:on},vt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),en&&vt.createElement("li",null,en),vt.createElement("li",{className:"btn-full-screen"},vt.createElement(ze,{icon:`${cn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:cn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:on})))},Xe=pe(79346),Ye=pe(78241),dt=pe(92832),He=pe(3113),Nt=Object.defineProperty,ot=Object.defineProperties,Tt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,Dt=(Zt,$t,Qe)=>$t in Zt?Nt(Zt,$t,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Zt[$t]=Qe,tt=(Zt,$t)=>{for(var Qe in $t||($t={}))Ot.call($t,Qe)&&Dt(Zt,Qe,$t[Qe]);if(xt)for(var Qe of xt($t))Wt.call($t,Qe)&&Dt(Zt,Qe,$t[Qe]);return Zt},Ve=(Zt,$t)=>ot(Zt,Tt($t));const _t={labelCol:{span:4},wrapperCol:{span:20}};var vn=({callback:Zt,onCancel:$t})=>{function Qe(on){Zt(on)}return le.createElement(Ye.default,Ve(tt({},_t),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Qe,style:{width:500}}),le.createElement(Ye.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},le.createElement(dt.default,null)),le.createElement(Ye.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},le.createElement(dt.default,null)),le.createElement("div",{className:"flex-container flex-end"},le.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(He.ZP,{type:"ghost",onClick:$t},"\u53D6\u6D88")))},yn=pe(97692),zt=pe(28451),qt=pe(43418),ln=pe(95237),Gn=pe(73524),un=pe(59301),_n=({callback:Zt,onCancel:$t})=>{const Qe=document.createElement("canvas"),on=Qe.getContext("2d");Qe.width=1e3,Qe.height=800,on.fillStyle="#ffffff",on.fillRect(0,0,Qe.width,Qe.height);const cn=Qe.toDataURL("image/png");return un.createElement(qt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},un.createElement(ln.Z,{style:{height:"100vh"}},un.createElement(Gn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:cn,visible:!0,title:String(Date.now())},onOk:At=>{Zt({src:At.url})},onClose:$t})))},St=pe(12378);function Zn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Zn,go.CommandHandler),Zn.prototype.canAlignSelection=function(){var Zt=this.diagram;return!(Zt===null||Zt.isReadOnly||Zt.isModelReadOnly||Zt.selection.count<2)},Zn.prototype.alignLeft=function(){var Zt=this.diagram;Zt.startTransaction("aligning left");var $t=1/0;Zt.selection.each(function(Qe){Qe instanceof go.Link||($t=Math.min(Qe.position.x,$t))}),Zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point($t,Qe.position.y))}),Zt.commitTransaction("aligning left")},Zn.prototype.alignRight=function(){var Zt=this.diagram;Zt.startTransaction("aligning right");var $t=-1/0;Zt.selection.each(function(Qe){if(!(Qe instanceof go.Link)){var on=Qe.actualBounds.x+Qe.actualBounds.width;$t=Math.max(on,$t)}}),Zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point($t-Qe.actualBounds.width,Qe.position.y))}),Zt.commitTransaction("aligning right")},Zn.prototype.alignTop=function(){var Zt=this.diagram;Zt.startTransaction("alignTop");var $t=1/0;Zt.selection.each(function(Qe){Qe instanceof go.Link||($t=Math.min(Qe.position.y,$t))}),Zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point(Qe.position.x,$t))}),Zt.commitTransaction("alignTop")},Zn.prototype.alignBottom=function(){var Zt=this.diagram;Zt.startTransaction("aligning bottom");var $t=-1/0;Zt.selection.each(function(Qe){if(!(Qe instanceof go.Link)){var on=Qe.actualBounds.y+Qe.actualBounds.height;$t=Math.max(on,$t)}}),Zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point(Qe.actualBounds.x,$t-Qe.actualBounds.height))}),Zt.commitTransaction("aligning bottom")},Zn.prototype.alignCenterX=function(){var Zt=this.diagram,$t=Zt.selection.first();if($t){Zt.startTransaction("aligning Center X");var Qe=$t.actualBounds.x+$t.actualBounds.width/2;Zt.selection.each(function(on){on instanceof go.Link||on.move(new go.Point(Qe-on.actualBounds.width/2,on.actualBounds.y))}),Zt.commitTransaction("aligning Center X")}},Zn.prototype.alignCenterY=function(){var Zt=this.diagram,$t=Zt.selection.first();if($t){Zt.startTransaction("aligning Center Y");var Qe=$t.actualBounds.y+$t.actualBounds.height/2;Zt.selection.each(function(on){on instanceof go.Link||on.move(new go.Point(on.actualBounds.x,Qe-on.actualBounds.height/2))}),Zt.commitTransaction("aligning Center Y")}},Zn.prototype.alignColumn=function(Zt){var $t=this.diagram;$t.startTransaction("align Column"),Zt===void 0&&(Zt=0),Zt=parseFloat(Zt);var Qe=new Array;$t.selection.each(function(en){en instanceof go.Link||Qe.push(en)});for(var on=0;on<Qe.length-1;on++){var cn=Qe[on],At=cn.actualBounds.y+cn.actualBounds.height+Zt,ht=Qe[on+1];ht.move(new go.Point(cn.actualBounds.x,At))}$t.commitTransaction("align Column")},Zn.prototype.alignRow=function(Zt){Zt===void 0&&(Zt=0),Zt=parseFloat(Zt);var $t=this.diagram;$t.startTransaction("align Row");var Qe=new Array;$t.selection.each(function(en){en instanceof go.Link||Qe.push(en)});for(var on=0;on<Qe.length-1;on++){var cn=Qe[on],At=cn.actualBounds.x+cn.actualBounds.width+Zt,ht=Qe[on+1];ht.move(new go.Point(At,cn.actualBounds.y))}$t.commitTransaction("align Row")},Zn.prototype.canRotate=function(Zt){var $t=this.diagram;return!($t===null||$t.isReadOnly||$t.isModelReadOnly||$t.selection.count<1)},Zn.prototype.rotate=function(Zt){Zt===void 0&&(Zt=90);var $t=this.diagram;$t.startTransaction("rotate "+Zt.toString());var $t=this.diagram;$t.selection.each(function(Qe){Qe instanceof go.Link||Qe instanceof go.Group||(Qe.angle+=Zt)}),$t.commitTransaction("rotate "+Zt.toString())},Zn.prototype.pullToFront=function(){var Zt=this.diagram;Zt.startTransaction("pullToFront");var $t=new go.Map;Zt.selection.each(function(Qe){$t.set(Qe.layer,0)}),$t.iteratorKeys.each(function(Qe){var on=0;Qe.parts.each(function(cn){if(!cn.isSelected){var At=cn.zOrder;isNaN(At)?cn.zOrder=0:on=Math.max(on,At)}}),$t.set(Qe,on)}),Zt.selection.each(function(Qe){Zn._assignZOrder(Qe,$t.get(Qe.layer)+1)}),Zt.commitTransaction("pullToFront")},Zn.prototype.pushToBack=function(){var Zt=this.diagram;Zt.startTransaction("pushToBack");var $t=new go.Map;Zt.selection.each(function(Qe){$t.set(Qe.layer,0)}),$t.iteratorKeys.each(function(Qe){var on=0;Qe.parts.each(function(cn){if(!cn.isSelected){var At=cn.zOrder;isNaN(At)?cn.zOrder=0:on=Math.min(on,At)}}),$t.set(Qe,on)}),Zt.selection.each(function(Qe){Zn._assignZOrder(Qe,$t.get(Qe.layer)-1-Zn._findGroupDepth(Qe))}),Zt.commitTransaction("pushToBack")},Zn._assignZOrder=function(Zt,$t,Qe){Qe===void 0&&(Qe=Zt),Zt.layer===Qe.layer&&(Zt.zOrder=$t),Zt instanceof go.Group&&Zt.memberParts.each(function(on){Zn._assignZOrder(on,$t+1,Qe)})},Zn._findGroupDepth=function(Zt){if(Zt instanceof go.Group){var $t=0;return Zt.memberParts.each(function(Qe){$t=Math.max($t,Zn._findGroupDepth(Qe))}),$t+1}else return 0},Zn.prototype.doKeyDown=function(){var Zt=this.diagram;if(Zt!==null){var $t=Zt.lastInput;if($t.key==="Up"||$t.key==="Down"||$t.key==="Left"||$t.key==="Right"){var Qe=this.arrowKeyBehavior;if(Qe==="none")return;if(Qe==="select"){this._arrowKeySelect();return}else if(Qe==="move"){this._arrowKeyMove();return}else if(Qe==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Zn.prototype._getAllParts=function(){var Zt=new Array;return this.diagram.nodes.each(function($t){Zt.push($t)}),this.diagram.parts.each(function($t){Zt.push($t)}),Zt},Zn.prototype._arrowKeyMove=function(){var Zt=this.diagram,$t=Zt.lastInput,Qe=0,on=0;if($t.control||$t.meta)Qe=1,on=1;else if(Zt.grid!==null){var cn=Zt.grid.gridCellSize;on=cn.width,Qe=cn.height}Zt.startTransaction("arrowKeyMove"),Zt.selection.each(function(At){$t.key==="Up"?At.move(new go.Point(At.actualBounds.x,At.actualBounds.y-Qe)):$t.key==="Down"?At.move(new go.Point(At.actualBounds.x,At.actualBounds.y+Qe)):$t.key==="Left"?At.move(new go.Point(At.actualBounds.x-on,At.actualBounds.y)):$t.key==="Right"&&At.move(new go.Point(At.actualBounds.x+on,At.actualBounds.y))}),Zt.commitTransaction("arrowKeyMove")},Zn.prototype._arrowKeySelect=function(){var Zt=this.diagram,$t=Zt.lastInput,Qe=null;$t.key==="Up"?Qe=this._findNearestPartTowards(270):$t.key==="Down"?Qe=this._findNearestPartTowards(90):$t.key==="Left"?Qe=this._findNearestPartTowards(180):$t.key==="Right"&&(Qe=this._findNearestPartTowards(0)),Qe!==null&&($t.shift?Qe.isSelected=!0:$t.control||$t.meta?Qe.isSelected=!Qe.isSelected:Zt.select(Qe))},Zn.prototype._findNearestPartTowards=function(Zt){var $t=this.diagram.selection.first();if($t===null)return null;for(var Qe=$t.actualBounds.center,on=this._getAllParts(),cn=1/0,At=$t,ht=0;ht<on.length;ht++){var en=on[ht];if(en!==$t&&en.canSelect()){var fn=en.actualBounds.center,Rn=Qe.directionPoint(fn),Qn=this._angleCloseness(Rn,Zt);if(Qn<=45){var Et=Qe.distanceSquaredPoint(fn);Et*=1+Math.sin(Qn*Math.PI/180),Et<cn&&(cn=Et,At=en)}}}return At},Zn.prototype._angleCloseness=function(Zt,$t){return Math.min(Math.abs($t-Zt),Math.min(Math.abs($t+360-Zt),Math.abs($t-360-Zt)))},Zn.prototype._arrowKeyTree=function(){var Zt=this.diagram,$t=Zt.selection.first();if($t instanceof go.Node){var Qe=Zt.lastInput;if(Qe.key==="Right"){if(!$t.isTreeLeaf)if(!$t.isTreeExpanded)Zt.commandHandler.canExpandTree($t)&&Zt.commandHandler.expandTree($t);else{var on=this._sortTreeChildrenByY($t).first();on!==null&&Zt.select(on)}}else if(Qe.key==="Left")if(!$t.isTreeLeaf&&$t.isTreeExpanded)Zt.commandHandler.canCollapseTree($t)&&Zt.commandHandler.collapseTree($t);else{var cn=$t.findTreeParentNode();cn!==null&&Zt.select(cn)}else if(Qe.key==="Up"){var cn=$t.findTreeParentNode();if(cn!==null){var At=this._sortTreeChildrenByY(cn),ht=At.indexOf($t);if(ht>0){for(var en=At.elt(ht-1);en!==null&&en.isTreeExpanded&&!en.isTreeLeaf;){var fn=this._sortTreeChildrenByY(en);en=fn.last()}en!==null&&Zt.select(en)}else Zt.select(cn)}}else if(Qe.key==="Down")if($t.isTreeExpanded&&!$t.isTreeLeaf){var on=this._sortTreeChildrenByY($t).first();on!==null&&Zt.select(on)}else for(;$t!==null;){var cn=$t.findTreeParentNode();if(cn===null)break;var At=this._sortTreeChildrenByY(cn),ht=At.indexOf($t);if(ht<At.length-1){Zt.select(At.elt(ht+1));break}else $t=cn}var Rn=Zt.selection.first();Rn!==null&&Zt.scrollToRect(Rn.actualBounds)}},Zn.prototype._sortTreeChildrenByY=function(Zt){var $t=new go.List().addAll(Zt.findTreeChildrenNodes());return $t.sort(function(Qe,on){var cn=Qe.location,At=on.location;return cn.y<At.y?-1:cn.y>At.y?1:cn.x<At.x?-1:cn.x>At.x?1:0}),$t},Zn.prototype.copyToClipboard=function(Zt){go.CommandHandler.prototype.copyToClipboard.call(this,Zt),this._lastPasteOffset.set(this.pasteOffset)},Zn.prototype.pasteFromClipboard=function(){var Zt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Zt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Zt},Object.defineProperty(Zn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Zt){if(Zt!=="move"&&Zt!=="select"&&Zt!=="scroll"&&Zt!=="tree"&&Zt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Zt);this._arrowKeyBehavior=Zt}}),Object.defineProperty(Zn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Zt){if(!(Zt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Zt);this._pasteOffset.set(Zt)}});var ci=Zn,Ze=pe(74413),be=pe(43604),Pe=pe(99064),Ae={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Oe=pe(24065),xe=pe(59301),ct=(Zt,$t,Qe)=>new Promise((on,cn)=>{var At=fn=>{try{en(Qe.next(fn))}catch(Rn){cn(Rn)}},ht=fn=>{try{en(Qe.throw(fn))}catch(Rn){cn(Rn)}},en=fn=>fn.done?on(fn.value):Promise.resolve(fn.value).then(At,ht);en((Qe=Qe.apply(Zt,$t)).next())});function Mt({onCancel:Zt,callback:$t}){let Qe=(0,le.useRef)(),on=(0,le.useRef)(),cn=(0,le.useRef)(),At=(0,le.useRef)(!1);const ht=(0,le.useRef)(!1),[en,fn]=(0,le.useState)(0);function Rn(){const Et=St.bx.make,wn={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"};Qe.current=new St.S0(on.current,{padding:20,grid:Et(St.s_,"Grid",Et(St.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Et(St.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:ri=>{var Yi=ri.diagram.commandHandler.addTopLevelParts(ri.diagram.selection,!0);Yi||ri.diagram.currentTool.doCancel()},commandHandler:Et(ci),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:ri=>{var Yi=ri.subject;Yi.location=Yi.location.copy().snapToGridPoint(ri.diagram.grid.gridOrigin,ri.diagram.grid.gridCellSize),setTimeout(()=>{ri.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:ri=>{var Yi=ri.subject;setTimeout(()=>{ri.diagram.commandHandler.editTextBlock()})},LinkRelinked:ri=>{var Yi=ri.parameter.part;Yi.invalidateConnectedLinks();var yr=ri.subject;ri.diagram.toolManager.linkingTool.isForwards?yr.toNode.invalidateConnectedLinks():yr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Qe.current.nodeTemplate=Et(St.NB,"Auto",{locationSpot:St.z6.Center,locationObjectName:"SHAPE",desiredSize:new St.$u(120,60),minSize:new St.$u(40,40),resizable:!0,resizeCellSize:new St.$u(10,10),rotatable:!0},new St.KX("location","loc",St.E9.parse).makeTwoWay(St.E9.stringify),new St.KX("desiredSize","size",St.$u.parse).makeTwoWay(St.$u.stringify),Et(St.bn,{name:"SHAPE",fill:wn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:St.z6.AllSides,toSpot:St.z6.AllSides},new St.KX("figure"),new St.KX("fill"),new St.KX("stroke","borderColor"),new St.KX("strokeWidth","thickness"),new St.KX("strokeDashArray","dash")),Et(St.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Et(St.al,{margin:1,textAlign:"center",overflow:St.al.OverflowEllipsis,editable:!0},new St.KX("text").makeTwoWay(),new St.KX("stroke","color"))),Qe.current.nodeTemplate.toolTip=Et("ToolTip",Et(St.s_,"Vertical",{maxSize:new St.$u(200,NaN)},Et(St.al,{font:"bold 10pt sans-serif",textAlign:"center"},new St.KX("text")),Et(St.al,{font:"10pt sans-serif",textAlign:"center"},new St.KX("text","details"))));function Kn(ri,Yi){var yr=(er,Fr)=>{er.handled=!0,er.diagram.model.commit(Ur=>{var zr=Fr.part.adornedPart,Tr=new St.E9().setRectSpot(zr.actualBounds,ri);Tr.subtract(zr.location),Tr.scale(2,2),Tr.x+=Math.sign(Tr.x)*130,Tr.y+=Math.sign(Tr.y)*130,Tr.add(zr.location),Tr.snapToGridPoint(er.diagram.grid.gridOrigin,er.diagram.grid.gridCellSize);var Yr=Ur.copyNodeData(zr.data);Ur.setGroupKeyForNodeData(Yr,Ur.getGroupKeyForNodeData(zr.data)),Ur.addNodeData(Yr);var Un={from:zr.key,to:Ur.getKeyForNodeData(Yr)};Ur.addLinkData(Un);var Ho=er.diagram.findNodeForData(Yr);Ho.location=Tr,er.diagram.select(Ho),setTimeout(()=>{er.diagram.commandHandler.editTextBlock()},20)})};return Et(St.bn,{figure:Yi,alignment:ri,alignmentFocus:ri.opposite(),width:ri.equals(St.z6.Top)||ri.equals(St.z6.Bottom)?25:18,height:ri.equals(St.z6.Top)||ri.equals(St.z6.Bottom)?18:25,fill:"orange",stroke:wn.white,strokeWidth:4,mouseEnter:(er,Fr)=>Fr.fill="dodgerblue",mouseLeave:(er,Fr)=>Fr.fill="orange",isActionable:!0,click:yr,contextClick:yr})}function Ei(ri){return Et(St.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:(Yi,yr)=>yr.fill="dodgerblue",mouseLeave:(Yi,yr)=>yr.fill="orange",click:(Yi,yr)=>{Yi.diagram.commandHandler.showContextMenu(yr.part.adornedPart)}},ri||{})}Qe.current.nodeTemplate.selectionAdornmentTemplate=Et(St.uz,"Spot",Et(St.Vm,{padding:10}),Kn(St.z6.Top,"TriangleUp"),Kn(St.z6.Left,"TriangleLeft"),Kn(St.z6.Right,"TriangleRight"),Kn(St.z6.Bottom,"TriangleDown"),Ei({alignment:new St.z6(.75,0)}));function tn(ri,Yi){return(yr,er)=>{yr.handled=!0,yr.diagram.model.commit(Fr=>{Fr.set(er.part.adornedPart.data,ri,Yi)})}}function sn(ri,Yi){return Yi||(Yi="color"),Et(St.bn,{width:16,height:16,stroke:"lightgray",fill:ri,margin:1,background:"transparent",mouseEnter:(yr,er)=>er.stroke="dodgerblue",mouseLeave:(yr,er)=>er.stroke="lightgray",click:tn(Yi,ri),contextClick:tn(Yi,ri)})}function In(){return[Et("ContextMenuButton",Et(St.s_,"Horizontal",sn(wn.white,"fill"),sn(wn.beige,"fill"),sn(wn.extralightblue,"fill"),sn(wn.extralightred,"fill"))),Et("ContextMenuButton",Et(St.s_,"Horizontal",sn(wn.lightgray,"fill"),sn(wn.lightgreen,"fill"),sn(wn.lightblue,"fill"),sn(wn.lightred,"fill")))]}function Oi(){return[Et("ContextMenuButton",Et(St.s_,"Horizontal",sn(wn.black),sn(wn.green),sn(wn.blue),sn(wn.red))),Et("ContextMenuButton",Et(St.s_,"Horizontal",sn(wn.white),sn(wn.magenta),sn(wn.purple),sn(wn.orange)))]}function Di(ri,Yi){return Yi||(Yi="thickness"),Et(St.bn,"LineH",{width:16,height:16,strokeWidth:ri,margin:1,background:"transparent",mouseEnter:(yr,er)=>er.background="dodgerblue",mouseLeave:(yr,er)=>er.background="transparent",click:tn(Yi,ri),contextClick:tn(Yi,ri)})}function vi(ri,Yi){return Yi||(Yi="dash"),Et(St.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:ri,margin:1,background:"transparent",mouseEnter:(yr,er)=>er.background="dodgerblue",mouseLeave:(yr,er)=>er.background="transparent",click:tn(Yi,ri),contextClick:tn(Yi,ri)})}function Ti(){return[Et("ContextMenuButton",Et(St.s_,"Horizontal",Di(1),Di(2),Di(3),Di(4))),Et("ContextMenuButton",Et(St.s_,"Horizontal",vi(null),vi([2,4]),vi([4,4])))]}function Li(ri,Yi){return Yi||(Yi="figure"),Et(St.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:ri,margin:1,background:"transparent",mouseEnter:(yr,er)=>er.fill="dodgerblue",mouseLeave:(yr,er)=>er.fill="lightgray",click:tn(Yi,ri),contextClick:tn(Yi,ri)})}Qe.current.nodeTemplate.contextMenu=Et("ContextMenu",Et("ContextMenuButton",Et(St.s_,"Horizontal",Li("Rectangle"),Li("RoundedRectangle"),Li("Ellipse"),Li("Diamond"))),Et("ContextMenuButton",Et(St.s_,"Horizontal",Li("Parallelogram2"),Li("ManualOperation"),Li("Procedure"),Li("Cylinder1"))),Et("ContextMenuButton",Et(St.s_,"Horizontal",Li("Terminator"),Li("CreateRequest"),Li("Document"),Li("TriangleDown"))),In(),Oi(),Ti()),Qe.current.groupTemplate=Et(St.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:St.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(ri,Yi)=>{var yr=Yi.addMembers(Yi.diagram.selection,!0);yr||Yi.diagram.currentTool.doCancel()},avoidable:!1},new St.KX("location","loc",St.E9.parse).makeTwoWay(St.E9.stringify),Et(St.s_,"Auto",{name:"BODY"},Et(St.bn,{parameter1:10,fill:wn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:St.z6.AllSides,toSpot:St.z6.AllSides},new St.KX("fill"),new St.KX("stroke","color"),new St.KX("strokeWidth","thickness"),new St.KX("strokeDashArray","dash")),Et(St.Vm,{background:"transparent",margin:20})),Et(St.al,{alignment:St.z6.Top,alignmentFocus:St.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new St.KX("text"),new St.KX("stroke","color"))),Qe.current.groupTemplate.selectionAdornmentTemplate=Et(St.uz,"Spot",Et(St.s_,"Auto",Et(St.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Et(St.Vm,{margin:1.5})),Ei({alignment:St.z6.TopRight,alignmentFocus:St.z6.BottomRight})),Qe.current.groupTemplate.contextMenu=Et("ContextMenu",In(),Oi(),Ti()),Qe.current.linkTemplate=Et(St.rU,{layerName:"Foreground",routing:St.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new St.KX("fromSpot","fromSpot",St.z6.parse),new St.KX("toSpot","toSpot",St.z6.parse),new St.KX("fromShortLength","dir",ri=>ri>=1?10:0),new St.KX("toShortLength","dir",ri=>ri>=1?10:0),new St.KX("points").makeTwoWay(),Et(St.bn,{strokeWidth:2},new St.KX("stroke","color"),new St.KX("strokeWidth","thickness"),new St.KX("strokeDashArray","dash")),Et(St.bn,{segmentIndex:0,segmentOffset:new St.E9(15,0),segmentOrientation:St.rU.OrientAlong,alignmentFocus:St.z6.Right,figure:"circle",width:10,strokeWidth:0},new St.KX("fill","color"),new St.KX("visible","dir",ri=>ri===1)),Et(St.bn,{segmentIndex:-1,segmentOffset:new St.E9(-10,6),segmentOrientation:St.rU.OrientPlus90,alignmentFocus:St.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new St.KX("fill","color"),new St.KX("visible","dir",ri=>ri>=1),new St.KX("width","thickness",ri=>7+3*ri),new St.KX("height","thickness",ri=>7+3*ri),new St.KX("segmentOffset","thickness",ri=>new St.E9(-15,4+1.5*ri))),Et(St.bn,{segmentIndex:0,segmentOffset:new St.E9(15,-6),segmentOrientation:St.rU.OrientMinus90,alignmentFocus:St.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new St.KX("fill","color"),new St.KX("visible","dir",ri=>ri===2),new St.KX("width","thickness",ri=>7+3*ri),new St.KX("height","thickness",ri=>7+3*ri),new St.KX("segmentOffset","thickness",ri=>new St.E9(-15,4+1.5*ri))),Et(St.al,{alignmentFocus:new St.z6(0,1,-4,0),editable:!0},new St.KX("text").makeTwoWay(),new St.KX("stroke","color"))),Qe.current.linkTemplate.selectionAdornmentTemplate=Et(St.uz,Et(St.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:sr(2)},new St.KX("pathPattern","thickness",sr)),Ei({alignmentFocus:new St.z6(0,0,-6,-4)}));function sr(ri){return Et(St.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(ri+4).toString()+" H3"})}function Zr(ri){var Yi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return ri===0?Yi="M0 0 M16 16 M0 8 L16 8":ri===2&&(Yi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Et(St.bn,{geometryString:Yi,margin:2,background:"transparent",mouseEnter:(yr,er)=>er.background="dodgerblue",mouseLeave:(yr,er)=>er.background="transparent",click:tn("dir",ri),contextClick:tn("dir",ri)})}function Vr(ri){var Yi=(yr,er)=>{yr.handled=!0,yr.diagram.model.commit(Fr=>{var Ur=er.part.adornedPart;Fr.set(Ur.data,ri?"toSpot":"fromSpot",St.z6.stringify(St.z6.AllSides)),(ri?Ur.toNode:Ur.fromNode).invalidateConnectedLinks()})};return Et(St.bn,{width:12,height:12,fill:"transparent",mouseEnter:(yr,er)=>er.background="dodgerblue",mouseLeave:(yr,er)=>er.background="transparent",click:Yi,contextClick:Yi})}function Tn(ri,Yi){var yr=0,er=St.z6.RightSide;ri.equals(St.z6.Top)?(yr=270,er=St.z6.TopSide):ri.equals(St.z6.Left)?(yr=180,er=St.z6.LeftSide):ri.equals(St.z6.Bottom)&&(yr=90,er=St.z6.BottomSide),Yi||(yr-=180);var Fr=(Ur,zr)=>{Ur.handled=!0,Ur.diagram.model.commit(Tr=>{var Yr=zr.part.adornedPart;Tr.set(Yr.data,Yi?"toSpot":"fromSpot",St.z6.stringify(er)),(Yi?Yr.toNode:Yr.fromNode).invalidateConnectedLinks()})};return Et(St.bn,{alignment:ri,alignmentFocus:ri.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:yr,background:"transparent",mouseEnter:(Ur,zr)=>zr.background="dodgerblue",mouseLeave:(Ur,zr)=>zr.background="transparent",click:Fr,contextClick:Fr})}Qe.current.linkTemplate.contextMenu=Et("ContextMenu",Oi(),Ti(),Et("ContextMenuButton",Et(St.s_,"Horizontal",Zr(0),Zr(1),Zr(2))),Et("ContextMenuButton",Et(St.s_,"Horizontal",Et(St.s_,"Spot",Vr(!1),Tn(St.z6.Top,!1),Tn(St.z6.Left,!1),Tn(St.z6.Right,!1),Tn(St.z6.Bottom,!1)),Et(St.s_,"Spot",{margin:new St.Zt(0,0,0,2)},Vr(!0),Tn(St.z6.Top,!0),Tn(St.z6.Left,!0),Tn(St.z6.Right,!0),Tn(St.z6.Bottom,!0)))));const Po=`{ "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 Xr=["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 Cr(ri){return console.log("shapeName:",ri),Xr.indexOf(ri)>=0}var Cn=new St.YI(cn.current,{maxSelectionCount:1,linkTemplate:Et(St.rU,{locationSpot:St.z6.Center,selectionAdornmentTemplate:Et(St.uz,"Link",{locationSpot:St.z6.Center},Et(St.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Et(St.bn,{toArrow:"Standard",stroke:null}))},{routing:St.rU.AvoidsNodes,curve:St.rU.JumpOver,corner:5,toShortLength:4},new St.KX("points"),Et(St.bn,{isPanelMain:!0,strokeWidth:2}),Et(St.bn,{toArrow:"Standard",stroke:null})),model:new St.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...St.bn.getFigureGenerators().toArray().map(ri=>({text:"\u672A\u547D\u540D",size:"100 100",figure:ri.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Qe.current.addDiagramListener("TextEdited",function(ri){var Yi;const yr=ri.subject.part;var er=(Yi=document.activeElement)==null?void 0:Yi.value;typeof er=="string"&&er.trim()===""&&Qe.current.model.commit(function(Fr){Fr.set(yr.data,"text","\u672A\u547D\u540D"),Qe.current.commandHandler.stopCommand()},"increment")}),Cn.nodeTemplate=Et(St.NB,"Auto",{locationSpot:St.z6.Center},new St.KX("location","location",St.E9.parse).makeTwoWay(St.E9.stringify),Et(St.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 St.KX("stroke").makeTwoWay(),new St.KX("fill").makeTwoWay(),new St.KX("figure")),Et(St.al,{margin:new St.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new St.$u(16,16),maxSize:new St.$u(10,NaN),textAlign:"center",editable:!0},new St.KX("key").makeTwoWay())),setTimeout(()=>{Qe.current.grid=Et(St.s_,"Grid",Et(St.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Et(St.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Qe.current.grid.visible=!0,Qe.current.grid.gridCellStroke="darkgray",Qe.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Qe.current,Qe.current}const Qn=()=>ct(this,null,function*(){var Et,wn=Qe.current.makeImage();const Kn=yield(0,Pe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:wn.src,file_data:JSON.stringify({login:(Et=(0,Oe.eY)())==null?void 0:Et.login,data:JSON.parse(Qe.current.model.toJson())})}});$t({src:Kn.url})});return(0,le.useEffect)(()=>(setTimeout(()=>{Rn()},500),fn(en+1),()=>{Qe.current=null}),[]),xe.createElement("div",{ref:ht,className:At.current?`${Ae.maxH60} body-overflow-initial`:"body-overflow-initial"},xe.createElement(qt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!en,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:xe.createElement(ln.Z,null,xe.createElement(be.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),xe.createElement(be.Z,{onClick:()=>{var Et,wn,Kn=Qe.current.selection.first();if(At.current=!At.current,document.activeElement&&Kn){let Ei=(wn=(Et=document.activeElement)==null?void 0:Et.value)==null?void 0:wn.trim();typeof Ei=="string"&&Qe.current.model.commit(function(tn){tn.set(Kn.data,"text",Ei||"\u672A\u547D\u540D"),Qe.current.commandHandler.stopCommand()},"increment")}fn(en+1)}},xe.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Zt},xe.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Ae.flowChartWrp},xe.createElement("div",{style:{display:"flex",height:"100%"}},xe.createElement("div",{style:{width:"300px",height:"100%"}},xe.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),xe.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ae.myPaletteDiv,ref:cn})),xe.createElement("div",{style:{flex:1,position:"relative"}},xe.createElement("div",{ref:on,style:{height:"80vh"}}))),xe.createElement("div",{className:"tr"},xe.createElement(He.ZP,{size:"large",onClick:Qn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var at=Mt,qe=pe(5112),Lt=pe(5871);const Bt=qe.ZP.Group,ft={margin:"0 8px"};var Gt=({callback:Zt,onCancel:$t})=>{function Qe(on){Zt(on)}return le.createElement(Ye.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Qe},le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},le.createElement("span",{style:ft},"\u5355\u5143\u683C\u6570\uFF1A"),le.createElement("span",{style:ft},"\u884C\u6570"),le.createElement(Ye.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},le.createElement(Lt.Z,null)),le.createElement("span",{style:ft},"\u5217\u6570"),le.createElement(Ye.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},le.createElement(Lt.Z,null))),le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},le.createElement("span",{style:ft},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),le.createElement(Ye.default.Item,{name:"align"},le.createElement(Bt,null,le.createElement(qe.ZP,{value:"default"},le.createElement("i",{className:"fa fa-align-justify"})),le.createElement(qe.ZP,{value:"left"},le.createElement("i",{className:"fa fa-align-left"})),le.createElement(qe.ZP,{value:"center"},le.createElement("i",{className:"fa fa-align-center"})),le.createElement(qe.ZP,{value:"right"},le.createElement("i",{className:"fa fa-align-right"}))))),le.createElement("div",{className:"flex-container flex-end"},le.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(He.ZP,{type:"ghost",onClick:$t},"\u53D6\u6D88")))},Sn=pe(78673),an=pe(80727),rn=pe.n(an),kn=(0,le.forwardRef)(({use3d:Zt,width:$t,height:Qe,callback:on,showSaveButton:cn},At)=>{const ht=(0,le.useRef)(),en=(0,le.useRef)(),[fn,Rn]=(0,le.useState)(!1),Qn=(0,le.useRef)({id:ht,appName:"graphing",width:$t||1e3,height:Qe||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,le.useEffect)(()=>{en.current=new(rn())(Qn.current,!0),window.onload=function(){en.current.inject("applet_container")}},[]);const Et=()=>{var wn=window.ggbApplet.getPNGBase64(1,!0,72);return on&&on(wn),wn};return(0,le.useEffect)(()=>{Qn.current.appName=fn?"3D":"graphing",en.current.inject("applet_container")},[fn]),(0,le.useEffect)(()=>{Rn(Zt)},[Zt]),(0,le.useImperativeHandle)(At,()=>({getImgData:Et})),le.createElement(le.Fragment,null,le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ht}),le.createElement(ln.Z,{align:"middle"},le.createElement(be.Z,{flex:1},le.createElement(Sn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:fn,onChange:wn=>Rn(wn)})),le.createElement(be.Z,null,le.createElement(He.ZP,{size:"large",onClick:Et,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),mn=pe(41588),ei=pe(8591);const Pi="link",Hn="upload-image",bn="add-flowchart",wi="draw-image",Zi="add-flowchart",Hi="code-block",rr="add-table",_r="------------",gi={default:_r,left:`:${_r}`,center:`:${_r}:`,right:`${_r}:`};var di=pe(58856);function xi(){}let $i=0;const Ri=1e4,Kr="\u2581",Sr="@\u2581\u2581@",Ne="@\u2581@",Ci=`
**\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`,wr=["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 Pn(Zt){return/^\d+$/.test(Zt)?`${Zt}px`:Zt}const Wi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",qi={[Wi+"-B"]:"bold",[Wi+"-I"]:"italic"},$n={[Pi]:"\u6DFB\u52A0\u94FE\u63A5",[Hi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Hn]:"\u6DFB\u52A0\u56FE\u7247",[wi]:"\u6DFB\u52A0\u753B\u56FE",[bn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[rr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var qn=({defaultValue:Zt="",onChange:$t,width:Qe="100%",height:on=400,miniToolbar:cn=!1,isFocus:At=!1,watch:ht,insertTemp:en,mode:fn="markdown",id:Rn="markdown-editor-id",showResizeBar:Qn=!1,noStorage:Et=!1,showNullButton:wn=!1,showNullProgramButton:Kn=!1,hidetoolBar:Ei=!1,fullScreen:tn=!1,onBlur:sn,onCMBeforeChange:In,onFullScreen:Oi,className:Di="",disablePaste:vi=!1,disabled:Ti=!1,disabledFill:Li=!1,placeholder:sr="",values:Zr="",extraUse:Vr})=>{const[Tn,Po]=(0,le.useState)(null),[Xr,Cr]=(0,le.useState)(Zt),[Cn,ri]=(0,le.useState)(ht),[Yi,yr]=(0,le.useState)(tn),[er,Fr]=(0,le.useState)(""),[Ur,zr]=(0,le.useState)(0),[Tr,Yr]=(0,le.useState)(on),[Un,Ho]=(0,le.useState)(!1),[Yn,Ao]=(0,le.useState)(0),[Qo,nr]=(0,le.useState)(0),qo=(0,le.useRef)(),Go=(0,le.useRef)(),Lr=(0,le.useRef)(),br=(0,le.useRef)();(0,le.useEffect)(()=>{const xo=window.scrollY||window.pageYOffset;Cr(Zr),Tn==null||Tn.setValue(Zr),window.scrollTo(0,xo)},[Zr]),(0,le.useEffect)(()=>{Oi==null||Oi(Yi)},[Yi]),(0,le.useEffect)(()=>{if(qo.current){let xo=function(pi,io){var ro;if(vi){io.preventDefault();return}const Ja=io.clipboardData;if(Ja){const Ca=Ja.types.toString(),fa=Ja.items;if(Ca==="Files"||Ja.types.indexOf("Files")>-1){if(io.preventDefault(),fn=="stex")return;try{let $a=fa[1];((ro=fa[0])==null?void 0:ro.kind)==="file"&&($a=fa[0]);const Qa=$a.getAsFile(),Es=Qa.name.split(".").pop();(0,zt.I)(Qa,ys=>{var Zs,Mn,Ss;ys.id?((Zs=Qa==null?void 0:Qa.type)==null?void 0:Zs.indexOf("image"))>-1?Qr.replaceSelection(`<img width="100%" src="/api/attachments/${ys.id}?type=${ys.content_type})" alt="" />`):((Mn=Qa==null?void 0:Qa.type)==null?void 0:Mn.indexOf("video"))>-1?Qr.replaceSelection(`<video width="100%" controls src="/api/attachments/${ys.id}"></video>`):((Ss=Qa==null?void 0:Qa.type)==null?void 0:Ss.indexOf("pdf"))>-1?Qr.replaceSelection(`<a href="/api/attachments/${ys.id}?type=${Qa.type}&disposition=inline" target="_blank">${Qa.name}</a>`):wr.includes(Es)?Qr.replaceSelection(`<a href="/api/attachments/${ys.id}?type=office&disposition=inline" target="_blank">${Qa.name}</a>`):Qr.replaceSelection(`[${Qa.name}](/api/attachments/${ys.id}?type=${ys.content_type})`):(ys==null?void 0:ys.status)===401&&(document.location.href="/user/login")})}catch($a){ei.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Qr=We().fromTextArea(qo.current,{mode:fn,lineNumbers:!cn,lineWrapping:!0,value:Zt,autoCloseTags:!0,autoCloseBrackets:!0});return Qr.on("keyup",function(pi,io){io.keyCode===8&&(pi.getValue()==""?Qr.setOption("placeholder",sr):Qr.setOption("placeholder",null))}),Qr.on("keydown",function(pi,io){if(io.keyCode===8){var ro=Yo(pi);ro&&io.preventDefault()}}),At&&Qr.focus(),Qr.on("paste",xo),Ti&&Qr.on("beforeChange",function(pi,io){(io.origin==="paste"||io.origin==="+input")&&io.cancel()}),Po(Qr),()=>{Qr.off("paste",xo)}}},[]);const mo=(0,le.useCallback)(()=>{if(Go.current)try{}catch(xo){console.log(xo,"---- to set md editor body height")}},[Tr,Go,Yi]);(0,le.useEffect)(()=>{function xo(){let Qr=new ut.Z(pi=>{for(let io of pi)(io.target.offsetHeight>0||io.target.offsetWidth>0)&&(mo(),Tn.setSize("100%","100%"),Tn.refresh())});return Qr.observe(qo.current.parentElement),Qr}if(Tn){const Qr=xo();return()=>{var pi,io;(pi=qo.current)!=null&&pi.parentElement&&Qr.unobserve((io=qo.current)==null?void 0:io.parentElement)}}},[Tn,mo]),(0,le.useEffect)(()=>{if(Tn){let xo=[];for(const[Qr,pi]of Object.entries(qi)){let io={[Qr]:()=>{Ki(pi)}};xo.push(io),Tn.addKeyMap(io)}return()=>{for(let Qr of xo)Tn.removeKeyMap(Qr)}}},[Tn]),(0,le.useEffect)(()=>{tn!==Yi&&yr(tn)},[tn]),(0,di.Z)(()=>{if(!Et&&Ur>0){let xo=new Date().getTime(),Qr=window.sessionStorage.getItem(Rn);xo>=Ur+Ri&&(!Qr||Qr!==Xr)&&(window.sessionStorage.setItem(Rn,Xr),Ho(!0))}},Ri),(0,le.useEffect)(()=>{ri(ht)},[Tn,ht]),(0,le.useEffect)(()=>{Tn&&At&&Tn.focus()},[Tn,At]),(0,le.useEffect)(()=>{if(Cn&&Tn){let xo=function(pi){let io=pi.target;if(br.current){let ro=io.scrollTop/io.scrollHeight;br.current.scrollTop=br.current.scrollHeight*ro}};const Qr=Tn.getScrollerElement();return Qr.addEventListener("scroll",xo),()=>{Qr.removeEventListener("scroll",xo)}}},[Tn,Cn]),(0,le.useEffect)(()=>{if(Tn&&In){let xo=function(Qr,pi){In(Qr,pi)};return Tn.on("beforeChange",xo),()=>{Tn.off("beforeChange",xo)}}},[Tn,In]),(0,le.useEffect)(()=>{if(Tn&&sn){let xo=function(){sn(Tn.getValue())};return Tn.on("blur",xo),()=>{Tn.off("blur",xo)}}},[Tn,sn]);function Yo(xo,Qr){var pi=xo.getDoc(),io=pi.getCursor(),ro=pi.getLine(io.line),Ja=ro.charAt(io.ch-1),Ca=ro.lastIndexOf("@\u2581@",io.ch),fa=ro.lastIndexOf("@\u2581\u2581@",io.ch),$a=Ca>fa?Ca:fa,Qa=Ca>fa?3:4;if(Sr.indexOf(Ja)===-1)return null;if(console.log("change1:",Qr,xo,ro,io,$a,Ca,fa,Ja),$a>=0&&io.ch-$a<5){var Es=$a+Qa;return pi.replaceRange("",{line:io.line,ch:$a},{line:io.line,ch:Es}),{line:io.line,ch:Es}}return null}(0,le.useEffect)(()=>{if(Tn){let xo=function(Qr,pi){const io=Qr.getValue();Cr(io),zr(new Date().getTime()),Qr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),$t&&(Kn?$t(io,po(io)):$t(io))};return Tn.on("change",xo),()=>{Tn.off("change",xo)}}},[Tn,$t]),(0,le.useEffect)(()=>{if(Tn)if(Zt==null)Tn.setValue(""),Cr("");else{const xo=window.scrollY||window.pageYOffset;Zt!==Tn.getValue()&&(Tn.setValue(Zt),Cr(Zt),Tn.setCursor(Ti?1:Tn.lineCount(),0),window.scrollTo(0,xo))}},[Tn,Zt]);const Ki=(0,le.useCallback)(xo=>{const Qr=Tn.getCursor(),pi=Tn.getSelection();let io=pi.split(`
`);switch(xo){case"bold":return Tn.replaceSelection("**"+pi+"**"),pi===""&&Tn.setCursor(Qr.line,Qr.ch+2),Tn.focus();case"italic":return Tn.replaceSelection("*"+pi+"*"),pi===""&&Tn.setCursor(Qr.line,Qr.ch+1),Tn.focus();case"code":return Tn.replaceSelection("`"+pi+"`"),pi===""&&Tn.setCursor(Qr.line,Qr.ch+1),Tn.focus();case"inline-latex":return Fr("inline-latex"),Tn.focus();case"latex":return Tn.replaceSelection("```latex\n"+pi+"\n```"),Tn.setCursor(Qr.line+1,pi.length+1),Tn.focus();case"line-break":return Tn.replaceSelection(`<br/>
`),Tn.focus();case"list-ul":return pi===""?Tn.replaceSelection("- "+pi):Tn.replaceSelection(io.map(ro=>ro===""?"":`- ${ro}`).join(`
`)),Tn.focus();case"list-ol":return pi===""?Tn.replaceSelection("1. "+pi):Tn.replaceSelection(io.map((ro,Ja)=>ro===""?"":`${Ja+1}. ${ro}`).join(`
`)),Tn.focus();case"add-null-ch":return pi===""&&Tn.setCursor(Qr.line,Qr.ch),Tn.replaceSelection(Kr),Tn.focus();case"add-signal":return pi===""&&Tn.setCursor(Qr.line,Qr.ch),Tn.replaceSelection(Ne),Tn.focus();case"add-multiple":return pi===""&&Tn.setCursor(Qr.line,Qr.ch),Tn.replaceSelection(Sr),Tn.focus();case"inster-template-1":return pi===""&&Tn.setCursor(Qr.line,Qr.ch),Tn.replaceSelection(Ci),Tn.focus();case"eraser":return Tn.setValue(""),Tn.focus();case"trigger-watch":return ri(!Cn),Tn.focus();case"trigger-full-screen":return yr(!Yi),Tn.focus();case Pi:Fr(Pi);return;case Hi:Fr(Hi);return;case Hn:Fr(Hn);return;case wi:Fr(wi);return;case"maths-latex":Fr("maths-latex");return;case bn:Fr(bn);return;case rr:Fr(rr);return;default:throw new Error}},[Tn,Cn,Yi]),st=(0,le.useCallback)((xo,Qr)=>{var pi,io,ro,Ja,Ca,fa;switch(Fr(""),er){case Pi:const{title:Zs,link:Mn}=xo;return Tn.replaceSelection(`[${Zs}](${Mn})`),Tn.focus();case Hi:const{language:Ss,content:ra}=xo;return Tn.replaceSelection(["```"+Ss,ra,"```"].join(`
`)),Tn.focus();case"maths-latex":for(var $a=atob(xo),Qa=new Uint8Array($a.length),Es=0;Es<$a.length;Es++)Qa[Es]=$a.charCodeAt(Es);var ys=new Blob([Qa],{type:"image/png"});(0,zt.I)(ys,Do=>{Do.id?Tn.replaceSelection(`![,](/api/attachments/${Do.id}?type=${Do.content_type})`):(Do==null?void 0:Do.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Tn.replaceSelection("`$$"+xo+"$$`");break;case Hn:case wi:case Zi:const{src:hl,alt:Ol}=xo,ns=Qr,yu=(ro=(io=(pi=ns==null?void 0:ns.name)==null?void 0:pi.split("."))==null?void 0:io.pop)==null?void 0:ro.call(io);return((Ja=ns==null?void 0:ns.type)==null?void 0:Ja.indexOf("image"))>-1||!(ns!=null&&ns.type)?ns!=null&&ns.align||ns!=null&&ns.width?Tn.replaceSelection(`<p style="text-align:${ns.align||"initial"}"><img width="${ns.width?ns.width+"%":"initial"}" src="${hl}" alt="${Ol||""}" /></p>`):Tn.replaceSelection(`<img width="100%" src="${hl}" alt="${Ol||""}" />`):((Ca=ns==null?void 0:ns.type)==null?void 0:Ca.indexOf("video"))>-1?Tn.replaceSelection(`<video width="100%" controls src="${hl}"></video>`):((fa=ns==null?void 0:ns.type)==null?void 0:fa.indexOf("pdf"))>-1?Tn.replaceSelection(`<a href="${hl}?type=${ns.type}&disposition=inline" target="_blank">${ns.name}</a>`):wr.includes(yu)?Tn.replaceSelection(`<a href="${hl}?type=office&disposition=inline" target="_blank">${ns.name}</a>`):Tn.replaceSelection(`[${ns.name}](${hl})`),Tn.focus();case rr:const{row:eu,col:ps,align:Ba}=xo;let tu=`
`;for(let Do=0;Do<eu;Do++){let Ea=[],ca=[];for(let hr=0;hr<ps;hr++)Do===1&&ca.push(gi[Ba]),Ea.push(" ");Do===1&&(tu+=`| ${ca.join(" | ")} |
`),tu+=`| ${Ea.join(ps===1?"":" | ")} |
`}return Tn.replaceSelection(tu+`
`),Tn.focus();default:throw new Error}},[Tn,er]),sa=(0,le.useMemo)(()=>{switch(er){case Pi:return le.createElement(vn,{callback:st,onCancel:va});case Hi:return le.createElement(yn.Z,{callback:st,onCancel:va});case Hn:return le.createElement(zt.Z,{callback:st,onCancel:va});case bn:return le.createElement(at,{callback:st,onCancel:va});case rr:return le.createElement(Gt,{callback:st,onCancel:va});case"maths-latex":return le.createElement(kn,{showSaveButton:!0,callback:st});case"inline-latex":return le.createElement(mn.Z,{showSaveButton:!0,callback:st});default:return null}},[er]);function va(){Fr("")}(0,le.useEffect)(()=>{if(Lr.current){let xo=function(Ca){ro=!0,Ja=Ca.pageY},Qr=function(){ro=!1},pi=function(Ca){if(ro){let fa=Ca.pageY-Ja;fa<0&&(fa=0),fa>300&&(fa=300);let $a=on+fa+"px";Yr($a)}},io=Lr.current,ro=!1,Ja=0;return io.addEventListener("mousedown",xo),document.addEventListener("mousemove",pi),document.addEventListener("mouseup",Qr),()=>{io.removeEventListener("mousedown",xo),document.removeEventListener("mousemove",pi),document.removeEventListener("mouseup",Qr)}}},[Tn,Lr]),(0,le.useEffect)(()=>{Yr(on)},[on]);const Ma=Pn(Qe),hs=Pn(Tr),Ga={width:Ma,height:hs},Lo=(0,le.useMemo)(()=>{if(Ur){let xo=new Date(Ur),Qr=xo.getHours(),pi=xo.getMinutes(),io=xo.getSeconds();return Qr=Qr<10?"0"+Qr:Qr,pi=pi<10?"0"+pi:pi,io=io<10?"0"+io:io,`${Qr}:${pi}:${io}`}return 0},[Ur]),po=xo=>{const Qr=[];if(Kn){let pi=-1;xo=xo.replace(/(@▁▁@|@▁@)/g,function(io,ro,Ja){Qr.push({multiLine:io!==Ne})})}return Qr};function la(){window.sessionStorage.removeItem(Rn),Ho(!1),zr(0)}function Eo(){Ho(!1),zr(0),Tn.setValue(window.sessionStorage.getItem(Rn))}(0,le.useEffect)(()=>{$n[er]&&er!==wi&&er!==bn&&setTimeout(()=>{const xo=document.getElementsByClassName("markdown-popup-form")[0],Qr=window.innerWidth/2-xo.offsetWidth/2,pi=window.innerHeight/2-xo.offsetHeight/2;Ao(Qr),nr(pi)},0)},[er]);const Na=xo=>{xo.preventDefault();const Qr=xo.clientX-Yn,pi=xo.clientY-Qo;document.body.onmousemove=io=>{let ro=io.clientX-Qr,Ja=io.clientY-pi;const Ca=document.getElementsByClassName("markdown-popup-form")[0],fa=window.innerWidth-Ca.offsetWidth,$a=window.innerHeight-Ca.offsetHeight;ro=Math.max(0,Math.min(ro,fa)),Ja=Math.max(0,Math.min(Ja,$a)),os(io.clientX,io.clientY,Qr,pi)&&(Ao(ro),nr(Ja))},document.body.onmouseup=function(){document.body.onmousemove=null}},os=(xo,Qr,pi,io)=>{const ro=document.body.clientHeight,Ja=document.body.clientWidth;return xo<20&&pi>xo||xo>Ja-20&&pi<xo||Qr<20&&io>Qr||Qr>ro-20&&io<Qr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return le.createElement(le.Fragment,null,le.createElement("div",{className:"markdown-editor-wrapper",ref:Go},le.createElement("div",{className:`markdown-editor-container ${Di} ${Cn?"on-preview":""} ${cn?"mini":""} ${Yi?"full-screen":""}`,style:Ga},le.createElement(je,{insertTemp:en,watch:Cn,fullScreen:Yi,showNullButton:wn,showNullProgramButton:Kn,onActionCallback:Ki,hidetoolBar:Ei,extraUse:Vr}),le.createElement("div",{className:"markdown-editor-body"},le.createElement("div",{className:"codemirror-container"},le.createElement("textarea",{ref:qo,placeholder:sr})),Cn?le.createElement("div",{ref:br,className:"preview-container"},fn==="stex"&&le.createElement(lt,{value:Xr}),fn!=="stex"&&le.createElement(Ft.Z,{disabledFill:Li,showProgramFill:Kn,value:Xr})):null))),Qn?le.createElement("a",{ref:Lr,className:"editor-resize"}):null,er===wi&&le.createElement(_n,{callback:st,onCancel:va}),er===bn&&le.createElement(at,{callback:st,onCancel:va}),le.createElement(Xe.Z,null,$n[er]&&er!==wi&&er!==bn?le.createElement(qt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Yn,top:Qo},title:le.createElement("div",{style:{cursor:"move"},onMouseDown:Na},$n[er]),open:!0,onCancel:va,footer:null,destroyOnClose:!0,width:er===bn?"1200px":null,height:er===bn?"80vh":null,className:"markdown-popup-form"},sa):null))}},28451:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Le},I:function(){return je}});var le=pe(78241),ke=pe(8591),We=pe(92832),ut=pe(81327),Ge=pe(5871),Ue=pe(5112),Me=pe(3113),Ct=pe(77903),wt=pe(59301),$e=pe(59301),Ft=Object.defineProperty,lt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,de=(Xe,Ye,dt)=>Ye in Xe?Ft(Xe,Ye,{enumerable:!0,configurable:!0,writable:!0,value:dt}):Xe[Ye]=dt,se=(Xe,Ye)=>{for(var dt in Ye||(Ye={}))te.call(Ye,dt)&&de(Xe,dt,Ye[dt]);if(Ie)for(var dt of Ie(Ye))ee.call(Ye,dt)&&de(Xe,dt,Ye[dt]);return Xe},he=(Xe,Ye)=>lt(Xe,vt(Ye));const{useForm:ve}=le.default,Ee={width:280,marginRight:10},Be={labelCol:{span:5},wrapperCol:{span:19}};var Le=({callback:Xe,onCancel:Ye})=>{const[dt]=ve();let He=(0,wt.useRef)();function Nt(xt){He.current.width=dt.getFieldValue("width"),He.current.align=dt.getFieldValue("align"),Xe(xt,He.current)}function ot(xt,Ot){if(xt.status===-1){ke.ZP.error(xt.message);return}dt.setFieldsValue({src:`/api/attachments/${xt.id}`,type:Ot.type})}function Tt(xt){let Ot=xt.target.files[0];He.current=Ot,je(Ot,ot)}return $e.createElement(le.default,he(se({form:dt},Be),{className:"upload-image-panel",onFinish:Nt,style:{width:470,overflow:"hidden"}}),$e.createElement(le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},$e.createElement("div",{className:"flex-container"},$e.createElement(le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},$e.createElement(We.default,{style:Ee})),$e.createElement(ze,{onFileChange:Tt}))),$e.createElement(le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},$e.createElement(We.default,{style:{width:264}})),$e.createElement(le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},$e.createElement(ut.Z,null,$e.createElement(le.default.Item,{name:"width",style:{margin:0}},$e.createElement(Ge.Z,{style:{width:264}})),$e.createElement("span",{className:"ml8"},"%"))),$e.createElement(le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},$e.createElement(Ue.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),$e.createElement("aside",null,$e.createElement(le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},$e.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),$e.createElement(Me.ZP,{type:"default",onClick:Ye},"\u53D6\u6D88"))))};function ze({onFileChange:Xe}){return $e.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",$e.createElement("input",{type:"file",onChange:Xe}))}function je(Xe,Ye){if(!Xe)throw new String("\u6CA1\u6709\u6587\u4EF6");let dt=new FormData;dt.append("editormd-image-file",Xe),dt.append("file_param_name","editormd-image-file"),dt.append("byxhr","true");var He=new window.XMLHttpRequest;He.withCredentials=!0,He.addEventListener("load",function(Nt){Ye(JSON.parse(Nt.target.responseText),Xe)},!1),He.addEventListener("error",function(Nt){console.error(Nt)},!1),He.open("POST",`${Ct.KI}/api/attachments.json`),He.send(dt)}},79346:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return We}});var le=pe(59301),ke=pe(4676);class We extends le.Component{constructor(Ge){super(Ge);const Ue=window.document;this.node=Ue.createElement("div"),Ue.body.appendChild(this.node)}render(){const{children:Ge}=this.props;return(0,ke.createPortal)(Ge,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(On,pn,pe){"use strict";pe.d(pn,{SV:function(){return ct},ZP:function(){return xe}});var le=pe(59301),ke=pe(76374);const We={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"]},ut={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(`
`)}]},Ue={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},Me={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
`)}]};var Ct=pe(53184),wt=pe.n(Ct),$e=Object.defineProperty,Ft=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ee=(Mt,at,qe)=>at in Mt?$e(Mt,at,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Mt[at]=qe,de=(Mt,at)=>{for(var qe in at||(at={}))Ie.call(at,qe)&&ee(Mt,qe,at[qe]);if(vt)for(var qe of vt(at))te.call(at,qe)&&ee(Mt,qe,at[qe]);return Mt},se=(Mt,at)=>Ft(Mt,lt(at)),he=(Mt,at,qe)=>new Promise((Lt,Bt)=>{var ft=an=>{try{Sn(qe.next(an))}catch(rn){Bt(rn)}},Gt=an=>{try{Sn(qe.throw(an))}catch(rn){Bt(rn)}},Sn=an=>an.done?Lt(an.value):Promise.resolve(an.value).then(ft,Gt);Sn((qe=qe.apply(Mt,at)).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"]}},Ee=(Mt,at)=>at.map(qe=>({label:qe,kind:Mt.languages.CompletionItemKind.Keyword,insertText:qe})),Be=Mt=>Object.keys(ve.tables).map(at=>({label:at,kind:Mt.languages.CompletionItemKind.Variable,insertText:at})),Le=(Mt,at)=>{const qe=ve.tables[Mt];return qe?qe.map(Lt=>({label:Lt,kind:at.languages.CompletionItemKind.Field,insertText:Lt})):[]};function ze(Mt,at,qe,Lt,Bt){let ft=at.getWordUntilPosition(qe),Gt={startLineNumber:qe.lineNumber,endLineNumber:qe.lineNumber,startColumn:ft.startColumn,endColumn:ft.endColumn},Sn=Lt.map(an=>({label:an,kind:Mt.languages.CompletionItemKind.Keyword,insertText:an,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Gt}));return Bt.map(an=>{Sn.push(se(de({},an),{range:Gt}))}),Sn}var je=Mt=>{ve.languages.map(Bt=>(Mt.languages.registerDocumentFormattingEditProvider(Bt,{provideDocumentFormattingEdits(ft,Gt,Sn){return he(this,null,function*(){const an=wt()(ft.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:ft.getFullModelRange(),text:an}]})}}),Bt));const at=Ge.quickKey.map(Bt=>({label:Bt.label,kind:Mt.languages.CompletionItemKind.Method,insertText:Bt.content,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),qe=Ue.quickKey.map(Bt=>({label:Bt.label,kind:Mt.languages.CompletionItemKind.Method,insertText:Bt.content,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Lt=ut.quickKey.map(Bt=>({label:Bt.label,kind:Mt.languages.CompletionItemKind.Method,insertText:Bt.content,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Mt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Bt,ft){var Gt=Bt.getWordUntilPosition(ft),Sn={startLineNumber:ft.lineNumber,endLineNumber:ft.lineNumber,startColumn:Gt.startColumn,endColumn:Gt.endColumn},an=Bt.getLineContent(ft.lineNumber).substring(Gt.startColumn-2,Gt.endColumn);return{suggestions:[...Ge.keywords.map(rn=>({label:rn,kind:Mt.languages.CompletionItemKind.Function,documentation:rn,insertText:rn,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Sn})),...Ge.quickKey.map(rn=>({label:rn.label,kind:Mt.languages.CompletionItemKind.Function,documentation:rn.content,insertText:an.startsWith("#")?rn.content.replace(/#/,""):rn.content,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Sn}))]}}}),Mt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Bt,ft){var Gt=Bt.getWordUntilPosition(ft),Sn={startLineNumber:ft.lineNumber,endLineNumber:ft.lineNumber,startColumn:Gt.startColumn,endColumn:Gt.endColumn};return{suggestions:[...We.keywords.map(an=>({label:an,kind:Mt.languages.CompletionItemKind.Function,documentation:an,insertText:an,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Sn}))]}}}),Mt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Bt,ft){var Gt=Bt.getWordUntilPosition(ft),Sn={startLineNumber:ft.lineNumber,endLineNumber:ft.lineNumber,startColumn:Gt.startColumn,endColumn:Gt.endColumn},an=Bt.getLineContent(ft.lineNumber).substring(Gt.startColumn-2,Gt.endColumn);return{suggestions:[...ut.keywords.map(rn=>({label:rn,kind:Mt.languages.CompletionItemKind.Function,documentation:rn,insertText:rn,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Sn})),...ut.quickKey.map(rn=>({label:rn.label,kind:Mt.languages.CompletionItemKind.Function,documentation:rn.content,insertText:an.startsWith("#")?rn.content.replace(/#/,""):rn.content,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Sn}))]}}}),Mt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Bt,ft){var Gt=Bt.getWordUntilPosition(ft),Sn={startLineNumber:ft.lineNumber,endLineNumber:ft.lineNumber,startColumn:Gt.startColumn,endColumn:Gt.endColumn},an=Bt.getLineContent(ft.lineNumber).substring(Gt.startColumn-2,Gt.endColumn);return{suggestions:[...Me.keywords.map(rn=>({label:rn,kind:Mt.languages.CompletionItemKind.Function,documentation:rn,insertText:rn,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Sn})),...Me.quickKey.map(rn=>({label:rn.label,kind:Mt.languages.CompletionItemKind.Function,documentation:rn.content,insertText:an.startsWith("#")?rn.content.replace(/#/,""):rn.content,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Sn}))]}}}),Mt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Bt,ft){var Gt=Bt.getWordUntilPosition(ft),Sn={startLineNumber:ft.lineNumber,endLineNumber:ft.lineNumber,startColumn:Gt.startColumn,endColumn:Gt.endColumn},an=Bt.getLineContent(ft.lineNumber).substring(Gt.startColumn-2,Gt.endColumn);return{suggestions:[...Ue.keywords.map(rn=>({label:rn,kind:Mt.languages.CompletionItemKind.Function,documentation:rn,insertText:rn,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Sn})),...Ue.quickKey.map(rn=>({label:rn.label,kind:Mt.languages.CompletionItemKind.Function,documentation:rn.content,insertText:an.startsWith("#")?rn.content.replace(/#/,""):rn.content,insertTextRules:Mt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Sn}))]}}})};const Xe="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ye=Object.defineProperty,dt=(Mt,at,qe)=>at in Mt?Ye(Mt,at,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Mt[at]=qe,He=(Mt,at,qe)=>dt(Mt,typeof at!="symbol"?at+"":at,qe);const Nt=class mS{constructor(at,qe,Lt){this.placeholder=at,this.editor=qe,this.monaco=Lt,qe.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mS.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(Nt,"ID","editor.widget.placeholderHint");var Tt=Nt,xt=pe(96236),Ot=pe(8591),Wt=pe(6848),Dt=pe(89392),tt=pe(34604),Ve=pe(56102),_t=Object.defineProperty,vn=Object.defineProperties,yn=Object.getOwnPropertyDescriptors,zt=Object.getOwnPropertySymbols,qt=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,Gn=(Mt,at,qe)=>at in Mt?_t(Mt,at,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Mt[at]=qe,un=(Mt,at)=>{for(var qe in at||(at={}))qt.call(at,qe)&&Gn(Mt,qe,at[qe]);if(zt)for(var qe of zt(at))ln.call(at,qe)&&Gn(Mt,qe,at[qe]);return Mt},_n=(Mt,at)=>vn(Mt,yn(at)),St=(Mt,at)=>{var qe={};for(var Lt in Mt)qt.call(Mt,Lt)&&at.indexOf(Lt)<0&&(qe[Lt]=Mt[Lt]);if(Mt!=null&&zt)for(var Lt of zt(Mt))at.indexOf(Lt)<0&&ln.call(Mt,Lt)&&(qe[Lt]=Mt[Lt]);return qe},Zn=(Mt,at,qe)=>new Promise((Lt,Bt)=>{var ft=an=>{try{Sn(qe.next(an))}catch(rn){Bt(rn)}},Gt=an=>{try{Sn(qe.throw(an))}catch(rn){Bt(rn)}},Sn=an=>an.done?Lt(an.value):Promise.resolve(an.value).then(ft,Gt);Sn((qe=qe.apply(Mt,at)).next())});function ci(Mt){return/^\d+$/.test(Mt)?`${Mt}px`:Mt}function Ze(){}let be=!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 Ae(Mt=[]){let at=Mt;if(Array.isArray(Mt)){for(let qe=0;qe<Mt.length;qe++){let Lt=Pe[Mt[qe]];if(Lt)return Lt}return at[0]}return Pe[at]||at}let Oe=null;var xe=Mt=>{var at=Mt,{width:qe="100%",height:Lt="100%",value:Bt,language:ft="javascript",style:Gt={},options:Sn={},overrideServices:an={},theme:rn="vs-dark",onEditBlur:zn,isCopy:kn=!1,onSave:mn,autoHeight:ei=!1,forbidCopy:Pi=!1,onChange:Hn=Ze,editorDidMount:bn=Ze,onFocus:wi=Ze,onBreakPoint:Zi=Ze,breakPointValue:Hi=[],filename:rr="educoder.txt",errorLine:_r,errorContent:gi="",highlightLine:di,openBreakPoint:xi=!1,placeholder:$i=""}=at,Ri=St(at,["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 Kr=(0,le.useRef)(),Sr=(0,le.useRef)({}),Ne=(0,le.useRef)(),Ci=(0,le.useRef)(),wr=(0,le.useRef)([]),Pn=(0,le.useRef)(!1),Si=(0,le.useRef)(),Wi=(0,le.useRef)(),qi=(0,le.useRef)(!1),[$n,qn]=(0,le.useState)(!1);function Zt(){let tn;return Kr.current&&(tn=new ke.Z(sn=>{for(let In of sn)(In.target.offsetHeight>0||In.target.offsetWidth>0)&&Sr.current.instance.layout()}),tn.observe(Kr.current)),tn}function $t(){Ot.ZP.warning({content:decodeURIComponent(Xe),key:"monaco-editor-tip"})}const Qe=()=>{let tn=Sr.current.instance;if(Bt!=null&&tn&&$n){const sn=tn.getModel();sn&&Bt!==sn.getValue()&&(be=!0,sn.setValue(Bt),tn.layout(),be=!1)}};(0,le.useEffect)(()=>{const tn=tt.Z.subscribe("formatDocument",sn=>{var In;let Oi=Sr.current.instance;(In=Oi==null?void 0:Oi.getAction)==null||In.call(Oi,"editor.action.formatDocument").run()});return window.updateMonacoValue=sn=>{Hn(sn)},tn},[]),(0,le.useEffect)(()=>{var tn;let sn=Sr.current.instance;Ci.current&&clearTimeout(Ci.current),Ci.current=setTimeout(()=>{Qe()},500),Bt&&(Bt!=null&&Bt.length)&&((tn=sn==null?void 0:sn.updateOptions)==null||tn.call(sn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Bt.split(/\r\n|\r|\n/g).length))+3,5)}))},[Bt,$n,Sr.current]),(0,le.useEffect)(()=>{if(_r&&Sr.current&&Sr.current.instance){let sn=Sr.current.instance;sn.changeViewZones(function(In){var Oi=document.createElement("div");Oi.style.padding="10px 20px",Oi.style.width="calc(100% - 20px)",Oi.className="my-error-line-wrp",Oi.innerHTML=gi,In.addZone({afterLineNumber:_r||11,heightInLines:3,domNode:Oi})});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}};sn.addOverlayWidget(tn),sn.revealPositionInCenter({lineNumber:20,column:1})}},[_r,Sr.current,$n]);const on=(tn="",sn)=>{if(!tn||tn.trim()==="")return!0;const Oi=Sr.current.instance.getModel().getLineTokens(sn);let Di=!1;for(let vi=0;vi<2;vi++)Oi.getStandardTokenType(vi)===1&&(Di=!0);return Di};(0,le.useEffect)(()=>{var tn;const sn=(tn=Sr.current)==null?void 0:tn.instance;if(sn&&$n&&Pi){const In=sn.onDidBlurEditorWidget(()=>{qi.current=!1}),Oi=sn.onDidFocusEditorText(()=>{qi.current=!0});return()=>{In.dispose(),Oi.dispose()}}},[Sr.current,$n,Pi]),(0,le.useEffect)(()=>{var tn;if((tn=Sr.current)!=null&&tn.instance&&$n&&xi){let sn=Sr.current.instance,In=sn.getModel();if(!In)return;(()=>{var Cr;let Cn=[],ri=[];const Yi=In.getAllDecorations();for(let er of Yi)er.options.className==="highlighted-line"&&(Cn.push((Cr=er==null?void 0:er.range)==null?void 0:Cr.startLineNumber),ri.push(er==null?void 0:er.id));if(di===Cn[0])return;In.deltaDecorations(ri,[]);const yr=In.getLineCount();di&&di<=yr&&(sn.deltaDecorations([],[{range:new Oe.Range(di,1,di,In.getLineMaxColumn(di)),options:{isWholeLine:!0,className:"highlighted-line"}}]),sn.revealLineInCenter(di))})();const Di=(Cr=!1)=>{var Cn;let ri=[],Yi=[];const yr=In.getAllDecorations();for(let er of yr)er.options.linesDecorationsClassName==="breakpoints-select"&&(ri.push((Cn=er==null?void 0:er.range)==null?void 0:Cn.startLineNumber),Yi.push(er==null?void 0:er.id));if(Cr)return{lines:ri,ids:Yi};Zi(ri)},vi=Cr=>Zn(void 0,null,function*(){let Cn={range:new Oe.Range(Cr,1,Cr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield In.deltaDecorations([],[Cn]),Di()}),Ti=Cr=>Zn(void 0,null,function*(){let Cn=[];const ri=sn.getLineDecorations(Cr);for(let Yi of ri)Yi.options.linesDecorationsClassName==="breakpoints-select"&&Cn.push(Yi.id);yield In.deltaDecorations(Cn,[]),Di()}),Li=Cr=>{let Cn=sn.getLineDecorations(Cr);for(let ri of Cn)if(ri.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Dt.isEqual)(Hi,Di(!0).lines)){In.deltaDecorations(Di(!0).ids,[]);const Cr=Hi.map(Cn=>({range:new Oe.Range(Cn,1,Cn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));In.deltaDecorations([],Cr)}const sr=sn.onDidChangeModelContent(Cr=>{let Cn=sn.getPosition();if(Cn){let ri=Cn.lineNumber;clearTimeout(Wi.current),Wi.current=setTimeout(()=>{on(In.getLineContent(ri),ri)?Ti(ri):Li(ri)?(Ti(ri),vi(ri)):Di()},100)}}),Zr=sn.onMouseDown(Cr=>{var Cn,ri,Yi;if(Cr.target.detail&&((Yi=(ri=(Cn=Cr.target)==null?void 0:Cn.element)==null?void 0:ri.className)!=null&&Yi.includes("line-numbers"))){let yr=Cr.target.position.lineNumber;if(on(In.getLineContent(yr),yr))return;Li(yr)?Ti(yr):vi(yr)}}),Vr=Cr=>{let Cn={range:new Oe.Range(Cr,1,Cr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};wr.current=sn.deltaDecorations(wr.current,[Cn])},Tn=()=>{wr.current=sn.deltaDecorations(wr.current,[])},Po=sn.onMouseMove(Cr=>{var Cn,ri,Yi;if(Tn(),Cr.target.detail&&((Yi=(ri=(Cn=Cr.target)==null?void 0:Cn.element)==null?void 0:ri.className)!=null&&Yi.includes("line-numbers"))){let yr=Cr.target.position.lineNumber;if(on(In.getLineContent(yr),yr))return;Vr(yr)}}),Xr=sn.onMouseLeave(()=>{Tn()});return()=>{sr.dispose(),Zr.dispose(),Po.dispose(),Xr.dispose()}}},[Sr.current,$n,Hi,di,xi,ft]),(0,le.useEffect)(()=>{var tn;(tn=Sr.current)!=null&&tn.instance&&xi&&Sr.current.instance.setPosition({lineNumber:0,column:0})},[di]);function cn(){let tn=Sr.current.instance;if(tn){const sn=tn.getSelection(),In=Sr.current.pastePos||{},Oi=new Oe.Range(In.startLineNumber||sn.endLineNumber,In.startColumn||sn.endColumn,In.endLineNumber||sn.endLineNumber,In.endColumn||sn.endColumn);setTimeout(()=>{tn.executeEdits("",[{range:Oi,text:""}])},300)}}function At(tn){(window.navigator.platform.match("Mac")?tn.metaKey:tn.ctrlKey)&&tn.keyCode==83&&(tn.preventDefault(),mn())}const ht=()=>{if(ei&&Sr.current.instance){const tn=Sr.current.instance.getContentHeight();Kn(tn<Lt?Lt:tn)}else Kn(Lt)};function en(tn){var sn=document.createEvent("MouseEvents");sn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),tn.dispatchEvent(sn)}const fn=tn=>{if(!qi.current)return;const{keyCode:sn,ctrlKey:In,metaKey:Oi,target:Di,type:vi}=tn;return(vi==="paste"||(sn===67||sn===86)&&(Oi||In))&&Di.nodeName==="TEXTAREA"&&($t(),tn.preventDefault()),!1};function Rn(tn,sn){var In=window.URL||window.webkitURL||window,Oi=new Blob([sn]),Di=document.createElementNS("http://www.w3.org/1999/xhtml","a");Di.href=In.createObjectURL(Oi),Di.download=tn,en(Di)}(0,le.useEffect)(()=>{ht()},[ht]),(0,le.useEffect)(()=>{Kr.current&&!$n&&Promise.all([pe.e(8909),pe.e(3267)]).then(pe.bind(pe,71448)).then(tn=>{try{Oe=tn,Sr.current.instance=Oe.editor.create(Kr.current,{value:Bt,language:Ae(ft),theme:rn,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},an);const sn=Sr.current.instance;let Di=[...xt.BH._menuItems].find(sr=>sr[0]._debugName=="EditorContext")[1],vi=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ti=(sr,Zr)=>{var Vr,Tn;let Po=sr._first;do Zr.includes((Tn=(Vr=Po.element)==null?void 0:Vr.command)==null?void 0:Tn.id)&&sr._remove(Po);while(Po=Po.next)};if(bn(sn,Oe),setTimeout(()=>{ht(),Sr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Rn(rr||"educoder.txt",sn.getValue())}})},500),Sr.current.subscription=sn.onDidChangeModelContent(sr=>{Pn.current?clearTimeout(Si.current):(ht(),Hn(sn.getValue(),sr)),Si.current=setTimeout(()=>{Pn.current=!1},500)}),window.Monaco||je(Oe,Ae(ft)),Pi&&(Ti(Di,vi),Kr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",fn),window.removeEventListener("paste",fn),window.addEventListener("keydown",fn),window.addEventListener("paste",fn)),window.Monaco=Oe,zn&&sn.onDidBlurEditorWidget(()=>{zn(sn.getValue())}),wi&&sn.onDidFocusEditorText(()=>{wi(sn.getValue())}),Pi)try{sn.onDidPaste(sr=>{const Zr=sn.getSelection(),Vr=Sr.current.pastePos||{},Tn=new Oe.Range(Vr.startLineNumber||Zr.endLineNumber,Vr.startColumn||Zr.endColumn,Vr.endLineNumber||Zr.endLineNumber,Vr.endColumn||Zr.endColumn);sn.executeEdits("",[{range:sr.range,text:""}])})}catch(sr){}let Li=Zt();return $i&&typeof $i=="string"&&new Tt($i,sn,Oe),qn(!0),()=>{const sr=Sr.current.instance;sr.dispose();const Zr=sr.getModel();Zr&&Zr.dispose(),Sr.current.subscription&&Sr.current.subscription.dispose(),Li.unobserve(Kr.current)}}catch(sn){}})},[]),(0,le.useEffect)(()=>{if(Sr.current.instance&&$n)return document.addEventListener("keydown",At,!1),()=>{document.removeEventListener("keydown",At)}},[mn,$n]),(0,le.useEffect)(()=>{let tn=Sr.current.instance;if(tn&&$n){let sn=Ae(ft);Oe.editor.setModelLanguage(tn.getModel(),sn)}},[ft,$n]),(0,le.useEffect)(()=>{Sr.current.instance&&$n&&Oe.editor.setTheme(rn)},[rn,$n]),(0,le.useEffect)(()=>{let tn=Sr.current.instance;Ne.current=Sn,tn&&$n&&(tn.updateOptions(un({},Sn)),setTimeout(()=>{tn.getModel().updateOptions(un({},Sn))},200))},[JSON.stringify(Sn),$n]),(0,le.useEffect)(()=>{let tn=Sr.current.instance;tn&&$n&&tn.layout()},[qe,Lt,$n]);const[Qn,Et]=(0,le.useState)(ci(qe)),[wn,Kn]=(0,le.useState)(ci(Lt)),Ei=_n(un({},Gt),{width:Qn,height:wn,position:"relative"});return le.createElement("div",{className:"my-monaco-editor",ref:Kr,style:Ei},kn&&le.createElement(Ve.CopyToClipboard,{text:Bt,onCopy:()=>Ot.ZP.success("\u590D\u5236\u6210\u529F")},le.createElement(Wt.Z,{title:"\u590D\u5236\u4EE3\u7801"},le.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},le.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ct({width:Mt="100%",height:at="100%",original:qe,modified:Lt,language:Bt,options:ft={}}){const Gt=(0,le.useRef)(),[Sn,an]=(0,le.useState)(null);function rn(ei){let Pi;return Gt.current&&(Pi=new ke.Z(Hn=>{for(let bn of Hn)(bn.target.offsetHeight>0||bn.target.offsetWidth>0)&&ei.layout()}),Pi.observe(Gt.current)),Pi}(0,le.useEffect)(()=>(Gt.current&&Promise.all([pe.e(8909),pe.e(9404)]).then(pe.bind(pe,2550)).then(ei=>{Oe=ei;const Pi=Oe.editor.createDiffEditor(Gt.current,_n(un({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},ft),{wordWrap:!0}));an(Pi);let Hn=rn(Pi);return()=>{Pi.dispose();const bn=Pi.getModel();bn&&bn.dispose(),Hn.unobserve(Gt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,le.useEffect)(()=>{Sn&&Sn.setModel({original:Oe.editor.createModel(qe,Bt),modified:Oe.editor.createModel(Lt,Bt)})},[qe,Lt,Bt,Sn]);const zn=ci(Mt),kn=ci(at),mn={width:zn,height:kn};return le.createElement("div",{className:"my-diff-editor",ref:Gt,style:mn})}},85057:function(On,pn,pe){"use strict";pe.d(pn,{jL:function(){return Ge},w9:function(){return qt},QD:function(){return Hn},cQ:function(){return Ve},op:function(){return rn},O5:function(){return qi},_b:function(){return _r},t7:function(){return se},Gi:function(){return Zn},YG:function(){return _n},qp:function(){return Ft},vr:function(){return Zi},qE:function(){return mn},Je:function(){return Ee},wb:function(){return xt},cq:function(){return Oe},tp:function(){return Ie}});var le=pe(59301),ke={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"},We="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:$n=[],img:qn,imgWidth:Zt=346,title:$t,sunTitle:Qe,bannerExtraContent:on})=>le.createElement("div",{className:ke.banner},le.createElement("div",{className:ke.content},le.createElement("aside",null,le.createElement("p",null,le.createElement("b",null,$t),le.createElement("span",null,Qe)),$n.length>0&&le.createElement("div",{className:ke.btns},$n.map((cn,At)=>le.createElement("div",{key:At,onClick:cn.click},cn.name,cn.sign?le.createElement("img",{src:We,width:39}):null))),on),qn&&le.createElement("img",{style:{marginTop:33,marginRight:38},src:qn,width:Zt}))),Ue={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},Me=pe(92310),Ct=pe.n(Me),wt=pe(89392),Ft=({dataSource:$n=[],value:qn,onChange:Zt,onTitleChange:$t,className:Qe,title:on,titleWidth:cn=41,style:At={},fontColor:ht="#6A7283",showCount:en})=>{const[fn,Rn]=(0,le.useState)(0),[Qn,Et]=(0,le.useState)(!1),wn=(0,le.useRef)(null),Kn=(0,le.useRef)(null);return(0,le.useEffect)(()=>{var Ei;$n.length!==0&&(((Ei=wn==null?void 0:wn.current)==null?void 0:Ei.clientHeight)>97?Rn(1):Rn(0)),$n.length===0&&Rn(0),Et(!1)},[$n]),le.createElement("div",{className:Ct()(Ue.row,Qe),style:At},le.createElement("div",{onClick:(0,wt.throttle)(()=>$t==null?void 0:$t(),2e3),style:{width:cn,marginTop:Qn?12:4},className:`${Ue.title} ${$t?"current":""}`},on),le.createElement("div",{className:Qn?`${Ue.tagsWrap} ${Ue.tagsBorderWrap}`:Ue.tagsWrap},le.createElement("div",{className:Ue.bar,ref:Kn,style:fn>0?{height:fn===1?97:"auto",overflow:fn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},le.createElement("div",{className:Ue.tag,ref:wn},$n==null?void 0:$n.map(Ei=>le.createElement("span",{onClick:()=>Zt(Ei.id),key:Ei.id,style:{color:ht},className:qn===Ei.id?Ue.active:""},le.createElement("span",{title:Ei.name,className:Ue.name},Ei.name),!!en&&le.createElement("span",{className:Ue.num},Ei.count))))),!!fn&&le.createElement(le.Fragment,null,fn===1?le.createElement("div",{onClick:()=>{var Ei;Rn(2),((Ei=wn==null?void 0:wn.current)==null?void 0:Ei.clientHeight)>245?Et(!0):Et(!1)},className:Ue.action},"\u5C55\u5F00",le.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):le.createElement("div",{onClick:()=>{Kn.current.scrollTop=0,Rn(1),Et(!1)},className:Ue.action},"\u6536\u8D77",le.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},lt={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"},Ie=({dataSource:$n=[],value:qn,onChange:Zt,className:$t,style:Qe={}})=>le.createElement("div",{style:Qe,className:Ct()(lt.tabs,$t)},$n.map(on=>le.createElement("span",{onClick:()=>Zt(on.id),className:qn===on.id?lt.active:"",key:on.id},on.name))),te={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},ee=pe(92832),se=({dataSource:$n=[],value:qn="",onChange:Zt,onInputChange:$t=()=>{},className:Qe,style:on={},placeholder:cn,allowClear:At=!1})=>{var ht;const[en,fn]=(0,le.useState)(""),[Rn,Qn]=(0,le.useState)("");(0,le.useEffect)(()=>{var Kn;let Ei=qn;(Kn=JSON.stringify(qn))!=null&&Kn.includes("{")&&(fn(qn.id),Ei=qn.value||"");try{Qn(decodeURIComponent(Ei||""))}catch(tn){Qn(decodeURIComponent(Ei||""))}},[qn]);const Et=()=>{Zt(encodeURIComponent(Rn),en||null)},wn=Kn=>{Kn!==en&&(fn(Kn),Zt(encodeURIComponent(Rn),Kn))};return le.createElement("div",{className:Ct()(te.input,Qe),style:on},!!$n.length&&le.createElement("div",{className:te.dropdown},le.createElement("div",{className:te.text},(ht=$n.find(Kn=>Kn.id===en))==null?void 0:ht.name,le.createElement("i",{className:"iconfont icon-zhankai4"}),le.createElement("b",{className:te.b1}),le.createElement("b",{className:te.b2})),le.createElement("div",{className:te.menu},$n.map((Kn,Ei)=>le.createElement("div",{key:Ei,onClick:()=>wn(Kn.id)},Kn.name)))),le.createElement(ee.default,{onPressEnter:Et,value:Rn,onChange:Kn=>{Qn(Kn.target.value),$t(encodeURIComponent(Kn.target.value),en||null)},bordered:!1,placeholder:cn}),le.createElement("i",{onClick:Et,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"},Ee=({value:$n,onChange:qn,className:Zt,total:$t,pageSize:Qe,style:on={}})=>{const cn=$n<2,At=$n>=Math.ceil($t/Qe);return $t<=Qe?le.createElement(le.Fragment,null):le.createElement("div",{className:Ct()(he.quickPager,Zt),style:on},le.createElement("div",{onClick:()=>{cn||qn($n-1,"prev")},className:cn?he.disabled:""},"\u4E0A\u4E00\u9875"),le.createElement("div",{onClick:()=>{At||qn($n+1,"next")},className:At?he.disabled:""},"\u4E0B\u4E00\u9875"))},Be={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"},Le=pe(71418),ze=pe(6848),je=pe(13570),Xe=pe(3294),Ye=pe(955),dt=pe(96908),He=pe(57177),Nt=pe(81378),ot=pe(8797),xt=({className:$n,dataSource:qn=[],col:Zt=4,right:$t,bottom:Qe=23,precision:on=0,wrapWidth:cn=1200,trackEventItems:At,loading:ht})=>{const en=Math.floor((cn-(Zt-1)*$t)/Zt);return le.createElement(Le.Z,{spinning:ht},le.createElement("div",{className:Ct()(Be.list,$n)},!!qn.length&&qn.map((fn,Rn)=>{const{name:Qn,id:Et,identifier:wn,power:Kn,cover_image_id:Ei,pic:tn}=fn;return le.createElement("div",{className:Be.wrap,key:Et,style:{width:en,marginRight:(1+Rn)%Zt===0?0:$t+on,marginBottom:Qe}},le.createElement("a",{target:"_blank",href:`/shixuns/${wn}/challenges`,className:Be.li,onClick:sn=>{sn.preventDefault(),At&&(0,Ye.L9)([At]),Kn&&(0,Ye.xg)(`/shixuns/${wn}/challenges`)}},le.createElement("div",{className:Be.img},le.createElement("img",{className:Be.cover,src:`${tn}`}),fn.is_jupyter&&le.createElement("img",{className:Be.sign,src:dt}),fn.is_jupyter_lab&&le.createElement("img",{className:Be.sign,src:He}),fn.is_unity_3d&&le.createElement("img",{className:Be.sign,src:Nt})),le.createElement("div",{className:Be.name},le.createElement(ze.Z,{title:Qn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},le.createElement("span",{className:Be.e},Qn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),le.createElement("div",{className:Be.tags},le.createElement(ze.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},le.createElement("span",null,le.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),le.createElement("span",null,fn.challenges_count))),!!fn.myshixuns_count&&le.createElement(ze.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},le.createElement("span",null,le.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),le.createElement("span",null,fn.myshixuns_count))),le.createElement(ze.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},le.createElement("span",null,le.createElement("span",null,fn.level))),le.createElement("div",{className:Be.rate},le.createElement(je.Z,{allowHalf:!0,disabled:!0,defaultValue:fn.score_info}),le.createElement("span",null,"\xA0",fn.score_info?`${fn.score_info}\u5206`:"5\u5206")))),!Kn&&le.createElement("div",{className:Be.lockWrap},le.createElement("img",{src:`${Xe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),le.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!qn.length&&le.createElement(ot.Z,null)))},Ot={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"},Wt=pe(24065),Dt=pe(59301),Ve=({className:$n,dataSource:qn=[],col:Zt=4,right:$t,bottom:Qe=23,precision:on=0,wrapWidth:cn=1200,trackEventItems:At,loading:ht,onRemove:en=()=>{},isCurrent:fn=!0,showAlias:Rn=!1})=>{const Qn=Math.floor((cn-(Zt-1)*$t)/Zt),Et=[{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 Dt.createElement(Le.Z,{spinning:ht},Dt.createElement("div",{className:Ct()(Ot.list,$n)},!!(qn!=null&&qn.length)&&(qn==null?void 0:qn.map((wn,Kn)=>{var Ei;const{name:tn,id:sn,identifier:In,featured:Oi,school_name:Di,image_url:vi,excellent:Ti,is_plan:Li}=wn;return Dt.createElement("div",{key:sn,className:Ot.wrap,style:{width:Qn,marginRight:(1+Kn)%Zt===0?0:$t+on,marginBottom:Qe}},Dt.createElement("a",{className:Ot.li,onClick:sr=>{sr.preventDefault(),sr.stopPropagation(),At&&(0,Ye.L9)([At]),(0,Ye.xg)(`/paths/${In}`)}},Dt.createElement("div",{className:Ot.img},Dt.createElement("img",{className:Ot.cover,src:`${vi}`}),fn&&(0,Wt.bg)()&&(wn==null?void 0:wn.studying)&&Dt.createElement("div",{className:`${Ot.movebq} user-path-items`,onClick:sr=>{sr.stopPropagation(),en(wn)}},Dt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Dt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ei=wn==null?void 0:wn.subject_tags)==null?void 0:Ei.map((sr,Zr)=>{var Vr,Tn;if(Zr===0){const Xr=(Vr=Et.find(Cr=>Cr.name==sr))==null?void 0:Vr.swimg;return Dt.createElement("img",{className:Ot.sign,src:Xr,style:{left:"-4px"}})}const Po=(Tn=Et.find(Xr=>Xr.name==sr))==null?void 0:Tn.ptimg;return Dt.createElement("img",{className:Ot.sign,src:Po,style:{left:`${48+52*(Zr-1)+2*Zr}px`}})}),Dt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(wn==null?void 0:wn.excellent)&&Dt.createElement("div",{className:Ot.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Dt.createElement("div",{className:Ot.name},Dt.createElement(ze.Z,{title:Rn&&(wn!=null&&wn.excellent_alias_name)?Dt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${tn}`,Dt.createElement("br",null),Dt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${wn==null?void 0:wn.excellent_alias_name}`)):tn},Dt.createElement("span",{className:Ot.e},Rn&&(wn==null?void 0:wn.excellent_alias_name)||tn))),Dt.createElement(ze.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Di}`},Dt.createElement("div",{className:Ot.unit},Dt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Di)),Dt.createElement("div",{className:Ot.tags},Dt.createElement("div",null,Dt.createElement(ze.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Dt.createElement("span",null,Dt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Dt.createElement("span",null,wn.stages_count))),Dt.createElement(ze.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Dt.createElement("span",null,Dt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Dt.createElement("span",null,wn.members_count)))))))})),!qn.length&&Dt.createElement(ot.Z,null)))},_t={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"},vn="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",yn=pe(59301),qt=({className:$n,dataSource:qn=[],col:Zt=4,right:$t,bottom:Qe=23,precision:on=0,wrapWidth:cn=1200,trackEventItems:At,loading:ht,handleVery:en=()=>!0})=>{const fn=Math.floor((cn-(Zt-1)*$t)/Zt);return yn.createElement(Le.Z,{spinning:ht},yn.createElement("div",{className:Ct()(_t.list,$n)},!!qn.length&&qn.map((Rn,Qn)=>{const{subject_identifier:Et,id:wn,identifier:Kn,power:Ei}=Rn,tn=Rn.is_public!=0&&Rn.is_public;return yn.createElement("div",{className:_t.wrap,key:wn,style:{width:fn,marginRight:(1+Qn)%Zt===0?0:$t+on,marginBottom:Qe}},yn.createElement("a",{className:_t.li,onClick:sn=>{sn.preventDefault(),en(Rn==null?void 0:Rn.first_category_url)&&(At&&(0,Ye.L9)([At]),(0,Ye.xg)(Rn.first_category_url))}},yn.createElement("div",{className:_t.top},yn.createElement(ze.Z,{title:Rn.name},yn.createElement("div",{className:_t.name},Rn.name)),yn.createElement("img",{className:_t.img,src:Xe.Z.IMG_SERVER+"/images/"+Rn.avatar_url}),yn.createElement("div",{className:_t.text,title:Rn.creator},Rn.creator),Et&&yn.createElement("div",{className:_t.btns},yn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),yn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),tn&&yn.createElement("div",{className:_t.sign},"\u516C\u5F00")),yn.createElement("div",{className:_t.bottom},Rn.visits>0&&yn.createElement(ze.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},yn.createElement("span",null,yn.createElement("i",{className:"iconfont icon-liulanyan"}),yn.createElement("span",null,Rn.visits))),Rn.course_members_count>0&&yn.createElement(ze.Z,{title:"\u6210\u5458",placement:"bottom"},yn.createElement("span",null,yn.createElement("i",{className:"iconfont icon-chengyuan"}),Rn.course_members_count)),Rn.tasks_count>0&&yn.createElement(ze.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},yn.createElement("span",null,yn.createElement("i",{className:"iconfont icon-zuoye"}),Rn.tasks_count)),Rn.is_end?yn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):yn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Rn.is_accessible&&yn.createElement("div",{className:_t.lockWrap},yn.createElement("img",{src:`${Xe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),yn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!qn.length&&yn.createElement(ot.Z,null)))},ln={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"},Gn=pe(89070),_n=({dataSource:$n=[],value:qn,onChange:Zt,className:$t,style:Qe={},tabBarExtraContent:on})=>le.createElement("div",{className:Ct()(ln.tabs,$t),style:Qe},le.createElement("div",{className:ln.tabsWrap},$n.map((cn,At)=>!(cn!=null&&cn.hide)&&le.createElement("aside",{className:ln.tab,onClick:()=>{Zt(cn.id),cn.link&&Gn.history.push(cn.link)},key:At},le.createElement("div",{className:qn===cn.id?ln.active:""},cn.name),(cn==null?void 0:cn.resetCount)==null&&(cn==null?void 0:cn.total)!==void 0&&le.createElement("span",null,"\uFF08",cn==null?void 0:cn.total,"\uFF09"),(cn==null?void 0:cn.resetCount)!==void 0&&(cn==null?void 0:cn.total)!==void 0&&le.createElement(ze.Z,{title:(cn==null?void 0:cn.tip)!=null?cn==null?void 0:cn.tip:""},le.createElement("span",{style:{color:"#9096A3"}},"\uFF08",le.createElement("span",{style:{color:"#000"}},cn==null?void 0:cn.resetCount),"/",le.createElement("span",null,cn==null?void 0:cn.total),"\uFF09"))))),le.createElement("div",{className:ln.tabBar},on)),Zn=({className:$n,style:qn={},children:Zt})=>le.createElement("div",{className:Ct()($n),style:qn},Zt),ci={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"},Ze=pe(38854),be=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 Oe=({sortValue:$n,dropValue:qn,className:Zt,onSort:$t,onDrop:Qe,dataSource:on=Pe})=>{var cn;return le.createElement("div",{className:Ct()(ci.orderWrap,Zt)},le.createElement(Ze.Z,{dropdownRender:()=>le.createElement(be.default,null,on.map((At,ht)=>le.createElement(be.default.Item,{key:ht,onClick:()=>Qe(At.id)},At.name)))},le.createElement("span",{className:ci.orderTextWrap},(cn=on.find(At=>qn===At.id))==null?void 0:cn.name)),le.createElement("span",{className:ci.orderIconWrap},le.createElement("span",{className:ci.orderAsc},le.createElement("i",{className:$n==="asc"?`iconfont icon-sanjiaoxing-up font12 ${ci.cursorPointer} ${ci.active}`:`iconfont icon-sanjiaoxing-up font12 ${ci.cursorPointer}`,onClick:()=>$t($n==="asc"?"desc":"asc")})),le.createElement("span",{className:ci.orderDesc},le.createElement("i",{className:$n==="desc"?`iconfont icon-sanjiaoxing-down font12 ${ci.cursorPointer} ${ci.active}`:`iconfont icon-sanjiaoxing-down font12 ${ci.cursorPointer}`,onClick:()=>$t($n==="asc"?"desc":"asc")}))))},xe={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"},ct=pe(3113),Mt=Object.defineProperty,at=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,Bt=($n,qn,Zt)=>qn in $n?Mt($n,qn,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):$n[qn]=Zt,ft=($n,qn)=>{for(var Zt in qn||(qn={}))qe.call(qn,Zt)&&Bt($n,Zt,qn[Zt]);if(at)for(var Zt of at(qn))Lt.call(qn,Zt)&&Bt($n,Zt,qn[Zt]);return $n},Gt=($n,qn)=>{var Zt={};for(var $t in $n)qe.call($n,$t)&&qn.indexOf($t)<0&&(Zt[$t]=$n[$t]);if($n!=null&&at)for(var $t of at($n))qn.indexOf($t)<0&&Lt.call($n,$t)&&(Zt[$t]=$n[$t]);return Zt},Sn=($n,qn,Zt)=>new Promise(($t,Qe)=>{var on=ht=>{try{At(Zt.next(ht))}catch(en){Qe(en)}},cn=ht=>{try{At(Zt.throw(ht))}catch(en){Qe(en)}},At=ht=>ht.done?$t(ht.value):Promise.resolve(ht.value).then(on,cn);At((Zt=Zt.apply($n,qn)).next())}),rn=$n=>{var qn=$n,{className:Zt,style:$t,children:Qe,loading:on=!1,openLoading:cn,onClick:At=()=>{},size:ht="middle",shape:en="round"}=qn,fn=Gt(qn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Rn,Qn]=(0,le.useState)(!1);return le.createElement(ct.ZP,ft({onClick:(0,wt.throttle)(Et=>Sn(void 0,null,function*(){cn&&Qn(!0);try{yield At(Et)}catch(wn){console.log("error",wn)}cn&&Qn(!1)}),2e3,{leading:!0,trailing:!1}),className:Ct()(xe.btn,xe[`${ht}-${en}`],Zt),style:$t,size:ht,shape:en,loading:Rn||on},fn),Qe)},zn={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"},mn=({className:$n,style:qn,children:Zt=null,onClick:$t,title:Qe})=>le.createElement("div",{className:Ct()(zn.head,$n),style:qn},le.createElement("span",{className:"primary-hover",onClick:$t},le.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),le.createElement("b",{title:Qe},Qe),le.createElement("div",{className:zn.node},Zt)),ei={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:$n=!0,confirmTitle:qn,confirmClick:Zt,cancelShow:$t=!0,cancelTitle:Qe,cancelClick:on,className:cn,style:At,confirmLoading:ht=!1})=>le.createElement("div",{className:Ct()(ei.btns,cn),style:At},$n&&le.createElement(ct.ZP,{loading:ht,onClick:Zt,type:"primary",className:ei.confirm},qn),$t&&le.createElement(ct.ZP,{onClick:on,className:ei.cancel},Qe)),bn={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"},Zi=({className:$n,style:qn={},LeftContent:Zt,children:$t,RightContent:Qe})=>le.createElement("div",{className:Ct()(bn.fixedBottom,$n),style:qn},le.createElement("div",{className:bn.wrap},le.createElement("div",{className:bn.left},Zt),le.createElement("div",{className:bn.center},$t),le.createElement("div",{className:bn.right},Qe))),Hi={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"},_r=({className:$n,style:qn={},dataSource:Zt=[]})=>le.createElement("div",{className:Ct()(Hi.crumbs,$n),style:qn},Zt.map(($t,Qe)=>Qe<Zt.length-1?le.createElement(le.Fragment,{key:Qe},$t.path||$t.onClick?le.createElement("span",{className:Hi.hover,onClick:$t!=null&&$t.onClick?$t.onClick:()=>Gn.history.push($t.path)},$t.name):le.createElement("span",null,$t.name),le.createElement("span",null,"\xA0",">","\xA0")):le.createElement("span",{key:Qe,style:{color:"#5F6368"}},$t.name))),gi=pe(31797),di=Object.defineProperty,xi=Object.defineProperties,$i=Object.getOwnPropertyDescriptors,Ri=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,Ne=($n,qn,Zt)=>qn in $n?di($n,qn,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):$n[qn]=Zt,Ci=($n,qn)=>{for(var Zt in qn||(qn={}))Kr.call(qn,Zt)&&Ne($n,Zt,qn[Zt]);if(Ri)for(var Zt of Ri(qn))Sr.call(qn,Zt)&&Ne($n,Zt,qn[Zt]);return $n},wr=($n,qn)=>xi($n,$i(qn)),Pn=($n,qn)=>{var Zt={};for(var $t in $n)Kr.call($n,$t)&&qn.indexOf($t)<0&&(Zt[$t]=$n[$t]);if($n!=null&&Ri)for(var $t of Ri($n))qn.indexOf($t)<0&&Sr.call($n,$t)&&(Zt[$t]=$n[$t]);return Zt};const{Countdown:Si}=gi.default;var qi=$n=>{var qn=$n,{onChange:Zt}=qn,$t=Pn(qn,["onChange"]);const[Qe,on]=(0,le.useState)(null);(0,le.useEffect)(()=>{typeof Qe=="number"&&Qe>=0&&Zt(Qe)},[Qe]);const cn=At=>{const ht=Math.floor(At/1e3);on(ht)};return le.createElement(Si,wr(Ci({},$t),{onChange:cn}))}},58856:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ke}});var le=pe(59301);function ke(We,ut){const Ge=(0,le.useRef)();(0,le.useEffect)(()=>{Ge.current=We}),(0,le.useEffect)(()=>{function Ue(){Ge.current()}if(ut!==null){let Me=setInterval(Ue,ut);return()=>clearInterval(Me)}},[ut])}},74440:function(On,pn,pe){"use strict";pe.d(pn,{h:function(){return le}});var le=(ke=>(ke[ke.NOMATCH=-1]="NOMATCH",ke[ke.OK=0]="OK",ke[ke.TIMEOUT=2]="TIMEOUT",ke[ke.PODFAILURE=3]="PODFAILURE",ke[ke.COMPILEFAILURE=4]="COMPILEFAILURE",ke[ke.EXECUTEFAILURE=5]="EXECUTEFAILURE",ke[ke.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",ke))(le||{})},88264:function(On,pn,pe){"use strict";pe.d(pn,{H7:function(){return te},MK:function(){return Ie},MU:function(){return $e},X6:function(){return lt},bM:function(){return wt},fi:function(){return ee},fu:function(){return Ct},n4:function(){return de},rX:function(){return vt},vl:function(){return se},zO:function(){return Ft}});var le=pe(99064),ke=Object.defineProperty,We=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ue=(he,ve,Ee)=>ve in he?ke(he,ve,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):he[ve]=Ee,Me=(he,ve)=>{for(var Ee in ve||(ve={}))ut.call(ve,Ee)&&Ue(he,Ee,ve[Ee]);if(We)for(var Ee of We(ve))Ge.call(ve,Ee)&&Ue(he,Ee,ve[Ee]);return he};function Ct(he,ve){return(0,le.U2)(`myproblems/${he}.json`,Me({hidePopLogin:!0},ve||{}))}function wt(he,ve){return(0,le.v_)(`myproblems/${he}/code_submit.json`,ve)}function $e(he,ve){return(0,le.v_)(`myproblems/${he}/code_debug.json`,ve)}function Ft(he,ve){return ve.language&&(ve.language=encodeURIComponent(ve.language)),(0,le.U2)(`myproblems/${he}/submit_records.json`,ve)}function lt(he){return(0,le.U2)("myproblems/record_detail.json",{id:he})}function vt(he,ve){return(0,le.U2)(`myproblems/${he}/result.json`,{mode:ve})}function Ie(he,ve){return(0,le.v_)(`myproblems/${he}/add_notes.json`,ve)}function te(he,ve){return(0,le.v_)(`myproblems/${he}/restore_initial_code.json`,ve)}function ee(he){return(0,le.v_)(`myproblems/${he}/sync_code.json`)}function de(he,ve){return(0,le.v_)(`myproblems/${he}/update_code.json`,ve)}function se(he,ve){return(0,le.v_)(`discusses/${he}/plus.json`,ve)}},92744:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return xu}});var le=pe(59301),ke={flex_box_center:"flex_box_center___bZaL5",flex_space_between:"flex_space_between___oaJSq",flex_box_vertical_center:"flex_box_vertical_center____hsuP",flex_box_center_end:"flex_box_center_end___ZYbPQ",flex_box_column:"flex_box_column___nE_62",wrap:"wrap___ulhwR",left:"left___kyWln",title:"title___jsO1D",total:"total___GEhiU",list:"list___u9dBZ",name:"name___Wxggs",b:"b___Y15YO",r:"r___mKQoe",l:"l___uelFD",tag:"tag___Mpkbg",right:"right___mQ3dU",examName:"examName___Na1r8",t:"t___IgCWK",num:"num___CXI8j",topWarp:"topWarp___Kicpu",head:"head___jx3W8",so:"so___qYW7F",btn:"btn___EMJDz",content:"content___sHGsV",titleWrap:"titleWrap___I__GR",single:"single___K5iv9",analysis:"analysis___NoAuR",text:"text___xESW2",modalColumn:"modalColumn___I_tK_",modalRow:"modalRow___lyw_U",sup:"sup___HSz3Z",popover:"popover___kE8aI"},We=pe(78241),ut=pe(6848),Ge=pe(3113),Ue=pe(43418),Me=pe(5871),Ct=pe(8591),wt=pe(92832),$e=pe(28103),Ft=pe(24905),lt=pe(95237),vt=pe(43604),Ie=pe(58421),te=pe(60324),ee=Object.defineProperty,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(Jt,Yt,Dn)=>Yt in Jt?ee(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,Ee=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))se.call(Yt,Dn)&&ve(Jt,Dn,Yt[Dn]);if(de)for(var Dn of de(Yt))he.call(Yt,Dn)&&ve(Jt,Dn,Yt[Dn]);return Jt};const Be=Jt=>React.createElement("svg",Ee({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Jt),React.createElement("title",null,"\u7F16\u7EC4 6"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E4E6FD",width:34,height:34,rx:10}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M13.808 11.448a.558.558 0 0 1 0 .788l-1.564 1.565a.558.558 0 1 1-.789-.79l1.564-1.563a.558.558 0 0 1 .79 0Zm9.882 2.462a.558.558 0 0 1-.789 0l-1.564-1.563a.558.558 0 1 1 .789-.789l1.564 1.564a.556.556 0 0 1 0 .788Z",fill:"#6678EB"}),React.createElement("path",{d:"M21.753 21.707a5.937 5.937 0 1 0-8.58.015l-.937.936a.558.558 0 1 0 .789.788l.995-.994a5.91 5.91 0 0 0 3.436 1.095c1.287 0 2.48-.41 3.452-1.106l.992.992a.558.558 0 1 0 .789-.789l-.936-.937Z",fill:"#6678EB"}),React.createElement("path",{d:"m20.858 18.95-3.024-1.745v-2.054a.558.558 0 1 0-1.117 0v2.351c0 .064.011.126.031.184a.551.551 0 0 0 .258.33l3.293 1.9a.557.557 0 0 0 .559-.966Z",fill:"#FFF"}))));var Le="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",ze=pe(85149),je=pe(89070),Xe=pe(955),Ye=pe(99064),dt=Object.defineProperty,He=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,Tt=(Jt,Yt,Dn)=>Yt in Jt?dt(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,xt=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))Nt.call(Yt,Dn)&&Tt(Jt,Dn,Yt[Dn]);if(He)for(var Dn of He(Yt))ot.call(Yt,Dn)&&Tt(Jt,Dn,Yt[Dn]);return Jt};const Ot=Jt=>React.createElement("svg",xt({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Jt),React.createElement("title",null,"\u7F16\u7EC4 12"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{width:34,height:34,rx:10,fill:"#EAF3F4"}),React.createElement("path",{d:"M25.905 15.37a.775.775 0 0 0-.626-.529l-4.814-.7-2.152-4.362a.776.776 0 0 0-1.392 0l-2.153 4.363-4.814.699a.775.775 0 0 0-.43 1.323l3.484 3.396-.823 4.794a.777.777 0 0 0 1.126.818l4.306-2.264 4.305 2.264a.778.778 0 0 0 .817-.059.777.777 0 0 0 .31-.759l-.823-4.794 3.483-3.396a.777.777 0 0 0 .196-.795Z",fill:"#21C0A6",fillRule:"nonzero"})));var Wt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=",Dt=Object.defineProperty,tt=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,vn=(Jt,Yt,Dn)=>Yt in Jt?Dt(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,yn=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))Ve.call(Yt,Dn)&&vn(Jt,Dn,Yt[Dn]);if(tt)for(var Dn of tt(Yt))_t.call(Yt,Dn)&&vn(Jt,Dn,Yt[Dn]);return Jt};const zt=Jt=>React.createElement("svg",yn({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Jt),React.createElement("title",null,"\u9898\u76EE"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E7F3FF",width:34,height:34,rx:10}),React.createElement("g",{fill:"#4C6FFF",fillRule:"nonzero"},React.createElement("path",{d:"m23.719 13.325-4.098-3.94c-.097-.13-.225-.162-.355-.162-.129 0-.258.064-.387.161l-7.55 7.753c-.065.065-.098.162-.13.227l-1.032 5.427c-.033.194.032.323.16.484.13.13.227.162.389.162h.096l4.776-1.099c.097-.032.194-.064.258-.161l7.841-8.108c.194-.162.194-.517.033-.744h-.001Zm-8.1 8.044a.534.534 0 0 1-.386.162.56.56 0 0 1-.388-.162l-3-2.81c-.226-.194-.226-.517-.033-.743.194-.227.517-.227.743-.033l3 2.811c.259.226.291.55.065.776ZM17 22.92h6.844v1.055H17z"}))));var qt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",ln=pe(42678),Gn=pe(12290),un=pe(65158),_n=pe(10672),St={wrap:"wrap___OIoOI",modal:"modal___Z3hfU",titleWrap:"titleWrap___aK3oG",required:"required___NHoO7",title:"title___uxb1R",colorGray:"colorGray___O8YPg",choiceWrap:"choiceWrap___t51sb",answer:"answer___vsBnh",activeAnswer:"activeAnswer___AJN4p",deleteIcon:"deleteIcon___WvOJZ",addIcon:"addIcon___UyeIs",editorWrap:"editorWrap___uqcFU",htmlWrap:"htmlWrap___GcBNL",radio:"radio___e8qQ5",color333:"color333___PLzVK",color999:"color999___v3EY0",fold:"fold___OfvPe",head:"head___EejYX",collapseWrapper:"collapseWrapper___sQyVD",panelHeader:"panelHeader___Ivicf",open:"open___aEOQE",close:"close___z4P5H",inputBorder:"inputBorder___ix67O",keywordTag:"keywordTag___iGx08",scoreByBlankRadio:"scoreByBlankRadio___Kwu7q"},Zn=pe(59301),ci=Object.defineProperty,Ze=Object.defineProperties,be=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,xe=(Jt,Yt,Dn)=>Yt in Jt?ci(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,ct=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))Ae.call(Yt,Dn)&&xe(Jt,Dn,Yt[Dn]);if(Pe)for(var Dn of Pe(Yt))Oe.call(Yt,Dn)&&xe(Jt,Dn,Yt[Dn]);return Jt},Mt=(Jt,Yt)=>Ze(Jt,be(Yt)),at=(Jt,Yt)=>{var Dn={};for(var nt in Jt)Ae.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&Pe)for(var nt of Pe(Jt))Yt.indexOf(nt)<0&&Oe.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn};const qe=null,Lt=(Jt,Yt)=>{var Dn=Jt,{globalSetting:nt,loading:Qt,dispatch:lr,isEdit:Ir,editData:mr}=Dn,ur=at(Dn,["globalSetting","loading","dispatch","isEdit","editData"]);const[Bi,Pr]=(0,le.useState)(""),[to,So]=(0,le.useState)(""),[fr,pr]=(0,le.useState)([]),[vr,ji]=(0,le.useState)(""),[Ai,Wr]=(0,le.useState)(),[zo,Br]=(0,le.useState)(!1),[Er,Or]=(0,le.useState)({}),[kr,gr]=(0,le.useState)([]);(0,le.useEffect)(()=>{!mr||!Ir||(Pr(mr==null?void 0:mr.name),So(mr==null?void 0:mr.analysis),Wr(mr==null?void 0:mr.is_ordered),Or(mr),Br(!0))},[mr]),(0,le.useEffect)(()=>{if(!zo)return;const Nr=mr==null?void 0:mr.standard_answer.map(jo=>jo==null?void 0:jo.answer_text);pr(Nr);const _s=mr==null?void 0:mr.standard_answer.map(jo=>jo==null?void 0:jo.score);gr(_s),Br(!1)},[zo]),(0,le.useImperativeHandle)(Yt,()=>({onSave:Aa,Clear:_o}));const Aa=()=>{let Nr=[],_s=!1;return Bi?(fr.forEach((jo,Hs)=>{Nr.push({position:Hs+1,answer_text:[],score:kr[Hs]}),jo==null||jo.forEach((gl,rc)=>{Nr[Hs].answer_text.push(gl),(!gl||!(0,Xe.eR)(gl,1e4))&&(ji(`${Hs}-${rc}`),Ct.ZP.info(gl?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),_s=!0)})}),_s?!1:(Nr==null?void 0:Nr.length)>20?(Ct.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Bi,analysis:to,standard_answers:Nr,is_ordered:Ai,downcase:Er==null?void 0:Er.downcase,no_space:Er==null?void 0:Er.no_space,use_blank_score:Er==null?void 0:Er.use_blank_score}):(Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},_o=()=>{Pr(""),So(""),pr([]),Wr(!1)},xa=(Nr,_s,jo)=>{const Hs=fr.slice();if(_s&&Hs.splice(Nr,_s),jo)for(let gl=0;gl<jo;gl++)Hs.splice(Nr+gl,0,[""]);pr(Hs)},Wa=(Nr,_s,jo)=>{ji("");let Hs=fr.slice();Hs[Nr][_s]=jo,pr(Hs)},wo=Nr=>{let _s=fr.slice();_s[Nr]=[..._s[Nr],""],pr(_s)},Oa=(Nr,_s)=>{let jo=fr.slice();if(!jo[Nr][_s]){jo[Nr]=jo[Nr].filter((Hs,gl)=>gl!==_s),pr(jo);return}Ue.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:St.modal,onOk:()=>{jo[Nr]=jo[Nr].filter((Hs,gl)=>gl!==_s),pr(jo)}})},El=Nr=>{Ue.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:St.modal,onOk:()=>{let _s=fr.slice();_s=fr.filter((jo,Hs)=>Nr!==Hs),pr(_s)}})};return Zn.createElement("section",{className:St.wrap},Zn.createElement("p",{className:St.titleWrap},Zn.createElement("span",{className:St.required},"*"),Zn.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),Zn.createElement("div",null,Zn.createElement(un.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Bi,onChange:Nr=>Pr(Nr),showNullButton:!0,onPlaceholderChange:xa})),Zn.createElement("div",{className:"mt20"},fr.map((Nr,_s)=>Zn.createElement("div",{style:{display:"flex"}},Zn.createElement("div",{style:{flex:1}},Zn.createElement(_n.Z,{key:_s,answers:Nr,index:_s,flex:1,is_md:!0,activeOptionErrorIndex:vr,onAnswerChange:Wa,addChildAnswer:wo,deleteChildAnswer:Oa,deleteChildAnswermain:El})),Er.use_blank_score&&Zn.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},Zn.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",Zn.createElement(Me.Z,{style:{width:"100px"},size:"large",defaultValue:kr[_s],onBlur:jo=>{kr[_s]=jo.target.value,gr([...kr])}}))))),Zn.createElement("div",null,Zn.createElement(Ft.default,{className:`${St.color333} font14 mt20`,checked:Er.use_blank_score,onChange:Nr=>Or(Mt(ct({},Er),{use_blank_score:Nr.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),Zn.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\uFF08\u9009\u4E2D\uFF0C\u5219\u9700\u8981\u8BBE\u7F6E\u6BCF\u7A7A\u5206\u503C\uFF0C\u5B66\u751F\u7B54\u6848\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206\uFF09")),Zn.createElement("div",null,Zn.createElement(Ft.default,{className:`${St.color333} font14 mt20`,checked:Er.downcase,onChange:Nr=>Or(Mt(ct({},Er),{downcase:Nr.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Zn.createElement("div",null,Zn.createElement(Ft.default,{className:`${St.color333} font14 mt20`,checked:Er.no_space,onChange:Nr=>Or(Mt(ct({},Er),{no_space:Nr.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),Zn.createElement("div",{className:"mt20"},(fr==null?void 0:fr.length)>1&&Zn.createElement("span",null,Zn.createElement(Ft.default,{checked:Ai,onChange:Nr=>Wr(Nr.target.checked),className:`${St.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),Zn.createElement("span",{className:`${St.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),Zn.createElement("p",{className:St.titleWrap},Zn.createElement("span",{className:St.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),Zn.createElement(Gn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:to,onChange:Nr=>So(Nr)}))};var Bt=(0,je.connect)(({loading:Jt,globalSetting:Yt})=>({globalSetting:Yt,loading:Jt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Lt)),ft=pe(5112),Gt=Object.getOwnPropertySymbols,Sn=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable,rn=(Jt,Yt)=>{var Dn={};for(var nt in Jt)Sn.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&Gt)for(var nt of Gt(Jt))Yt.indexOf(nt)<0&&an.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn};const zn=null,kn=(Jt,Yt)=>{var Dn=Jt,{globalSetting:nt,loading:Qt,editData:lr,dispatch:Ir,onRef:mr=()=>{},isEdit:ur}=Dn,Bi=rn(Dn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[Pr,to]=(0,le.useState)(),[So,fr]=(0,le.useState)(""),[pr,vr]=(0,le.useState)("");(0,le.useEffect)(()=>{if(!lr||!ur)return;fr(lr==null?void 0:lr.name),vr(lr==null?void 0:lr.analysis);const Wr=lr==null?void 0:lr.choices.find(zo=>zo.is_answer);to(Wr.choice_text==="\u6B63\u786E"?"0":"1")},[lr]),(0,le.useImperativeHandle)(Yt,()=>({onSave:ji,Clear:Ai}));const ji=()=>So?Pr?{name:So,choices:[{choice_text:"\u6B63\u786E",is_answer:Pr==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Pr==="1"?1:0}],analysis:pr}:(Ct.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),Ai=()=>{fr(""),vr(""),to("")};return le.createElement("section",{className:St.wrap},le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),le.createElement(Gn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:So,onChange:Wr=>fr(Wr)}),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:St.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),le.createElement(ft.ZP.Group,{buttonStyle:"solid",value:Pr,onChange:Wr=>to(Wr.target.value)},le.createElement(ft.ZP.Button,{value:"0",className:`${St.radio} mr40`},"\u6B63\u786E"),le.createElement(ft.ZP.Button,{value:"1",className:St.radio},"\u9519\u8BEF")),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Gn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:pr,onChange:Wr=>vr(Wr)}))};var mn=(0,je.connect)(({loading:Jt,globalSetting:Yt})=>({globalSetting:Yt,loading:Jt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(kn)),ei=Object.getOwnPropertySymbols,Pi=Object.prototype.hasOwnProperty,Hn=Object.prototype.propertyIsEnumerable,bn=(Jt,Yt)=>{var Dn={};for(var nt in Jt)Pi.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&ei)for(var nt of ei(Jt))Yt.indexOf(nt)<0&&Hn.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn};const wi=null,Zi=(Jt,Yt)=>{var Dn=Jt,{globalSetting:nt,loading:Qt,editData:lr,dispatch:Ir,onRef:mr=()=>{},isEdit:ur}=Dn,Bi=bn(Dn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[Pr,to]=(0,le.useState)([]);(0,le.useEffect)(()=>{var vr;if(!lr||!ur)return;const ji=(vr=lr==null?void 0:lr.shixun)==null?void 0:vr.challenges.map(Ai=>({id:Ai==null?void 0:Ai.id,score:Ai.score}));to(ji)},[lr]),(0,le.useImperativeHandle)(Yt,()=>({onSave:So,Clear:fr}));const So=()=>({challenges:[...Pr]}),fr=()=>{to([])};console.log("editData--",lr);const pr=vr=>{var ji,Ai;return le.createElement("div",null,(Ai=(ji=vr==null?void 0:vr.shixun)==null?void 0:ji.challenges)==null?void 0:Ai.map((Wr,zo)=>{var Br;return le.createElement("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"}},le.createElement("div",null,le.createElement("span",{className:"mr5"},"\u7B2C",zo+1,"\u5173"),le.createElement(ut.Z,{key:zo,title:Wr==null?void 0:Wr.challenge_name},le.createElement("span",null,(0,Xe.Pq)(Wr==null?void 0:Wr.challenge_name,44)))),le.createElement("p",{style:{marginBottom:0}},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u5206\u503C\uFF1A"),le.createElement(Me.Z,{precision:1,min:1,max:100,className:St.baseFormItem,style:{width:176},value:(Br=Pr.find(Er=>Er.id===Wr.id))==null?void 0:Br.score,onChange:Er=>{Pr.find(Or=>Or.id===Wr.id).score=Er,to([...Pr])}})))}),le.createElement("div",{style:{clear:"both"}}))};return le.createElement("section",{className:St.wrap},le.createElement(ze.Z,{style:{paddingRight:10},className:St.titleHtml,value:`${lr==null?void 0:lr.position}\u3001${lr==null?void 0:lr.name}`}),le.createElement("p",{style:{marginBottom:"10px",marginTop:"25px"}},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u5173\u5361")),pr(lr))};var Hi=(0,je.connect)(({loading:Jt,globalSetting:Yt})=>({globalSetting:Yt,loading:Jt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Zi)),rr=Object.getOwnPropertySymbols,_r=Object.prototype.hasOwnProperty,gi=Object.prototype.propertyIsEnumerable,di=(Jt,Yt)=>{var Dn={};for(var nt in Jt)_r.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&rr)for(var nt of rr(Jt))Yt.indexOf(nt)<0&&gi.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn};const xi=["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"],$i=(Jt,Yt)=>{var Dn=Jt,{editData:nt,globalSetting:Qt,loading:lr,dispatch:Ir,onRef:mr=()=>{},isEdit:ur}=Dn,Bi=di(Dn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Pr,to]=(0,le.useState)([]),[So,fr]=(0,le.useState)(),[pr,vr]=(0,le.useState)([]),[ji,Ai]=(0,le.useState)(""),[Wr,zo]=(0,le.useState)("");(0,le.useEffect)(()=>{to(["","","",""])},[]),(0,le.useEffect)(()=>{if(!nt||!ur)return;Ai(nt==null?void 0:nt.name),zo(nt==null?void 0:nt.analysis),to(nt==null?void 0:nt.choices.map(kr=>kr.choice_text));const Or=[];nt==null||nt.choices.map((kr,gr)=>{kr.is_answer&&Or.push(gr)}),vr(Or)},[nt]),(0,le.useImperativeHandle)(Yt,()=>({onSave:Br,Clear:Er}));const Br=()=>{if(!ji)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Or=Pr.findIndex(gr=>!gr);if(Or>-1)return Ct.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${xi[Or]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!pr.length)return Ct.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(pr.length<2)return Ct.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const kr=Pr.map((gr,Aa)=>({choice_text:gr,is_answer:pr.includes(Aa)?1:0}));return{name:ji,choices:kr,analysis:Wr}},Er=()=>{to(["","","",""]),Ai(""),zo(""),vr("")};return le.createElement("section",{className:St.wrap},le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),le.createElement(Gn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:ji,onChange:Or=>Ai(Or)}),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:St.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Pr.map((Or,kr)=>le.createElement("div",{className:St.choiceWrap,key:kr},le.createElement(ut.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},le.createElement("div",{className:`${St.answer} ${pr.includes(kr)?St.activeAnswer:""}`,onClick:()=>{pr.includes(kr)?vr(pr.filter(gr=>gr!==kr)):vr([...pr,kr])}},xi[kr])),le.createElement("div",{className:St.editorWrap},So===kr?le.createElement(Gn.Z,{id:`single-question-option-${kr}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Or,onChange:gr=>{Pr[kr]=gr,to(Pr)}}):le.createElement("div",{className:St.htmlWrap,onClick:()=>fr(kr)},le.createElement(ze.Z,{value:Or}))),kr>1&&le.createElement(ut.Z,{title:"\u5220\u9664"},le.createElement("i",{className:`${St.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{to(Pr.filter((gr,Aa)=>Aa!==kr)),pr.includes(kr)?vr(pr.filter(gr=>gr!==kr)):vr([...pr,kr])}})),kr<7&&kr===Pr.length-1&&le.createElement(ut.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},le.createElement("i",{className:`${St.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>to([...Pr,""])})))),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Gn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Wr,onChange:Or=>zo(Or)}))};var Ri=(0,je.connect)(({loading:Jt,globalSetting:Yt})=>({globalSetting:Yt,loading:Jt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)($i)),Kr=Object.getOwnPropertySymbols,Sr=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Ci=(Jt,Yt)=>{var Dn={};for(var nt in Jt)Sr.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&Kr)for(var nt of Kr(Jt))Yt.indexOf(nt)<0&&Ne.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn};const wr=["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"],Pn=(Jt,Yt)=>{var Dn=Jt,{editData:nt,globalSetting:Qt,loading:lr,dispatch:Ir,onRef:mr=()=>{},isEdit:ur}=Dn,Bi=Ci(Dn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Pr,to]=(0,le.useState)([]),[So,fr]=(0,le.useState)(),[pr,vr]=(0,le.useState)(),[ji,Ai]=(0,le.useState)(""),[Wr,zo]=(0,le.useState)("");(0,le.useEffect)(()=>{to(["","","",""])},[]),(0,le.useEffect)(()=>{if(!nt||!ur)return;const Or=[],kr=[];nt==null||nt.choices.forEach((gr,Aa)=>{Or.push(gr.choice_text),gr.is_answer&&kr.push(Aa)}),Ai(nt==null?void 0:nt.name),zo(nt==null?void 0:nt.analysis),to(Or),vr(kr)},[nt]),(0,le.useImperativeHandle)(Yt,()=>({onSave:Br,Clear:Er}));const Br=()=>{if(!ji)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Or=Pr.findIndex(gr=>!gr);if(Or>-1)return Ct.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${wr[Or]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Array.isArray(pr))return Ct.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;const kr=Pr.map((gr,Aa)=>({choice_text:gr,is_answer:pr.includes(Aa)?1:0}));return{name:ji,choices:kr,analysis:Wr}},Er=()=>{to(["","","",""]),Ai(""),zo(""),vr("")};return le.createElement("section",{className:St.wrap},le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),le.createElement(Gn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:ji,onChange:Or=>Ai(Or)}),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:St.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Pr.map((Or,kr)=>le.createElement("div",{className:St.choiceWrap,key:kr},le.createElement(ut.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},le.createElement("div",{className:`${St.answer} ${pr!=null&&pr.includes(kr)?St.activeAnswer:""}`,onClick:()=>vr([kr])},wr[kr])),le.createElement("div",{className:St.editorWrap},So===kr?le.createElement(Gn.Z,{id:`single-question-option-${kr}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Or,onChange:gr=>{Pr[kr]=gr,to(Pr)}}):le.createElement("div",{className:St.htmlWrap,onClick:()=>fr(kr)},le.createElement(ze.Z,{value:Or}))),kr>1&&le.createElement(ut.Z,{title:"\u5220\u9664"},le.createElement("i",{className:`${St.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{to(Pr.filter((gr,Aa)=>Aa!==kr)),kr===pr&&vr(null)}})),kr<7&&kr===Pr.length-1&&le.createElement(ut.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},le.createElement("i",{className:`${St.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>to([...Pr,""])})))),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Gn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Wr,onChange:Or=>zo(Or)}))};var Si=(0,je.connect)(({loading:Jt,globalSetting:Yt})=>({globalSetting:Yt,loading:Jt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Pn)),Wi=pe(12563),qi=pe(78673),$n=pe(61485),qn=pe(59301),Zt=Object.defineProperty,$t=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,on=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,ht=(Jt,Yt,Dn)=>Yt in Jt?Zt(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,en=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))cn.call(Yt,Dn)&&ht(Jt,Dn,Yt[Dn]);if(on)for(var Dn of on(Yt))At.call(Yt,Dn)&&ht(Jt,Dn,Yt[Dn]);return Jt},fn=(Jt,Yt)=>$t(Jt,Qe(Yt)),Rn=(Jt,Yt)=>{var Dn={};for(var nt in Jt)cn.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&on)for(var nt of on(Jt))Yt.indexOf(nt)<0&&At.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn},Qn=(Jt,Yt,Dn)=>new Promise((nt,Qt)=>{var lr=ur=>{try{mr(Dn.next(ur))}catch(Bi){Qt(Bi)}},Ir=ur=>{try{mr(Dn.throw(ur))}catch(Bi){Qt(Bi)}},mr=ur=>ur.done?nt(ur.value):Promise.resolve(ur.value).then(lr,Ir);mr((Dn=Dn.apply(Jt,Yt)).next())});const Et=Jt=>{if(!Jt)return!1;if(/^s*$/.test(Jt)||Jt.trim()===""){Ct.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Yt=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 Jt==="|"?(Ct.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},wn=({value:Jt=[],onClose:Yt})=>qn.createElement(Wi.default,{closable:!0,onClose:Yt,className:St.keywordTag},qn.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Jt.join(" \u6216 "))),Kn=(Jt,Yt)=>{var Dn=Jt,{editData:nt,globalSetting:Qt,loading:lr,dispatch:Ir,onRef:mr=()=>{},isEdit:ur}=Dn,Bi=Rn(Dn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Pr,to]=(0,le.useState)(""),[So,fr]=(0,le.useState)(""),[pr,vr]=(0,le.useState)(""),[ji,Ai]=(0,le.useState)(""),[Wr]=We.default.useForm(),zo=We.default.useWatch("use_keywords",Wr);(0,le.useEffect)(()=>{var kr;!nt||!ur||(to(nt==null?void 0:nt.name),fr(nt==null?void 0:nt.analysis),vr((kr=nt==null?void 0:nt.answer_texts)==null?void 0:kr[0]),Wr.setFieldsValue(en({},nt)))},[nt]),(0,le.useImperativeHandle)(Yt,()=>({onSave:Br,Clear:Er}));const Br=()=>Qn(void 0,null,function*(){if(!Pr)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Wr.validateFields()}catch(gr){Ct.ZP.error(gr.errorFields[0].errors[0]);return}const kr=Wr.getFieldsValue();return console.log(kr,"values"),en({name:Pr,answer_texts:[pr],analysis:So},kr)}),Er=()=>{to(""),fr(""),vr(""),Wr.resetFields()},Or=nt==null?void 0:nt.score;return qn.createElement("section",{className:St.wrap},qn.createElement("p",{className:St.titleWrap},qn.createElement("span",{className:St.required},"*"),qn.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),qn.createElement(Gn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Pr,onChange:kr=>to(kr)}),qn.createElement("p",{className:St.titleWrap},qn.createElement("span",{className:St.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),qn.createElement(Gn.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:pr,onChange:kr=>vr(kr)}),qn.createElement("p",{className:St.titleWrap},qn.createElement("span",{className:St.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),qn.createElement(Gn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:So,onChange:kr=>fr(kr)}),qn.createElement(We.default,{form:Wr,size:"large",onFinishFailed:kr=>Qn(void 0,null,function*(){var gr,Aa;Ct.ZP.error(kr.errorFields[0].errors[0]),Wr.scrollToField((Aa=(gr=kr==null?void 0:kr.errorFields)==null?void 0:gr[0])==null?void 0:Aa.name,{behavior:"smooth",block:"center"})})},qn.createElement(lt.Z,{align:"middle",className:"mb30 mt20"},qn.createElement(We.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},qn.createElement(qi.Z,null)),qn.createElement(vt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),qn.createElement(vt.Z,null,qn.createElement(ut.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"},qn.createElement($n.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),zo&&qn.createElement(We.default.List,{name:"keywords",rules:[{validator(kr,gr){return gr!=null&&gr.length?(gr==null?void 0:gr.reduce((_o,xa)=>_o+xa.score,0))>parseFloat(Or)?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"))}}]},(kr,{add:gr,remove:Aa})=>qn.createElement(qn.Fragment,null,qn.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),qn.createElement(lt.Z,{align:"middle",className:"font14 mb30"},qn.createElement(vt.Z,{flex:1},qn.createElement(wt.default,{value:ji,onChange:_o=>{Ai(_o.target.value)},maxLength:50,allowClear:!0,onPressEnter:_o=>{var xa,Wa,wo,Oa;const El=`${(xa=_o.target)==null?void 0:xa.value}`,Nr=(wo=(Wa=El==null?void 0:El.split("|"))==null?void 0:Wa.filter(Hs=>!!Hs))==null?void 0:wo.map(Hs=>Hs==null?void 0:Hs.trim()),_s=Wr.getFieldValue("keywords"),jo=((Oa=_s==null?void 0:_s.map(Hs=>Hs==null?void 0:Hs.keyword))==null?void 0:Oa.flat())||[];for(const Hs of Nr)if(jo.includes(Hs)){Ct.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Et(El)&&(gr({keyword:Nr,score:1}),Ai(""))},className:St.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"})),qn.createElement(vt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),kr.map(_o=>{var xa=_o,{key:Wa,name:wo}=xa,Oa=Rn(xa,["key","name"]);return qn.createElement(lt.Z,{key:Wa,style:{marginRight:148}},qn.createElement(vt.Z,{flex:1},qn.createElement(lt.Z,{align:"middle",justify:"space-between"},qn.createElement(We.default.Item,fn(en({},Oa),{name:[wo,"keyword"]}),qn.createElement(wn,{onClose:()=>Aa(wo)})),qn.createElement(We.default.Item,fn(en({},Oa),{name:[wo,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),qn.createElement(Me.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var Ei=(0,je.connect)(({loading:Jt,globalSetting:Yt})=>({globalSetting:Yt,loading:Jt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Kn)),tn=pe(36381),sn={wrap:"wrap___Cc0gS",deleteIcon:"deleteIcon___ebwMv",keywordTag:"keywordTag___lUfL5",questionTitleEditorWrap:"questionTitleEditorWrap___u9UgK",choiceWrap:"choiceWrap___VHsr3",choiceIndex:"choiceIndex___rsj9r",judgementIndex:"judgementIndex___fMm6E",setAnswerBtn:"setAnswerBtn___krVC9",activeAnswer:"activeAnswer___WiYo2",activeJudgementAnswer:"activeJudgementAnswer___M6iww",actionWrapper:"actionWrapper___oKI8_",addIcon:"addIcon___eMbGP",inputBorder:"inputBorder___ob_6x",placeholder:"placeholder___Vkwr4",blankWrapper:"blankWrapper____MZQ5",blankInput:"blankInput___ephwY",blankInputNumberWrapper:"blankInputNumberWrapper___C1UJS",addBtn:"addBtn___qRBpJ",blankIndex:"blankIndex___QsKgf",baseInputWrapper:"baseInputWrapper___juqCB",collapseWrapper:"collapseWrapper___kAXJ0",panelHeader:"panelHeader___hLTSe",open:"open___wWDjf",close:"close___XPTJ0",hide:"hide___VytUy"},In=pe(32134),Oi=pe(12893),Di=Object.defineProperty,vi=Object.defineProperties,Ti=Object.getOwnPropertyDescriptors,Li=Object.getOwnPropertySymbols,sr=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,Vr=(Jt,Yt,Dn)=>Yt in Jt?Di(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,Tn=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))sr.call(Yt,Dn)&&Vr(Jt,Dn,Yt[Dn]);if(Li)for(var Dn of Li(Yt))Zr.call(Yt,Dn)&&Vr(Jt,Dn,Yt[Dn]);return Jt},Po=(Jt,Yt)=>vi(Jt,Ti(Yt)),Xr=(Jt,Yt)=>{var Dn={};for(var nt in Jt)sr.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&Li)for(var nt of Li(Jt))Yt.indexOf(nt)<0&&Zr.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn};const Cr=Jt=>{var Yt=Jt,{value:Dn,onChange:nt,scrollId:Qt}=Yt,lr=Xr(Yt,["value","onChange","scrollId"]);return le.createElement("div",{id:Qt||""},le.createElement(Gn.Z,Po(Tn({},lr),{defaultValue:Dn,onChange:(Ir,mr)=>{mr!=null&&mr.length?nt(Ir,mr):nt(Ir)}})))},Cn=({value:Jt,onChange:Yt,placeholder:Dn,height:nt=140,isEdit:Qt})=>Qt?le.createElement(Gn.Z,{watch:!0,isFocus:!0,height:nt,placeholder:Dn,defaultValue:Jt,onChange:Yt}):le.createElement("div",{style:{cursor:"pointer"}},Jt?le.createElement(ze.Z,{className:sn.inputBorder,value:Jt}):le.createElement("div",{className:`${sn.inputBorder} ${sn.placeholder}`},Dn));var ri=pe(59301),Yi=Object.defineProperty,yr=Object.defineProperties,er=Object.getOwnPropertyDescriptors,Fr=Object.getOwnPropertySymbols,Ur=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Tr=(Jt,Yt,Dn)=>Yt in Jt?Yi(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,Yr=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))Ur.call(Yt,Dn)&&Tr(Jt,Dn,Yt[Dn]);if(Fr)for(var Dn of Fr(Yt))zr.call(Yt,Dn)&&Tr(Jt,Dn,Yt[Dn]);return Jt},Un=(Jt,Yt)=>yr(Jt,er(Yt)),Ho=(Jt,Yt)=>{var Dn={};for(var nt in Jt)Ur.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&Fr)for(var nt of Fr(Jt))Yt.indexOf(nt)<0&&zr.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn};const Yn=["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"],Ao=({value:Jt,onChange:Yt,choiceTextKey:Dn,answerKey:nt,index:Qt,isEdit:lr,setInputActive:Ir,form:mr,choiceOptionsPath:ur,allowChangeMode:Bi,showAddIcon:Pr,addItem:to,deleteItem:So})=>{const fr=(Jt==null?void 0:Jt[nt])===!0,pr=()=>{const ji=mr.getFieldValue(ur);mr.setFieldValue(ur,ji.map(Ai=>Un(Yr({},Ai),{[nt]:!1})))},vr=()=>{fr?Yt(Un(Yr({},Jt),{[nt]:!1})):(Bi||pr(),Yt(Un(Yr({},Jt),{[nt]:!0})))};return ri.createElement(lt.Z,{className:sn.choiceWrap,align:"middle",wrap:!1},ri.createElement(vt.Z,{onClick:vr,className:`${sn.choiceIndex} ${fr?sn.activeAnswer:""}`},Yn[Qt]),ri.createElement(vt.Z,{flex:1,className:`${sn.editorWrap} ml15`,onClick:Ir},ri.createElement(Cn,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:lr,value:Jt==null?void 0:Jt[Dn],onChange:ji=>{Yt(Un(Yr({},Jt),{[Dn]:ji}))}})),ri.createElement(vt.Z,{flex:"0 0 auto",className:"ml15"},ri.createElement("div",{onClick:vr,className:`${sn.setAnswerBtn} ${fr?sn.activeAnswer:""}`},fr?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),ri.createElement(vt.Z,{className:sn.actionWrapper},ri.createElement(ut.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ri.createElement(In.Z,{className:sn.addIcon,onClick:to,style:{visibility:Pr?"visible":"hidden"}})),ri.createElement(ut.Z,{title:"\u5220\u9664"},ri.createElement(Oi.Z,{className:sn.deleteIcon,onClick:So,style:{visibility:Qt>1?"visible":"hidden"}}))))},Qo=({questionTitlePlaceholder:Jt,titleKey:Yt,choiceKey:Dn,analysisKey:nt,choiceTextKey:Qt,answerKey:lr,choiceOptionsPath:Ir,allowChangeMode:mr=!0,form:ur,showAnalysis:Bi=!0})=>{const[Pr,to]=(0,le.useState)(),[So,fr]=(0,le.useState)(!1);return ri.createElement("div",{className:sn.wrap},ri.createElement("div",{className:sn.questionTitleEditorWrap},ri.createElement(We.default.Item,{label:"\u9898\u5E72",name:Yt,labelCol:{span:24},rules:[{required:!0}]},ri.createElement(Cr,{scrollId:Array.isArray(Yt)?Yt.join("_"):`${Yt}`,watch:!0,height:140,placeholder:Jt}))),ri.createElement(We.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),ri.createElement(We.default.List,{name:Dn,rules:[{validator(pr,vr){const ji=vr.some(Wr=>Wr[lr]),Ai=vr.findIndex(Wr=>{var zo;return((zo=Wr[Qt])==null?void 0:zo.length)<=0});return Ai!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Yn[Ai]}\u9009\u9879\u7684\u5185\u5BB9`)):ji?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(pr,{add:vr,remove:ji})=>ri.createElement("div",{id:Array.isArray(Ir)?Ir.join("_"):`${Ir}`},pr.map((Ai,Wr)=>{var zo=Ai,{key:Br,name:Er}=zo,Or=Ho(zo,["key","name"]);const kr=Pr===Br,gr=()=>{to(Br)},Aa=Wr<7&&Wr===pr.length-1,_o=()=>vr({[Qt]:"",[lr]:0}),xa=()=>ji(Er);return ri.createElement(We.default.Item,Un(Yr({},Or),{key:Br,name:Er,noStyle:!0}),ri.createElement(Ao,{choiceTextKey:Qt,answerKey:lr,index:Wr,isEdit:kr,setInputActive:gr,form:ur,choiceOptionsPath:Ir,allowChangeMode:mr,showAddIcon:Aa,addItem:_o,deleteItem:xa}))}),pr.length<8&&ri.createElement("div",{className:`${sn.addBtn} mb30`,onClick:()=>vr({[Qt]:"",[lr]:0})},"\u6DFB\u52A0\u9009\u9879"))),Bi&&ri.createElement("div",{onClick:()=>fr(!0)},ri.createElement(We.default.Item,{name:nt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ri.createElement(Cn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:So}))))};var nr=pe(59301),qo=Object.defineProperty,Go=Object.defineProperties,Lr=Object.getOwnPropertyDescriptors,br=Object.getOwnPropertySymbols,mo=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable,Ki=(Jt,Yt,Dn)=>Yt in Jt?qo(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,st=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))mo.call(Yt,Dn)&&Ki(Jt,Dn,Yt[Dn]);if(br)for(var Dn of br(Yt))Yo.call(Yt,Dn)&&Ki(Jt,Dn,Yt[Dn]);return Jt},sa=(Jt,Yt)=>Go(Jt,Lr(Yt)),va=(Jt,Yt)=>{var Dn={};for(var nt in Jt)mo.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&br)for(var nt of br(Jt))Yt.indexOf(nt)<0&&Yo.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn};const Ma=({value:Jt,onChange:Yt})=>{const Dn=Qt=>{Ue.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:sn.modal,onOk:()=>{const lr=[...Jt];lr.splice(Qt,1),Yt(lr)}})},nt=()=>{const Qt=[...Jt];Qt.push(""),Yt(Qt)};return nr.createElement(lt.Z,{align:"middle",className:"ml20",gutter:[40,20]},Jt==null?void 0:Jt.map((Qt,lr)=>nr.createElement(vt.Z,{key:`${Qt}_${lr}`,className:sn.blankWrapper},nr.createElement(wt.default,{className:sn.blankInput,defaultValue:Qt,maxLength:1e3,onBlur:Ir=>{const mr=[...Jt],ur=Ir.target.value.trim();mr[lr]=ur,Yt(mr)}}),nr.createElement(ut.Z,{title:"\u5220\u9664"},nr.createElement(Oi.Z,{className:sn.deleteIcon,style:{marginLeft:15,visibility:lr>0?"visible":"hidden"},onClick:()=>Dn(lr)})))),nr.createElement(vt.Z,null,nr.createElement("div",{className:`${sn.addBtn}`,onClick:()=>{nt()}},"\u65B0\u589E\u7B54\u6848")))},hs=({value:Jt=!0,onChange:Yt})=>nr.createElement(qi.Z,{checked:!Jt,onChange:Dn=>{Yt(!Dn)}}),Ga="\u2581",Lo=({questionTitlePlaceholder:Jt,form:Yt,name:Dn,scoreByBlank:nt="use_blank_score",answerKey:Qt,titleKey:lr="name",analysisKey:Ir="analysis",isOrdered:mr="is_ordered"})=>{var ur,Bi;const[Pr,to]=(0,le.useState)(!1),So=(Br,Er)=>{const Or=Er.line;let kr=0;for(let Aa=0;Aa<Or;Aa++)kr+=Br.getLine(Aa).split(Ga).length-1;const gr=Br.getLine(Or).substring(0,Er.ch);return kr+=gr.split(Ga).length-1,kr},fr=(Br,Er,Or,kr)=>{const gr=Br.getRange(Er.from,Er.to);let Aa=0;if(Er.text.forEach(_o=>{Aa+=_o.split(Ga).length-1}),Er.origin!=="setValue"){if(gr&&gr.indexOf(Ga)!==-1){const _o=gr.split(Ga).length-1,xa=So(Br,Er.from);if(console.log(`\u5220\u9664${_o}\u4E2A\uFF0C \u524D\u9762\u6709${xa}\u4E2A\uFF0C\u65B0\u589E${Aa}\u4E2A`),_o>1){const Wa=Array.from({length:_o},(wo,Oa)=>xa+Oa);kr(Wa)}else kr(xa)}else if(Aa>0){const _o=So(Br,Er.from);console.log(`\u65B0\u589E${Aa}\u4E2A\uFF0C\u4E4B\u524D\u6709${_o}\u4E2A`),Or(Aa,_o)}}},pr=()=>{const Br=Yt.getFieldValue(["sub_item_banks",...Qt]);Yt.setFieldValue(["sub_item_banks",...Qt],Br==null?void 0:Br.map((Er,Or)=>sa(st({},Er),{position:Or+1})))},vr=(0,le.useRef)(),ji=(Br,Er)=>{for(let Or=0;Or<Br;Or++)vr.current({position:null,answer_text:[""]},Er+Or);pr()},Ai=(0,le.useRef)(),Wr=Br=>{Ai.current(Br),pr()},zo=(Bi=(ur=Yt.getFieldValue("sub_item_banks"))==null?void 0:ur[Qt==null?void 0:Qt[0]])==null?void 0:Bi[Qt==null?void 0:Qt[1]];return nr.createElement("div",{className:sn.wrap},nr.createElement("div",{className:sn.questionTitleEditorWrap},nr.createElement(We.default.Item,{label:"\u9898\u5E72",name:lr,labelCol:{span:24},rules:[{required:!0}]},nr.createElement(Cr,{scrollId:"name",watch:!0,height:140,placeholder:Jt,showNullButton:!0,onCMBeforeChange:(Br,Er)=>{fr(Br,Er,ji,Wr)}}))),nr.createElement(We.default.List,{name:Qt,rules:[{validator(Br,Er){if((Er==null?void 0:Er.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Or of Er){const{answer_text:kr}=Or||{};if(kr!=null&&kr.some(gr=>(gr==null?void 0:gr.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Br,{add:Er,remove:Or},{errors:kr})=>(vr.current=Er,Ai.current=Or,nr.createElement(nr.Fragment,null,nr.createElement(We.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Br.map((gr,Aa)=>{var _o=gr,{key:xa,name:Wa}=_o,wo=va(_o,["key","name"]);return nr.createElement(lt.Z,{className:"mb20",key:xa,align:"middle",wrap:!1},nr.createElement(vt.Z,{flex:"0 0 auto",className:`${sn.blankIndex}`},"\u586B\u7A7A\u9879",Aa+1),nr.createElement(vt.Z,{flex:1},nr.createElement(lt.Z,{align:"top",justify:"space-between",wrap:!1},nr.createElement(vt.Z,null,nr.createElement(We.default.Item,sa(st({},wo),{name:[Wa,"answer_text"],noStyle:!0}),nr.createElement(Ma,null))),(Yt==null?void 0:Yt.getFieldValue(["sub_item_banks",...nt]))&&nr.createElement(vt.Z,{flex:"224px"},nr.createElement(We.default.Item,sa(st({},wo),{name:[Wa,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:sn.blankInputNumberWrapper}),nr.createElement(Me.Z,{className:sn.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),nr.createElement(We.default.Item,sa(st({},wo),{name:[Wa,"position"],noStyle:!0}),nr.createElement(wt.default,{type:"hidden"}))))})))),nr.createElement(lt.Z,{align:"middle"},nr.createElement(We.default.Item,{name:[Dn,"downcase"],valuePropName:"checked"},nr.createElement(qi.Z,null)),nr.createElement(vt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),nr.createElement(lt.Z,{align:"middle"},nr.createElement(We.default.Item,{name:[Dn,"no_space"],valuePropName:"checked"},nr.createElement(qi.Z,null)),nr.createElement(vt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(zo==null?void 0:zo.length)>1&&nr.createElement(lt.Z,{align:"middle",className:(zo==null?void 0:zo.length)>1?"mb30":`${sn.hide}`},nr.createElement(We.default.Item,{name:mr},nr.createElement(hs,null)),nr.createElement(vt.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")),nr.createElement("div",{onClick:()=>to(!0)},nr.createElement(We.default.Item,{name:Ir,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},nr.createElement(Cn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Pr}))))};var po=Object.defineProperty,la=Object.defineProperties,Eo=Object.getOwnPropertyDescriptors,Na=Object.getOwnPropertySymbols,os=Object.prototype.hasOwnProperty,xo=Object.prototype.propertyIsEnumerable,Qr=(Jt,Yt,Dn)=>Yt in Jt?po(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,pi=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))os.call(Yt,Dn)&&Qr(Jt,Dn,Yt[Dn]);if(Na)for(var Dn of Na(Yt))xo.call(Yt,Dn)&&Qr(Jt,Dn,Yt[Dn]);return Jt},io=(Jt,Yt)=>la(Jt,Eo(Yt)),ro=(Jt,Yt)=>{var Dn={};for(var nt in Jt)os.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&Na)for(var nt of Na(Jt))Yt.indexOf(nt)<0&&xo.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn};const Ja={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Ca=({value:Jt,onChange:Yt,form:Dn,choiceKey:nt})=>{const Qt=(Jt==null?void 0:Jt.is_answer)===!0,lr=Jt==null?void 0:Jt.choice_text,Ir=()=>{var mr;const ur=(mr=Dn==null?void 0:Dn.getFieldValue(["sub_item_banks",...nt]))==null?void 0:mr.map(Bi=>({choice_text:Bi==null?void 0:Bi.choice_text,is_answer:!1}));Dn==null||Dn.setFieldValue(["sub_item_banks",...nt],ur),Yt(io(pi({},Jt),{is_answer:!0}))};return le.createElement(lt.Z,{className:sn.choiceWrap,align:"middle",wrap:!1},le.createElement(vt.Z,{onClick:Ir,className:`${sn.choiceIndex} ${sn.judgementIndex} ${Qt?sn.activeAnswer:""}`},Ja[lr]),le.createElement(vt.Z,{flex:1,className:`${sn.editorWrap} ml15`},le.createElement("div",{className:`${sn.inputBorder} ${sn.placeholder} ${Qt?sn.activeJudgementAnswer:""}`},lr)),le.createElement(vt.Z,{flex:"0 0 auto",className:"ml15"},le.createElement("div",{onClick:Ir,className:`${sn.setAnswerBtn} ${Qt?sn.activeAnswer:""}`},Qt?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},fa=({questionTitlePlaceholder:Jt,choiceKey:Yt="choices",form:Dn,titleKey:nt="name",analysisKey:Qt="analysis"})=>{const[lr,Ir]=(0,le.useState)(!1);return le.createElement("div",{className:sn.wrap},le.createElement("div",{className:sn.questionTitleEditorWrap},le.createElement(We.default.Item,{label:"\u9898\u5E72",name:nt,labelCol:{span:24},rules:[{required:!0}]},le.createElement(Cr,{scrollId:"name",watch:!0,height:140,placeholder:Jt}))),le.createElement(We.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},le.createElement(We.default.List,{name:Yt,rules:[{validator(mr,ur){return ur.some(Pr=>(Pr==null?void 0:Pr.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},mr=>le.createElement("div",{id:"choices"},mr.map(ur=>{var Bi=ur,{key:Pr,name:to}=Bi,So=ro(Bi,["key","name"]);return le.createElement(We.default.Item,io(pi({},So),{key:Pr,name:to,noStyle:!0}),le.createElement(Ca,{form:Dn,choiceKey:Yt}))})))),le.createElement("div",{onClick:()=>Ir(!0)},le.createElement(We.default.Item,{name:Qt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(Cn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:lr}))))};var $a=Object.defineProperty,Qa=Object.defineProperties,Es=Object.getOwnPropertyDescriptors,ys=Object.getOwnPropertySymbols,Zs=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Ss=(Jt,Yt,Dn)=>Yt in Jt?$a(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,ra=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))Zs.call(Yt,Dn)&&Ss(Jt,Dn,Yt[Dn]);if(ys)for(var Dn of ys(Yt))Mn.call(Yt,Dn)&&Ss(Jt,Dn,Yt[Dn]);return Jt},hl=(Jt,Yt)=>Qa(Jt,Es(Yt)),Ol=(Jt,Yt)=>{var Dn={};for(var nt in Jt)Zs.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&ys)for(var nt of ys(Jt))Yt.indexOf(nt)<0&&Mn.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn};const ns=Jt=>{var Yt=Jt,{value:Dn,onChange:nt}=Yt,Qt=Ol(Yt,["value","onChange"]);const lr=Ir=>{nt([Ir])};return le.createElement(Gn.Z,hl(ra({},Qt),{defaultValue:Dn==null?void 0:Dn[0],onChange:lr}))},yu=Jt=>{if(!Jt)return!1;let Yt=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 Jt==="|"?(Ct.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},eu=({value:Jt=[],onClose:Yt})=>le.createElement(Wi.default,{closable:!0,onClose:Yt,className:sn.keywordTag},Jt==null?void 0:Jt.join(" \u6216 ")),ps=({questionTitlePlaceholder:Jt,form:Yt,showKeywords:Dn,isMustKeyWords:nt=Dn,titleKey:Qt="name",analysisKey:lr="analysis",answerTexts:Ir="answer_texts",keywords:mr="keywords",useKeywords:ur="use_keywords",indexs:Bi})=>{const[Pr,to]=(0,le.useState)(!1),[So,fr]=(0,le.useState)(""),pr=We.default.useWatch("sub_item_banks",Yt),{use_keywords:vr,score:ji}=(pr==null?void 0:pr[Bi])||{};return console.log(vr,ji,"itemValues"),le.createElement("div",{className:sn.wrap},le.createElement("div",{className:sn.questionTitleEditorWrap},le.createElement(We.default.Item,{label:"\u9898\u5E72",name:Qt,labelCol:{span:24},rules:[{required:!0}]},le.createElement(Cr,{scrollId:"name",watch:!0,height:140,placeholder:Jt}))),le.createElement(We.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:Ir,labelCol:{span:24}},le.createElement(ns,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Dn&&!nt&&le.createElement(We.default.Item,{hidden:!0,name:ur,valuePropName:"checked"},le.createElement(qi.Z,{defaultChecked:!0})),Dn&&nt&&le.createElement(lt.Z,{align:"middle",className:"mb30"},le.createElement(We.default.Item,{name:ur,valuePropName:"checked"},le.createElement(qi.Z,null)),le.createElement(vt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),le.createElement(vt.Z,null,le.createElement(ut.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"},le.createElement($n.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(vr||!nt)&&le.createElement(We.default.List,{name:mr,rules:[{validator(Ai,Wr){return nt?Wr!=null&&Wr.length?(Wr==null?void 0:Wr.reduce((Br,Er)=>Br+Er.score,0))>parseFloat(ji)?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()}}]},(Ai,{add:Wr,remove:zo})=>le.createElement(le.Fragment,null,le.createElement("div",{className:`${sn.title} mb10`},nt?"\u5173\u952E\u8BCD":le.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),le.createElement(lt.Z,{align:"middle",className:"font14 mb30"},le.createElement(vt.Z,{flex:1},le.createElement(wt.default,{value:So,onChange:Br=>{fr(Br.target.value)},maxLength:50,allowClear:!0,onPressEnter:Br=>{var Er,Or,kr,gr;const Aa=`${(Er=Br.target)==null?void 0:Er.value}`,_o=(kr=(Or=Aa==null?void 0:Aa.split("|"))==null?void 0:Or.filter(wo=>!!wo))==null?void 0:kr.map(wo=>wo==null?void 0:wo.trim()),xa=Yt.getFieldValue(["sub_item_banks",...mr]),Wa=((gr=xa==null?void 0:xa.map(wo=>wo==null?void 0:wo.keyword))==null?void 0:gr.flat())||[];for(const wo of _o)if(Wa.includes(wo)){Ct.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}yu(Aa)&&(Wr({keyword:_o,score:1}),fr(""))},className:sn.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"})),le.createElement(vt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Ai.map(Br=>{var Er=Br,{key:Or,name:kr}=Er,gr=Ol(Er,["key","name"]);return le.createElement(lt.Z,{key:Or,className:"mb20",style:{marginRight:148}},le.createElement(vt.Z,{flex:1},le.createElement(lt.Z,{align:"middle",justify:"space-between"},le.createElement(We.default.Item,hl(ra({},gr),{name:[kr,"keyword"]}),le.createElement(eu,{onClose:()=>zo(kr)})),nt&&le.createElement(We.default.Item,hl(ra({},gr),{name:[kr,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:sn.blankInputNumberWrapper}),le.createElement(Me.Z,{className:sn.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),le.createElement("div",{onClick:()=>to(!0)},le.createElement(We.default.Item,{name:lr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(Cn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Pr}))))};var Ba=pe(59301),tu=Object.defineProperty,Do=Object.defineProperties,Ea=Object.getOwnPropertyDescriptors,ca=Object.getOwnPropertySymbols,hr=Object.prototype.hasOwnProperty,Rs=Object.prototype.propertyIsEnumerable,ls=(Jt,Yt,Dn)=>Yt in Jt?tu(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,sl=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))hr.call(Yt,Dn)&&ls(Jt,Dn,Yt[Dn]);if(ca)for(var Dn of ca(Yt))Rs.call(Yt,Dn)&&ls(Jt,Dn,Yt[Dn]);return Jt},jl=(Jt,Yt)=>Do(Jt,Ea(Yt)),ou=(Jt,Yt)=>{var Dn={};for(var nt in Jt)hr.call(Jt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Jt[nt]);if(Jt!=null&&ca)for(var nt of ca(Jt))Yt.indexOf(nt)<0&&Rs.call(Jt,nt)&&(Dn[nt]=Jt[nt]);return Dn},Ji=(Jt,Yt,Dn)=>new Promise((nt,Qt)=>{var lr=ur=>{try{mr(Dn.next(ur))}catch(Bi){Qt(Bi)}},Ir=ur=>{try{mr(Dn.throw(ur))}catch(Bi){Qt(Bi)}},mr=ur=>ur.done?nt(ur.value):Promise.resolve(ur.value).then(lr,Ir);mr((Dn=Dn.apply(Jt,Yt)).next())});const{Panel:Cs}=tn.default,Us=null,$l=(Jt,Yt)=>{var Dn=Jt,{globalSetting:nt,loading:Qt,dispatch:lr,editData:Ir,onRef:mr=()=>{},isEdit:ur}=Dn,Bi=ou(Dn,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[Pr,to]=(0,le.useState)(""),[So,fr]=(0,le.useState)([]),[pr]=We.default.useForm();(0,le.useEffect)(()=>{!Ir||!ur||(to(Ir==null?void 0:Ir.name),fr(Ir==null?void 0:Ir.sub_item_banks),pr.setFieldsValue(sl({},Ir)))},[Ir]),(0,le.useEffect)(()=>{fr(pr.getFieldValue("sub_item_banks"))},[We.default.useWatch("sub_item_banks",pr)]),(0,le.useImperativeHandle)(Yt,()=>({onSave:vr,Clear:ji}));const vr=()=>Ji(void 0,null,function*(){if(!Pr)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield pr.validateFields()}catch(Or){return console.log(Or,"errInfo"),Ct.ZP.error(Or.errorFields[0].errors[0]),!1}const Er=So.map(Or=>sl({id:Or.id>1?Or.id:null},Or));return{name:Pr,sub_item_banks:Er}}),ji=()=>{to(""),fr([])},Ai={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},Wr=({value:Er})=>Ba.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},Er),[zo,Br]=(0,le.useState)();return Ba.createElement("section",{className:St.wrap},Ba.createElement("p",{className:St.titleWrap},Ba.createElement("span",{className:St.required},"*"),Ba.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),Ba.createElement(Gn.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Pr,onChange:Er=>to(Er)}),Ba.createElement(We.default,{form:pr,autoComplete:"off"},Ba.createElement(We.default.List,{name:"sub_item_banks",rules:[{validator(Er,Or){return Or?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Er,{add:Or,remove:kr})=>{const gr=pr.getFieldValue("sub_item_banks");return Ba.createElement(Ba.Fragment,null,Ba.createElement(tn.default,{className:Er.length>0?St.collapseWrapper:"",bordered:!1,expandIcon:({isActive:Aa})=>Ba.createElement("i",{className:`iconfont icon-weizhankai ${Aa?St.open:St.close}`,style:{fontSize:14,transition:"all .2s"}})},Er.map((Aa,_o)=>{var xa=Aa,{key:Wa,name:wo}=xa,Oa=ou(xa,["key","name"]),El,Nr,_s,jo,Hs,gl,rc,ad,kc,oc,vc,as;return Ba.createElement(Cs,{className:St.panel,forceRender:!0,header:Ba.createElement("div",{className:St.panelHeader},"\u7B2C",_o+1,"\u5C0F\u9898",Ba.createElement("span",null,"\uFF08",Ai[(El=gr==null?void 0:gr[wo])==null?void 0:El.item_type],"\uFF09")),extra:Ba.createElement(lt.Z,{align:"middle",onClick:du=>du.stopPropagation(),style:{display:"flex",alignItems:"center"}},((Nr=gr==null?void 0:gr[wo])==null?void 0:Nr.item_type)=="completion"&&Ba.createElement(We.default.Item,jl(sl({},Oa),{name:[wo,"score"],className:St.blankInputNumberWrapper,style:{marginBottom:0}}),((_s=gr==null?void 0:gr[wo])==null?void 0:_s.item_type)=="completion"&&Ba.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",Ba.createElement(Wr,{value:(jo=gr==null?void 0:gr[wo])==null?void 0:jo.score}),"\u5206")),((Hs=gr==null?void 0:gr[wo])==null?void 0:Hs.item_type)=="completion"&&Ba.createElement(Ba.Fragment,null,Ba.createElement(ft.ZP.Group,{defaultValue:(gl=gr==null?void 0:gr[wo])==null?void 0:gl.use_blank_score,className:St.scoreByBlankRadio,style:{marginRight:10},optionType:"button",options:[{label:"\u6309\u7A7A\u7ED9\u5206",value:!0},{label:"\u6309\u9898\u7ED9\u5206",value:!1}],onChange:du=>{var Rc;console.log(pr.getFieldsValue()),pr==null||pr.setFieldValue(["sub_item_banks",wo,"use_blank_score"],(Rc=du==null?void 0:du.target)==null?void 0:Rc.value),Br(new Date)}}),Ba.createElement(ut.Z,{overlayInnerStyle:{width:460},title:Ba.createElement("div",null,"\u6309\u7A7A\u7ED9\u5206\uFF1A\u9700\u8981\u5206\u522B\u8BBE\u7F6E\u6BCF\u4E2A\u586B\u7A7A\u9879\u7684\u5206\u503C\uFF0C\u586B\u7A7A\u9879\u7B54\u5BF9\u4E4B\u540E\u5219\u83B7\u5F97\u5BF9\u5E94\u7684\u5206\u503C\u3002",Ba.createElement("br",null),"\u6309\u9898\u7ED9\u5206\uFF1A\u7B54\u5BF9\u5168\u90E8\u586B\u7A7A\u9879\u4E4B\u540E\u624D\u80FD\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\u3002")},Ba.createElement("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})))),key:Wa},Ba.createElement(We.default.Item,jl(sl({},Oa),{name:wo}),(((rc=gr==null?void 0:gr[wo])==null?void 0:rc.item_type)=="single"||((ad=gr==null?void 0:gr[wo])==null?void 0:ad.item_type)=="multiple")&&Ba.createElement(Qo,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((kc=gr==null?void 0:gr[wo])==null?void 0:kc.item_type)!="single",form:pr,choiceKey:[wo,"choices"],titleKey:[wo,"name"],analysisKey:[wo,"analysis"],choiceOptionsPath:["sub_item_banks",wo,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((oc=gr==null?void 0:gr[wo])==null?void 0:oc.item_type)=="completion"&&Ba.createElement(Lo,{form:pr,name:wo,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[wo,"use_blank_score"],titleKey:[wo,"name"],analysisKey:[wo,"analysis"],isOrdered:[wo,"is_ordered"],answerKey:[wo,"standard_answer"],key:zo}),((vc=gr==null?void 0:gr[wo])==null?void 0:vc.item_type)=="judgement"&&Ba.createElement(fa,{form:pr,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[wo,"name"],analysisKey:[wo,"analysis"],choiceKey:[wo,"choices"]}),((as=gr==null?void 0:gr[wo])==null?void 0:as.item_type)=="subjective"&&Ba.createElement(ps,{showKeywords:!0,form:pr,titleKey:[wo,"name"],analysisKey:[wo,"analysis"],answerTexts:[wo,"answer_texts"],useKeywords:[wo,"use_keywords"],keywords:[wo,"keywords"],indexs:wo,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var Tl=(0,je.connect)(({loading:Jt,globalSetting:Yt})=>({globalSetting:Yt,loading:Jt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)($l)),Kl=pe(6021),Oo=pe(19842),ic=pe(57809),zl=pe(1710),En={flex_box_center:"flex_box_center___xDdtW",flex_space_between:"flex_space_between___J4mFI",flex_box_vertical_center:"flex_box_vertical_center___hDYn6",flex_box_center_end:"flex_box_center_end___H7l1j",flex_box_column:"flex_box_column___TPd2T",questionInfo:"questionInfo___ABq66",label:"label___VQOr7",content:"content____HZ6z",leftPart:"leftPart___YB0y5",rightPart:"rightPart___UVMmS",dragItem:"dragItem___Hbx8k",blackText:"blackText___U4u33",greyText:"greyText___rWIL_",iconWrapper:"iconWrapper___I0kek",contentArea:"contentArea___hGC13",dragging:"dragging___z7VVY",hidden:"hidden___nWAxb",dragIcon:"dragIcon___j91TC",deleteIcon:"deleteIcon___cmCqc",disabled:"disabled___ZlKMj",challengeNameWrapper:"challengeNameWrapper___SpiRb",challengeName:"challengeName___lmQe2",shixunPreviewFooter:"shixunPreviewFooter___u0CzD",shixunInfoWrapper:"shixunInfoWrapper___HzLHD",shixunInfo:"shixunInfo___qaQlF",btnToDetail:"btnToDetail___scXqr",fixedBottom:"fixedBottom___wTBAR",cancelBtn:"cancelBtn___Km4Gi",confirmBtn:"confirmBtn___WrECz",previewBtn:"previewBtn____oGPS",setScoreModalTable:"setScoreModalTable___CjDlp",title:"title___cQWdZ",tipcontent:"tipcontent___A8tZ5",name:"name___CvfT9",tip:"tip___EvoCF",info:"info___y_ayi",img:"img___X9CNn"},Nn=pe(85057),ai=pe(94860),Qi=pe(92365),Gi=pe(83312),ki=pe(8797),_i=pe(32570),Mi=({open:Jt,onCancel:Yt,onOk:Dn})=>{const nt=(0,ai.g)(),[Qt,lr,Ir,mr]=(0,Gi.U)(Qi.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[ur,Bi]=(0,le.useState)(!1);(0,le.useEffect)(()=>{Jt&&Ir({page:1,limit:10,type:0},!0).then(pr=>{(pr==null?void 0:pr.shixuns_count)===0&&Bi(!0)})},[Jt]);const[Pr,to]=(0,le.useState)([]),[So,fr]=(0,le.useState)([]);return le.createElement(Ue.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:Jt,width:948,centered:!0,closable:!0,onCancel:Yt,onOk:()=>Dn(So),destroyOnClose:!0},le.createElement(lt.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},le.createElement(vt.Z,null,le.createElement(Oo.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:nt,onChange:pr=>{Ir({page:1,discipline_id:pr==null?void 0:pr[0],sub_discipline_id:pr==null?void 0:pr[1]})}}),le.createElement(ic.default,{className:"ml20",style:{width:118},size:"large",placeholder:"\u96BE\u5EA6",allowClear:!0,options:[{label:"\u521D\u7EA7",value:1},{label:"\u4E2D\u7EA7",value:2},{label:"\u4E2D\u9AD8\u7EA7",value:3},{label:"\u9AD8\u7EA7",value:4}],onChange:pr=>Ir({page:1,diff:pr})}),le.createElement(ic.default,{className:"ml20",placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"large",allowClear:!0,options:[{label:"\u672A\u53D1\u5E03",value:"unpublish"},{label:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{label:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],onChange:pr=>Ir({page:1,shixun_publish_status:pr})})),le.createElement(Nn.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:pr=>{Ir({keyword:pr,page:1})}})),ur?le.createElement("div",null,le.createElement(ki.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,Xe.xg)("/shixuns")})):le.createElement(zl.default,{loading:lr,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(pr,vr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:vr!=null&&vr.high_resources_consume?En.title:"",title:pr||"--"},le.createElement(ze.Z,{key:1,showLines:1,showTextOnly:!0,value:pr||"--"})),(vr==null?void 0:vr.high_resources_consume)&&le.createElement(_i.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(pr,vr,ji)=>le.createElement("span",null,pr||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:le.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",le.createElement(ut.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},le.createElement($n.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(pr,vr,ji)=>le.createElement("span",null,pr||"- -")},{title:"\u64CD\u4F5C",render(pr,vr){const{title:ji,challenge_names:Ai,author_name:Wr,identifier:zo,author_school_name:Br,study_count:Er}=vr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{Ue.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(ze.Z,{value:ji,style:{marginBottom:18}}),le.createElement("div",{className:En.challengeNameWrapper},Ai.map((Or,kr)=>le.createElement("div",{className:En.challengeName,key:kr},"\u7B2C",(0,Xe.EM)(kr+1),"\u9898\xA0",Or))),le.createElement(lt.Z,{className:En.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(vt.Z,{className:En.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:En.shixunInfo},Wr.split("\u3001")[0]),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:En.shixunInfo},Br),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:En.shixunInfo},Er)),le.createElement(Ge.ZP,{type:"primary",className:En.btnToDetail,onClick:()=>(0,Xe.xg)(`/shixuns/${zo}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(vr==null?void 0:vr.shixun_tag_num)===1&&le.createElement("a",{target:"_blank",href:`/shixuns/${vr==null?void 0:vr.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:mr==null?void 0:mr.items,rowSelection:{type:"radio",selectedRowKeys:Pr,preserveSelectedRowKeys:!0,getCheckboxProps:pr=>({disabled:pr.shixun_tag_num===1}),onChange(pr,vr){var ji,Ai,Wr;console.log(pr),to(pr);const zo=[];for(const Er of So)pr.includes(Er.id)&&zo.push(Er);const Br=zo.map(Er=>Er.id);for(const Er of vr)Er&&pr.includes(Er.id)&&!Br.includes(Er.id)&&zo.push({id:Er.id,difficulty:Er.level,identifier:Er.identifier,name:Er.name,real_name:(ji=Er==null?void 0:Er.author_name)==null?void 0:ji.split("\u3001")[0],school_name:Er.author_school_name,challenge_names:Er.challenge_names,challenges:(Ai=Er.challenge_names)==null?void 0:Ai.map((Or,kr)=>({subject:Or,id:kr,score:5})),score:((Wr=Er.challenge_names)==null?void 0:Wr.length)*5,study_count:Er.study_count,challenges_count:Er.challenges_count});fr(zo)}},pagination:{current:Qt.page,pageSize:Qt.limit,total:mr==null?void 0:mr.items_count,showTotal:pr=>le.createElement("span",null,"\u5171\xA0",le.createElement("span",{style:{color:"#165DFF"}},pr),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(pr,vr){Ir({page:pr,limit:vr})},size:"default"},scroll:{y:400}}))},cr=pe(82438),Hr=pe(49692),ga=(Jt,Yt,Dn)=>new Promise((nt,Qt)=>{var lr=ur=>{try{mr(Dn.next(ur))}catch(Bi){Qt(Bi)}},Ir=ur=>{try{mr(Dn.throw(ur))}catch(Bi){Qt(Bi)}},mr=ur=>ur.done?nt(ur.value):Promise.resolve(ur.value).then(lr,Ir);mr((Dn=Dn.apply(Jt,Yt)).next())}),Ua=({visible:Jt,getdata:Yt,onCancel:Dn,onRandomExchange:nt,selectFromProblemSet:Qt,questionParams:lr})=>{const[Ir,mr]=(0,le.useState)(!1),[ur,Bi]=(0,le.useState)(!1),[Pr,to]=(0,le.useState)({}),So=(0,je.useParams)(),[fr,pr]=(0,le.useState)(),vr=(ji,Ai)=>ga(void 0,null,function*(){Bi(!0);const Wr=yield(0,Ye.ZP)(`/api/exercises/${So.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:lr.id,item_bank_id:ji,shixuns_info:[{id:ji,is_copy:Ai!=1,is_use:Ai!=1}]}});Bi(!1),Wr!=null&&Wr.status||(Ct.ZP.info("\u6362\u9898\u6210\u529F"),Dn(),Yt())});return le.createElement(Ue.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:Jt,onCancel:Dn,centered:!0,maskClosable:!0,footer:null},le.createElement(lt.Z,{justify:"center",className:"pb20"},le.createElement(Kl.Z,{onClick:nt},"\u968F\u673A\u66F4\u6362"),(lr==null?void 0:lr.type)!=="PRACTICAL"&&le.createElement(Ge.ZP,{style:{marginLeft:24},onClick:Qt},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9"),(lr==null?void 0:lr.type)==="PRACTICAL"&&le.createElement(Ge.ZP,{style:{marginLeft:24},onClick:()=>{mr(!0)}},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9")),le.createElement(Mi,{open:Ir,onCancel:()=>mr(!1),onOk:ji=>ga(void 0,null,function*(){if(console.log("----selectedRows",ji,So),(ji==null?void 0:ji.length)<=0){Ct.ZP.info("\u8BF7\u9009\u62E9\u5B9E\u8BAD");return}let Ai=ji==null?void 0:ji.map(zo=>zo==null?void 0:zo.id),Wr=yield(0,Hr.Tr)({id:[...Ai],course_id:So.coursesId,type:"shixun"});(Wr==null?void 0:Wr.student_count)===0?vr(Ai==null?void 0:Ai[0],1):(pr(Ai),to(Wr)),mr(!1)})}),le.createElement(cr.Z,{resdata:Pr,type:"shixun",okloading:ur,oktext:(Pr==null?void 0:Pr.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:ji=>ga(void 0,null,function*(){vr(fr==null?void 0:fr[0],2)})}))},Ka=pe(94734),No=pe(24334),qr=pe(69304),Fi=pe(68042),eo=pe(14165),Ko=Object.defineProperty,ma=Object.defineProperties,ya=Object.getOwnPropertyDescriptors,bo=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,Io=Object.prototype.propertyIsEnumerable,Dr=(Jt,Yt,Dn)=>Yt in Jt?Ko(Jt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Jt[Yt]=Dn,Da=(Jt,Yt)=>{for(var Dn in Yt||(Yt={}))oa.call(Yt,Dn)&&Dr(Jt,Dn,Yt[Dn]);if(bo)for(var Dn of bo(Yt))Io.call(Yt,Dn)&&Dr(Jt,Dn,Yt[Dn]);return Jt},Ha=(Jt,Yt)=>ma(Jt,ya(Yt)),La=(Jt,Yt,Dn)=>new Promise((nt,Qt)=>{var lr=ur=>{try{mr(Dn.next(ur))}catch(Bi){Qt(Bi)}},Ir=ur=>{try{mr(Dn.throw(ur))}catch(Bi){Qt(Bi)}},mr=ur=>ur.done?nt(ur.value):Promise.resolve(ur.value).then(lr,Ir);mr((Dn=Dn.apply(Jt,Yt)).next())}),xu=({data:Jt,submit:Yt,goBack:Dn,loading:nt,onTypeScore:Qt,editPreview:lr=!1,onSkipExamination:Ir,selectValue:mr,onExchange:ur,getdata:Bi,handleMarkWrongQuestion:Pr})=>{var to,So,fr,pr,vr,ji,Ai,Wr,zo,Br,Er;const Or=(0,le.useRef)(),[kr,gr]=(0,le.useState)(null),[Aa,_o]=(0,le.useState)(!1),[xa,Wa]=(0,le.useState)(!1),wo=(0,le.useRef)(),[Oa]=We.default.useForm(),El=(0,je.useParams)(),[Nr,_s]=(0,le.useState)(!1);(0,le.useEffect)(()=>{_o(!0)},[]),(0,le.useEffect)(()=>{lr||(0,Xe.Dk)("\u8BD5\u5377\u9884\u89C8")},[lr]);const jo=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],Hs={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898",COMPLETION:"\u586B\u7A7A\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898"},gl={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},rc=li=>{var fo;const Xa=[];return le.createElement(le.Fragment,null,le.createElement("aside",{className:ke.single},(fo=li==null?void 0:li.choices)==null?void 0:fo.map((rt,et)=>(rt.is_answer&&Xa.push(eo.k4[et]),le.createElement("ul",{key:et},le.createElement("li",null,eo.k4[et],"\u3001"),le.createElement("li",null,le.createElement(ze.Z,{value:rt.choice_text})))))),le.createElement("div",{className:ke.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Xa.join(""),le.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",jo[li.difficulty])),le.createElement("aside",null,le.createElement("span",{className:ke.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:li.analysis?li.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:li==null?void 0:li.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),li==null?void 0:li.tag_discipline_name)))))},ad=(li,fo)=>{var Xa;const rt=(Xa=li==null?void 0:li.standard_answer)==null?void 0:Xa.map((et,Ut)=>{var Xt;return le.createElement("div",{key:Ut},`\u7B54\u6848\uFF08\u586B\u7A7A${et==null?void 0:et.position}\uFF09\uFF1A${(Xt=et==null?void 0:et.answer_text)==null?void 0:Xt.join("\u3001")}`)});return le.createElement(le.Fragment,null,le.createElement("div",{className:ke.analysis},le.createElement("div",{style:{display:"flex"}},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),le.createElement("div",null,rt)),le.createElement("aside",null,le.createElement("span",{className:ke.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:li.analysis?li.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),fo?`${(fo==null?void 0:fo.discipline_name)||"--"}/${fo==null?void 0:fo.sub_discipline_name}`:`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:fo?fo==null?void 0:fo.tag_discipline_name:li==null?void 0:li.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),fo?fo==null?void 0:fo.tag_discipline_name:li==null?void 0:li.tag_discipline_name)))))},kc=li=>{var fo;const Xa=(fo=li==null?void 0:li.standard_answer)==null?void 0:fo.map((rt,et)=>le.createElement("div",{key:et},`\u7B54\u6848\uFF08\u586B\u7A7A${(rt==null?void 0:rt.position)||(rt==null?void 0:rt.exercise_choice_id)}\uFF09\uFF1A${rt==null?void 0:rt.answer_text}`));return le.createElement(le.Fragment,null,le.createElement("div",{className:ke.analysis},le.createElement("div",{style:{display:"flex"}},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),le.createElement("div",null,Xa)),le.createElement("aside",null,le.createElement("span",{className:ke.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:li.analysis?li.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:li==null?void 0:li.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),li==null?void 0:li.tag_discipline_name)))))},oc=(li,fo)=>{var Xa;return le.createElement("div",{className:ke.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(Xa=li==null?void 0:li.answer_texts)==null?void 0:Xa[0]),le.createElement("aside",null,le.createElement("span",{className:ke.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:li.analysis?li.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),fo?`${(fo==null?void 0:fo.discipline_name)||"--"}/${fo==null?void 0:fo.sub_discipline_name}`:`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:fo?fo==null?void 0:fo.tag_discipline_name:li==null?void 0:li.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),fo?fo==null?void 0:fo.tag_discipline_name:li==null?void 0:li.tag_discipline_name))))},vc=li=>{var fo,Xa;return le.createElement("div",{className:ke.analysis},le.createElement("aside",null,le.createElement("span",{className:ke.text},"\u9884\u671F\u8F93\u51FA:"),le.createElement(ze.Z,{value:(fo=li==null?void 0:li.program_attr)==null?void 0:fo.description})),le.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((Xa=li==null?void 0:li.program_attr)==null?void 0:Xa.answer_text)||"--"),le.createElement("aside",null,le.createElement("span",{className:ke.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:li.analysis?li.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:li==null?void 0:li.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),li==null?void 0:li.tag_discipline_name))))},as=(li,fo)=>{var Xa;return le.createElement("div",null,(Xa=li==null?void 0:li.sub_item_banks)==null?void 0:Xa.map((rt,et)=>{var Ut,Xt;const gn=[];return le.createElement(le.Fragment,null,le.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},fo+1+"."+(et+1),"\uFF08",Hs[rt.item_type]||gl[rt.item_type],"\uFF09",rt.name),(rt.item_type=="SINGLE"||rt.item_type=="MULTIPLE"||rt.item_type=="JUDGMENT"||rt.item_type=="single"||rt.item_type=="multiple"||rt.item_type=="judgement")&&le.createElement(le.Fragment,null,le.createElement("aside",{className:ke.single},(Ut=rt==null?void 0:rt.choices)==null?void 0:Ut.map((nn,Vn)=>(nn.is_answer&&gn.push(eo.k4[Vn]),le.createElement("ul",{key:Vn},le.createElement("li",null,eo.k4[Vn],"\u3001"),le.createElement("li",null,le.createElement(ze.Z,{value:nn.choice_text})))))),le.createElement("div",{className:ke.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",gn.join(""),le.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",jo[rt.difficulty])),le.createElement("aside",null,le.createElement("span",{className:ke.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:rt.analysis?rt.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:li==null?void 0:li.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),li==null?void 0:li.tag_discipline_name))))),(rt.item_type=="COMPLETION"||rt.item_type=="completion")&&ad(rt,li),(rt.item_type=="SUBJECTIVE"||rt.item_type=="subjective")&&oc(rt,li),((Xt=Jt==null?void 0:Jt.exam)==null?void 0:Xt.exercise_status)===3&&le.createElement("div",{className:"flex gap-20px mt20"},le.createElement(qr.Z,{state:rt==null?void 0:rt.is_wrong,onClick:()=>{Pr==null||Pr({value:Ha(Da({},rt),{question_id:rt==null?void 0:rt.id,question_score:rt==null?void 0:rt.score})})}}),rt.item_type=="single"&&le.createElement(Ge.ZP,{style:{color:"#3061D0"},onClick:()=>{_d({value:rt})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848")))}))},du=li=>{var fo,Xa,rt;return le.createElement("div",{style:{marginTop:"12px"}},(Xa=(fo=li==null?void 0:li.shixun)==null?void 0:fo.challenges)==null?void 0:Xa.map((et,Ut)=>le.createElement("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},le.createElement("div",null,le.createElement("span",{className:"mr5"},"\u7B2C",Ut+1,"\u5173"),le.createElement(ut.Z,{key:Ut,title:et==null?void 0:et.challenge_name},le.createElement("span",null,(0,Xe.Pq)(et==null?void 0:et.challenge_name,44)))),lr&&le.createElement("div",null,"\u5206\u503C\uFF1A",et.score,"\u5206"))),le.createElement(je.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(rt=li==null?void 0:li.shixun)==null?void 0:rt.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),le.createElement("div",{style:{clear:"both"}}))},Rc=li=>{let fo=li.questions_score/li.questions_count;Ue.default.confirm({icon:null,centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:le.createElement("div",{className:ke.modalColumn},le.createElement("div",{className:ke.modalRow,style:{justifyContent:"flex-start"}},le.createElement("sup",{className:ke.sup},"*"),le.createElement("span",null,li==null?void 0:li.name,"\uFF1A"),le.createElement(Me.Z,{min:0,precision:1,defaultValue:fo,onChange:Xa=>{fo=Xa}}),le.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){var Xa;if(!fo)return Ct.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const rt={type:li==null?void 0:li.type,score:fo,scoreTotal:Number((Xa=fo*li.questions_count)==null?void 0:Xa.toFixed(1))};Qt(rt)})})},ac=()=>{let li="";Ue.default.confirm({icon:null,centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:le.createElement("div",{className:ke.modalColumn},le.createElement("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20"},le.createElement("img",{style:{marginRight:5},src:ln.Z}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),le.createElement("div",{className:ke.modalRow,style:{marginTop:20}},le.createElement("sup",{className:ke.sup},"*"),le.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),le.createElement(wt.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:li,onChange:fo=>{li=fo.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){var fo;if(!li)return Ct.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Xa=[],rt=[],et=[],Ut=[];(fo=Jt==null?void 0:Jt.questionList)==null||fo.forEach(gn=>{var nn;(nn=gn.questions)==null||nn.forEach(Vn=>{let jn=gn.questions_score/gn.questions_count;jn=jn&&jn.toFixed(1),gn.type==="COMBINATION"&&et.push({id:Vn.id,sub_item_bank_ids:Vn.sub_item_banks.map(Xn=>Xn.id)}),gn.type==="PRACTICAL"?Ut.push(Vn.id):(Xa.push(Vn.id),rt.push(jn))})}),console.log("-----",et),yield Yt({item_bank_ids:Xa,item_bank_scores:rt,name:li,combination_item_banks:et,shixun_ids:Ut})})})},Rd=(li,fo,Xa,rt)=>{var et;const Ut=`${location.pathname}${location.search}`,Xt=(et=rt.questions)==null?void 0:et.map(gn=>gn==null?void 0:gn.id);if(Ut.includes("exercise"))wo.current={id:li,ids:Xt,type:fo,index:Xa},Wa(!0);else{let gn=Ue.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u8981\u66F4\u6362\u8BE5\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!0,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){gn.update({cancelButtonProps:{disabled:!0}}),yield ur({single_question_id:li,seleted_item_bank_ids:Xt},{type:fo,index:Xa}),gn.update({cancelButtonProps:{disabled:!1}}),Ct.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},au=li=>{var fo;const Xa=(fo=li.questions)==null?void 0:fo.map(Ut=>Ut==null?void 0:Ut.id),rt=li.name;let et=Ue.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${rt}\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F`,cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){et.update({cancelButtonProps:{disabled:!0}}),yield ur({seleted_item_bank_ids:Xa},{type:li.type}),et.update({cancelButtonProps:{disabled:!1}}),Ct.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${rt}\u8BD5\u9898`)})})},su=()=>{let li=Ue.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362\u9884\u89C8\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){li.update({cancelButtonProps:{disabled:!0}}),yield ur(),li.update({cancelButtonProps:{disabled:!1}}),Ct.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},Wu=li=>{console.log(li,"key"),Ir(li-1)},Au=(li,fo)=>{var Xa,rt;if(fo==="SINGLE")return le.createElement(le.Fragment,null,le.createElement(Si,{ref:Or,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(fo==="MULTIPLE")return le.createElement(le.Fragment,null,le.createElement(Ri,{ref:Or,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(fo==="JUDGMENT")return le.createElement(le.Fragment,null,le.createElement(mn,{ref:Or,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(fo==="COMPLETION")return le.createElement(le.Fragment,null,le.createElement(Bt,{ref:Or,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(fo==="SUBJECTIVE")return le.createElement(le.Fragment,null,le.createElement(Ei,{ref:Or,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(fo==="COMBINATION")return le.createElement(le.Fragment,null,le.createElement(Tl,{ref:Or,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(fo==="BPROGRAM")return le.createElement(le.Fragment,null,le.createElement(We.default,{form:Oa,style:{marginTop:20},onFinishFailed:et=>{var Ut,Xt;et.errorFields[0].name.includes("standard_answers")?Ct.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):Ct.ZP.error(et.errorFields[0].errors[0]),Oa.scrollToField((Xt=(Ut=et==null?void 0:et.errorFields)==null?void 0:Ut[0])==null?void 0:Xt.name,{behavior:"smooth",block:"center"})},onFinish:et=>La(void 0,null,function*(){var Ut;let Xt=Ha(Da({question_score:li.score},et),{question_type:8,hack:Ha(Da({},et.hack),{difficult:li.program_attr.difficult}),hack_codes:Ha(Da({},et.hack_codes),{code:No.Base64.encode((Ut=et.hack_codes)==null?void 0:Ut.code)})});Nr&&(Xt.is_cover=1);const gn=yield(0,Ye.ZP)(`/api/exercise_questions/${li.id}.json`,{method:"put",body:Xt});(gn==null?void 0:gn.status)===0&&(Ct.ZP.success("\u7F16\u8F91\u6210\u529F"),Wu(mr+1)),gr(null)})},le.createElement(Ka.tc,{form:Oa,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(Xa=li==null?void 0:li.program_attr)==null?void 0:Xa.identifier,answerKey:"standard_answers"}),le.createElement($e.Z,null)));if(fo==="PROGRAM"&&je.history.push(`/problems/${(rt=li==null?void 0:li.program_attr)==null?void 0:rt.identifier}/edit?type=exercises&express_id=${El.categoryId}&question_id=${li==null?void 0:li.id}&score=${li==null?void 0:li.score}&callback_url=${location.pathname}&select=${mr}&exercise=true`),fo==="PRACTICAL")return le.createElement(le.Fragment,null,le.createElement(Hi,{ref:Or,editData:li,isEdit:!0}),le.createElement($e.Z,null))},yc=(li,fo)=>La(void 0,null,function*(){var Xa,rt,et,Ut,Xt,gn;const nn=yield(Xa=Or.current)==null?void 0:Xa.onSave();if(!nn)return;const Vn=Jn=>{const mi=Jn.map(Vi=>Vi.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(mi).size!==mi.length},jn={question_score:fo.score,analysis:nn.analysis};if(li==="SINGLE"||li==="MULTIPLE"||li==="JUDGMENT"){if(li!=="JUDGMENT"&&Vn(nn==null?void 0:nn.choices)){Ct.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const Jn=[],mi=[];jn.question_type=li==="JUDGMENT"?2:1,jn.question_title=nn==null?void 0:nn.name,(rt=nn==null?void 0:nn.choices)==null||rt.forEach((or,Vi)=>{Jn.push(or.choice_text),or!=null&&or.is_answer&&mi.push(Vi+1)}),jn.question_choices=Jn,jn.standard_answers=mi}if(li==="COMPLETION"){let Jn=(et=nn==null?void 0:nn.standard_answers)==null?void 0:et.map((Vi,Ui)=>(Vi==null?void 0:Vi.score)<=0?Ui+1:null).filter(Vi=>Vi!==null);if((Jn==null?void 0:Jn.length)>0)return Ct.ZP.warning(`\u7B2C${Jn.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let mi=(Ut=nn==null?void 0:nn.standard_answers)==null?void 0:Ut.reduce((Vi,Ui)=>Vi+(Number(Ui==null?void 0:Ui.score)||0),0);if(parseFloat(mi.toFixed(2))!=(jn==null?void 0:jn.question_score))return Ct.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;jn.is_ordered=nn.is_ordered,jn.question_title=nn==null?void 0:nn.name,jn.use_blank_score=nn==null?void 0:nn.use_blank_score,jn.question_type=3;const or=[];(Xt=nn==null?void 0:nn.standard_answers)==null||Xt.forEach((Vi,Ui)=>{or.push({choice_id:Vi.position,answer_text:Vi.answer_text,score:Vi.score})}),jn.standard_answers=or,jn.downcase=nn==null?void 0:nn.downcase,jn.no_space=nn==null?void 0:nn.no_space}if(li==="SUBJECTIVE"&&(console.log("editorData"),console.log(nn),jn.question_title=nn==null?void 0:nn.name,jn.question_type=4,jn.answer_texts=nn==null?void 0:nn.answer_texts,jn.use_keywords=nn==null?void 0:nn.use_keywords,jn.keywords=nn==null?void 0:nn.keywords),li==="COMBINATION"){jn.question_title=nn==null?void 0:nn.name,jn.question_type=7;try{jn.sub_questions=(gn=nn==null?void 0:nn.sub_item_banks)==null?void 0:gn.map((Jn,mi)=>{var or,Vi,Ui;if((Jn==null?void 0:Jn.item_type)=="single"||(Jn==null?void 0:Jn.item_type)=="multiple"){if(Vn(Jn==null?void 0:Jn.choices))throw new Error(`\u7B2C${mi+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const Jr=[],ir=[];return(or=Jn==null?void 0:Jn.choices)==null||or.forEach((Rr,jr)=>{Jr.push(Rr.choice_text),Rr!=null&&Rr.is_answer&&ir.push(jr+1)}),{id:Jn.id,question_id:Jn.id,question_title:Jn.name,difficulty:Jn.difficulty,question_type:(Jn==null?void 0:Jn.item_type)=="single"?0:(Jn==null?void 0:Jn.item_type)=="multiple"?1:2,question_choices:Jr,standard_answers:ir,analysis:Jn.analysis,question_score:Jn==null?void 0:Jn.score}}else if((Jn==null?void 0:Jn.item_type)=="completion"){let Jr=(Vi=Jn==null?void 0:Jn.standard_answer)==null?void 0:Vi.reduce((Rr,jr)=>Rr+(Number(jr==null?void 0:jr.score)||0),0);if(parseFloat(Jr.toFixed(2))!=(Jn==null?void 0:Jn.score))throw new Error("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01");const ir=[];return(Ui=Jn==null?void 0:Jn.standard_answer)==null||Ui.forEach((Rr,jr)=>{ir.push({choice_id:Rr.position,answer_text:Rr.answer_text,score:Rr.score})}),{id:Jn.id,question_id:Jn.id,is_ordered:Jn.is_ordered,question_title:Jn.name,difficulty:Jn.difficulty,question_type:3,standard_answers:ir,use_blank_score:Jn.use_blank_score,analysis:Jn.analysis,downcase:Jn==null?void 0:Jn.downcase,no_space:Jn==null?void 0:Jn.no_space,question_score:Jn==null?void 0:Jn.score}}else if((Jn==null?void 0:Jn.item_type)=="subjective")return{id:Jn.id,question_id:Jn.id,question_title:Jn.name,question_type:4,difficulty:Jn.difficulty,answer_texts:Jn==null?void 0:Jn.answer_texts,analysis:Jn.analysis,question_score:Jn==null?void 0:Jn.score,use_keywords:Jn.use_keywords,keywords:Jn==null?void 0:Jn.keywords}})}catch(Jn){Ct.ZP.warning(Jn.message);return}delete jn.analysis}let Xn=!1;(fo==null?void 0:fo.is_my)===1&&(Xn=yield new Promise((mi,or)=>{Ue.default.confirm({title:"\u63D0\u793A",content:"\u6B64\u9898\u76EE\u5DF2\u5B58\u5728\u4E8E\u8BD5\u9898\u5E93\uFF0C\u662F\u5426\u5C06\u4FEE\u6539\u540E\u7684\u9898\u76EE\u8986\u76D6\u8BD5\u9898\u5E93\u7684\u539F\u9898\uFF1F",okText:"\u8986\u76D6\u539F\u9898",cancelText:"\u4E0D\u8986\u76D6",keyboard:!1,onOk:()=>{mi(!0)},onCancel:()=>{mi(!1)}})})),Xn&&(jn.is_cover=1);const yi=li!=="PRACTICAL"?yield(0,Ye.ZP)(`/api/exercise_questions/${fo.id}.json`,{method:"put",body:jn}):yield(0,Ye.ZP)(`/api/exercise_questions/${fo.id}/update_shixun_score.json`,{method:"post",body:Da({},nn)});(yi==null?void 0:yi.status)===0&&(Ct.ZP.success("\u7F16\u8F91\u6210\u529F"),Wu(mr+1),gr(null))}),bd=()=>La(void 0,null,function*(){(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,Ye.ZP)(`/api/exercises/${El.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield Ir(mr),Ct.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),_d=({value:li}={})=>{var fo;const Xa=[];let rt=[];const et=(fo=li==null?void 0:li.choices)==null?void 0:fo.map((Xt,gn)=>{var nn;const Vn=gn+1;return Xt!=null&&Xt.is_answer&&(Xa.push(Vn),rt.push(Vn)),{value:Vn,label:le.createElement(ze.Z,{className:"c-black font14",value:`${(nn=eo.k4)==null?void 0:nn[gn]}. ${Xt==null?void 0:Xt.choice_text}`}),disabled:Xt==null?void 0:Xt.origin_standard_answer}}),Ut=Ue.default.confirm({centered:!0,icon:null,title:"\u589E\u8BBE\u6B63\u786E\u7B54\u6848",width:800,content:le.createElement(le.Fragment,null,"\u5F53\u524D\u8BD5\u9898\u7684\u6B63\u786E\u7B54\u6848\u4E3A ",Xa==null?void 0:Xa.map(Xt=>{var gn;return(gn=eo.k4)==null?void 0:gn[Xt-1]}),"\uFF0C\u8BF7\u9009\u62E9\u9700\u8981\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u7684\u9009\u9879\u3002",le.createElement("br",null),"\u52FE\u9009\u63D0\u4EA4\u4E4B\u540E\uFF0C\u9009\u4E2D\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u4EFB\u4E00\u9009\u9879\u7684\u5B66\u751F\u4E5F\u4F1A\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\uFF0C\u4F46\u4E0D\u4F1A\u4FEE\u6539\u5F53\u524D\u8BD5\u9898\u7684\u9898\u578B\u3002\u53D6\u6D88\u52FE\u9009\u63D0\u4EA4\u4E4B\u540E\uFF0C\u4E5F\u4F1A\u91CD\u65B0\u8BA1\u7B97\u5BF9\u5E94\u5B66\u751F\u7684\u5F97\u5206\u3002",le.createElement("br",null),le.createElement(Ft.default.Group,{className:"flex-col mt20",options:et,defaultValue:rt,onChange:Xt=>{rt=Xt}})),onOk:()=>La(void 0,null,function*(){const Xt=yield(0,Ye.ZP)(`/api/exercises/${El.categoryId}/questions/${li==null?void 0:li.id}/add_standard_answers.json`,{method:"put",body:{standard_answer:rt}});(Xt==null?void 0:Xt.status)===0&&(Ct.ZP.success("\u4FEE\u6539\u6210\u529F"),Wu(mr+1))})})},Fd=(to=Jt==null?void 0:Jt.questionList)==null?void 0:to.reduce((li,fo)=>li+Number(fo.questions_score),0),ch=lr&&((So=Jt==null?void 0:Jt.exam)==null?void 0:So.exercise_status)!==1;return le.createElement("section",{className:ke.wrap},le.createElement("div",{id:"id_left_preview",className:ke.left,onMouseEnter:li=>{const fo=document.getElementById("id_left_preview");fo.style.overflowY="auto"},onMouseLeave:li=>{const fo=document.getElementById("id_left_preview");fo.style.overflowY="hidden"}},le.createElement("div",{className:ke.title},le.createElement("div",{className:"body-overflow-initial"},le.createElement("b",null),le.createElement("span",null,"\u7B54\u9898\u5361"))),le.createElement("div",{className:ke.total},le.createElement("div",null,le.createElement("img",{src:Wt}),le.createElement("span",null,"\u9898\u6570(\u9053)"),le.createElement("aside",null,Jt==null?void 0:Jt.all_questions_count)),le.createElement("div",{className:"mr30 ml30"},le.createElement("img",{src:qt}),le.createElement("span",null,"\u603B\u5206(\u5206)"),le.createElement("aside",null,Fd&&Fd.toFixed(1))),le.createElement("div",null,le.createElement("img",{src:Le}),le.createElement("span",null,"\u65F6\u957F(\u5206)"),le.createElement("aside",null,((fr=Jt==null?void 0:Jt.exam)==null?void 0:fr.time)===-1||((pr=Jt==null?void 0:Jt.exam)==null?void 0:pr.time)===null?"\u4E0D\u9650":(vr=Jt==null?void 0:Jt.exam)==null?void 0:vr.time))),(ji=Jt==null?void 0:Jt.questionList)==null?void 0:ji.map((li,fo)=>{var Xa;return le.createElement("div",{className:ke.list,key:fo},le.createElement("div",{className:ke.name},le.createElement("b",null),le.createElement("span",null,li.name)),le.createElement("aside",null,le.createElement("div",null,"\u5171",le.createElement("span",{className:ke.b},li.questions_count),"\u9898 ",le.createElement("span",{className:ke.l},"|"),"\u5171",le.createElement("span",{className:ke.r},li.questions_score),"\u5206"),le.createElement("div",{className:ke.answerSheet},(Xa=li==null?void 0:li.questions)==null?void 0:Xa.map((rt,et)=>le.createElement("div",{onClick:()=>{const Ut=`Anchor_${rt==null?void 0:rt.id}`;let Xt=document.getElementById(Ut);Xt&&setTimeout(()=>Xt.scrollIntoView({block:"center",behavior:"smooth"}))},key:rt==null?void 0:rt.id,className:ke.tag},et+1)))))})),le.createElement("div",{className:ke.right},le.createElement("div",{className:ke.examName,id:"examName"},le.createElement("div",{className:ke.name},le.createElement(ut.Z,{title:(Ai=Jt==null?void 0:Jt.exam)==null?void 0:Ai.name,getPopupContainer:li=>li.parentNode},le.createElement("span",{className:ke.t},(Wr=Jt==null?void 0:Jt.exam)==null?void 0:Wr.name))),lr&&((zo=Jt==null?void 0:Jt.exam)==null?void 0:zo.exercise_status)===1&&le.createElement(Nn.op,{openLoading:!0,shape:"default",onClick:()=>{Ue.default.confirm({title:"\u63D0\u793A",content:"\u786E\u8BA4\u6839\u636E\u6700\u65B0\u7684\u968F\u673A\u7EC4\u5377\u62BD\u9898\u89C4\u5219\u91CD\u65B0\u751F\u6210\u8BD5\u5377\u5417\uFF1F",onOk:()=>{bd()}})},type:"primary"},"\u66F4\u65B0\u8BD5\u5377"),!lr&&le.createElement(Ge.ZP,{onClick:su,type:"primary"},"\u968F\u673A\u66F4\u6362")),le.createElement("div",{className:ke.topWarp},(Br=Jt==null?void 0:Jt.questionList)==null?void 0:Br.map((li,fo)=>{var Xa,rt;return le.createElement(le.Fragment,{key:fo},le.createElement("div",{className:ke.head,style:fo===0?{border:0,marginTop:-16}:{}},le.createElement("div",{className:ke.name},le.createElement("b",null),le.createElement("span",null,li.name)),le.createElement("div",{className:ke.so},"\u5171",le.createElement("span",{className:ke.b},li.questions_count," "),"\u9898 ",li.type==="COMBINATION"&&`\uFF08\u5305\u542B${(Xa=li==null?void 0:li.questions)==null?void 0:Xa.map(et=>{var Ut;return(Ut=et==null?void 0:et.sub_item_banks)==null?void 0:Ut.length}).reduce((et,Ut)=>et+Ut)}\u5C0F\u9898\uFF09`,le.createElement("span",{className:ke.l},"|"),"\u5171",le.createElement("span",{className:ke.r},li.questions_score),"\u5206"),!lr&&le.createElement("div",{className:ke.btn},le.createElement(Ge.ZP,{onClick:()=>{Rc(li)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),le.createElement(Ge.ZP,{onClick:()=>au(li),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(rt=li==null?void 0:li.questions)==null?void 0:rt.map((et,Ut)=>{var Xt,gn,nn,Vn;return kr===(et==null?void 0:et.id)?le.createElement("div",{id:`Anchor_${et==null?void 0:et.id}`,className:ke.content,style:{padding:0,marginTop:24},key:et==null?void 0:et.id},le.createElement("div",{style:{float:"right",marginTop:`${(li==null?void 0:li.type)==="PRACTICAL"?"-2px":"-6px"}`}},le.createElement(Ge.ZP,{onClick:()=>gr(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),le.createElement(Ge.ZP,{onClick:()=>{yc(li==null?void 0:li.type,et)},type:"primary"},"\u4FDD\u5B58")),Au(et,li.type)):le.createElement("div",{id:`Anchor_${et==null?void 0:et.id}`,className:ke.content,key:et==null?void 0:et.id},le.createElement("div",{className:ke.titleWrap},(et==null?void 0:et.item_type)==="bprogram"?le.createElement(ze.Z,{style:{paddingRight:10},value:Ut+1+"\u3001"+((Xt=et==null?void 0:et.program_attr)==null?void 0:Xt.description)}):le.createElement(ze.Z,{style:{paddingRight:10},className:ke.titleHtml,value:Ut+1+`\u3001${(et==null?void 0:et.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(et==null?void 0:et.name)}),lr&&le.createElement(Ge.ZP,{onClick:()=>{var jn,Xn,yi;if(kr){Ct.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}Oa.setFieldsValue({standard_answers:et==null?void 0:et.standard_answer,hack:Da(Da({},et),et==null?void 0:et.program_attr),hack_codes:Ha(Da({},et==null?void 0:et.program_attr),{code:No.Base64.decode(((jn=et==null?void 0:et.program_attr)==null?void 0:jn.code)||"")}),hack_sets:Da({},(Xn=et==null?void 0:et.hack_sets)==null?void 0:Xn[0])}),(et==null?void 0:et.item_type)=="program"?je.history.push(`/problems/newedit/${(yi=et==null?void 0:et.program_attr)==null?void 0:yi.identifier}?type=exercises&express_id=${El.categoryId}&question_id=${et==null?void 0:et.id}&score=${et==null?void 0:et.score}&exercise=true&callback_url=/classrooms/${El.coursesId}/exercise/${El.categoryId}/detail?random=true`):gr(et==null?void 0:et.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!ch&&le.createElement(Ge.ZP,{disabled:ch,className:"ml20",onClick:()=>Rd(et==null?void 0:et.id,li.type,Ut,li),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(et==null?void 0:et.item_type)==="bprogram"&&le.createElement(ze.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:ke.titleHtml,value:No.Base64.decode(((gn=et==null?void 0:et.program_attr)==null?void 0:gn.code)||"")}),(li.type==="SINGLE"||li.type==="JUDGMENT"||li.type==="MULTIPLE")&&rc(et),li.type==="COMPLETION"&&ad(et),li.type==="SUBJECTIVE"&&oc(et),li.type==="PROGRAM"&&vc(et),li.type==="BPROGRAM"&&kc(et),li.type==="COMBINATION"&&as(et,Ut),li.type==="PRACTICAL"&&du(et),le.createElement(lt.Z,{className:"mt20",wrap:!1,align:"middle",gutter:20},((nn=Jt==null?void 0:Jt.exam)==null?void 0:nn.exercise_status)===3&&!["PROGRAM","BPROGRAM","PRACTICAL","COMBINATION"].includes(li.type)&&le.createElement(vt.Z,null,le.createElement(qr.Z,{state:et==null?void 0:et.is_wrong,onClick:()=>{Pr==null||Pr({value:Ha(Da({},et),{question_id:et==null?void 0:et.id,question_score:et==null?void 0:et.score})})}})),["PROGRAM","BPROGRAM","PRACTICAL"].includes(li.type)&&(et==null?void 0:et.show_resubmit)&&le.createElement(vt.Z,null,le.createElement(Fi.C,{dataSource:Ha(Da({},et),{question_id:et==null?void 0:et.id})})),((Vn=Jt==null?void 0:Jt.exam)==null?void 0:Vn.exercise_status)===3&&["SINGLE"].includes(li.type)&&le.createElement(vt.Z,null,le.createElement(Ge.ZP,{style:{color:"#3061D0"},onClick:()=>{_d({value:et})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848"))))}))}))),lr?le.createElement(Nn.vr,null,le.createElement(Ie.Z,{showTotal:Xe.rU,total:(Er=Jt==null?void 0:Jt.exam)==null?void 0:Er.total_num,pageSize:1,current:mr+1,showSizeChanger:!1,onChange:Wu,showQuickJumper:!1,hideOnSinglePage:!1})):le.createElement(Nn.vr,{LeftContent:le.createElement(Nn.op,{onClick:Dn,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:le.createElement(lt.Z,{align:"middle"},le.createElement(te.Z,{color:"#55575D",overlayClassName:ke.popover,open:Aa,getPopupContainer:li=>li==null?void 0:li.parentNode,content:"\u5982\u60A8\u5BF9\u6B64\u4EFD\u8BD5\u9898\u6EE1\u610F\uFF0C\u53EF\u5C06\u6B64\u4EFD\u8BD5\u9898\u4FDD\u5B58\u4E3A\u56FA\u5B9A\u8BD5\u5377"},le.createElement(Nn.op,{onMouseEnter:()=>_o(!0),onMouseLeave:()=>_o(!1),onClick:()=>ac(),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),le.createElement(Nn.op,{shape:"default",type:"primary",onClick:()=>Yt(),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),le.createElement(Ua,{visible:xa,questionParams:wo.current,getdata:Bi,onRandomExchange:()=>La(void 0,null,function*(){const li=wo.current;yield ur({single_question_id:li.id,seleted_item_bank_ids:li.ids},{type:li.type,index:li.index}),Wa(!1)}),selectFromProblemSet:()=>{const li=wo.current,fo=`${location.pathname}${location.search}`;fo.includes("exercise")&&je.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${li.id}&qtype=${li.type}&exerciseid=${El.categoryId}&from=${fo}`)},onCancel:()=>{Wa(!1)}}))}},43794:function(On,pn,pe){"use strict";pe.r(pn),pe.d(pn,{default:function(){return zl}});var le=pe(59301),ke={wrapper:"wrapper___KtBVT",breadCrumbWrapper:"breadCrumbWrapper___k9tSB",baseInfo:"baseInfo____j5EY",radioBtnWrapper:"radioBtnWrapper___k9OCh",baseLineHeight:"baseLineHeight___O_QXK",radiogroup:"radiogroup___e2fW6",easy:"easy___WcUAp",medium:"medium___U_o3j",hard:"hard___dAXLS",formWrap:"formWrap___wt5tC",baseFormItem:"baseFormItem___zV64d",cascaderPopup:"cascaderPopup___qm63f",fixedBottom:"fixedBottom___liDZ4",cancelBtn:"cancelBtn___ZV9Mi",confirmBtn:"confirmBtn___DwH6m",previewBtn:"previewBtn___aLYCy",concat:"concat___ZuLMo"},We=pe(8591),ut=pe(78241),Ge=pe(66104),Ue=pe(89070),Me=pe(23367),Ct=pe(71418),wt=pe(92832),$e=pe(19842),Ft=pe(5112),lt=pe(95237),vt=pe(5871),Ie=pe(3113),te=pe(99064),ee=Object.defineProperty,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(En,Nn,ai)=>Nn in En?ee(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):En[Nn]=ai,Ee=(En,Nn)=>{for(var ai in Nn||(Nn={}))se.call(Nn,ai)&&ve(En,ai,Nn[ai]);if(de)for(var ai of de(Nn))he.call(Nn,ai)&&ve(En,ai,Nn[ai]);return En},Be=(En,Nn,ai)=>new Promise((Qi,Gi)=>{var ki=Mi=>{try{oi(ai.next(Mi))}catch(cr){Gi(cr)}},_i=Mi=>{try{oi(ai.throw(Mi))}catch(cr){Gi(cr)}},oi=Mi=>Mi.done?Qi(Mi.value):Promise.resolve(Mi.value).then(ki,_i);oi((ai=ai.apply(En,Nn)).next())});function Le(En){return Be(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${En}/edit_random_exam_new.json`,{method:"get"})})}function ze(En,Nn){return Be(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${En}/update_random_exam.json`,{method:"post",body:Nn})})}function je(En){return Be(this,null,function*(){return(0,te.ZP)("/api/examination_banks/create_random_exam.json",{method:"post",body:En})})}function Xe(En){return Be(this,null,function*(){return(0,te.ZP)("/api/disciplines.json",{method:"get",params:En})})}function Ye(En){return Be(this,null,function*(){return(0,te.ZP)("/api/item_banks/item_difficulty_count.json",{method:"get",params:En})})}function dt(En,Nn){return Be(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${En}/set_item_type_score.json`,{method:"post",body:Nn})})}function He(En,Nn){return Be(this,null,function*(){return(0,te.ZP)(`/api/exercises/${En}/set_item_type_score.json`,{method:"post",body:Nn})})}function Nt(En,Nn){return Be(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${En}/delete_item_type.json`,{method:"post",body:Nn})})}function ot(En,Nn){return Be(this,null,function*(){return(0,te.ZP)(`/api/exercises/${En}/delete_item_type.json`,{method:"post",body:Nn})})}function Tt(En){return Be(this,null,function*(){return(0,te.ZP)("/api/examination_banks/preview_random_questions.json",{method:"post",body:En})})}function xt(En){return Be(this,null,function*(){return(0,te.ZP)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:En})})}function Ot(En){return Be(this,null,function*(){return(0,te.ZP)("/api/examination_banks/save_question_list.json",{method:"post",body:En})})}function Wt(En){return Be(this,null,function*(){return(0,te.ZP)(`/api/exercises/${En.categoryId}/edit.json`,{method:"get",params:Ee({},En)})})}var Dt=(En=>(En.OnlyFileFolder="1",En.OnlyKnowledge="2",En.OnlyDifficulty="3",En.FileFolderAndDiff="4",En.FileFolderAndKnowledge="5",En.KnowledgeAndDiff="6",En.All="7",En.Shixun="8",En))(Dt||{}),tt=pe(89392),Ve=Object.defineProperty,_t=Object.defineProperties,vn=Object.getOwnPropertyDescriptors,yn=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,ln=(En,Nn,ai)=>Nn in En?Ve(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):En[Nn]=ai,Gn=(En,Nn)=>{for(var ai in Nn||(Nn={}))zt.call(Nn,ai)&&ln(En,ai,Nn[ai]);if(yn)for(var ai of yn(Nn))qt.call(Nn,ai)&&ln(En,ai,Nn[ai]);return En},un=(En,Nn)=>_t(En,vn(Nn)),_n=(En=>(En[En.FileFolder=1]="FileFolder",En[En.Difficulty=2]="Difficulty",En[En.Knowledge=3]="Knowledge",En))(_n||{});const St=(0,le.createContext)(null),Zn={[Dt.OnlyFileFolder]:[1],[Dt.OnlyKnowledge]:[3],[Dt.OnlyDifficulty]:[2],[Dt.FileFolderAndDiff]:[1,2],[Dt.FileFolderAndKnowledge]:[1,3],[Dt.KnowledgeAndDiff]:[3,2],[Dt.All]:[3,2,1]},ci=(En,Nn)=>{if(En.length!==Nn.length)return!1;for(const ai of Nn)if(!En.includes(ai))return!1;return!0},Ze=En=>{for(const[Nn,ai]of Object.entries(Zn))if(ci(En,ai))return Nn},be={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",COMPLETION:"\u586B\u7A7A\u9898",JUDGMENT:"\u5224\u65AD\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898"},Pe={1:{label:"\u7B80\u5355",color:"#46B70E"},2:{label:"\u9002\u4E2D",color:"#165DFF"},3:{label:"\u56F0\u96BE",color:"#EE6F1A"}},Ae=En=>En&&parseFloat(En.toFixed(1)),Oe=(En,Nn)=>{var ai,Qi,Gi;switch(Nn.type){case"init":return Nn.payload;case"updateBaseInfo":return un(Gn({},En),{examination_bank:Nn.payload});case"deleteQuestionType":{const{item_types:ki}=En,_i=ki.filter(oi=>oi.item_type!==Nn.payload);return En.examination_bank.question_count=Ae(_i.reduce((oi,Mi)=>oi+Mi.item_bank_count,0)),En.examination_bank.total_score=Ae(_i.reduce((oi,Mi)=>oi+Mi.total_score,0)),un(Gn({},En),{item_types:_i})}case"setQuestionType":{const{item_types:ki=[]}=En,_i=ki.map(Mi=>Mi.item_type),oi=ki.filter(Mi=>Nn.payload.includes(Mi.item_type));for(const Mi of Nn.payload)_i.includes(Mi)||(Mi==="PRACTICAL"?oi.push({item_type:Mi,contents:[],item_banks:[],item_bank_count:0,item_bank_num:0,item_type_text:be[Mi],random_rule_type:Dt.Shixun,score:0,total_score:0}):oi.push({item_type:Mi,contents:[],item_bank_count:0,item_type_text:be[Mi],score:0,total_score:0}));return un(Gn({},En),{item_types:oi})}case"updateItemTypes":return un(Gn({},En),{item_types:Nn.payload});case"deleteRule":{const ki=(0,tt.cloneDeep)(En),_i=ki.item_types.find(Mi=>Mi.item_type===Nn.payload.itemType),oi=_i.contents.find(Mi=>Mi.id===Nn.payload.id&&Mi.is_share==Nn.payload.is_share);return _i.contents=_i.contents.filter(Mi=>Mi!==oi),((ai=_i.contents)==null?void 0:ai.length)===0&&(_i.random_rule_type=[]),_i.item_bank_count-=oi==null?void 0:oi.quanlity,ki.examination_bank.question_count-=oi==null?void 0:oi.quanlity,_i.total_score-=(oi==null?void 0:oi.quanlity)*_i.score,ki.examination_bank.total_score-=(oi==null?void 0:oi.quanlity)*_i.score,_i.total_score=Ae(_i.total_score),ki.examination_bank.total_score=Ae(ki.examination_bank.total_score),ki.contents=_i.contents,ki}case"changeQuestionNum":{const ki=(0,tt.cloneDeep)(En),_i=ki.item_types.find(ga=>ga.item_type===Nn.payload.itemType),oi=(Qi=_i==null?void 0:_i.contents)==null?void 0:Qi.find(ga=>ga.id===Nn.payload.id);if(Nn.payload.itemType==="PRACTICAL")return Nn.payload.num&&(ki.examination_bank.question_count=ki.examination_bank.question_count-_i.item_bank_count+Nn.payload.num,ki.examination_bank.total_score=Ae(ki.examination_bank.total_score-_i.total_score+Nn.payload.num*_i.score)),Nn.payload.score&&(ki.examination_bank.total_score=Ae(ki.examination_bank.total_score-_i.total_score+Nn.payload.num*_i.score)),_i.item_bank_count=Nn.payload.num,_i.total_score=Ae(_i.item_bank_count*_i.score),ki;ki.examination_bank.question_count=ki.examination_bank.question_count-(oi==null?void 0:oi.quanlity)+Nn.payload.num;const Mi=_i.contents.find(ga=>ga.id===Nn.payload.id&&ga.teacher_group_id===Nn.payload.teacher_group_id);Mi.quanlity=Nn.payload.num;let cr=0,Hr=0;for(const ga of _i.contents)cr+=ga==null?void 0:ga.quanlity,Hr+=(ga==null?void 0:ga.quanlity)*_i.score;return ki.examination_bank.total_score=Ae(ki.examination_bank.total_score-_i.total_score+Hr),_i.item_bank_count=cr,_i.total_score=Ae(Hr),ki}case"changeQuestionScore":{const ki=(0,tt.cloneDeep)(En),_i=ki.item_types.find(oi=>oi.item_type===Nn.payload.itemType);return _i.score=Nn.payload.score,_i.total_score=Ae(_i.item_bank_count*_i.score),ki.examination_bank.total_score=Ae(ki.item_types.reduce((oi,Mi)=>oi+Mi.total_score,0)),ki}case"editRule":{const ki=(0,tt.cloneDeep)(En),_i=ki.item_types.find(oi=>oi.item_type===Nn.payload.itemType);return _i.contents=Nn.payload.tableData.map(oi=>un(Gn({},oi),{item_type:Nn.payload.itemType,random_rule_type:Nn.payload.randomRuleType})),_i.random_rule_type=Nn.payload.randomRuleType,_i.item_bank_count=_i.contents.reduce((oi,Mi)=>oi+(Mi==null?void 0:Mi.quanlity),0),_i.score=_i.score||1,_i.total_score=Ae(_i.item_bank_count*_i.score),ki.examination_bank.question_count=ki.item_types.reduce((oi,Mi)=>oi+Mi.item_bank_count,0),ki.examination_bank.total_score=Ae(ki.item_types.reduce((oi,Mi)=>oi+Mi.total_score,0)),ki}case"addShixun":{const ki=(0,tt.cloneDeep)(En),_i=ki.item_types.find(oi=>oi.item_type==="PRACTICAL");return _i.item_banks=Nn.payload.shixunList,ki.examination_bank.question_count=ki.examination_bank.question_count+1,_i.item_bank_num=_i.item_banks.length,_i.item_bank_count=_i.item_bank_count||1,_i.score=_i.score||1,_i.total_score=_i.total_score||_i.score*_i.item_bank_count,ki.examination_bank.total_score=(Gi=ki==null?void 0:ki.item_types)==null?void 0:Gi.map(oi=>oi.total_score).reduce((oi,Mi)=>oi+Mi),ki}case"deleteShixunQuestion":{const ki=(0,tt.cloneDeep)(En),_i=ki.item_types.find(oi=>oi.item_type==="PRACTICAL");return _i.item_banks=_i.item_banks.filter(oi=>oi.id!==Nn.payload.shixunId),_i.item_bank_num-=1,_i.item_bank_count>_i.item_bank_num&&(_i.item_bank_count-=1,_i.total_score-=_i.score,_i.total_score=Ae(_i.total_score)),ki}}};var xe=pe(86918),ct=Object.defineProperty,Mt=Object.defineProperties,at=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,ft=(En,Nn,ai)=>Nn in En?ct(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):En[Nn]=ai,Gt=(En,Nn)=>{for(var ai in Nn||(Nn={}))Lt.call(Nn,ai)&&ft(En,ai,Nn[ai]);if(qe)for(var ai of qe(Nn))Bt.call(Nn,ai)&&ft(En,ai,Nn[ai]);return En},Sn=(En,Nn)=>Mt(En,at(Nn)),an=(En,Nn,ai)=>new Promise((Qi,Gi)=>{var ki=Mi=>{try{oi(ai.next(Mi))}catch(cr){Gi(cr)}},_i=Mi=>{try{oi(ai.throw(Mi))}catch(cr){Gi(cr)}},oi=Mi=>Mi.done?Qi(Mi.value):Promise.resolve(Mi.value).then(ki,_i);oi((ai=ai.apply(En,Nn)).next())}),zn=({courseOptions:En,setCurrentKey:Nn,loading:ai,form:Qi})=>{const{data:Gi,disabled:ki,dispatch:_i}=(0,le.useContext)(St),oi=(0,Ue.useParams)(),Mi=(0,le.useRef)(!0),[cr,Hr]=(0,le.useState)(!1),ga=(0,le.useMemo)(()=>{var $o,Ua,Ka,No,qr;if(!En.length||!Gi)return;const Fi=($o=Gi==null?void 0:Gi.examination_bank)==null?void 0:$o.sub_discipline_id,eo=((Ua=Gi==null?void 0:Gi.examination_bank)==null?void 0:Ua.time)===-1?void 0:Mi.current?oi.id?(Ka=Gi==null?void 0:Gi.examination_bank)==null?void 0:Ka.time:((No=Gi==null?void 0:Gi.examination_bank)==null?void 0:No.time)||60:(qr=Gi==null?void 0:Gi.examination_bank)==null?void 0:qr.time;Mi.current=!1;let Ko=[];for(const ma of En)for(const ya of ma.children)ya.value===Fi&&(Ko=[ma.value,ya.value]);return Sn(Gt({},Gi.examination_bank),{time:eo,course:Ko})},[Gi,En]);return(0,le.useEffect)(()=>{Qi.setFieldsValue(Gt({},ga))},[ga]),le.createElement(Ct.Z,{spinning:ai,size:"large",style:{position:"fixed",maxHeight:"100vh"},className:"mt30"},le.createElement("div",{className:ke.formWrap},le.createElement(ut.default,{form:Qi,autoComplete:"off",colon:!1,labelCol:{span:4},wrapperCol:{span:20},initialValues:ga||{difficulty:2,time:60},onValuesChange:($o,Ua)=>{const{course:Ka=[]}=Ua,No=Sn(Gt({},Ua),{sub_discipline_id:Ka[1]||0});_i({type:"updateBaseInfo",payload:No})}},le.createElement(ut.default.Item,{name:"name",label:"\u8BD5\u5377\u540D\u79F0",className:ke.baseLineHeight,rules:[{required:!0,validator:($o,Ua)=>{var Ka;return((Ka=Ua==null?void 0:Ua.replaceAll(" ",""))==null?void 0:Ka.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0")}}]},le.createElement(wt.default,{maxLength:60,className:ke.baseFormItem,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",showCount:!0})),le.createElement(ut.default.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B",name:"course",className:ke.baseLineHeight},le.createElement($e.Z,{className:ke.baseFormItem,disabled:ki,size:"large",allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:En,dropdownMenuColumnStyle:{padding:"8px 12px",fontSize:14}})),le.createElement("div",{className:ke.concat},"\u6CA1\u6709\u5408\u9002\u7684\u65B9\u5411&\u8BFE\u7A0B\uFF1F",le.createElement("span",{onClick:()=>Hr(!0)},"\u8054\u7CFB\u6559\u7814\u52A9\u7406")),le.createElement(ut.default.Item,{label:"\u96BE\u5EA6",name:"difficulty",className:ke.radioBtnWrapper,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},le.createElement(Ft.ZP.Group,{disabled:ki,className:ke.radiogroup},le.createElement(Ft.ZP.Button,{className:ke.easy,value:1},"\u7B80\u5355"),le.createElement(Ft.ZP.Button,{className:ke.medium,value:2},"\u9002\u4E2D"),le.createElement(Ft.ZP.Button,{className:ke.hard,value:3},"\u56F0\u96BE"))),le.createElement(ut.default.Item,{label:"\u7B54\u9898\u65F6\u957F",className:ke.baseLineHeight},le.createElement(lt.Z,{align:"middle"},le.createElement(ut.default.Item,{name:"time",noStyle:!0},le.createElement(vt.Z,{className:ke.baseFormItem,min:1,disabled:ki,size:"large",max:9999,style:{width:220},placeholder:"\u8BF7\u586B\u5199\u7B54\u9898\u65F6\u957F"})),le.createElement("span",{style:{marginLeft:"10px",width:"40px",lineHeight:"46px",fontSize:14}},"\u5206\u949F"))),le.createElement(ut.default.Item,{label:"\u8BD5\u5377\u987B\u77E5",name:"exam_notes"},le.createElement(wt.default.TextArea,{rows:6,disabled:ki,maxLength:65535,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u987B\u77E5"})))),le.createElement("div",{className:ke.fixedBottom},le.createElement(Ie.ZP,{className:`${ke.cancelBtn} mr5`,onClick:()=>{oi.id||window.location.href.indexOf("randompaper")>-1?Ue.history.push("/paperlibrary"):Ue.history.push(`/classrooms/${oi.coursesId}/exercise`)}},"\u53D6\u6D88"),le.createElement(Ie.ZP,{className:`${ke.confirmBtn} ml15`,type:"primary",size:"large",onClick:()=>an(void 0,null,function*(){if(yield Qi.validateFields(),!oi.id&&!oi.coursesId){const $o=yield je(Gi);$o.status===0&&(Ue.history.replace(`/randompaper/edit/${$o==null?void 0:$o.examination_bank_id}?type=settings`),Nn("settings"))}else Nn("settings")})},"\u4E0B\u4E00\u6B65")),le.createElement(xe.Z,{open:cr,onCancel:()=>{Hr(!1)}}))},kn=pe(43418),mn=pe(43604),ei={flex_box_center:"flex_box_center___NXYwj",flex_space_between:"flex_space_between___Oy2UZ",flex_box_vertical_center:"flex_box_vertical_center___ybBar",flex_box_center_end:"flex_box_center_end___yyQPf",flex_box_column:"flex_box_column____kuXY",questionInfo:"questionInfo___U9mnu",label:"label___PP7Ng",content:"content___PUXFl",leftPart:"leftPart___uoQeo",rightPart:"rightPart___mCG7H",dragItem:"dragItem___djmPG",blackText:"blackText___KqEaU",greyText:"greyText___VamKm",iconWrapper:"iconWrapper___o1C0y",contentArea:"contentArea___Fj7D0",dragging:"dragging___mX3Il",hidden:"hidden___KWDLK",dragIcon:"dragIcon___yPuB3",deleteIcon:"deleteIcon___go29y",disabled:"disabled___uSK9k",challengeNameWrapper:"challengeNameWrapper___DFjRy",challengeName:"challengeName___m7v0x",shixunPreviewFooter:"shixunPreviewFooter___iaciG",shixunInfoWrapper:"shixunInfoWrapper___aSihg",shixunInfo:"shixunInfo___WYBm1",btnToDetail:"btnToDetail___WVmtj",fixedBottom:"fixedBottom___oeMSX",cancelBtn:"cancelBtn___ac73V",confirmBtn:"confirmBtn___sYh2O",previewBtn:"previewBtn___c2uQz",setScoreModalTable:"setScoreModalTable___kPddX",title:"title___lP1E2",tipcontent:"tipcontent___tV6uE",name:"name___YLyPW",tip:"tip___FYIzt",info:"info___rSdr9",img:"img___ft7eS"},Pi=pe(8797),Hn=pe(85057),bn=pe(24905);const wi=[{label:"\u5355\u9009\u9898",value:"SINGLE"},{label:"\u591A\u9009\u9898",value:"MULTIPLE"},{label:"\u586B\u7A7A\u9898",value:"COMPLETION"},{label:"\u5224\u65AD\u9898",value:"JUDGMENT"},{label:"\u7B80\u7B54\u9898",value:"SUBJECTIVE"},{label:"\u7F16\u7A0B\u9898",value:"PROGRAM"},{label:"\u7EC4\u5408\u9898",value:"COMBINATION"},{label:"\u5B9E\u8BAD\u9898",value:"PRACTICAL"},{label:"\u7A0B\u5E8F\u586B\u7A7A\u9898",value:"BPROGRAM"}];var Hi=({open:En,onCancel:Nn,onOk:ai})=>{const{data:Qi,dispatch:Gi}=(0,le.useContext)(St);(0,le.useEffect)(()=>{if(En){const{item_types:oi}=Qi||{};_i(oi==null?void 0:oi.map(Mi=>Mi.item_type))}},[En,Qi]);const[ki,_i]=(0,le.useState)([]);return le.createElement(kn.default,{title:le.createElement("div",null,"\u9898\u578B\u8BBE\u7F6E",le.createElement("span",{className:"c-grey-333",style:{fontSize:14,fontWeight:400}},"\uFF08\u901A\u8FC7\u52FE\u9009\u53EF\u5BF9\u9898\u578B\u8FDB\u884C\u6DFB\u52A0/\u5220\u9664\uFF09")),closable:!0,centered:!0,open:En,onCancel:Nn,onOk:()=>ai(ki)},le.createElement(bn.default.Group,{value:ki,onChange:oi=>_i(oi)},le.createElement(lt.Z,{gutter:[0,20]},wi.map(oi=>le.createElement(mn.Z,{key:oi.value,span:6},le.createElement(bn.default,{value:oi.value},oi.label))))))},rr=pe(1710),_r=Object.defineProperty,gi=Object.getOwnPropertySymbols,di=Object.prototype.hasOwnProperty,xi=Object.prototype.propertyIsEnumerable,$i=(En,Nn,ai)=>Nn in En?_r(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):En[Nn]=ai,Ri=(En,Nn)=>{for(var ai in Nn||(Nn={}))di.call(Nn,ai)&&$i(En,ai,Nn[ai]);if(gi)for(var ai of gi(Nn))xi.call(Nn,ai)&&$i(En,ai,Nn[ai]);return En},Sr=({open:En,onCancel:Nn,onOk:ai})=>{const{data:Qi}=(0,le.useContext)(St),[Gi,ki]=(0,le.useState)();console.log("--xxx-",Gi),(0,le.useEffect)(()=>{En&&ki((0,tt.cloneDeep)(Qi))},[En,Qi]);const _i=(0,le.useMemo)(()=>{var oi;let Mi;return Mi=(oi=Gi==null?void 0:Gi.item_types)==null?void 0:oi.map(cr=>cr.total_score).reduce((cr,Hr)=>parseFloat(cr)+parseFloat(Hr)),Mi==null?void 0:Mi.toFixed(1)},[Gi]);return En?le.createElement(kn.default,{title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C",open:En,width:640,centered:!0,closable:!0,onCancel:Nn,onOk:()=>{ai(Gi)}},le.createElement("div",{className:"c-black mb20"},"\u603B\u5206",le.createElement("span",{className:"ml10 c-light-primary"},_i)),le.createElement(rr.default,{columns:[{title:"\u9898\u578B\u540D\u79F0",dataIndex:"item_type_text",width:130},{title:"\u5C0F\u9898\u603B\u6570",dataIndex:"item_bank_count",width:130},{title:"\u9898\u578B\u603B\u5206",dataIndex:"total_score",width:130},{title:"\u64CD\u4F5C",render(oi,Mi){const{score:cr,item_type:Hr}=Mi;return le.createElement("div",{style:{color:"#9096A3"}},"\u6BCF",((Mi==null?void 0:Mi.item_type)==="PRACTICAL","\u9898"),le.createElement(vt.Z,{precision:1,size:"large",className:"ml10 mr10",min:.1,disabled:(Mi==null?void 0:Mi.item_bank_count)===0,max:100,onChange:ga=>{const $o=Gi,Ua=$o.item_types.find(No=>No.item_type===Hr);Ua.score=Number(ga);const Ka=ga*Ua.item_bank_count;Ua.total_score=Ka&&Number(Ka.toFixed(1)),$o.examination_bank.total_score=$o.item_types.reduce((No,qr)=>Number(No)+Number(qr.total_score),0),ki(Ri({},$o))}}),"\u5206")}}],className:ei.setScoreModalTable,dataSource:Gi==null?void 0:Gi.item_types,rowKey:"item_type",pagination:!1})):null},Ne=pe(99313),Ci=pe(57809),wr=pe(17574),Pn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAtFJREFUWEftWL9rU1EYPffFpCCKEEEJVUQHB10qAUHFHwguDg4ORRDq4uDg4CBIJ6GD0D/B3UEFJ5cugjbQChIqokWKClVrFDGIg2B8yZX3Xl/z/O5LzvfyKhTJXV7g/jrfOfc797sx1toCNnAzQ4A51RkymJNA/CcMvpoYhf0xDWtPwqICWEKM+QSYGgojt3Hw3mweFjmD9YlR+N8WAJSdjYwBrAWCb1oL+jzvMbzSFKoPBgLKAc6dugPbuRDtHzAXgGEMxmjjsXEAYr4MMOw2DcA8wcjWG6g+XOEAZ8c+wNpKtCXZMI+WMn6DJrbsOMQBPtrr9ySM4ZX9LEApkOfd5QBntvvhuhqFswKOz2/wDQWSZ9o0FADLfji5fBTYPwmUduYVMmV+IrLWF2DpFtCcizDTu3hmFeCBKaC4LR2cJpvjMZrwfn8HFm8qATan/bWslWckq6SuTyWcIfi5allrkmsY/DoZSZzanCwQo0REAwTIJf583e9txNIWic9p5E2OCQilZ7BxzY/8L60RSqRkcgnHqKXERgFw5eq/80EagIbB91cSPigilMabNWmYD6okXr7cZdABIAE7Gv6dpfIuZxJDI/G7S32ymJx6CoDP50ny5mIXIJPQ2Y8kEVVEw+DSeCKLWbkldlQA6JZwaZe9BuDr8xkAZjU6Pp5LvHiu9xmkWej6Wt8KXOK1VuGDL89272IaMLv6yAID3cUvzvS5SZyQyZOAZZl7hrnEz0/rjZoxzAhOyUEOcOFEH6MWhDGCWAApPs8B1o/p68GsANgbRVVRPzu8fvVg5gA0xcLTsV/wCtF/iKz6cABkfBfL+Z12m0tc2/cWXnFPODf3zZCxmOj4yxzg/O4qWv48LDwHIHOZrO/i5HoGHRQ3HeEAg0m1ShWtn/dh27tgUAilTqOUMcyqm7AfbZjCR5Q2j+N4o64DOMDhXq8pQ4B5mdzwDP4B5kHmZrL/eyAAAAAASUVORK5CYII=",Si="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA4RJREFUWEftWEtrE1EYPXfSh5VWSlMfNSi4sokLK30pWtuKIChVVBBBWpfiRhcKghii7tp/4FrBBxREXbhQ0Bj7gqokahe+kNZWqa21tLGtk7kymY5J79yZL5NUKNLZZHHnzj33fOec+90wzrkHS/hhywBzrM4ygzkSiP+EwTdtPvDJdnDeCI4KgBPEsGGAPYOn8Bq23A7nwiLNYH+bD+rYSwBlloUYAzgH9F/Zo48pyhMoBVdR3ZkVUBpgV9MNcO24sb7OnA6GYtBEa75rbkCYL24wOcxGAPYUhSUXUH3/Cw0wXDUIziuMJYkFc6mluH+GcRSv2UYDfLxJtSWMwiuOUxsUC6Qot2iAD71q8ruZVNgtYFO/+m+yQKKm2UgGAMvU5GTvbqDyClC4LmUMuw+LTFiYdNDC7FdgIASMG57KHGDNdSB/tVyKltIJAESmRHziBmZHgf5WlwBrb6bihFrQmkdpCSDRiiyu+ozgyJzBujtpy1Jiy9XOAPqOuQRY35mKP8qdFvELBFJu1qH1HnUL8K59iV0DFtwqc3PPIQnAH+3noGmXAK1k4YnhxoaS8joqQgFYOaBUAlBSedbTIgCcuLwBc78+SW3qWnJUzkjG8/yAZ3Nqd937BYDfghvB4x+NQJ5vAMycozRvOVOF+Rk1FaVAkQEquX73PkmJh89EwXngn5+5dhsuPgwopYYZu/ZKAA6dDkLTQhaAlhKLDAsvuJWE+X5RDbCi1jBjpEkCcPCsH4mpmKXEVIksbZiAkDxz5zWZVwaUnjS6pkiDTcx8aI2CscCCRtStJqmjzKmtLD8FeLxAZKcNwPcnguCJ0II1SAYERJSJnUxX0gysagbC2+0YbPNDnY79rZrk6LR+n0DkRsP5a4GK80C4xuEkeXswCvCAfaOawV3E1K2+DGUaUeO+i4AlB9NpeX0gCGihpA6zeahcpBB7W4Bo0IHBgSN+zP2MGVuX1ZiihHKJOC5IpMAHfH7gAFAfetUYBUcgGwIXZc73d0BixqEffNGQ5mYi1yjCSFdLKhIfA6ZHHQBGm/2YmYpJ2bAEN4nAmVRZjKmzwOQQcWnq3focnNdTBwV9n88yhuKj95xb/i5/HdSpRwBbmfpXIRPTCIS5ycF0U3o8O+g7SWR9FebiHeCJXQArkNdKYIiqODXO2G9A6cCeiRANcFEsmf1HlgFmz50xc8kz+AfHHTJwrKNsNwAAAABJRU5ErkJggg==",Wi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABWlJREFUWEftV1tsVEUY/ubspUu3W9mWGlttwXqJVRNBbqIFDbyA8mCCkAYtpEaIGBODhBCECiG+UE1EnzTempYqtSAE45saBMX40JC0IRojpd1GKM1uW7bd7V7OOWPmnD3bPTNndxYbE2I6L2dzdubMN9/3/ZchlFIXbuNB5gDOUp05BmdJIP4fDPZcxt2xaRzVgadBUQ3QDDEE5m/2zBkE1whwoYTg461LcX42LEoZZOCiMXoJoBUCHEIASgH2dBqUgijKORfBkW3/EqgUYNsPieMAmtj+Fhb2NIfFXvaFnUhCQBlI6wD8dGcBrisEP5V7fft2NuJvKcC9p6PDoLSa7cwTJgKejZj8WjLm93iWSAG2tI+qEsdlvywl6BZPqBByQgpw44fDKskEAQUF+82e5rBrxCvGz7fWZr+XkZ/ZwFTIbgkKel0K8LkPhlW2uLbSh9UNQfh9btGLIrIZ7E7WyDkaf8xYQsX538cwHE4YgKUAnz0WMgC+/EwNSn1uR5MVEcxZ/xbjUgbyi3PXDNNLAW44FjIk3rOxNpvtCseuCEFCMGcUc/2734YMFaQA178fUhlDB56vy+4s27AYlgrOocA7Z0IG60UDPLypLm8BEQBncnc2X3ITijng4ZMhM8vK+kHGIIuyI5sXZgsGn//ECmOvgMJ8rgA5/f92T8hM8rkAX/psZI+u4yClesAWhhLNhPTBpSMhfeSkF7eLoP5OHzY8FoSizGzU+vWQmXosgLvPTNTGJpNXi8lvPF4hPwoZW0YZsKw+gMWLSrMV1ASYE8V7e27WTUwnB7IzsrFVjOXzdDVWOpfgY+YO+j3YvKrCWMEkP9g9ZHjeJvErnaN9oHhYgCSrYQ5F2echKPcpSGkUE9PU3vXkMeWWJxcg6HcZAA+cGDIosgHc0THaqun0EN8ViFFqdij5SlTT8jKsa5gHJdPF/DaQwCcXotkCme+8y+/zY1m937D/W19yHmSs7eoeb0gm0v1Wi2QBEGpuAcm8buCjF6tmWqyMHPu/iWAkahQlseZm0lKw1I2mRlPm/V2D9iCxZG1pH+2j4GR2KB1lJaaE8TSTUDf88kiNB2sfKsWCMgWlXgVVARfG4xp+/iuBU72xmca7gGW2NlYaMu/vYgxyaYaBbGkPt+pUP5Trw1xGa4Nu7FhdjkULPBlDUwxGVLgVgsFIGj/+MY0rYdXwzzwvQTzFOiDHi4Fj9K14wI+V9/uxr3PQuZLs6hxviKnpfttVI+fERzdVoPoOsWmYiGt4ozsCncnFA+JeFGp0KwJuNK+pwL6OPBKzYzV/npHZoZN/74UK3OUAMJ7S8VpXBJoRsPYgEhBLskLzmkq0nR7OX+q2t4fNaHYYtUEXdq4O4N6MxGzKnzfSiExpqJnvRm8oiYtXkhiJasZqj8vMMCqzaebAsvbsiQf9OHXxRv5+kEXzZFzvt+5qgiQEmO8jhseSGjAW0w0wJW7g8Tovnqovgb+EGO+XLvTCRYBITEd3bxy/DqREQrnmojLgRt/VMaN7z9ssNLeP94GPZotR2d2CECy5x40315XZNIgldbz61U15aSLASHgSqqblB9hyfKpV07WMzHaXi3lS3NPrAnav9ePRGjOgVI3i5KUEvrucEm6HfFix2h6dnMbNqen8AHd1pxpiyWS/mS0lYSncj2cWVJURBHwEI1Ed8VQ+8sSoSasqro9OFL40beuM/UIpXSnczvjbF387484jK+VODDL/3QiPny3YsG7vGFsRT+rfE5BSC6QjB7IWWfY/91FrrwRRV0k76i2fhhcnk2obqN4IQrxOAGWevEV8UIiS1iltO/t69SEpQHnI/bcz5gDOlt/bnsF/AOXAMnuF/cdAAAAAAElFTkSuQmCC",qi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABpxJREFUWAntWE2IHFUQrtfzk5nNbrKbRGPcRSU/oIEkmERjMAQhCBIjKBpFEBER9OZNL4IevOhFbyGHRA9BhKBeouJFIkTNwaxGg16ikN1k0WR3M5ndnf/ptr56r7p7+s1mkYCHkILpev1e1VdfVb3X0zNEt+Qmr4Dpl9+xs9FYq0XvR0SPUETriC9WYI6x72YML0T0By99Gxj68KWd5k/ndEPKiwRy7RadZSKrDEdDVGiRxfnZ9YjJM1MTUScydIwn371Roh7BD042P2Hg5xHRxRON+6R6WlE7m1wzGRjT4ZnTjNOFjQkYIbQ68UlGURhSYIIpTu7k6N7CkWeN6XoE3zoxP8WMuK22kemG6ngxel4CWQeubpw1AmQrkFpnyx9HVg/uy8MuLbPV5uJ7DuloUDhlA8hWSAxS8SSEZy6zi152V2pX3/YJzjVlH8EtYkTDUaAhOobuJ0vZL7XuJWzoKY9gtd6JY5eKAQ0PFOL7/2NQqbWp0eKNCjFmk0fQVsvQ2Opl9Pj2NZQPeGdnWpu5jbtu68zA2uV4QsIll+sAdPigfPXzNF2cafKBCo1HUFF2bRiikQEmx/If9042H49vdm9qTKsDenD9EE1O263mbaaDhy7FeWf3jBe5F5mXe5+b+gyFhiy17rWKK+NVcGQ5ppRjpheZW680/oQQSy5LAiSmGHGpPYKyB/WUZnurvFUDJD32eodFJQXjrGAN4nQ2Hq/4BGHsgtrHChKxAH38BT6+wED8LUCOt/CejSW6czhPF2badPqvJoUO2/o4ew0Y+yaE+xBkVwkEniBrd5KScEsOnwNo1TCjY5fQ6/uG6b51RXWlLWMNOvxdNaZD/J2GEKLF340dP+xZe0xjCPBxQTmIjqHtx67DRIiKDTuDUMb+3jsKPeQQYufdJRrjaiqezR/xgKGYVgM/5ItHEJZog22FHSuCEOZ1DQAbjPvZryz1gWYeQ2XMW0ahBOEYrPFhuFhjDDuvxWBtATi4GCUat7Ls5j0DVwW8tYyOeNBUa4Z0/nLbJQ8QJGu1XlMvd2LnoaQN4NQryBxi9YbbCrRpbYGa7Yh+mWzS7EKXxlbl6ZWHV9DalTn6+twC7V5f4q/LHE3Pd+nIqSrV2VYF1dfvd8xl97yts1o7/eLRf7B1RbSWCaSd5zdmem3vCtrFwVVanYjOTDTpgXuW0e9TLfr4hzmaWQhlew4WDc01JbwUfTF8zGtM4GLcp4JYSiRLDisHtg70kMNcMW+kWsfPzNOJX2uYEkELQQ6CVwCQcK8C8ThNGHYaE9ojCAPZu6xxOBEAGqLjvZvKdqLPFb7qn11WcjEhDNheW6b40BAsewR1EQYIJKApB8ytkJMIC1/WDuX8STfjYJIK4fWfA+BngIiOEdSJ9ywAAQAJmBvrhM5NzCbvjAqk+mKlI4kJDjuoRuI6hsYHotreKTNoe8I9grZmzkDqx4YwFgerPxtfYGAXwSLLFXMHdwzS09uXU6nAGFwe+ZpEmVJjzOm8aqwLpNM69vqx9ck337G8AML8BTsQQKHNL7CX50KavNqljbfnaYDfuiHnptr03jfX6O9qSAe2DNCjm8s034hocrbLEIa2jRVp22iRupxXpY7kBK1HG7wcY4a1EHerMqmXFz6aZW9bHWTBCbmHaTLGHATrq5YbarSJai2usbMt86+EJ7aW6bHNJZq61qU5JrplNPnp8OlPNfryHL8xS1/QFRsPsBg5eMH3WyzRYcJ5S0ZWy5grqho/cjG+WjdU51+/adsG3x8fb9AbX1TlEZMmx8D0zP1ld9A4TioeyTcvYoOWxfcJCrEcB0T3Edhqm5clvtg4TRLjGX4c/jblH6h8ztCawRwFjI1tBI0PyKoW4nzvPWZ03zE7tgGhRMf1tx2xPHt6wlNI2a0b/g/k/BV9hgiUXOq8HS5ei43iPSQJ8r6xiVocv4JBwJ79K5WtEOx0Tny0XdD8QfXPT0f0+dmWvKWAHfbqoe8b1MafGpKN0xiLn2r2z+X0GS6JyeW5o5VmPhfIW2b2y5xduDh44CABFqhUBa9nP1xGWw1dqoRUcy8M6JD6CF7mVLbDqOW1uF5vjpeK+YfEYQkCWYYZc4HQyxU+6Veqeme1Jpuc4t4CNFqdcY9g1yzbX2/WL+QCM9QLhzstl90/S1fUdg2FgWQT6EVLbNHpThjNhaa8Hz6e7DgcFVbPTxwNcrk9JgqH9bBkCWYDZPh7uNmWanuhVfhIVaIwOjUzeNfLZ141XPdbcpNX4F/ikyqlsA/6bwAAAABJRU5ErkJggg==",$n={ruleCheckBox:"ruleCheckBox___Onj2f",folderAreaWrapper:"folderAreaWrapper___ut2mr",folderAreaHeader:"folderAreaHeader___fOIDA",folderWrapper:"folderWrapper___IpJ50",folderIcon:"folderIcon___zBoRM",shareFolderIcon:"shareFolderIcon____5s3p",treeNodeItem:"treeNodeItem___quqla",treeNodeDifficulty:"treeNodeDifficulty___en0gk"},qn=pe(16149),Zt=Object.defineProperty,$t=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,on=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,ht=(En,Nn,ai)=>Nn in En?Zt(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):En[Nn]=ai,en=(En,Nn)=>{for(var ai in Nn||(Nn={}))cn.call(Nn,ai)&&ht(En,ai,Nn[ai]);if(on)for(var ai of on(Nn))At.call(Nn,ai)&&ht(En,ai,Nn[ai]);return En},fn=(En,Nn)=>$t(En,Qe(Nn)),Rn=(En,Nn,ai)=>new Promise((Qi,Gi)=>{var ki=Mi=>{try{oi(ai.next(Mi))}catch(cr){Gi(cr)}},_i=Mi=>{try{oi(ai.throw(Mi))}catch(cr){Gi(cr)}},oi=Mi=>Mi.done?Qi(Mi.value):Promise.resolve(Mi.value).then(ki,_i);oi((ai=ai.apply(En,Nn)).next())});const Qn=(En,Nn,ai)=>En.map(Qi=>Qi.key===Nn?en(en({},Qi),ai):Qi.children?fn(en({},Qi),{children:Qn(Qi.children,Nn,ai)}):Qi),Et={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3},wn=(En,Nn,ai)=>En.map(Qi=>{var Gi;const ki=Qi==null?void 0:Qi.tag_disciplines.map(oi=>{const Mi=oi==null?void 0:oi.difficulty_count.map(cr=>({label:cr==null?void 0:cr.name,value:Et[cr.name]}));return{title:Ze(Nn)===Dt.All&&Mi.length>0?le.createElement(lt.Z,{justify:"space-between"},le.createElement(mn.Z,null,`${oi.name}\uFF08${oi.child_count}\uFF09`),le.createElement(mn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"diffValue"]},le.createElement(bn.default.Group,{style:{columnGap:12},options:Mi})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"diffNum"],initialValue:oi==null?void 0:oi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"extra"],initialValue:fn(en({},Qi),{type:ai})},le.createElement("input",{type:"hidden"})))):`${oi.name}\uFF08${oi.child_count}\uFF09`,key:`${Qi.id}_${oi.id}`,name:oi.name,parentName:Qi.name,item_banks_count:oi.child_count,icon:null,isLeaf:!0,checkable:Ze(Nn)===Dt.FileFolderAndKnowledge,disableCheckbox:oi.child_count===0}}),_i=Qi==null?void 0:Qi.difficulty_count.map(oi=>({label:oi==null?void 0:oi.name,value:Et[oi.name]}));return{title:Ze(Nn)===Dt.FileFolderAndDiff&&_i.length>0?le.createElement(lt.Z,{justify:"space-between"},le.createElement(mn.Z,null,`${Qi.name}\uFF08${Qi.item_banks_count}\uFF09`),le.createElement(mn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}`,"diffValue"]},le.createElement(bn.default.Group,{style:{columnGap:12},options:_i})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}`,"diffNum"],initialValue:Qi==null?void 0:Qi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}`,"extra"],initialValue:fn(en({},Qi),{type:ai})},le.createElement("input",{type:"hidden"})))):`${Qi.name}\uFF08${Qi.item_banks_count}\uFF09`,key:`${Qi.id}`,name:Qi.name,item_banks_count:Qi.item_banks_count,icon:oi=>oi.expanded?ai==="0"?le.createElement("img",{src:Si,className:$n.folderIcon}):le.createElement("img",{src:Wi,className:$n.shareFolderIcon}):ai==="0"?le.createElement("img",{src:Pn,className:$n.folderIcon}):le.createElement("img",{src:qi,className:$n.shareFolderIcon}),isLeaf:!Qi.have_child&&!((Gi=Qi.tag_disciplines)!=null&&Gi.length),checkable:Ze(Nn)===Dt.OnlyFileFolder,disableCheckbox:Qi.item_banks_count===0,children:Qi.children.length?Ze(Nn)===Dt.All||Ze(Nn)===Dt.FileFolderAndKnowledge?[...wn(Qi.children,Nn,ai),...ki]:wn(Qi.children,Nn,ai):[]}}),Kn=(En,Nn,ai)=>En.map(Qi=>{var Gi;const ki=Qi==null?void 0:Qi.tag_disciplines.map(oi=>{console.log("tagItem:",oi);const Mi=oi==null?void 0:oi.difficulty_count.map(cr=>({label:cr==null?void 0:cr.name,value:Et[cr.name]}));return{title:Ze(Nn)===Dt.All&&Mi.length>0?le.createElement(lt.Z,{justify:"space-between"},le.createElement(mn.Z,null,`${oi.name}\uFF08${oi.child_count}\uFF09`),le.createElement(mn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"diffValue"]},le.createElement(bn.default.Group,{style:{columnGap:12},options:Mi})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"diffNum"],initialValue:oi==null?void 0:oi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"extra"],initialValue:fn(en({},Qi),{type:ai})},le.createElement("input",{type:"hidden"})))):`${oi.name}\uFF08${oi.child_count}\uFF09`,key:`${Qi.id}_${oi.id}`,name:oi.name,parentName:Qi.name,item_banks_count:oi.child_count,icon:null,isLeaf:!0,checkable:Ze(Nn)===Dt.FileFolderAndKnowledge,disableCheckbox:oi.child_count===0}}),_i=Qi==null?void 0:Qi.difficulty_count.map(oi=>({label:oi==null?void 0:oi.name,value:Et[oi.name]}));return{title:Ze(Nn)===Dt.FileFolderAndDiff&&_i.length>0?le.createElement(lt.Z,{justify:"space-between"},le.createElement(mn.Z,null,`${Qi.name}\uFF08${Qi.item_banks_count}\uFF09`),le.createElement(mn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}`,"diffValue"]},le.createElement(bn.default.Group,{style:{columnGap:12},options:_i})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}`,"diffNum"],initialValue:Qi==null?void 0:Qi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Qi.id}`,"extra"],initialValue:fn(en({},Qi),{type:ai})},le.createElement("input",{type:"hidden"})))):`${Qi.name}\uFF08${Qi.item_banks_count}\uFF09`,key:`${Qi.id}`,name:Qi.name,item_banks_count:Qi.item_banks_count,icon:oi=>oi.expanded?ai==="0"?le.createElement("img",{src:Si,className:$n.folderIcon}):le.createElement("img",{src:Wi,className:$n.shareFolderIcon}):ai==="0"?le.createElement("img",{src:Pn,className:$n.folderIcon}):le.createElement("img",{src:qi,className:$n.shareFolderIcon}),isLeaf:!Qi.have_child&&!((Gi=Qi.tag_disciplines)!=null&&Gi.length),checkable:Ze(Nn)===Dt.OnlyFileFolder,disableCheckbox:Qi.item_banks_count===0,children:[...Kn(Qi.children,Nn,ai),...ki]}});var tn=({ruleValue:En,defaultData:Nn,setSelectData:ai,currentItemType:Qi,selectData:Gi})=>{const[ki,_i]=(0,le.useState)("1"),[oi,Mi]=(0,le.useState)(!0),[cr]=ut.default.useForm(),[Hr,ga]=(0,le.useState)([]),[$o,Ua]=(0,le.useState)("all"),Ka=(Qt,lr,Ir)=>{const{checkedNodes:mr}=lr;console.log("type:",Ir,mr,Gi),Ir==="0"?(qr(Qt),Ze(En)===Dt.OnlyFileFolder?(ai(ur=>fn(en({},ur),{my:mr.map(Bi=>({id:Bi.key,group_id:Bi.key,group_name:Bi.name,item_bank_num:Bi.item_banks_count,folderType:"0",quanlity:1}))})),nt(mr.reduce((ur,Bi)=>ur+Bi.item_banks_count,0))):(console.log(mr),ai(ur=>fn(en({},ur),{my:mr.map(Bi=>{const[Pr,to]=Bi.key.split("_");return{id:Bi.key,tag_discipline_name:Bi.name,group_id:Pr,tag_discipline_id:to,folderType:"0",group_name:Bi.parentName,item_bank_num:Bi.item_banks_count,quanlity:1}})})),nt(mr.reduce((ur,Bi)=>ur+Bi.item_banks_count,0)))):(eo(Qt),Ze(En)===Dt.OnlyFileFolder?ai(ur=>(console.log("pre:",ur),fn(en({},ur),{public:mr.map(Bi=>({id:Bi.key==="0"?"00":Bi.key,teacher_group_name:Bi.name,teacher_group_id:Bi.key,folderType:"3",item_bank_num:Bi.item_banks_count,quanlity:1}))}))):ai(ur=>fn(en({},ur),{public:mr.map(Bi=>{const[Pr,to]=Bi.key.split("_");return{id:Bi.key==="0"?"00":Bi.key,tag_discipline_name:Bi.name,teacher_group_id:Pr,tag_discipline_id:to,folderType:"3",teacher_group_name:Bi.parentName,item_bank_num:Bi.item_banks_count,quanlity:1}})})),nt(mr.reduce((ur,Bi)=>ur+Bi.item_banks_count,0)))},[No,qr]=(0,le.useState)([]),[Fi,eo]=(0,le.useState)([]),[Ko,ma]=(0,le.useState)([]),[ya,bo]=(0,le.useState)([]),[oa,Io]=(0,le.useState)([]),[Dr,Da]=(0,le.useState)([]),[Ha,La]=(0,le.useState)(!1),[fl,xu]=(0,le.useState)(!1);function Jt(){return Rn(this,null,function*(){let Qt=yield(0,te.ZP)("/api/teach_group_shares.json",{method:"get"});Qt&&ga(Qt==null?void 0:Qt.groups)})}(0,le.useEffect)(()=>{Jt()},[]);const Yt=Qt=>Rn(void 0,null,function*(){var lr,Ir,mr,ur,Bi,Pr,to,So,fr,pr,vr,ji;Qt.type==="0"?La(!0):xu(!0);const Ai=yield(0,qn.ex)(Qt);Qt.type==="0"?La(!1):xu(!1),Qt.type==="0"?Io(Ai):Da(Ai);const Wr=(lr=Ai.navigation[0])==null?void 0:lr.difficulty_count.map(Br=>({label:Br==null?void 0:Br.name,value:Et[Br.name]})),zo=(Ir=Ai.navigation[0])==null?void 0:Ir.tag_disciplines.map(Br=>{const Er=Br==null?void 0:Br.difficulty_count.map(Or=>({label:Or==null?void 0:Or.name,value:Et[Or.name]}));return{title:Ze(En)===Dt.All&&Er.length>0?le.createElement(lt.Z,{justify:"space-between",style:{color:"#232B40"}},le.createElement(mn.Z,null,`${Br.name}\uFF08${Br.child_count}\uFF09`),le.createElement(mn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:[`0_${Br.id}`,"diffValue"]},le.createElement(bn.default.Group,{style:{columnGap:12},options:Er})),le.createElement(ut.default.Item,{noStyle:!0,name:[`0_${Br.id}`,"diffNum"],initialValue:Br==null?void 0:Br.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:[`0_${Br.id}`,"extra"],initialValue:{tag_discipline_name:Br.name,name:"\u6839\u76EE\u5F55",type:Qt.type}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},Br.name,"\uFF08",Br.child_count,"\uFF09"),key:`0_${Br.id}`,name:Br.name,parentName:"\u6839\u76EE\u5F55",item_banks_count:Br.child_count,icon:null,isLeaf:!0,checkable:Ze(En)===Dt.FileFolderAndKnowledge,disableCheckbox:Br.child_count===0}});if(Qt.type==="0"){const Br=wn(Ai.data,En,"0"),Er=Kn(Ai.data,En,"0");console.log("normalChildren2:",Er),ma([{title:Ze(En)===Dt.FileFolderAndDiff?le.createElement(lt.Z,{justify:"space-between",style:{color:"#232B40"}},le.createElement(mn.Z,null,`\u6839\u76EE\u5F55\uFF08${(mr=Ai.navigation[0])==null?void 0:mr.child_count}\uFF09`),le.createElement(mn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:["0","diffValue"],initialValue:[]},le.createElement(bn.default.Group,{style:{columnGap:12},options:Wr})),le.createElement(ut.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(ur=Ai.navigation[0])==null?void 0:ur.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:["0","extra"],initialValue:{type:"0",group_id:"0",name:"\u6839\u76EE\u5F55"}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},`\u6839\u76EE\u5F55\uFF08${(Bi=Ai.navigation[0])==null?void 0:Bi.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(Pr=Ai.navigation[0])==null?void 0:Pr.child_count,disabled:!(((to=Ai.navigation[0])==null?void 0:to.child_count)>0),checkable:Ze(En)===Dt.OnlyFileFolder,icon:Or=>Or.expanded?le.createElement("img",{src:Si,className:$n.folderIcon}):le.createElement("img",{src:Pn,className:$n.folderIcon}),isLeaf:!1,children:Ze(En)===Dt.OnlyFileFolder||Ze(En)===Dt.FileFolderAndDiff?Br:[...Er,...zo]}])}else{const Br=wn(Ai.data,En,"3");bo([{title:Ze(En)===Dt.FileFolderAndDiff?le.createElement(lt.Z,{justify:"space-between"},le.createElement(mn.Z,null,`\u6839\u76EE\u5F55\uFF08${(So=Ai.navigation[0])==null?void 0:So.child_count}\uFF09`),le.createElement(mn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:["0","diffValue"]},le.createElement(bn.default.Group,{style:{columnGap:12},options:Wr})),le.createElement(ut.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(fr=Ai.navigation[0])==null?void 0:fr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:["0","extra"],initialValue:{type:"3",group_id:"0",name:"\u6839\u76EE\u5F55"}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},`\u6839\u76EE\u5F55\uFF08${(pr=Ai.navigation[0])==null?void 0:pr.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(vr=Ai.navigation[0])==null?void 0:vr.child_count,checkable:Ze(En)===Dt.OnlyFileFolder,icon:Er=>Er.expanded?le.createElement("img",{src:Wi,className:$n.shareFolderIcon}):le.createElement("img",{src:qi,className:$n.shareFolderIcon}),isLeaf:!1,disabled:!(((ji=Ai.navigation[0])==null?void 0:ji.child_count)>0),children:Ze(En)===Dt.OnlyFileFolder||Ze(En)===Dt.FileFolderAndDiff?Br:[...Br,...zo]}])}});(0,le.useEffect)(()=>{ki==="1"?Yt({type:"0",group_id:0,item_type:Qi,show_children:!0}):ki==="2"&&Yt({type:"3",except_mine:!0,item_type:Qi,show_children:!0,teach_group_id:$o==="all"?"":$o})},[En,ki,$o]),(0,le.useEffect)(()=>{var Qt,lr,Ir,mr,ur,Bi,Pr,to,So,fr,pr,vr;console.log("selectData-active:",Gi,Nn,ki),ki==="1"?(qr((Qt=Gi==null?void 0:Gi.my)==null?void 0:Qt.map(ji=>ji.id)),nt(((Ir=(lr=Gi==null?void 0:Gi.my)==null?void 0:lr.reduce)==null?void 0:Ir.call(lr,(ji,Ai)=>ji+Ai.item_bank_num,0))||0)):ki==="2"&&(eo((mr=Gi==null?void 0:Gi.public)==null?void 0:mr.map(ji=>ji.id)),nt(((Bi=(ur=Gi==null?void 0:Gi.public)==null?void 0:ur.reduce)==null?void 0:Bi.call(ur,(ji,Ai)=>ji+Ai.item_bank_num,0))||0)),Ze(En)===Dt.All&&(ki==="1"?(qr((Pr=Gi==null?void 0:Gi.my)==null?void 0:Pr.map(ji=>ji.id)),nt((Gi==null?void 0:Gi.filter(ji=>!ji.is_share).reduce((ji,Ai)=>ji+Ai.item_bank_num,0))||0),(to=Gi==null?void 0:Gi.filter(ji=>!ji.is_share))==null||to.forEach(ji=>{const Ai=cr.getFieldValue([`${ji.group_id||0}_${ji.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Ai),Ai!=null&&Ai.includes[ji.difficulty]||cr.setFieldValue([`${ji.group_id||0}_${ji.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Ai,ji.difficulty])))})):ki==="2"&&(eo((So=Gi==null?void 0:Gi.public)==null?void 0:So.map(ji=>ji.id)),nt((Gi==null?void 0:Gi.filter(ji=>!!ji.is_share).reduce((ji,Ai)=>ji+Ai.item_bank_num,0))||0),(fr=Gi==null?void 0:Gi.filter(ji=>!!ji.is_share))==null||fr.forEach(ji=>{const Ai=cr.getFieldValue([`${ji.teacher_group_id||0}_${ji.tag_discipline_id}`,"diffValue"])||[];Ai!=null&&Ai.includes[ji.difficulty]||cr.setFieldValue([`${ji.teacher_group_id||0}_${ji.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Ai,ji.difficulty])))}))),Ze(En)===Dt.FileFolderAndDiff&&(cr.resetFields(),setTimeout(()=>{ai(Gi)},300),ki==="1"?(nt((Gi==null?void 0:Gi.filter(ji=>!ji.is_share).reduce((ji,Ai)=>ji+Ai.item_bank_num,0))||0),(pr=Gi==null?void 0:Gi.filter(ji=>!ji.is_share))==null||pr.forEach(ji=>{const Ai=cr.getFieldValue([`${ji.group_id}`,"diffValue"])||[];console.log("prev:",Ai),Ai!=null&&Ai.includes[ji.difficulty]||cr.setFieldValue([`${ji.group_id}`,"diffValue"],Array.from(new Set([...Ai,ji.difficulty])))})):(nt((Gi==null?void 0:Gi.filter(ji=>!!ji.is_share).reduce((ji,Ai)=>ji+Ai.item_bank_num,0))||0),(vr=Gi==null?void 0:Gi.filter(ji=>!!ji.is_share))==null||vr.forEach(ji=>{const Ai=cr.getFieldValue([`${ji.teacher_group_id}`,"diffValue"])||[];Ai!=null&&Ai.includes[ji.difficulty]||cr.setFieldValue([`${ji.teacher_group_id}`,"diffValue"],Array.from(new Set([...Ai,ji.difficulty])))})))},[ki]),console.log("1111111111:",No,Fi),(0,le.useEffect)(()=>{setTimeout(()=>{var Qt,lr,Ir,mr,ur;switch(Ze(En)){case Dt.OnlyFileFolder:{const Bi=[],Pr=[];for(const to of Gi.my||[])Bi.push(to);for(const to of Gi.public||[])Pr.push(to);qr(Bi.map(to=>`${to.group_id}`)),eo(Pr.map(to=>`${to.teacher_group_id}`)),nt(ki==="1"?Bi.reduce((to,So)=>to+So.item_bank_num,0):Pr.reduce((to,So)=>to+So.item_bank_num,0));break}case Dt.FileFolderAndKnowledge:{const Bi=[],Pr=[];for(const to of(Gi==null?void 0:Gi.my)||[])Bi.push(to);for(const to of(Gi==null?void 0:Gi.public)||[])Pr.push(to);nt((Qt=ki==="1"?Bi:Pr)==null?void 0:Qt.reduce((to,So)=>to+So.item_bank_num,0)),qr(Bi.map(to=>`${to.group_id}_${to.tag_discipline_id}`)),eo(Pr.map(to=>`${to.teacher_group_id}_${to.tag_discipline_id}`));break}case Dt.All:{ki==="1"?(nt((Gi==null?void 0:Gi.filter(Bi=>!Bi.is_share).reduce((Bi,Pr)=>Bi+Pr.item_bank_num,0))||0),(lr=Gi==null?void 0:Gi.filter(Bi=>!Bi.is_share))==null||lr.forEach(Bi=>{const Pr=cr.getFieldValue([`${Bi.group_id||0}_${Bi.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Pr,Bi.difficulty,Bi),Pr!=null&&Pr.includes[Bi.difficulty]||cr.setFieldValue([`${Bi.group_id||0}_${Bi.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Pr,Bi.difficulty])))})):(nt((Gi==null?void 0:Gi.filter(Bi=>!!Bi.is_share).reduce((Bi,Pr)=>Bi+Pr.item_bank_num,0))||0),(Ir=Gi==null?void 0:Gi.filter(Bi=>!!Bi.is_share))==null||Ir.forEach(Bi=>{const Pr=cr.getFieldValue([`${Bi.group_id||0}_${Bi.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Pr,Bi.difficulty,Bi),Pr!=null&&Pr.includes[Bi.difficulty]||cr.setFieldValue([`${Bi.group_id||0}_${Bi.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Pr,Bi.difficulty])))}));break}case Dt.FileFolderAndDiff:{ki==="1"?(nt((Gi==null?void 0:Gi.filter(Bi=>!Bi.is_share).reduce((Bi,Pr)=>Bi+Pr.item_bank_num,0))||0),(mr=Gi==null?void 0:Gi.filter(Bi=>!Bi.is_share))==null||mr.forEach(Bi=>{const Pr=cr.getFieldValue([`${Bi.group_id}`,"diffValue"])||[];console.log("prev:",Pr,Bi.difficulty),Pr!=null&&Pr.includes[Bi.difficulty]||cr.setFieldValue([`${Bi.group_id}`,"diffValue"],Array.from(new Set([...Pr,Bi.difficulty])))})):(nt((Gi==null?void 0:Gi.filter(Bi=>!!Bi.is_share).reduce((Bi,Pr)=>Bi+Pr.item_bank_num,0))||0),(ur=Gi==null?void 0:Gi.filter(Bi=>!!Bi.is_share))==null||ur.forEach(Bi=>{const Pr=cr.getFieldValue([`${Bi.group_id}`,"diffValue"])||[];Pr!=null&&Pr.includes[Bi.difficulty]||cr.setFieldValue([`${Bi.group_id}`,"diffValue"],Array.from(new Set([...Pr,Bi.difficulty])))}));break}}},800)},[Nn,En,Ko,ya]);const[Dn,nt]=(0,le.useState)(0);return le.createElement(ut.default,{form:cr,onValuesChange:(Qt,lr)=>Rn(void 0,null,function*(){var Ir,mr,ur,Bi;console.log("onValuesChange:",lr,Qt);let Pr=0;if(Ze(En)===Dt.FileFolderAndDiff){const to=yield cr.getFieldValue(),So=[],fr=[];for(const vr of Object.keys(to))if((mr=(Ir=to[vr])==null?void 0:Ir.diffValue)!=null&&mr.length&&vr!=="null"&&vr!==null){const ji=to[vr];So.push(en({id:vr},ji))}const pr={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"};So.map(vr=>{var ji,Ai,Wr,zo,Br;vr.id==0&&(vr.diffNum=ki==="1"?(Ai=(ji=oa==null?void 0:oa.navigation)==null?void 0:ji[0])==null?void 0:Ai.difficulty_count:(zo=(Wr=Dr==null?void 0:Dr.navigation)==null?void 0:Wr[0])==null?void 0:zo.difficulty_count),(Br=vr==null?void 0:vr.diffValue)==null||Br.map(Er=>{var Or,kr,gr,Aa,_o;const xa={group_name:((Or=vr.extra)==null?void 0:Or.name)||"",teacher_group_name:"",id:`${vr.id}_${Er}`,group_id:vr.id,difficulty:Er,item_bank_num:(Aa=(gr=(kr=vr.diffNum)==null?void 0:kr.filter(Wa=>Wa.name===pr[Er]))==null?void 0:gr[0])==null?void 0:Aa.value};ki==="2"&&(xa.is_share=!0,xa.teacher_group_id=vr.id,xa.teacher_group_name=(_o=vr.extra)==null?void 0:_o.name),fr.push(xa)})}),Pr=fr.reduce((vr,ji)=>vr+ji.item_bank_num,0),ai([...fr,...Gi==null?void 0:Gi.filter(vr=>ki==="1"?vr.is_share:!vr.is_share)])}else if(Ze(En)===Dt.All){const to=[];for(const So of Object.keys(lr)){const{diffNum:fr=[],diffValue:pr=[],extra:vr={}}=lr[So];console.log("---",vr);const[ji,Ai]=So.split("_");let Wr=(Bi=(ur=vr.tag_disciplines)==null?void 0:ur.filter(zo=>parseInt(zo.id)===parseInt(Ai)))==null?void 0:Bi[0];pr.forEach(zo=>{var Br;const Er={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},Or=(Br=fr==null?void 0:fr.find(gr=>gr.name===Er[zo]))==null?void 0:Br.value,kr={group_name:"",teacher_group_name:"",tag_discipline_name:(Wr==null?void 0:Wr.name)||vr.tag_discipline_name,id:`${So}_${zo}`,group_id:ji,is_share:!!(Wr!=null&&Wr.is_share||(vr==null?void 0:vr.type)==="3"),tag_discipline_id:Ai,difficulty:zo,item_bank_num:Or};Pr+=Or,vr.type==="0"?kr.group_name=vr.name:kr.teacher_group_name=vr.name,ki==="2"&&(kr.is_share=!0,kr.teacher_group_id=vr.id||0,kr.teacher_group_name=vr.name),Or>0&&to.push(kr)})}ai([...to,...Gi==null?void 0:Gi.filter(So=>ki==="1"?So.is_share:!So.is_share)])}nt(Pr)})},le.createElement(Ne.default,{destroyInactiveTabPane:!0,activeKey:ki,onChange:Qt=>_i(Qt),style:{minHeight:260},tabBarExtraContent:{right:ki==="2"&&(Hr==null?void 0:Hr.length)>0&&le.createElement(Ci.default,{onChange:Qt=>{Ua(Qt)},value:$o,style:{width:120}},le.createElement(Ci.default.Option,{key:"all",value:"all"},"\u5168\u90E8"),Hr==null?void 0:Hr.map(Qt=>le.createElement(Ci.default.Option,{key:Qt==null?void 0:Qt.group_id,value:Qt==null?void 0:Qt.group_id},Qt==null?void 0:Qt.name)))},items:[{key:"1",label:"\u6211\u521B\u5EFA\u7684",children:(Ko==null?void 0:Ko.length)===0?le.createElement(Ct.Z,{spinning:Ha},le.createElement(Pi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):le.createElement("div",{className:$n.folderAreaWrapper},le.createElement(lt.Z,{justify:"space-between",align:"middle",className:$n.folderAreaHeader},le.createElement("span",null,"\u6587\u4EF6\u5939"),le.createElement("span",{className:"mr20"},"\u5DF2\u9009",le.createElement("span",{style:{color:"#3061D0"}}," ",Dn," "),"\u9898")),le.createElement(Ct.Z,{spinning:Ha},le.createElement("div",{style:{minHeight:200}},Ko.length>0&&le.createElement(wr.default,{checkable:!0,className:$n.folderWrapper,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},selectable:!1,onCheck:(Qt,lr)=>Ka(Qt,lr,"0"),checkedKeys:No,checkStrictly:!0,treeData:Ko,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))},{key:"2",label:"\u56E2\u961F\u5171\u4EAB",children:(ya==null?void 0:ya.length)===0?le.createElement(Ct.Z,{spinning:fl},le.createElement(Pi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):le.createElement("div",{className:$n.folderAreaWrapper},le.createElement(lt.Z,{justify:"space-between",align:"middle",className:$n.folderAreaHeader},le.createElement("span",null,"\u6587\u4EF6\u5939"),le.createElement("span",{className:"mr20"},"\u5DF2\u9009",le.createElement("span",{style:{color:"#3061D0"}}," ",Dn||0," "),"\u9898")),le.createElement(Ct.Z,{spinning:fl},le.createElement("div",{style:{minHeight:200}},(ya==null?void 0:ya.length)>0&&le.createElement(wr.default,{checkable:!0,className:$n.folderWrapper,selectable:!1,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},onCheck:(Qt,lr)=>Ka(Qt,lr,"3"),checkedKeys:Fi,checkStrictly:!0,treeData:ya,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))}]}))},sn=pe(26422),In=pe(83312),Oi=Object.defineProperty,Di=Object.defineProperties,vi=Object.getOwnPropertyDescriptors,Ti=Object.getOwnPropertySymbols,Li=Object.prototype.hasOwnProperty,sr=Object.prototype.propertyIsEnumerable,Zr=(En,Nn,ai)=>Nn in En?Oi(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):En[Nn]=ai,Vr=(En,Nn)=>{for(var ai in Nn||(Nn={}))Li.call(Nn,ai)&&Zr(En,ai,Nn[ai]);if(Ti)for(var ai of Ti(Nn))sr.call(Nn,ai)&&Zr(En,ai,Nn[ai]);return En},Tn=(En,Nn)=>Di(En,vi(Nn)),Po=(En,Nn,ai)=>new Promise((Qi,Gi)=>{var ki=Mi=>{try{oi(ai.next(Mi))}catch(cr){Gi(cr)}},_i=Mi=>{try{oi(ai.throw(Mi))}catch(cr){Gi(cr)}},oi=Mi=>Mi.done?Qi(Mi.value):Promise.resolve(Mi.value).then(ki,_i);oi((ai=ai.apply(En,Nn)).next())});const Xr={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var Cn=({ruleValue:En,setSelectData:Nn,currentItemType:ai,defaultData:Qi,isFirst:Gi})=>{const[ki,_i]=(0,le.useState)([]),[oi,Mi,cr,Hr]=(0,In.U)(Xe,{source:"question",page:1,per_page:10,group_id:0,keyword:"",group_type:0,clazz:"ItemBanksGroup",sub_discipline_id:void 0,item_type:ai,show_children:!0});(0,le.useEffect)(()=>{Po(void 0,null,function*(){const Fi=yield cr({},!0);_i((0,sn.L)(Fi.disciplines))})},[]),console.log(Qi),(0,le.useEffect)(()=>{if(Gi)switch(Ze(En)){case Dt.OnlyKnowledge:{No(Qi.map(Fi=>Fi.tag_discipline_id));break}case Dt.KnowledgeAndDiff:{const Fi=new Map;Qi.forEach(eo=>{eo&&(Fi.has(eo.tag_discipline_id)?Fi.set(eo.tag_discipline_id,[...Fi.get(eo.tag_discipline_id),eo.difficulty]):Fi.set(eo.tag_discipline_id,[eo.difficulty]))});for(const[eo,Ko]of Fi.entries())ga.setFieldValue([eo,"diff"],Ko);break}}},[Qi,En,Gi]);const[ga]=ut.default.useForm(),$o=(0,le.useMemo)(()=>{const Fi=[];let eo="",Ko="";const ma={};for(const ya of(Hr==null?void 0:Hr.disciplines)||[]){eo=ya.name;for(const bo of ya.sub_disciplines){Ko=bo.name;for(const oa of bo.tag_disciplines){const Io={sub_discipline_name:`${eo}&${Ko}`,sub_discipline_id:bo.id,tag_discipline_name:oa.name,id:oa.id,item_bank_num:oa.total_count,difficulty_count:oa.difficulty_count,tag_discipline_id:oa.id};Fi.push(Io)}}}return Fi},[Hr,Qi]),Ua=[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",show:!0,render:(Fi,eo)=>{const{item_bank_num:Ko}=eo;return le.createElement("div",null,Fi,`(${Ko})`)}},{title:"\u65B9\u5411&\u8BFE\u7A0B",dataIndex:"sub_discipline_name",ellipsis:!0,show:!0},{title:"\u96BE\u5EA6",width:"35%",show:En.includes(_n.Difficulty),render:(Fi,eo)=>{const{id:Ko,difficulty_count:ma,total_count:ya,sub_discipline_name:bo,tag_discipline_name:oa}=eo;return le.createElement(le.Fragment,null,le.createElement(ut.default.Item,{name:[Ko,"diff"],noStyle:!0},le.createElement(bn.default.Group,{style:{columnGap:12},options:ma.map(Io=>({label:Io.name,value:Xr[Io.name]}))})),le.createElement(ut.default.Item,{name:[Ko,"extra"],initialValue:{difficulty_count:ma,total_count:ya,sub_discipline_name:bo,tag_discipline_name:oa},noStyle:!0},le.createElement("input",{type:"hidden"})))}}].filter(Fi=>Fi.show),[Ka,No]=(0,le.useState)([]),qr=(0,le.useRef)(new Map);return le.createElement("div",{style:{marginTop:12}},le.createElement(lt.Z,{className:"mb20",align:"middle",gutter:20},le.createElement(mn.Z,null,le.createElement($e.Z,{placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",size:"large",style:{width:240},options:ki,onChange:Fi=>{cr({sub_discipline_id:Fi==null?void 0:Fi[1]})}})),le.createElement(mn.Z,null,le.createElement(Hn.t7,{style:{width:300},placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\u8FDB\u884C\u641C\u7D22",value:oi.keyword,onChange:Fi=>cr({keyword:Fi})}))),le.createElement(ut.default,{form:ga,onValuesChange:(Fi,eo)=>{var Ko;console.log(eo),qr.current.clear();for(const ma of Object.keys(eo)){const ya={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},bo=eo[ma],{difficulty_count:oa,total_count:Io}=bo.extra||{};(Ko=bo==null?void 0:bo.diff)==null||Ko.forEach(Dr=>{var Da;const Ha=(Da=oa==null?void 0:oa.find(fl=>fl.name===ya[Dr]))==null?void 0:Da.value,La=Tn(Vr({},bo.extra),{id:`${ma}_${Dr}`,difficulty:Dr,item_bank_num:Ha,tag_discipline_id:ma});Ha>0&&qr.current.set(`${ma}_${Dr}`,La)})}Nn([...qr.current.values()])}},($o==null?void 0:$o.length)===0?le.createElement(Pi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")}):le.createElement(rr.default,{rowSelection:Ze(En)===Dt.OnlyKnowledge?{preserveSelectedRowKeys:!0,type:"checkbox",onChange(Fi,eo){console.log("table-selectedRowKeys:",Fi,eo),No(Fi),Nn(eo)},getCheckboxProps:Fi=>({disabled:Fi.item_bank_num===0}),selectedRowKeys:Ka}:void 0,columns:Ua,dataSource:$o,loading:Mi,scroll:{y:480},rowKey:"id",pagination:!1})))},ri=Object.defineProperty,Yi=Object.defineProperties,yr=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,zr=(En,Nn,ai)=>Nn in En?ri(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):En[Nn]=ai,Tr=(En,Nn)=>{for(var ai in Nn||(Nn={}))Fr.call(Nn,ai)&&zr(En,ai,Nn[ai]);if(er)for(var ai of er(Nn))Ur.call(Nn,ai)&&zr(En,ai,Nn[ai]);return En},Yr=(En,Nn)=>Yi(En,yr(Nn)),Un=(En,Nn,ai)=>new Promise((Qi,Gi)=>{var ki=Mi=>{try{oi(ai.next(Mi))}catch(cr){Gi(cr)}},_i=Mi=>{try{oi(ai.throw(Mi))}catch(cr){Gi(cr)}},oi=Mi=>Mi.done?Qi(Mi.value):Promise.resolve(Mi.value).then(ki,_i);oi((ai=ai.apply(En,Nn)).next())});const Ho={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var Ao=({open:En,onCancel:Nn,setVisibleModalType:ai,currentItemType:Qi})=>{var Gi;const{data:ki,dispatch:_i}=(0,le.useContext)(St),[oi,Mi]=(0,le.useState)([]),[cr,Hr]=(0,le.useState)(),ga=(Gi=ki==null?void 0:ki.item_types)==null?void 0:Gi.find(Ko=>Ko.item_type===Qi);(0,le.useEffect)(()=>{var Ko,ma,ya;if(En){const bo=(Ko=ki==null?void 0:ki.item_types)==null?void 0:Ko.find(oa=>oa.item_type===Qi);if((bo==null?void 0:bo.random_rule_type)!==Dt.Shixun){const oa=Zn[bo==null?void 0:bo.random_rule_type]||[];Mi(oa);const Io=(ya=(ma=ki==null?void 0:ki.item_types)==null?void 0:ma.find(Dr=>Dr.item_type===Qi))==null?void 0:ya.contents;switch(console.log("----xxx",Ze(oa)),Ze(oa)){case Dt.OnlyDifficulty:{No(Io.map(Dr=>Dr.difficulty));break}case Dt.OnlyFileFolder:{No({my:Io==null?void 0:Io.filter(Dr=>parseInt(Dr.teacher_group_id)!=="NaN"&&!Dr.teacher_group_id&&Dr.teacher_group_id!==0),public:Io==null?void 0:Io.filter(Dr=>parseInt(Dr.teacher_group_id)>=0)}),Hr({my:Io==null?void 0:Io.filter(Dr=>parseInt(Dr.teacher_group_id)!=="NaN"&&!Dr.teacher_group_id&&Dr.teacher_group_id!==0),public:Io==null?void 0:Io.filter(Dr=>parseInt(Dr.teacher_group_id)>=0)});break}case Dt.FileFolderAndKnowledge:{No({my:Io==null?void 0:Io.filter(Dr=>parseInt(Dr.teacher_group_id)!=="NaN"&&!Dr.teacher_group_id&&Dr.teacher_group_id!==0),public:Io==null?void 0:Io.filter(Dr=>parseInt(Dr.teacher_group_id)>=0)}),Hr({my:Io==null?void 0:Io.filter(Dr=>parseInt(Dr.teacher_group_id)!=="NaN"&&!Dr.teacher_group_id&&Dr.teacher_group_id!==0),public:Io==null?void 0:Io.filter(Dr=>parseInt(Dr.teacher_group_id)>=0)});break}case Dt.FileFolderAndDiff:{No(Io),Hr(Io);break}case Dt.All:{No(Io),Hr(Io);break}default:No(Io)}}}},[En]);const[$o,Ua]=(0,le.useState)([]);(0,le.useEffect)(()=>{En&&Ye({item_type:Qi}).then(Ko=>{Ko.status===0&&Ua(Ko.data)})},[En]),(0,le.useEffect)(()=>{console.log("selectData",cr)},[cr]);const[Ka,No]=(0,le.useState)(),[qr,Fi]=(0,le.useState)(!0);console.log("isFirst:",qr);const eo=Ko=>{Mi(Ko),Hr([]),No([]),Fi(!1)};return le.createElement(kn.default,{title:"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219",width:948,closable:!0,centered:!0,open:En,onCancel:Nn,destroyOnClose:!0,onOk:()=>Un(void 0,null,function*(){var Ko,ma,ya,bo,oa,Io,Dr;if(cr===void 0){ai("");return}if(Object.prototype.toString.call(cr)==="[object Object]"&&!((Ko=cr.my)!=null&&Ko.length)&&!((ma=cr.public)!=null&&ma.length)){We.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if(!Object.keys(cr).length&&!(cr!=null&&cr.length)){We.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}const Da=Ze(oi);switch(Da){case Dt.OnlyFileFolder:{_i({type:"editRule",payload:{itemType:Qi,tableData:[...cr.my||[],...cr.public||[]],randomRuleType:Da}});break}case Dt.OnlyDifficulty:{const Ha=(bo=(ya=ki==null?void 0:ki.item_types)==null?void 0:ya.find(fl=>fl.item_type===Qi))==null?void 0:bo.contents;let La=[{},{value:(oa=$o.find(fl=>fl.name==="\u7B80\u5355"))==null?void 0:oa.value},{value:(Io=$o.find(fl=>fl.name==="\u9002\u4E2D"))==null?void 0:Io.value},{value:(Dr=$o.find(fl=>fl.name==="\u56F0\u96BE"))==null?void 0:Dr.value}];_i({type:"editRule",payload:{itemType:Qi,tableData:cr.map((fl,xu)=>{var Jt,Yt,Dn,nt;return{difficulty:fl,id:xu,quanlity:((Yt=(Jt=Ha==null?void 0:Ha.filter(Qt=>Qt.id===xu))==null?void 0:Jt[0])==null?void 0:Yt.quanlity)||1,item_bank_num:($o==null?void 0:$o.length)===1?(Dn=$o[0])==null?void 0:Dn.value:(nt=La==null?void 0:La[fl])==null?void 0:nt.value}}),randomRuleType:Da}});break}case Dt.OnlyKnowledge:{_i({type:"editRule",payload:{itemType:Qi,tableData:cr.map(Ha=>Yr(Tr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Da}});break}case Dt.KnowledgeAndDiff:{_i({type:"editRule",payload:{itemType:Qi,tableData:cr.map(Ha=>Yr(Tr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Da}});break}case Dt.FileFolderAndDiff:{_i({type:"editRule",payload:{itemType:Qi,tableData:cr.map(Ha=>Yr(Tr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Da}});break}case Dt.FileFolderAndKnowledge:{_i({type:"editRule",payload:{itemType:Qi,tableData:[...cr.my||[],...cr.public||[]],randomRuleType:Da}});break}case Dt.All:{_i({type:"editRule",payload:{itemType:Qi,tableData:cr.map(Ha=>Yr(Tr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Da}});break}}ai("")})},le.createElement(bn.default.Group,{className:`${$n.ruleCheckBox}`,style:{marginBottom:8},value:oi,onChange:Ko=>{var ma;oi!=null&&oi.length&&((ma=ga==null?void 0:ga.contents)==null?void 0:ma.length)>0?kn.default.confirm({title:"\u63D0\u793A",content:"\u5207\u6362\u89C4\u5219\u540E\uFF0C\u4E4B\u524D\u7684\u62BD\u9898\u914D\u7F6E\u5C06\u88AB\u6E05\u7A7A\uFF01",okText:"\u7ACB\u5373\u5207\u6362",cancelText:"\u6682\u4E0D\u5207\u6362",onOk:()=>eo(Ko)}):eo(Ko)},options:[{label:"\u6307\u5B9A\u6587\u4EF6\u5939\u62BD\u9898",value:_n.FileFolder},{label:"\u6307\u5B9A\u96BE\u5EA6\u62BD\u9898",value:_n.Difficulty},{label:"\u6307\u5B9A\u77E5\u8BC6\u70B9\u62BD\u9898",value:_n.Knowledge}]}),oi.includes(_n.FileFolder)?le.createElement(tn,{defaultData:Ka,selectData:cr,ruleValue:oi,setSelectData:Hr,currentItemType:Qi}):oi.includes(_n.Knowledge)?le.createElement(Cn,{defaultData:Ka,isFirst:qr,ruleValue:oi,setSelectData:Hr,currentItemType:Qi}):oi.includes(_n.Difficulty)?le.createElement("div",{style:{marginTop:12}},le.createElement("span",{className:"mr20",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(bn.default.Group,{style:{columnGap:12},options:$o.map(Ko=>({label:Ko.name,value:Ho[Ko.name]})),value:cr||Ka,onChange:Ko=>Hr(Ko)})):null)},nr=({open:En,onCancel:Nn,setVisibleModalType:ai,currentItemType:Qi})=>En?le.createElement(Ao,{open:En,onCancel:Nn,setVisibleModalType:ai,currentItemType:Qi}):null,qo=pe(6848),Go=pe(94860),Lr=pe(92365),br=pe(85149),mo=pe(955),Yo=pe(61485),Ki=pe(32570),sa=({open:En,onCancel:Nn,onOk:ai})=>{const{data:Qi}=(0,le.useContext)(St),Gi=(0,Go.g)(),[ki,_i,oi,Mi]=(0,In.U)(Lr.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[cr,Hr]=(0,le.useState)(!1);(0,le.useEffect)(()=>{if(En){oi({page:1,limit:10,type:0},!0).then(qr=>{(qr==null?void 0:qr.shixuns_count)===0&&Hr(!0)});const No=Qi.item_types.find(qr=>qr.item_type==="PRACTICAL");$o(No.item_banks.map(qr=>qr.id)),Ka(No.item_banks)}},[En,Qi]);const[ga,$o]=(0,le.useState)([]),[Ua,Ka]=(0,le.useState)([]);return le.createElement(kn.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:En,width:948,centered:!0,closable:!0,onCancel:Nn,onOk:()=>ai(Ua),destroyOnClose:!0},le.createElement(lt.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},le.createElement(mn.Z,null,le.createElement($e.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:Gi,onChange:No=>{oi({page:1,discipline_id:No==null?void 0:No[0],sub_discipline_id:No==null?void 0:No[1]})}}),le.createElement(Ci.default,{className:"ml20",style:{width:118},size:"large",placeholder:"\u96BE\u5EA6",allowClear:!0,options:[{label:"\u521D\u7EA7",value:1},{label:"\u4E2D\u7EA7",value:2},{label:"\u4E2D\u9AD8\u7EA7",value:3},{label:"\u9AD8\u7EA7",value:4}],onChange:No=>oi({page:1,diff:No})}),le.createElement(Ci.default,{className:"ml20",placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"large",allowClear:!0,options:[{label:"\u672A\u53D1\u5E03",value:"unpublish"},{label:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{label:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],onChange:No=>oi({page:1,shixun_publish_status:No})})),le.createElement(Hn.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:No=>{oi({keyword:No,page:1})}})),cr?le.createElement("div",null,le.createElement(Pi.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,mo.xg)("/shixuns")})):le.createElement(rr.default,{loading:_i,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(No,qr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:qr!=null&&qr.high_resources_consume?ei.title:"",title:No||"--"},le.createElement(br.Z,{key:1,showLines:1,showTextOnly:!0,value:No||"--"})),(qr==null?void 0:qr.high_resources_consume)&&le.createElement(Ki.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(No,qr,Fi)=>le.createElement("span",null,No||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:le.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",le.createElement(qo.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},le.createElement(Yo.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(No,qr,Fi)=>le.createElement("span",null,No||"- -")},{title:"\u64CD\u4F5C",render(No,qr){const{title:Fi,challenge_names:eo,author_name:Ko,identifier:ma,author_school_name:ya,study_count:bo}=qr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{kn.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(br.Z,{value:Fi,style:{marginBottom:18}}),le.createElement("div",{className:ei.challengeNameWrapper},eo.map((oa,Io)=>le.createElement("div",{className:ei.challengeName,key:Io},"\u7B2C",(0,mo.EM)(Io+1),"\u9898\xA0",oa))),le.createElement(lt.Z,{className:ei.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(mn.Z,{className:ei.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:ei.shixunInfo},Ko.split("\u3001")[0]),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:ei.shixunInfo},ya),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:ei.shixunInfo},bo)),le.createElement(Ie.ZP,{type:"primary",className:ei.btnToDetail,onClick:()=>(0,mo.xg)(`/shixuns/${ma}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(qr==null?void 0:qr.shixun_tag_num)===1&&le.createElement("a",{target:"_blank",href:`/shixuns/${qr==null?void 0:qr.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:Mi==null?void 0:Mi.items,rowSelection:{selectedRowKeys:ga,preserveSelectedRowKeys:!0,getCheckboxProps:No=>({disabled:No.shixun_tag_num===1}),onChange(No,qr){var Fi,eo,Ko;console.log(No),$o(No);const ma=[];for(const bo of Ua)No.includes(bo.id)&&ma.push(bo);const ya=ma.map(bo=>bo.id);for(const bo of qr)bo&&No.includes(bo.id)&&!ya.includes(bo.id)&&ma.push({id:bo.id,difficulty:bo.level,identifier:bo.identifier,name:bo.name,real_name:(Fi=bo==null?void 0:bo.author_name)==null?void 0:Fi.split("\u3001")[0],school_name:bo.author_school_name,challenge_names:bo.challenge_names,challenges:(eo=bo.challenge_names)==null?void 0:eo.map((oa,Io)=>({subject:oa,id:Io,score:5})),score:((Ko=bo.challenge_names)==null?void 0:Ko.length)*5,study_count:bo.study_count,challenges_count:bo.challenges_count});Ka(ma)}},pagination:{current:ki.page,pageSize:ki.limit,total:Mi==null?void 0:Mi.items_count,showTotal:No=>le.createElement("span",null,"\u5171\xA0",le.createElement("span",{style:{color:"#165DFF"}},No),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(No,qr){oi({page:No,limit:qr})},size:"default"},scroll:{y:400}}))},va=pe(54203),Ma=pe(59301),hs=Object.defineProperty,Ga=Object.defineProperties,Lo=Object.getOwnPropertyDescriptors,po=Object.getOwnPropertySymbols,la=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,Na=(En,Nn,ai)=>Nn in En?hs(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):En[Nn]=ai,os=(En,Nn)=>{for(var ai in Nn||(Nn={}))la.call(Nn,ai)&&Na(En,ai,Nn[ai]);if(po)for(var ai of po(Nn))Eo.call(Nn,ai)&&Na(En,ai,Nn[ai]);return En},xo=(En,Nn)=>Ga(En,Lo(Nn)),pi=({onDelete:En,list:Nn,onSelect:ai})=>{const[Qi,Gi]=(0,le.useState)(!1),{dispatch:ki,disabled:_i}=(0,le.useContext)(St),oi=($o,Ua,Ka)=>{const No=Array.from($o),[qr]=No.splice(Ua,1);return No.splice(Ka,0,qr),No},[Mi,cr]=(0,le.useState)(null),[Hr,ga]=(0,le.useState)(!1);return Ma.createElement(va.Z5,{onDragStart:()=>{ga(!0)},onDragEnd:$o=>{if(ga(!1),!$o.destination)return;const Ua=oi(Nn,$o.source.index,$o.destination.index);ki({type:"updateItemTypes",payload:Ua})}},Ma.createElement(va.bK,{droppableId:"droppable"},($o,Ua)=>Ma.createElement("div",xo(os({},$o.droppableProps),{ref:$o.innerRef}),Ma.createElement(Ct.Z,{spinning:Qi},Nn.map((Ka,No)=>Ma.createElement(va._l,{key:No,draggableId:No.toString(),index:No,isDragDisabled:Mi!==Ka.item_type},(qr,Fi)=>Ma.createElement(lt.Z,xo(os(os({align:"middle",wrap:!1,ref:qr.innerRef},qr.draggableProps),qr.dragHandleProps),{className:`${ei.dragItem} ${Hr?ei.dragging:""}`}),Ma.createElement(mn.Z,{className:ei.contentArea,onClick:()=>{ai(Ka.item_type),(0,mo.k3)()}},Ma.createElement("span",{className:ei.blackText},(0,mo.EM)(No+1),"\u3001\u3010",Ka.item_type_text,"\u3011"),Ma.createElement(qo.Z,{title:`\uFF08${Ka.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(Ka.total_score).toFixed(1)}\u5206\uFF09`},Ma.createElement("span",{className:ei.greyText},`\uFF08${Ka.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(Ka.total_score).toFixed(1)}\u5206\uFF09`))),!_i&&Ma.createElement(Ma.Fragment,null,Ma.createElement(qo.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F",open:Mi===Ka.item_type&&!Hr},Ma.createElement("div",{style:{cursor:"grab"},className:`${ei.iconWrapper} ${Hr?ei.hidden:""}`,onMouseEnter:()=>{cr(Ka.item_type)},onMouseLeave:()=>cr(null)},Ma.createElement("i",{className:`iconfont icon-tuodong1 ${ei.dragIcon}`}))),Ma.createElement(qo.Z,{title:"\u5220\u9664"},Ma.createElement("div",{className:`${ei.iconWrapper} ${Hr?ei.hidden:""}`,style:{cursor:"pointer"},onClick:()=>En(Ka.item_type)},Ma.createElement("i",{className:`iconfont icon-shanchu12 ${ei.deleteIcon}`})))))))),$o.placeholder)))},io=pe(10777),ro={flex_box_center:"flex_box_center___ppkzA",flex_space_between:"flex_space_between___Z1syx",flex_box_vertical_center:"flex_box_vertical_center___twJ9S",flex_box_center_end:"flex_box_center_end___uI0uW",flex_box_column:"flex_box_column___JRp7D",timelineWrapper:"timelineWrapper___LP9aM",title:"title___KUHj_",desc:"desc___ubc8E",titles:"titles___njkjf",questionDetailWrapper:"questionDetailWrapper___p4SFM",questionTitle:"questionTitle___JC9X6",questionScoreInfo:"questionScoreInfo___NgOJI",deleteIcon:"deleteIcon___oMVTN",deleteBtn:"deleteBtn___JUPEl",normalText:"normalText___FW9Y_",folderIcon:"folderIcon___gvacQ",challengeNameWrapper:"challengeNameWrapper___fG7Vv",challengeName:"challengeName___Ia1Xs",shixunPreviewFooter:"shixunPreviewFooter___rKsnN",shixunInfoWrapper:"shixunInfoWrapper___FEnDb",shixunInfo:"shixunInfo___TbrA2",btnToDetail:"btnToDetail___dqLQP",q_title:"q_title___qnv4p"},Ja=pe(73631),Ca=pe(31328);const fa=(En,Nn,ai,Qi)=>{const Gi={[Dt.OnlyDifficulty]:[{title:"\u96BE\u5EA6",key:"difficulty",render(ki,_i){const{difficulty:oi}=_i;return le.createElement("span",{style:{color:Pe[oi].color}},Pe[oi].label)}}],[Dt.OnlyKnowledge]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u65B9\u5411&\u8BFE\u7A0B",dataIndex:"sub_discipline_name",width:180,ellipsis:{showTitle:!0},render(ki,_i){return`${ki}`}}],[Dt.OnlyFileFolder]:[{title:"\u6587\u4EF6\u5939",render(ki,_i,oi){const{group_name:Mi,teacher_group_name:cr}=_i,Hr=Mi||cr,ga=cr?Ca:Ja;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:ga,className:ro.folderIcon})," ",le.createElement(qo.Z,{title:Hr},le.createElement("span",{className:ro.titles},Hr)))}},{title:"\u7C7B\u578B",render(ki,_i){const{teacher_group_name:oi}=_i;return le.createElement("span",null,oi?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[Dt.KnowledgeAndDiff]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:{showTitle:!0}},{title:"\u65B9\u5411&\u8BFE\u7A0B",width:180,dataIndex:"sub_discipline_name",ellipsis:{showTitle:!0}},{title:"\u96BE\u5EA6",key:"difficulty",render(ki,_i){const{difficulty:oi}=_i;return le.createElement("span",{style:{color:Pe[oi].color}},Pe[oi].label)}}],[Dt.FileFolderAndKnowledge]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render(ki,_i){const{group_name:oi,teacher_group_name:Mi}=_i,cr=oi||Mi,Hr=Mi?Ca:Ja;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:Hr,className:ro.folderIcon})," ",le.createElement(qo.Z,{title:cr},le.createElement("span",{className:ro.titles},cr)))}},{title:"\u7C7B\u578B",render(ki,_i){const{teacher_group_name:oi}=_i;return le.createElement("span",null,oi?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[Dt.FileFolderAndDiff]:[{title:"\u6587\u4EF6\u5939",render(ki,_i){const{group_name:oi,teacher_group_name:Mi}=_i,cr=oi||Mi,Hr=Mi?Ca:Ja;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:Hr,className:ro.folderIcon})," ",le.createElement(qo.Z,{title:cr},le.createElement("span",{className:ro.titles},cr)))}},{title:"\u7C7B\u578B",render(ki,_i){const{teacher_group_name:oi}=_i;return le.createElement("span",null,oi?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render(ki,_i){const{difficulty:oi}=_i;return le.createElement("span",{style:{color:Pe[oi].color}},Pe[oi].label)}}],[Dt.All]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render(ki,_i){const{group_name:oi,teacher_group_name:Mi,teacher_group_id:cr}=_i,Hr=oi||Mi,ga=cr||cr===0?Ca:Ja;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:ga,className:ro.folderIcon})," ",le.createElement(qo.Z,{title:Hr},le.createElement("span",{className:ro.titles},Hr)))}},{title:"\u7C7B\u578B",render(ki,_i){const{teacher_group_id:oi}=_i;return le.createElement("span",null,oi||oi===0?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render(ki,_i){const{difficulty:oi}=_i;return le.createElement("span",{style:{color:Pe[oi].color}},Pe[oi].label)}}],[Dt.Shixun]:[]};for(const ki of Object.values(Gi))ki.push({title:"\u62BD\u9898\u6570\u91CF",key:"quanlity",render(_i,oi){const{item_bank_num:Mi,quanlity:cr,id:Hr,teacher_group_id:ga}=oi||{};return le.createElement(lt.Z,{align:"middle"},le.createElement(vt.Z,{disabled:Qi,min:1,max:Mi,size:"large",precision:0,value:cr,onChange:$o=>{Nn({type:"changeQuestionNum",payload:{itemType:ai,id:Hr,num:$o,teacher_group_id:ga}})}}),le.createElement("span",{className:"ml10 font14",style:{color:"#333333"}},"/",Mi))}},{title:"\u64CD\u4F5C",key:"action",align:"right",render(_i,oi){const{id:Mi,is_share:cr}=oi;return Qi?le.createElement("span",{className:"cursorNotAllowed c-grey-999"},"\u5220\u9664"):le.createElement("span",{className:ro.deleteBtn,onClick:()=>{Nn({type:"deleteRule",payload:{itemType:ai,id:Mi,is_share:cr}})}},"\u5220\u9664")}});return Gi[En]},$a=({setVisibleModalType:En})=>{var Nn,ai,Qi,Gi;const{data:ki,dispatch:_i,disabled:oi}=(0,le.useContext)(St),Mi=(Nn=ki==null?void 0:ki.item_types)==null?void 0:Nn.find(cr=>cr.item_type==="PRACTICAL");return le.createElement(io.Z,{className:ro.timelineWrapper,items:[{children:le.createElement("div",{style:{transform:"translateY(-4px)"}},le.createElement(lt.Z,{className:"mb20",align:"middle",justify:"space-between"},le.createElement(mn.Z,null,le.createElement("span",{className:ro.title},"\u9898\u5E93\u9009\u9898"),le.createElement("span",{className:ro.desc},"\uFF08\u9700\u8981\u5148\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9\u5B9E\u8BAD\u9898\uFF0C\u518D\u8BBE\u7F6E\u4ECE\u5DF2\u9009\u5B9E\u8BAD\u9898\u4E2D\u968F\u673A\u62BD\u9898\u7684\u6570\u91CF\uFF09")),!oi&&le.createElement(Hn.op,{style:{width:102},onClick:()=>En("selectShixun")},"\u4ECE\u9898\u5E93\u9009\u62E9")),((ai=Mi==null?void 0:Mi.item_banks)==null?void 0:ai.length)===0?le.createElement(Pi.Z,{customText:"\u6682\u65E0\u5F85\u62BD\u8BD5\u9898\uFF0C\u8BF7\u5148\u4ECE\u9898\u5E93\u8FDB\u884C\u9009\u62E9\uFF5E"}):le.createElement(rr.default,{rowKey:"id",className:"mb10",columns:[{title:"\u5E8F\u53F7",width:60,render(cr,Hr,ga){return le.createElement("span",null,ga+1)}},{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"40%",ellipsis:{showTitle:!0},render:(cr,Hr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:Hr!=null&&Hr.high_resources_consume?ro.q_title:"",title:cr||"--"},le.createElement(br.Z,{key:1,showLines:1,showTextOnly:!0,value:cr})),(Hr==null?void 0:Hr.high_resources_consume)&&le.createElement(Ki.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(cr,Hr,ga)=>le.createElement("span",null,cr||"- -")},{title:"\u96BE\u5EA6",dataIndex:"difficulty"},{title:"\u64CD\u4F5C",align:"right",width:180,render(cr,Hr,ga){const{id:$o,identifier:Ua,name:Ka,challenge_names:No=[],real_name:qr,school_name:Fi,study_count:eo,challenges:Ko=[]}=Hr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer",marginLeft:20},onClick:()=>{kn.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(br.Z,{value:Ka,style:{marginBottom:18}}),le.createElement("div",{className:ro.challengeNameWrapper},Ko==null?void 0:Ko.map((ma,ya)=>le.createElement("div",{className:ro.challengeName,key:ya},"\u7B2C",(0,mo.EM)(ya+1),"\u9898\xA0",ma==null?void 0:ma.subject))),le.createElement(lt.Z,{className:ro.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(mn.Z,{className:ro.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:ro.shixunInfo},qr),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:ro.shixunInfo},Fi),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:ro.shixunInfo},eo)),le.createElement(Ie.ZP,{type:"primary",className:ro.btnToDetail,onClick:()=>(0,mo.xg)(`/shixuns/${Ua}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),!oi&&le.createElement("span",{onClick:()=>{_i({type:"deleteShixunQuestion",payload:{shixunId:$o}})},className:`ml20 ${ro.deleteBtn}`},"\u5220\u9664"))}}],dataSource:(Mi==null?void 0:Mi.item_banks)||[],pagination:!1}))},{children:le.createElement(lt.Z,{style:{transform:(Qi=Mi==null?void 0:Mi.item_banks)!=null&&Qi.length?"translateY(-8px)":"none"},align:"middle",justify:"space-between"},le.createElement("span",{className:ro.title},"\u5DF2\u9009\u5B9E\u8BAD\u9898\u4E2D\u968F\u673A\u62BD\u9898"),!!((Gi=Mi==null?void 0:Mi.item_banks)!=null&&Gi.length)&&le.createElement(mn.Z,null,le.createElement(lt.Z,{align:"middle"},le.createElement("span",{className:ro.normalText},"\u62BD\u9898\u6570\u91CF"),le.createElement(vt.Z,{min:0,disabled:oi,max:Mi==null?void 0:Mi.item_bank_num,size:"large",className:"ml10 mr10",value:(Mi==null?void 0:Mi.item_bank_count)||1,onChange:cr=>_i({type:"changeQuestionNum",payload:{num:cr||1,itemType:"PRACTICAL"}})}),le.createElement("span",{className:`${ro.normalText} mr30`},"/",Mi==null?void 0:Mi.item_bank_num),le.createElement("span",{className:ro.normalText},"\u6BCF\u9898\u5206\u503C"),le.createElement(vt.Z,{disabled:oi,min:0,max:100,size:"large",precision:1,className:"ml10 mr10",value:Mi==null?void 0:Mi.score,onChange:cr=>_i({type:"changeQuestionScore",payload:{score:cr,itemType:"PRACTICAL"}})}),le.createElement("span",{className:ro.normalText},"\u5206"))))}]})};var Es=({setVisibleModalType:En,currentItemType:Nn,onDelete:ai})=>{var Qi,Gi;const ki=(0,Ue.useParams)(),{data:_i,dispatch:oi,disabled:Mi}=(0,le.useContext)(St),cr=((Qi=_i==null?void 0:_i.item_types)==null?void 0:Qi.findIndex(ga=>ga.item_type===Nn))+1,Hr=(Gi=_i==null?void 0:_i.item_types)==null?void 0:Gi.find(ga=>ga.item_type===Nn);return le.createElement("div",{className:ro.questionDetailWrapper},le.createElement(lt.Z,{justify:"space-between",align:"middle",className:"mb30"},le.createElement(mn.Z,null,le.createElement("span",{className:ro.questionTitle},`${(0,mo.EM)(cr)}\u3001${Hr==null?void 0:Hr.item_type_text}`),le.createElement("span",{className:ro.questionScoreInfo},"\uFF08",le.createElement("span",{style:{color:"#3061D0"}},Hr==null?void 0:Hr.item_bank_count),"\u5C0F\u9898 ",le.createElement("span",null,"\uFF0C\u5171",le.createElement("span",{style:{color:"#3061D0"}},Hr==null?void 0:Hr.total_score),"\u5206"),"\uFF09")),!Mi&&le.createElement("i",{className:`iconfont icon-shanchutimu ${ro.deleteIcon}`,onClick:()=>ai(Nn)})),Nn==="PRACTICAL"?le.createElement($a,{setVisibleModalType:En}):le.createElement(le.Fragment,null,(Hr==null?void 0:Hr.contents.length)===0?le.createElement(Pi.Z,{styles:{margin:"70px auto 100px auto"},customText:le.createElement("span",null,"\u6682\u65E0\u62BD\u9898\u89C4\u5219\uFF0C\u652F\u6301",le.createElement("span",{style:{color:"#EA9741"}},"\u6307\u5B9A\u6587\u4EF6\u5939\u3001\u96BE\u5EA6\u3001\u77E5\u8BC6\u70B9"),"\u8FDB\u884C\u62BD\u9898\uFF5E"),ButtonTwo:(ki==null?void 0:ki.id)&&le.createElement(lt.Z,{justify:"center",className:"mt30"},le.createElement(Hn.op,{style:{width:136,marginTop:-10},onClick:()=>En("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219"))}):le.createElement(le.Fragment,null,le.createElement(lt.Z,{justify:"space-between",align:"middle",className:"mb20"},le.createElement(mn.Z,null,le.createElement(lt.Z,{align:"middle"},le.createElement("span",{className:`${ro.normalText}`},"\u6BCF\u9898\u5206\u503C"),le.createElement(vt.Z,{disabled:Mi,size:"large",className:"ml10 mr10",min:.1,max:100,value:Hr==null?void 0:Hr.score,precision:1,onChange:ga=>oi({type:"changeQuestionScore",payload:{score:ga,itemType:Nn}})}),le.createElement("span",{className:ro.normalText},"\u5206"))),(ki==null?void 0:ki.id)&&le.createElement(Hn.op,{onClick:()=>En("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219")),le.createElement(rr.default,{columns:fa(Hr==null?void 0:Hr.random_rule_type,oi,Nn,Mi),dataSource:Hr==null?void 0:Hr.contents,pagination:!1,rowKey:"id"}))))},ys=pe(6021),Zs=pe(94941),Mn=pe(24065),Ss=pe(32637),ra=pe(59301),hl=Object.defineProperty,Ol=Object.defineProperties,ns=Object.getOwnPropertyDescriptors,yu=Object.getOwnPropertySymbols,eu=Object.prototype.hasOwnProperty,ps=Object.prototype.propertyIsEnumerable,Ba=(En,Nn,ai)=>Nn in En?hl(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):En[Nn]=ai,tu=(En,Nn)=>{for(var ai in Nn||(Nn={}))eu.call(Nn,ai)&&Ba(En,ai,Nn[ai]);if(yu)for(var ai of yu(Nn))ps.call(Nn,ai)&&Ba(En,ai,Nn[ai]);return En},Do=(En,Nn)=>Ol(En,ns(Nn)),Ea=(En,Nn,ai)=>new Promise((Qi,Gi)=>{var ki=Mi=>{try{oi(ai.next(Mi))}catch(cr){Gi(cr)}},_i=Mi=>{try{oi(ai.throw(Mi))}catch(cr){Gi(cr)}},oi=Mi=>Mi.done?Qi(Mi.value):Promise.resolve(Mi.value).then(ki,_i);oi((ai=ai.apply(En,Nn)).next())}),hr=({})=>{var En,Nn,ai,Qi,Gi,ki,_i,oi,Mi,cr,Hr,ga,$o,Ua,Ka;const[No]=(0,Ue.useSearchParams)(),qr=(0,Ue.useParams)(),{data:Fi,dispatch:eo,setPreview:Ko,getData:ma,handlePreview:ya,disabled:bo}=(0,le.useContext)(St),[oa,Io]=(0,le.useState)(""),[Dr,Da]=(0,le.useState)((Nn=(En=Fi==null?void 0:Fi.item_types)==null?void 0:En[0])==null?void 0:Nn.item_type),[Ha,La]=(0,le.useState)(!0),[fl,xu]=(0,le.useState)(!1),Jt=(Qt,lr)=>Ea(void 0,null,function*(){var Ir,mr,ur,Bi,Pr,to;const So=Fi.item_types.map(Ai=>Ai.item_type_text),fr=(Ir=Fi==null?void 0:Fi.item_types)==null?void 0:Ir.filter(Ai=>{var Wr,zo;return((Wr=Ai.contents)==null?void 0:Wr.length)>0||((zo=Ai==null?void 0:Ai.item_banks)==null?void 0:zo.length)>0});if(Fi.sort_by_item_type=So,!((mr=Fi.item_types)!=null&&mr.length)){We.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((fr==null?void 0:fr.length)===0){We.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}let pr=()=>Ea(void 0,null,function*(){const Ai=(0,tt.cloneDeep)(Fi),{item_types:Wr}=Ai||{};Ai.item_types=Wr.filter(Br=>Br.item_type===Dr),(yield ze(qr.id||qr.categoryId,Ai)).status===0&&(Da(lr),We.ZP.success("\u4FDD\u5B58\u6210\u529F"),Qt||Ue.history.push("/paperlibrary"))}),vr=(Bi=(ur=Fi==null?void 0:Fi.item_types)==null?void 0:ur.filter(Ai=>Ai.item_type_text==="\u5B9E\u8BAD\u9898")[0])==null?void 0:Bi.item_banks,ji=0;vr==null||vr.map(Ai=>{Ai.high_resources_consume&&(ji=ji+1)}),console.log(ji),ji>0?kn.default.info({centered:!0,icon:null,width:600,okText:"\u6211\u77E5\u9053\u4E86",title:"\u63D0\u793A",content:ra.createElement("div",null,ra.createElement("div",{className:ei.tipcontent},ra.createElement("div",null,ra.createElement("div",{className:ei.name},"\u60A8\u597D\uFF01",(Pr=(0,Mn.eY)())==null?void 0:Pr.username,"\uFF08",(to=(0,Mn.eY)())==null?void 0:to.login,"\uFF09\uFF1A"),ra.createElement("div",{className:ei.tip},"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",ra.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002\u53D1\u5E03\u8003\u8BD5\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),ra.createElement("div",{className:ei.info},ra.createElement("i",{className:"iconfont icon-xunifangzhenti1 mr10 font26"}),ra.createElement("span",{className:"mr10",style:{color:"#6A7283"}},"\u9AD8\u6D88\u8017\u5B9E\u9A8C"),ra.createElement("span",{style:{color:"#232B40"}},`${ji}\u4E2A`))),ra.createElement("div",null,ra.createElement("div",{className:ei.img},ra.createElement("img",{src:Ss,width:"124px",height:"124px"})),ra.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")))),onOk:()=>{pr()}}):pr()}),Yt=(Qt,lr,Ir,mr=!1)=>Ea(void 0,null,function*(){console.log(Fi);const ur=Do(tu(tu({},Fi.exercise),qr),{exerciseId:qr.categoryId,sort_by_item_type:Fi.sort_by_item_type,difficulty:Fi.examination_bank.difficulty,exam_notes:Fi.examination_bank.exam_notes,exercise_name:Fi.examination_bank.name,time:Fi.examination_bank.time,changed_item_type:Dr,item_types:Fi.item_types,sub_discipline_id:Fi.examination_bank.sub_discipline_id});(!Qt||lr===1)&&(ur.is_reset=1);const Bi=yield(0,Zs.wy)(ur);return Bi.status===0&&(mr||We.ZP.success("\u4FEE\u6539\u6210\u529F "),Da(Ir),Qt||Ue.history.push(`/classrooms/${qr.coursesId}/exercise/${qr.categoryId}/detail?random=true`)),Bi}),Dn=Qt=>{kn.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,closable:!0,content:ra.createElement("div",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u9898\u578B\uFF1F"),onOk:()=>Ea(void 0,null,function*(){var lr,Ir,mr,ur;if(qr.id){if((yield Nt(qr.id,{item_type:[Qt]})).status!==0)return}else{const Bi=yield ot(qr.categoryId,{item_type:[Qt]});if(ma(),Bi.status!==0)return}if(eo({type:"deleteQuestionType",payload:Qt}),Qt===Dr){const Bi=Oe(Fi,{type:"deleteQuestionType",payload:Qt});Da(Bi.item_types.length?Bi.item_types[0].item_type:(Ir=(lr=Fi==null?void 0:Fi.item_types)==null?void 0:lr[0])==null?void 0:Ir.item_type)}else Da((ur=(mr=Fi==null?void 0:Fi.item_types)==null?void 0:mr[0])==null?void 0:ur.item_type)})})};(0,le.useEffect)(()=>{var Qt;(Qt=Fi==null?void 0:Fi.examination_bank)!=null&&Qt.name&&La(!1),(0,mo.Dk)("\u968F\u673A\u7EC4\u5377")},[(ai=Fi==null?void 0:Fi.examination_bank)==null?void 0:ai.name]);const nt=()=>Ea(void 0,null,function*(){var Qt;let lr=yield Yt(!0,1,Dr,!0);if((lr==null?void 0:lr.status)===0){const Ir=yield(0,te.ZP)(`/api/exercises/${qr==null?void 0:qr.categoryId}/simulate_start_answer.json`,{method:"get",params:{coursesId:qr==null?void 0:qr.coursesId,categoryId:qr==null?void 0:qr.categoryId}});(Ir==null?void 0:Ir.status)!=-1&&window.open(`/classrooms/${qr.coursesId}/exercise/${qr.categoryId}/${(Qt=(0,Mn.eY)())==null?void 0:Qt.login}/initate_answer`)}});return ra.createElement("div",{className:ei.questionInfo},ra.createElement("div",{className:"tc mb20"},ra.createElement(Me.VP,{defaultValue:(Qi=Fi==null?void 0:Fi.examination_bank)==null?void 0:Qi.name,onFinish:Qt=>Ea(void 0,null,function*(){return eo({type:"updateBaseInfo",payload:Do(tu({},Fi.examination_bank),{name:Qt})}),(0,Zs.wy)({exercise_name:Qt,exerciseId:qr==null?void 0:qr.categoryId}),!0})})),ra.createElement(lt.Z,{justify:"center",className:"mb20"},ra.createElement(mn.Z,{className:"mr30"},ra.createElement("span",{className:ei.label},"\u7B54\u9898\u65F6\u957F"),ra.createElement("span",null,((Gi=Fi==null?void 0:Fi.examination_bank)==null?void 0:Gi.time)===-1?"\u4E0D\u9650":((ki=Fi==null?void 0:Fi.examination_bank)==null?void 0:ki.time)||"\u4E0D\u9650")),ra.createElement(mn.Z,{className:"mr30"},ra.createElement("span",{className:ei.label},"\u96BE\u5EA6"),ra.createElement("span",null,(oi=Pe[`${(_i=Fi==null?void 0:Fi.examination_bank)==null?void 0:_i.difficulty}`])==null?void 0:oi.label)),ra.createElement(mn.Z,{className:"mr30"},ra.createElement("span",{className:ei.label},"\u8BD5\u9898\u603B\u6570"),ra.createElement("span",null,((Mi=Fi==null?void 0:Fi.examination_bank)==null?void 0:Mi.question_count)||0)),ra.createElement(mn.Z,null,ra.createElement("span",{className:ei.label},"\u603B\u5206"),ra.createElement("span",null,((Hr=(cr=Fi==null?void 0:Fi.examination_bank)==null?void 0:cr.total_score)==null?void 0:Hr.toFixed(1))||0))),ra.createElement("div",{className:ei.content,style:{border:((ga=Fi==null?void 0:Fi.item_types)==null?void 0:ga.length)<=0&&"none"}},(($o=Fi==null?void 0:Fi.item_types)==null?void 0:$o.length)>0?ra.createElement(lt.Z,{wrap:!1},ra.createElement(mn.Z,{flex:"260px",className:ei.leftPart},!bo&&ra.createElement(lt.Z,{className:"mb20"},ra.createElement(Hn.op,{style:{margin:"0 15px",borderRadius:2},onClick:()=>Io("setScore")},"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C"),(qr==null?void 0:qr.id)&&ra.createElement(Hn.op,{shape:"default",onClick:()=>Io("questionType")},"\u6DFB\u52A0\u9898\u578B")),ra.createElement(pi,{list:Fi.item_types,onSelect:Qt=>Ea(void 0,null,function*(){if(Qt===Dr)return;La(!0);const lr=Fi.item_types.find(Ir=>Ir.item_type===Dr);if(Dr!=="PRACTICAL"&&lr.contents.length>0&&(qr!=null&&qr.id)){const Ir=(0,tt.cloneDeep)(Fi),{item_types:mr}=Ir||{};Ir.item_types=mr.filter(ur=>ur.item_type===Dr);try{(yield ze(qr.id||qr.categoryId,Ir)).status===0&&Da(Qt)}catch(ur){}}else qr.categoryId?Yt(!0,2,Qt):Jt(!0,Qt);La(!1)}),onDelete:Dn})),ra.createElement(mn.Z,{flex:1,className:ei.rightPart},ra.createElement(Ct.Z,{spinning:Ha},ra.createElement(Es,{setVisibleModalType:Io,currentItemType:Dr,onDelete:Dn})))):ra.createElement(Pi.Z,{customText:"\u8BF7\u5148\u8BBE\u7F6E\u8BD5\u5377\u9898\u578B",styles:{margin:"70px auto"},ButtonTwo:ra.createElement(lt.Z,{justify:"center",className:"mt20"},(qr==null?void 0:qr.id)&&ra.createElement(Hn.op,{style:{width:88},onClick:()=>Io("questionType")},"\u6DFB\u52A0\u9898\u578B"))})),!!(qr!=null&&qr.id)&&ra.createElement("div",{className:ei.fixedBottom},ra.createElement(ys.Z,{className:`${ei.previewBtn} mr20`,onClick:()=>Ea(void 0,null,function*(){var Qt,lr;const Ir=(Qt=Fi==null?void 0:Fi.item_types)==null?void 0:Qt.filter(mr=>{var ur,Bi;return((ur=mr.contents)==null?void 0:ur.length)>0||((Bi=mr==null?void 0:mr.item_banks)==null?void 0:Bi.length)>0});if(!((lr=Fi.item_types)!=null&&lr.length)){We.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((Ir==null?void 0:Ir.length)===0){We.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}yield Jt(!0,Dr),ya()})},"\u8BD5\u5377\u9884\u89C8"),ra.createElement(ys.Z,{type:"primary",className:ei.confirmBtn,onClick:()=>Jt()},ra.createElement("i",{className:"iconfont icon-baocun1 mr5"}),"\u4FDD\u5B58\u8BD5\u5377")),!!(qr!=null&&qr.categoryId)&&ra.createElement("div",{className:ei.fixedBottom,style:{justifyContent:((Ua=Fi==null?void 0:Fi.exercise)==null?void 0:Ua.exercise_status)!==1?"end":"center"}},ra.createElement(ys.Z,{className:`${ei.previewBtn} mr20`,onClick:()=>Ea(void 0,null,function*(){var Qt,lr;document.body.scrollIntoView(),Ue.history.push(`/classrooms/${qr.coursesId}/exercise/${(Qt=Fi==null?void 0:Fi.exercise)==null?void 0:Qt.id}/detail?random=${(lr=Fi==null?void 0:Fi.exercise)==null?void 0:lr.is_random}`)})},"\u8FD4\u56DE"),((Ka=Fi==null?void 0:Fi.exercise)==null?void 0:Ka.exercise_status)===1&&ra.createElement(ys.Z,{className:`${ei.previewBtn} mr20`,onClick:nt},"\u6A21\u62DF\u8003\u8BD5"),(Fi==null?void 0:Fi.exercise.exercise_status)===1&&ra.createElement(ys.Z,{type:"primary",className:ei.confirmBtn,onClick:()=>Yt()},"\u63D0\u4EA4")),ra.createElement(Hi,{open:oa==="questionType",onCancel:()=>Io(""),onOk:Qt=>Ea(void 0,null,function*(){var lr,Ir;const mr=[],ur=Oe(Fi,{type:"setQuestionType",payload:Qt}),Bi=((lr=ur==null?void 0:ur.item_types)==null?void 0:lr.map(Pr=>Pr.item_type))||[];for(const Pr of((Ir=Fi==null?void 0:Fi.item_types)==null?void 0:Ir.map(to=>to.item_type))||[])Bi.includes(Pr)||mr.push(Pr);qr.id&&mr.length>0&&(yield Nt(qr.id,{item_type:mr})).status!==0||(eo({type:"setQuestionType",payload:Qt}),Da(Dr||ur.item_types[0].item_type),Io(""))})}),ra.createElement(Sr,{open:oa==="setScore",onCancel:()=>{Io("")},onOk:Qt=>Ea(void 0,null,function*(){console.log("---newData",Qt);const lr=Qt.item_types.map(Ir=>({item_type:Ir.item_type,score:Ir.score}));qr.id?(yield dt(qr.id,{score_settings:lr})).status===0&&eo({type:"init",payload:Qt}):(yield He(qr.categoryId,{score_settings:lr})).status===0&&eo({type:"init",payload:Qt}),Io("")})}),ra.createElement(nr,{open:oa==="rule",onCancel:()=>Io(""),currentItemType:Dr,setVisibleModalType:Io}),No.get("type")==="settings"&&ra.createElement(sa,{open:oa==="selectShixun",onCancel:()=>Io(""),onOk:Qt=>{if(console.log(Qt),(Qt==null?void 0:Qt.length)<=0){We.ZP.info("\u5B9E\u8BAD\u6570\u4E0D\u80FD\u4E3A0");return}eo({type:"addShixun",payload:{shixunList:[...Qt]}}),Io("")}}))},Rs=pe(92744),ls=pe(59301),sl=Object.defineProperty,jl=Object.defineProperties,ou=Object.getOwnPropertyDescriptors,Ji=Object.getOwnPropertySymbols,Cs=Object.prototype.hasOwnProperty,Us=Object.prototype.propertyIsEnumerable,$l=(En,Nn,ai)=>Nn in En?sl(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):En[Nn]=ai,Tl=(En,Nn)=>{for(var ai in Nn||(Nn={}))Cs.call(Nn,ai)&&$l(En,ai,Nn[ai]);if(Ji)for(var ai of Ji(Nn))Us.call(Nn,ai)&&$l(En,ai,Nn[ai]);return En},Kl=(En,Nn)=>jl(En,ou(Nn)),Oo=(En,Nn,ai)=>new Promise((Qi,Gi)=>{var ki=Mi=>{try{oi(ai.next(Mi))}catch(cr){Gi(cr)}},_i=Mi=>{try{oi(ai.throw(Mi))}catch(cr){Gi(cr)}},oi=Mi=>Mi.done?Qi(Mi.value):Promise.resolve(Mi.value).then(ki,_i);oi((ai=ai.apply(En,Nn)).next())}),zl=()=>{var En,Nn,ai,Qi;const[Gi,ki]=(0,le.useState)("baseInfo"),_i=(0,Ue.useDispatch)();(0,le.useEffect)(()=>{_i({type:"globalSetting/footerToggle",payload:!1})},[]);const oi=(0,Ue.useParams)(),Mi=!!(oi.id||oi.categoryId),[cr]=(0,Ue.useSearchParams)();(0,le.useEffect)(()=>{cr.get("type")==="settings"&&ki("settings")},[]);const[Hr,ga]=(0,le.useReducer)(Oe,null),[$o,Ua]=(0,le.useState)(!1),Ka=()=>Oo(void 0,null,function*(){Ua(!0);let Dr;oi.categoryId?Dr=yield Wt(oi):Dr=yield Le(oi.id),Ua(!1),Dr.status===0&&ga({type:"init",payload:Dr})});(0,le.useEffect)(()=>{Mi?Ka():ga({type:"init",payload:{examination_bank:{difficulty:2}}})},[oi]);const[No,qr]=(0,le.useState)(""),Fi=(Dr,Da)=>Oo(void 0,null,function*(){var Ha,La,fl,xu;const Jt=(Ha=Hr==null?void 0:Hr.item_types)==null?void 0:Ha.filter(nt=>{var Qt;return((Qt=nt==null?void 0:nt.item_type)==null?void 0:Qt.toUpperCase())===(Da==null?void 0:Da.type)}),Yt={sort_by_item_type:Hr.sort_by_item_type,difficulty:Hr.examination_bank.difficulty,exam_notes:Hr.examination_bank.exam_notes,name:Hr.examination_bank.name,time:Hr.examination_bank.time,item_types:Hr.item_types};if(Dr!==void 0&&!(Dr!=null&&Dr.single_question_id)){Yt.seleted_item_bank_ids=Dr==null?void 0:Dr.seleted_item_bank_ids,Yt.item_types=Jt;const nt=yield xt(Yt);if((nt==null?void 0:nt.status)===0){let Qt=(0,tt.cloneDeep)(bo.data);Qt.questionList=(La=Qt==null?void 0:Qt.questionList)==null?void 0:La.map(lr=>{var Ir;return lr.type===Da.type?Kl(Tl({},lr),{questions:((Ir=nt==null?void 0:nt.questions)==null?void 0:Ir.questions)||[]}):lr}),oa({show:!0,data:Qt})}return}if(Dr!==void 0&&(Dr!=null&&Dr.single_question_id)){Yt.seleted_item_bank_ids=Dr==null?void 0:Dr.seleted_item_bank_ids,Yt.single_question_id=Dr==null?void 0:Dr.single_question_id,Yt.item_types=Jt;const nt=yield xt(Yt);if((nt==null?void 0:nt.status)===0){let Qt=(0,tt.cloneDeep)(bo.data);Qt.questionList=(fl=Qt==null?void 0:Qt.questionList)==null?void 0:fl.map(lr=>{var Ir,mr;if(lr.type===Da.type){const ur=(0,tt.cloneDeep)(lr==null?void 0:lr.questions);return ur.splice(Da.index,1,(mr=(Ir=nt==null?void 0:nt.questions)==null?void 0:Ir.questions)==null?void 0:mr[0]),console.log(lr==null?void 0:lr.questions,ur,Da.index,"new_questions"),Kl(Tl({},lr),{questions:ur})}return lr}),oa({show:!0,data:Qt})}return}const Dn=yield Tt(Yt);if((Dn==null?void 0:Dn.status)===0){const nt=(0,mo.ad)(Dn);let Qt=[];(xu=Hr==null?void 0:Hr.item_types)==null||xu.forEach(lr=>{var Ir;const mr=(Ir=nt==null?void 0:nt.questionList)==null?void 0:Ir.find(ur=>lr.item_type===ur.type);Qt.push(mr)}),console.log(Hr,"sortList"),Qt=(0,tt.compact)(Qt),nt.questionList=Qt,oa({show:!0,data:nt}),qr(new Date)}}),eo=Dr=>{var Da;let Ha=(0,tt.cloneDeep)(bo.data);Ha.questionList=(Da=Ha==null?void 0:Ha.questionList)==null?void 0:Da.map(La=>La.type===Dr.type?Kl(Tl({},La),{questions_score:Dr.scoreTotal}):La),ga({type:"changeQuestionScore",payload:{score:Dr.score,itemType:Dr.type}}),oa({show:!0,data:Ha})},Ko=Dr=>Oo(void 0,null,function*(){const Da={sort_by_item_type:Hr.sort_by_item_type,difficulty:Hr.examination_bank.difficulty,exam_notes:Hr.examination_bank.exam_notes,name:Hr.examination_bank.name,time:Hr.examination_bank.time,item_types:Hr.item_types,sub_discipline_id:Hr.examination_bank.sub_discipline_id};if(Dr){(yield Ot(Tl(Tl({},Da),Dr))).status===0&&We.ZP.success("\u4FDD\u5B58\u6210\u529F");return}(yield ze(oi.id,Da)).status===0&&(We.ZP.success("\u63D0\u4EA4\u6210\u529F"),Ue.history.push("/paperlibrary?defaultActiveKey=0"))}),ma=(0,Go.g)(),[ya]=ut.default.useForm(),[bo,oa]=(0,le.useState)({show:!1,data:{}}),Io=!!((En=Hr==null?void 0:Hr.exercise)!=null&&En.exercise_status)&&((Nn=Hr==null?void 0:Hr.exercise)==null?void 0:Nn.exercise_status)!==1;return ls.createElement(St.Provider,{value:{data:Hr,disabled:Io,dispatch:ga,setPreview:oa,getData:Ka,handlePreview:Fi}},bo.show?ls.createElement(Rs.Z,{key:No,data:bo.data,onExchange:Fi,onTypeScore:eo,submit:Ko,goBack:()=>oa({show:!1,data:{}})}):ls.createElement("div",{className:ke.wrapper},ls.createElement("div",{className:"edu-container"},ls.createElement(Ge.Z,{className:ke.breadCrumbWrapper,separator:">",items:oi!=null&&oi.categoryId?[{title:ls.createElement(Ue.Link,{to:`/classrooms/${oi.coursesId}/exercise`},(Qi=(ai=(0,Mn.eY)())==null?void 0:ai.course)==null?void 0:Qi.course_name)},{title:ls.createElement(Ue.Link,{to:`/classrooms/${oi.coursesId}/exercise`},"\u8BD5\u5377\u5217\u8868")},{title:"\u7F16\u8F91\u8BD5\u5377"}]:[{title:ls.createElement(Ue.Link,{to:"/paperlibrary"},"\u8BD5\u5377\u5E93")},{title:"\u968F\u673A\u7EC4\u5377"}]}),ls.createElement(Me.d4,{activeKey:Gi,tabs:[{key:"baseInfo",label:"\u8BD5\u5377\u57FA\u7840\u4FE1\u606F"},{key:"settings",label:"\u7EC4\u5377\u914D\u7F6E"}],onChange:Dr=>Oo(void 0,null,function*(){if(Dr==="settings"&&(yield ya.validateFields(),!Mi)){const Da=yield je(Hr);Da.status===0&&Ue.history.replace(`/randompaper/edit/${Da==null?void 0:Da.examination_bank_id}?type=settings`)}ki(Dr)})}),Gi==="baseInfo"&&ls.createElement(zn,{courseOptions:ma,setCurrentKey:ki,loading:$o,form:ya}),ls.createElement("div",{style:{display:Gi==="settings"?"block":"none"}},Hr&&ls.createElement(hr,null)))))}},86918:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return $e}});var le=pe(43418),ke={ul:"ul___TdfYY"},We=pe(32637),ut=pe(59301),Ge=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ct=(Ft,lt)=>{var vt={};for(var Ie in Ft)Ue.call(Ft,Ie)&&lt.indexOf(Ie)<0&&(vt[Ie]=Ft[Ie]);if(Ft!=null&&Ge)for(var Ie of Ge(Ft))lt.indexOf(Ie)<0&&Me.call(Ft,Ie)&&(vt[Ie]=Ft[Ie]);return vt},$e=Ft=>{var lt=Ft,{open:vt,onCancel:Ie}=lt,te=Ct(lt,["open","onCancel"]);return ut.createElement(le.default,{centered:!0,open:vt,title:ut.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:Ie,footer:null},ut.createElement("div",null,ut.createElement("div",{className:"tc"},ut.createElement("img",{className:"mt10",src:We,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),ut.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),ut.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),ut.createElement("div",{style:{color:"#333"},className:"pt30 font14"},ut.createElement("ul",{className:ke.ul},ut.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"),ut.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"),ut.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")))))}},94860:function(On,pn,pe){"use strict";pe.d(pn,{g:function(){return Ge}});var le=pe(59301),ke=pe(80401),We=pe(26422),ut=(Ue,Me,Ct)=>new Promise((wt,$e)=>{var Ft=Ie=>{try{vt(Ct.next(Ie))}catch(te){$e(te)}},lt=Ie=>{try{vt(Ct.throw(Ie))}catch(te){$e(te)}},vt=Ie=>Ie.done?wt(Ie.value):Promise.resolve(Ie.value).then(Ft,lt);vt((Ct=Ct.apply(Ue,Me)).next())});const Ge=()=>{const[Ue,Me]=(0,le.useState)([]);return(0,le.useEffect)(()=>{ut(void 0,null,function*(){const wt=yield(0,ke.d1)({source:"question"});wt!=null&&wt.disciplines&&Me((0,We.L)(wt==null?void 0:wt.disciplines))})},[]),Ue}},83312:function(On,pn,pe){"use strict";pe.d(pn,{U:function(){return wt}});var le=pe(59301),ke=Object.defineProperty,We=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ue=($e,Ft,lt)=>Ft in $e?ke($e,Ft,{enumerable:!0,configurable:!0,writable:!0,value:lt}):$e[Ft]=lt,Me=($e,Ft)=>{for(var lt in Ft||(Ft={}))ut.call(Ft,lt)&&Ue($e,lt,Ft[lt]);if(We)for(var lt of We(Ft))Ge.call(Ft,lt)&&Ue($e,lt,Ft[lt]);return $e},Ct=($e,Ft,lt)=>new Promise((vt,Ie)=>{var te=se=>{try{de(lt.next(se))}catch(he){Ie(he)}},ee=se=>{try{de(lt.throw(se))}catch(he){Ie(he)}},de=se=>se.done?vt(se.value):Promise.resolve(se.value).then(te,ee);de((lt=lt.apply($e,Ft)).next())});function wt($e,Ft){const[lt,vt]=(0,le.useState)(Ft),[Ie,te]=(0,le.useState)(!1),[ee,de]=(0,le.useState)();return[lt,Ie,(he,ve=!1)=>Ct(this,null,function*(){const Ee=ve?Ft:Me(Me({},lt),he);te(!0),vt(Ee);const Be=yield $e(Ee);return te(!1),de(Be),Be}),ee,de]}},24768:function(On,pn,pe){"use strict";pe.d(pn,{AL:function(){return Ee},Iy:function(){return Ft},Qv:function(){return Ie},ez:function(){return ve},jb:function(){return lt}});var le=pe(32834),ke=pe.n(le),We=pe(11690),ut=pe.n(We);let Ge=1;function Ue(Xe,Ye){const dt=Xe.match(/^(\s+)(?:```)/);if(dt===null)return Ye;const He=dt[1];return Ye.split(`
`).map(Nt=>{const ot=Nt.match(/^\s+/);if(ot===null)return Nt;const[Tt]=ot;return Tt.length>=He.length?Nt.slice(He.length):Nt}).join(`
`)}let Me=[],Ct=["<ul>"];const wt=new(ke()).Renderer,$e=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ft(){Me.length=0,Ct=["<ul>"]}const lt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function vt(Xe,Ye,dt,He){if(Ye>=Xe.length||Xe[Ye].level<=dt)return Ye;var Nt=Xe[Ye];He.push("<li><a href='#"+Ge+Nt.anchor+"'>"+Nt.text+"</a>"),Ye++;var ot=[];return Ye=vt(Xe,Ye,Nt.level,ot),ot.length>0&&(He.push("<ul>"),ot.forEach(function(Tt){He.push(Tt)}),He.push("</ul>")),He.push("</li>"),Ye=vt(Xe,Ye,dt,He),Ye}function Ie(){return vt(Me,0,0,Ct),Ct.push("</ul>"),Ct.join("")}const te={heading(Xe){const Ye=$e.exec(Xe);if(Ge+=1,Ye)return{type:"heading",raw:Ye[0],depth:Ye[1].length,text:Ye[2]}},fences(Xe){const Ye=this.rules.block.fences.exec(Xe);if(Ye){const dt=Ye[0];let He=Ue(dt,Ye[3]||"");const Nt=Ye[2]?Ye[2].trim():Ye[2];if(["latex","katex","math"].indexOf(Nt)>=0){const ot=se(),Tt=He;He=ot,he[ot]={type:"block",expression:Tt}}return{type:"code",raw:dt,lang:Nt,text:He}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let de=0;const se=()=>`__special_katext_id_${de++}__`;let he={};function ve(){return he}function Ee(){de=0,he={}}function Be(Xe){return Xe=Xe.replace(ee,(Ye,dt)=>{const He=se();return he[He]={type:"inline",expression:dt},He}),Xe}const Le=wt.listitem;wt.listitem=function(Xe){return Le(Be(Xe))};const ze=wt.paragraph;wt.paragraph=function(Xe){return ze(Be(Xe))};const je=wt.tablecell;wt.tablecell=function(Xe,Ye){return je(Be(Xe),Ye)},wt.code=function(Xe,Ye,dt){const He=(Ye||"").match(/\S*/)[0];return He?["latex","katex","math"].indexOf(He)>=0?`<p class='editormd-tex'>${Xe}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ye}">${dt?Xe:(0,We.escape)(Xe,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(dt?Xe:(0,We.escape)(Xe,!0))+"</code></pre>"},wt.heading=function(Xe,Ye,dt){let He=this.options.headerPrefix+dt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Me.push({anchor:He,level:Ye,text:Xe}),"<h"+Ye+' id="'+Ge+He+'">'+Xe+"</h"+Ye+">"},ke().setOptions({silent:!0,gfm:!0,pedantic:!1}),ke().use({tokenizer:te,renderer:wt}),pn.ZP=ke()},50371:function(On,pn){"use strict";function pe(){const le=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let ke=1;ke<arguments.length;ke++){const We=ke<0||arguments.length<=ke?void 0:arguments[ke];We&&Object.keys(We).forEach(ut=>{const Ge=We[ut];Ge!==void 0&&(le[ut]=Ge)})}return le}pn.Z=pe},77578:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return le}});const le=ke=>ke?typeof ke=="function"?ke():ke:null},13845:function(On,pn,pe){"use strict";pe.d(pn,{F:function(){return le},Z:function(){return ke}});function le(We){return We!=null&&We===We.window}function ke(We,ut){var Ge,Ue;if(typeof window=="undefined")return 0;const Me=ut?"scrollTop":"scrollLeft";let Ct=0;return le(We)?Ct=We[ut?"pageYOffset":"pageXOffset"]:We instanceof Document?Ct=We.documentElement[Me]:(We instanceof HTMLElement||We)&&(Ct=We[Me]),We&&!le(We)&&typeof Ct!="number"&&(Ct=(Ue=((Ge=We.ownerDocument)!==null&&Ge!==void 0?Ge:We).documentElement)===null||Ue===void 0?void 0:Ue[Me]),Ct}},56762:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ke}});var le=pe(59301);function ke(){const[,We]=le.useReducer(ut=>ut+1,0);return We}},68031:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ut}});var le=pe(16089);function ke(Ge,Ue,Me,Ct){const wt=Me-Ue;return Ge/=Ct/2,Ge<1?wt/2*Ge*Ge*Ge+Ue:wt/2*((Ge-=2)*Ge*Ge+2)+Ue}var We=pe(13845);function ut(Ge){let Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Me=()=>window,callback:Ct,duration:wt=450}=Ue,$e=Me(),Ft=(0,We.Z)($e,!0),lt=Date.now(),vt=()=>{const te=Date.now()-lt,ee=ke(te>wt?wt:te,Ft,Ge,wt);(0,We.F)($e)?$e.scrollTo(window.pageXOffset,ee):$e instanceof Document||$e.constructor.name==="HTMLDocument"?$e.documentElement.scrollTop=ee:$e.scrollTop=ee,te<wt?(0,le.Z)(vt):typeof Ct=="function"&&Ct()};(0,le.Z)(vt)}},66104:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Tt}});var le=pe(92310),ke=pe.n(le),We=pe(11592),ut=pe(26112),Ge=pe(59301),Ue=pe(92343),Me=pe(36355),Ct=pe(84105),wt=pe(91857);const $e=xt=>{let{children:Ot}=xt;const{getPrefixCls:Wt}=Ge.useContext(Me.E_),Dt=Wt("breadcrumb");return Ge.createElement("li",{className:`${Dt}-separator`,"aria-hidden":"true"},Ot===""?Ot:Ot||"/")};$e.__ANT_BREADCRUMB_SEPARATOR=!0;var Ft=$e,lt=function(xt,Ot){var Wt={};for(var Dt in xt)Object.prototype.hasOwnProperty.call(xt,Dt)&&Ot.indexOf(Dt)<0&&(Wt[Dt]=xt[Dt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,Dt=Object.getOwnPropertySymbols(xt);tt<Dt.length;tt++)Ot.indexOf(Dt[tt])<0&&Object.prototype.propertyIsEnumerable.call(xt,Dt[tt])&&(Wt[Dt[tt]]=xt[Dt[tt]]);return Wt};function vt(xt,Ot){if(xt.title===void 0||xt.title===null)return null;const Wt=Object.keys(Ot).join("|");return typeof xt.title=="object"?xt.title:String(xt.title).replace(new RegExp(`:(${Wt})`,"g"),(Dt,tt)=>Ot[tt]||Dt)}function Ie(xt,Ot,Wt,Dt){if(Wt==null)return null;const{className:tt,onClick:Ve}=Ot,_t=lt(Ot,["className","onClick"]),vn=Object.assign(Object.assign({},(0,ut.Z)(_t,{data:!0,aria:!0})),{onClick:Ve});return Dt!==void 0?Ge.createElement("a",Object.assign({},vn,{className:ke()(`${xt}-link`,tt),href:Dt}),Wt):Ge.createElement("span",Object.assign({},vn,{className:ke()(`${xt}-link`,tt)}),Wt)}function te(xt,Ot){return(Dt,tt,Ve,_t,vn)=>{if(Ot)return Ot(Dt,tt,Ve,_t);const yn=vt(Dt,tt);return Ie(xt,Dt,yn,vn)}}var ee=function(xt,Ot){var Wt={};for(var Dt in xt)Object.prototype.hasOwnProperty.call(xt,Dt)&&Ot.indexOf(Dt)<0&&(Wt[Dt]=xt[Dt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,Dt=Object.getOwnPropertySymbols(xt);tt<Dt.length;tt++)Ot.indexOf(Dt[tt])<0&&Object.prototype.propertyIsEnumerable.call(xt,Dt[tt])&&(Wt[Dt[tt]]=xt[Dt[tt]]);return Wt};const de=xt=>{const{prefixCls:Ot,separator:Wt="/",children:Dt,menu:tt,overlay:Ve,dropdownProps:_t,href:vn}=xt,zt=(qt=>{if(tt||Ve){const ln=Object.assign({},_t);if(tt){const Gn=tt||{},{items:un}=Gn,_n=ee(Gn,["items"]);ln.menu=Object.assign(Object.assign({},_n),{items:un==null?void 0:un.map((St,Zn)=>{var{key:ci,title:Ze,label:be,path:Pe}=St,Ae=ee(St,["key","title","label","path"]);let Oe=be!=null?be:Ze;return Pe&&(Oe=Ge.createElement("a",{href:`${vn}${Pe}`},Oe)),Object.assign(Object.assign({},Ae),{key:ci!=null?ci:Zn,label:Oe})})})}else Ve&&(ln.overlay=Ve);return Ge.createElement(wt.Z,Object.assign({placement:"bottom"},ln),Ge.createElement("span",{className:`${Ot}-overlay-link`},qt,Ge.createElement(Ct.Z,null)))}return qt})(Dt);return zt!=null?Ge.createElement(Ge.Fragment,null,Ge.createElement("li",null,zt),Wt&&Ge.createElement(Ft,null,Wt)):null},se=xt=>{const{prefixCls:Ot,children:Wt,href:Dt}=xt,tt=ee(xt,["prefixCls","children","href"]),{getPrefixCls:Ve}=Ge.useContext(Me.E_),_t=Ve("breadcrumb",Ot);return Ge.createElement(de,Object.assign({},tt,{prefixCls:_t}),Ie(_t,tt,Wt,Dt))};se.__ANT_BREADCRUMB_ITEM=!0;var he=se,ve=pe(17313),Ee=pe(83116),Be=pe(37613);const Le=xt=>{const{componentCls:Ot,iconCls:Wt}=xt;return{[Ot]:Object.assign(Object.assign({},(0,ve.Wf)(xt)),{color:xt.itemColor,fontSize:xt.fontSize,[Wt]:{fontSize:xt.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:xt.linkColor,transition:`color ${xt.motionDurationMid}`,padding:`0 ${xt.paddingXXS}px`,borderRadius:xt.borderRadiusSM,height:xt.lineHeight*xt.fontSize,display:"inline-block",marginInline:-xt.marginXXS,"&:hover":{color:xt.linkHoverColor,backgroundColor:xt.colorBgTextHover}},(0,ve.Qy)(xt)),"li:last-child":{color:xt.lastItemColor},[`${Ot}-separator`]:{marginInline:xt.separatorMargin,color:xt.separatorColor},[`${Ot}-link`]:{[`
> ${Wt} + span,
> ${Wt} + a
`]:{marginInlineStart:xt.marginXXS}},[`${Ot}-overlay-link`]:{borderRadius:xt.borderRadiusSM,height:xt.lineHeight*xt.fontSize,display:"inline-block",padding:`0 ${xt.paddingXXS}px`,marginInline:-xt.marginXXS,[`> ${Wt}`]:{marginInlineStart:xt.marginXXS,fontSize:xt.fontSizeIcon},"&:hover":{color:xt.linkHoverColor,backgroundColor:xt.colorBgTextHover,a:{color:xt.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${xt.componentCls}-rtl`]:{direction:"rtl"}})}};var ze=(0,Ee.Z)("Breadcrumb",xt=>{const Ot=(0,Be.TS)(xt,{});return[Le(Ot)]},xt=>({itemColor:xt.colorTextDescription,lastItemColor:xt.colorText,iconFontSize:xt.fontSize,linkColor:xt.colorTextDescription,linkHoverColor:xt.colorText,separatorColor:xt.colorTextDescription,separatorMargin:xt.marginXS})),je=function(xt,Ot){var Wt={};for(var Dt in xt)Object.prototype.hasOwnProperty.call(xt,Dt)&&Ot.indexOf(Dt)<0&&(Wt[Dt]=xt[Dt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,Dt=Object.getOwnPropertySymbols(xt);tt<Dt.length;tt++)Ot.indexOf(Dt[tt])<0&&Object.prototype.propertyIsEnumerable.call(xt,Dt[tt])&&(Wt[Dt[tt]]=xt[Dt[tt]]);return Wt};function Xe(xt){const{breadcrumbName:Ot,children:Wt}=xt,Dt=je(xt,["breadcrumbName","children"]),tt=Object.assign({title:Ot},Dt);return Wt&&(tt.menu={items:Wt.map(Ve=>{var{breadcrumbName:_t}=Ve,vn=je(Ve,["breadcrumbName"]);return Object.assign(Object.assign({},vn),{title:_t})})}),tt}function Ye(xt,Ot){return(0,Ge.useMemo)(()=>xt||(Ot?Ot.map(Xe):null),[xt,Ot])}var dt=function(xt,Ot){var Wt={};for(var Dt in xt)Object.prototype.hasOwnProperty.call(xt,Dt)&&Ot.indexOf(Dt)<0&&(Wt[Dt]=xt[Dt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,Dt=Object.getOwnPropertySymbols(xt);tt<Dt.length;tt++)Ot.indexOf(Dt[tt])<0&&Object.prototype.propertyIsEnumerable.call(xt,Dt[tt])&&(Wt[Dt[tt]]=xt[Dt[tt]]);return Wt};const He=(xt,Ot)=>{if(Ot===void 0)return Ot;let Wt=(Ot||"").replace(/^\//,"");return Object.keys(xt).forEach(Dt=>{Wt=Wt.replace(`:${Dt}`,xt[Dt])}),Wt},Nt=xt=>{const{prefixCls:Ot,separator:Wt="/",style:Dt,className:tt,rootClassName:Ve,routes:_t,items:vn,children:yn,itemRender:zt,params:qt={}}=xt,ln=dt(xt,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Gn,direction:un,breadcrumb:_n}=Ge.useContext(Me.E_);let St;const Zn=Gn("breadcrumb",Ot),[ci,Ze]=ze(Zn),be=Ye(vn,_t),Pe=te(Zn,zt);if(be&&be.length>0){const xe=[],ct=vn||_t;St=be.map((Mt,at)=>{const{path:qe,key:Lt,type:Bt,menu:ft,overlay:Gt,onClick:Sn,className:an,separator:rn,dropdownProps:zn}=Mt,kn=He(qt,qe);kn!==void 0&&xe.push(kn);const mn=Lt!=null?Lt:at;if(Bt==="separator")return Ge.createElement(Ft,{key:mn},rn);const ei={},Pi=at===be.length-1;ft?ei.menu=ft:Gt&&(ei.overlay=Gt);let{href:Hn}=Mt;return xe.length&&kn!==void 0&&(Hn=`#/${xe.join("/")}`),Ge.createElement(de,Object.assign({key:mn},ei,(0,ut.Z)(Mt,{data:!0,aria:!0}),{className:an,dropdownProps:zn,href:Hn,separator:Pi?"":Wt,onClick:Sn,prefixCls:Zn}),Pe(Mt,qt,ct,xe,Hn))})}else if(yn){const xe=(0,We.Z)(yn).length;St=(0,We.Z)(yn).map((ct,Mt)=>{if(!ct)return ct;const at=Mt===xe-1;return(0,Ue.Tm)(ct,{separator:at?"":Wt,key:Mt})})}const Ae=ke()(Zn,_n==null?void 0:_n.className,{[`${Zn}-rtl`]:un==="rtl"},tt,Ve,Ze),Oe=Object.assign(Object.assign({},_n==null?void 0:_n.style),Dt);return ci(Ge.createElement("nav",Object.assign({className:Ae,style:Oe},ln),Ge.createElement("ol",null,St)))};Nt.Item=he,Nt.Separator=Ft;var ot=Nt,Tt=ot},19842:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return wr}});var le=pe(19127),ke=pe(59301),We=pe(33853),ut=pe(58617),Ge=pe(38819),Ue=pe(92310),Me=pe.n(Ue),Ct=pe(96663),wt=pe(72071),$e=pe(6620),Ft=pe(77861),lt=pe(17115),vt=pe(90782),Ie=pe(6089),te=pe(18929),ee=ke.createContext(null),de=ee,se=pe(20135),he=pe(90493),ve=pe(44127),Ee="__rc_cascader_search_mark__",Be=function(Si,Wi,qi){var $n=qi.label;return Wi.some(function(qn){return String(qn[$n]).toLowerCase().includes(Si.toLowerCase())})},Le=function(Si,Wi,qi,$n){return Wi.map(function(qn){return qn[$n.label]}).join(" / ")},ze=function(Pn,Si,Wi,qi,$n,qn){var Zt=$n.filter,$t=Zt===void 0?Be:Zt,Qe=$n.render,on=Qe===void 0?Le:Qe,cn=$n.limit,At=cn===void 0?50:cn,ht=$n.sort;return ke.useMemo(function(){var en=[];if(!Pn)return[];function fn(Rn,Qn){var Et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Rn.forEach(function(wn){if(!(!ht&&At!==!1&&At>0&&en.length>=At)){var Kn=[].concat((0,le.Z)(Qn),[wn]),Ei=wn[Wi.children],tn=Et||wn.disabled;if((!Ei||Ei.length===0||qn)&&$t(Pn,Kn,{label:Wi.label})){var sn;en.push((0,ve.Z)((0,ve.Z)({},wn),{},(sn={disabled:tn},(0,he.Z)(sn,Wi.label,on(Pn,Kn,qi,Wi)),(0,he.Z)(sn,Ee,Kn),(0,he.Z)(sn,Wi.children,void 0),sn)))}Ei&&fn(wn[Wi.children],Kn,tn)}})}return fn(Si,[]),ht&&en.sort(function(Rn,Qn){return ht(Rn[Ee],Qn[Ee],Pn,Wi)}),At!==!1&&At>0?en.slice(0,At):en},[Pn,Si,Wi,qi,on,qn,$t,ht,At])},je="__RC_CASCADER_SPLIT__",Xe="SHOW_PARENT",Ye="SHOW_CHILD";function dt(Pn){return Pn.join(je)}function He(Pn){return Pn.map(dt)}function Nt(Pn){return Pn.split(je)}function ot(Pn){var Si=Pn||{},Wi=Si.label,qi=Si.value,$n=Si.children,qn=qi||"value";return{label:Wi||"label",value:qn,key:qn,children:$n||"children"}}function Tt(Pn,Si){var Wi,qi;return(Wi=Pn.isLeaf)!==null&&Wi!==void 0?Wi:!((qi=Pn[Si.children])!==null&&qi!==void 0&&qi.length)}function xt(Pn){var Si=Pn.parentElement;if(Si){var Wi=Pn.offsetTop-Si.offsetTop;Wi-Si.scrollTop<0?Si.scrollTo({top:Wi}):Wi+Pn.offsetHeight-Si.scrollTop>Si.offsetHeight&&Si.scrollTo({top:Wi+Pn.offsetHeight-Si.offsetHeight})}}function Ot(Pn,Si){return Pn.map(function(Wi){var qi;return(qi=Wi[Ee])===null||qi===void 0?void 0:qi.map(function($n){return $n[Si.value]})})}function Wt(Pn,Si,Wi){var qi=new Set(Pn),$n=Si();return Pn.filter(function(qn){var Zt=$n[qn],$t=Zt?Zt.parent:null,Qe=Zt?Zt.children:null;return Zt&&Zt.node.disabled?!0:Wi===Ye?!(Qe&&Qe.some(function(on){return on.key&&qi.has(on.key)})):!($t&&!$t.node.disabled&&qi.has($t.key))})}function Dt(Pn,Si,Wi){for(var qi=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,$n=Si,qn=[],Zt=function(){var on,cn,At,ht=Pn[$t],en=(on=$n)===null||on===void 0?void 0:on.findIndex(function(Rn){var Qn=Rn[Wi.value];return qi?String(Qn)===String(ht):Qn===ht}),fn=en!==-1?(cn=$n)===null||cn===void 0?void 0:cn[en]:null;qn.push({value:(At=fn==null?void 0:fn[Wi.value])!==null&&At!==void 0?At:ht,index:en,option:fn}),$n=fn==null?void 0:fn[Wi.children]},$t=0;$t<Pn.length;$t+=1)Zt();return qn}var tt=function(Pn,Si,Wi,qi,$n){return ke.useMemo(function(){var qn=$n||function(Zt){var $t=qi?Zt.slice(-1):Zt,Qe=" / ";return $t.every(function(on){return["string","number"].includes((0,se.Z)(on))})?$t.join(Qe):$t.reduce(function(on,cn,At){var ht=ke.isValidElement(cn)?ke.cloneElement(cn,{key:At}):cn;return At===0?[ht]:[].concat((0,le.Z)(on),[Qe,ht])},[])};return Pn.map(function(Zt){var $t,Qe,on=Dt(Zt,Si,Wi),cn=qn(on.map(function(ht){var en,fn=ht.option,Rn=ht.value;return(en=fn==null?void 0:fn[Wi.label])!==null&&en!==void 0?en:Rn}),on.map(function(ht){var en=ht.option;return en})),At=dt(Zt);return{label:cn,value:At,key:At,valueCells:Zt,disabled:($t=on[on.length-1])===null||$t===void 0||(Qe=$t.option)===null||Qe===void 0?void 0:Qe.disabled}})},[Pn,Si,Wi,$n,qi])},Ve=pe(71430),_t=function(Pn,Si){var Wi=ke.useRef({options:null,info:null}),qi=ke.useCallback(function(){return Wi.current.options!==Pn&&(Wi.current.options=Pn,Wi.current.info=(0,Ve.I8)(Pn,{fieldNames:Si,initWrapper:function(qn){return(0,ve.Z)((0,ve.Z)({},qn),{},{pathKeyEntities:{}})},processEntity:function(qn,Zt){var $t=qn.nodes.map(function(Qe){return Qe[Si.value]}).join(je);Zt.pathKeyEntities[$t]=qn,qn.key=$t}})),Wi.current.info.pathKeyEntities},[Si,Pn]);return qi},vn=function(Pn,Si){return ke.useCallback(function(Wi){var qi=[],$n=[];return Wi.forEach(function(qn){var Zt=Dt(qn,Pn,Si);Zt.every(function($t){return $t.option})?$n.push(qn):qi.push(qn)}),[$n,qi]},[Pn,Si])},yn=pe(48736);function zt(Pn){return ke.useMemo(function(){if(!Pn)return[!1,{}];var Si={matchInputWidth:!0,limit:50};return Pn&&(0,se.Z)(Pn)==="object"&&(Si=(0,ve.Z)((0,ve.Z)({},Si),Pn)),Si.limit<=0&&delete Si.limit,[!0,Si]},[Pn])}var qt=ke.memo(function(Pn){var Si=Pn.children;return Si},function(Pn,Si){return!Si.open}),ln=qt;function Gn(Pn){var Si,Wi=Pn.prefixCls,qi=Pn.checked,$n=Pn.halfChecked,qn=Pn.disabled,Zt=Pn.onClick,$t=Pn.disableCheckbox,Qe=ke.useContext(de),on=Qe.checkable,cn=typeof on!="boolean"?on:null;return ke.createElement("span",{className:Me()("".concat(Wi),(Si={},(0,he.Z)(Si,"".concat(Wi,"-checked"),qi),(0,he.Z)(Si,"".concat(Wi,"-indeterminate"),!qi&&$n),(0,he.Z)(Si,"".concat(Wi,"-disabled"),qn||$t),Si)),onClick:Zt},cn)}var un="__cascader_fix_label__";function _n(Pn){var Si=Pn.prefixCls,Wi=Pn.multiple,qi=Pn.options,$n=Pn.activeValue,qn=Pn.prevValuePath,Zt=Pn.onToggleOpen,$t=Pn.onSelect,Qe=Pn.onActive,on=Pn.checkedSet,cn=Pn.halfCheckedSet,At=Pn.loadingKeys,ht=Pn.isSelectable,en=Pn.searchValue,fn="".concat(Si,"-menu"),Rn="".concat(Si,"-menu-item"),Qn=ke.useContext(de),Et=Qn.fieldNames,wn=Qn.changeOnSelect,Kn=Qn.expandTrigger,Ei=Qn.expandIcon,tn=Qn.loadingIcon,sn=Qn.dropdownMenuColumnStyle,In=Kn==="hover",Oi=ke.useMemo(function(){return qi.map(function(Di){var vi,Ti=Di.disabled,Li=Di.disableCheckbox,sr=Di[Ee],Zr=(vi=Di[un])!==null&&vi!==void 0?vi:Di[Et.label],Vr=Di[Et.value],Tn=Tt(Di,Et),Po=sr?sr.map(function(Yi){return Yi[Et.value]}):[].concat((0,le.Z)(qn),[Vr]),Xr=dt(Po),Cr=At.includes(Xr),Cn=on.has(Xr),ri=cn.has(Xr);return{disabled:Ti,label:Zr,value:Vr,isLeaf:Tn,isLoading:Cr,checked:Cn,halfChecked:ri,option:Di,disableCheckbox:Li,fullPath:Po,fullPathKey:Xr}})},[qi,on,Et,cn,At,qn]);return ke.createElement("ul",{className:fn,role:"menu"},Oi.map(function(Di){var vi,Ti=Di.disabled,Li=Di.label,sr=Di.value,Zr=Di.isLeaf,Vr=Di.isLoading,Tn=Di.checked,Po=Di.halfChecked,Xr=Di.option,Cr=Di.fullPath,Cn=Di.fullPathKey,ri=Di.disableCheckbox,Yi=function(){if(!(Ti||en)){var Ur=(0,le.Z)(Cr);In&&Zr&&Ur.pop(),Qe(Ur)}},yr=function(){ht(Xr)&&$t(Cr,Zr)},er;return typeof Xr.title=="string"?er=Xr.title:typeof Li=="string"&&(er=Li),ke.createElement("li",{key:Cn,className:Me()(Rn,(vi={},(0,he.Z)(vi,"".concat(Rn,"-expand"),!Zr),(0,he.Z)(vi,"".concat(Rn,"-active"),$n===sr||$n===Cn),(0,he.Z)(vi,"".concat(Rn,"-disabled"),Ti),(0,he.Z)(vi,"".concat(Rn,"-loading"),Vr),vi)),style:sn,role:"menuitemcheckbox",title:er,"aria-checked":Tn,"data-path-key":Cn,onClick:function(){Yi(),!ri&&(!Wi||Zr)&&yr()},onDoubleClick:function(){wn&&Zt(!1)},onMouseEnter:function(){In&&Yi()},onMouseDown:function(Ur){Ur.preventDefault()}},Wi&&ke.createElement(Gn,{prefixCls:"".concat(Si,"-checkbox"),checked:Tn,halfChecked:Po,disabled:Ti||ri,disableCheckbox:ri,onClick:function(Ur){ri||(Ur.stopPropagation(),yr())}}),ke.createElement("div",{className:"".concat(Rn,"-content")},Li),!Vr&&Ei&&!Zr&&ke.createElement("div",{className:"".concat(Rn,"-expand-icon")},Ei),Vr&&tn&&ke.createElement("div",{className:"".concat(Rn,"-loading-icon")},tn))}))}var St=function(){var Pn=(0,Ft.lk)(),Si=Pn.multiple,Wi=Pn.open,qi=ke.useContext(de),$n=qi.values,qn=ke.useState([]),Zt=(0,wt.Z)(qn,2),$t=Zt[0],Qe=Zt[1];return ke.useEffect(function(){if(Wi&&!Si){var on=$n[0];Qe(on||[])}},[Wi]),[$t,Qe]},Zn=pe(10228),ci=function(Pn,Si,Wi,qi,$n,qn){var Zt=(0,Ft.lk)(),$t=Zt.direction,Qe=Zt.searchValue,on=Zt.toggleOpen,cn=Zt.open,At=$t==="rtl",ht=ke.useMemo(function(){for(var sn=-1,In=Si,Oi=[],Di=[],vi=qi.length,Ti=Ot(Si,Wi),Li=function(Xr){var Cr=In.findIndex(function(Cn,ri){return(Ti[ri]?dt(Ti[ri]):Cn[Wi.value])===qi[Xr]});if(Cr===-1)return"break";sn=Cr,Oi.push(sn),Di.push(qi[Xr]),In=In[sn][Wi.children]},sr=0;sr<vi&&In;sr+=1){var Zr=Li(sr);if(Zr==="break")break}for(var Vr=Si,Tn=0;Tn<Oi.length-1;Tn+=1)Vr=Vr[Oi[Tn]][Wi.children];return[Di,sn,Vr,Ti]},[qi,Wi,Si]),en=(0,wt.Z)(ht,4),fn=en[0],Rn=en[1],Qn=en[2],Et=en[3],wn=function(In){$n(In)},Kn=function(In){var Oi=Qn.length,Di=Rn;Di===-1&&In<0&&(Di=Oi);for(var vi=0;vi<Oi;vi+=1){Di=(Di+In+Oi)%Oi;var Ti=Qn[Di];if(Ti&&!Ti.disabled){var Li=fn.slice(0,-1).concat(Et[Di]?dt(Et[Di]):Ti[Wi.value]);wn(Li);return}}},Ei=function(){if(fn.length>1){var In=fn.slice(0,-1);wn(In)}else on(!1)},tn=function(){var In,Oi=((In=Qn[Rn])===null||In===void 0?void 0:In[Wi.children])||[],Di=Oi.find(function(Ti){return!Ti.disabled});if(Di){var vi=[].concat((0,le.Z)(fn),[Di[Wi.value]]);wn(vi)}};ke.useImperativeHandle(Pn,function(){return{onKeyDown:function(In){var Oi=In.which;switch(Oi){case Zn.Z.UP:case Zn.Z.DOWN:{var Di=0;Oi===Zn.Z.UP?Di=-1:Oi===Zn.Z.DOWN&&(Di=1),Di!==0&&Kn(Di);break}case Zn.Z.LEFT:{if(Qe)break;At?tn():Ei();break}case Zn.Z.RIGHT:{if(Qe)break;At?Ei():tn();break}case Zn.Z.BACKSPACE:{Qe||Ei();break}case Zn.Z.ENTER:{if(fn.length){var vi=Qn[Rn],Ti=(vi==null?void 0:vi[Ee])||[];Ti.length?qn(Ti.map(function(Li){return Li[Wi.value]}),Ti[Ti.length-1]):qn(fn,Qn[Rn])}break}case Zn.Z.ESC:on(!1),cn&&In.stopPropagation()}},onKeyUp:function(){}}})},Ze=ke.forwardRef(function(Pn,Si){var Wi,qi,$n,qn,Zt=(0,Ft.lk)(),$t=Zt.prefixCls,Qe=Zt.multiple,on=Zt.searchValue,cn=Zt.toggleOpen,At=Zt.notFoundContent,ht=Zt.direction,en=Zt.open,fn=ke.useRef(),Rn=ht==="rtl",Qn=ke.useContext(de),Et=Qn.options,wn=Qn.values,Kn=Qn.halfValues,Ei=Qn.fieldNames,tn=Qn.changeOnSelect,sn=Qn.onSelect,In=Qn.searchOptions,Oi=Qn.dropdownPrefixCls,Di=Qn.loadData,vi=Qn.expandTrigger,Ti=Oi||$t,Li=ke.useState([]),sr=(0,wt.Z)(Li,2),Zr=sr[0],Vr=sr[1],Tn=function(nr){if(!(!Di||on)){var qo=Dt(nr,Et,Ei),Go=qo.map(function(mo){var Yo=mo.option;return Yo}),Lr=Go[Go.length-1];if(Lr&&!Tt(Lr,Ei)){var br=dt(nr);Vr(function(mo){return[].concat((0,le.Z)(mo),[br])}),Di(Go)}}};ke.useEffect(function(){Zr.length&&Zr.forEach(function(Qo){var nr=Nt(Qo),qo=Dt(nr,Et,Ei,!0).map(function(Lr){var br=Lr.option;return br}),Go=qo[qo.length-1];(!Go||Go[Ei.children]||Tt(Go,Ei))&&Vr(function(Lr){return Lr.filter(function(br){return br!==Qo})})})},[Et,Zr,Ei]);var Po=ke.useMemo(function(){return new Set(He(wn))},[wn]),Xr=ke.useMemo(function(){return new Set(He(Kn))},[Kn]),Cr=St(),Cn=(0,wt.Z)(Cr,2),ri=Cn[0],Yi=Cn[1],yr=function(nr){Yi(nr),Tn(nr)},er=function(nr){var qo=nr.disabled,Go=Tt(nr,Ei);return!qo&&(Go||tn||Qe)},Fr=function(nr,qo){var Go=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;sn(nr),!Qe&&(qo||tn&&(vi==="hover"||Go))&&cn(!1)},Ur=ke.useMemo(function(){return on?In:Et},[on,In,Et]),zr=ke.useMemo(function(){for(var Qo=[{options:Ur}],nr=Ur,qo=Ot(nr,Ei),Go=function(){var Yo=ri[Lr],Ki=nr.find(function(sa,va){return(qo[va]?dt(qo[va]):sa[Ei.value])===Yo}),st=Ki==null?void 0:Ki[Ei.children];if(!(st!=null&&st.length))return"break";nr=st,Qo.push({options:st})},Lr=0;Lr<ri.length;Lr+=1){var br=Go();if(br==="break")break}return Qo},[Ur,ri,Ei]),Tr=function(nr,qo){er(qo)&&Fr(nr,Tt(qo,Ei),!0)};ci(Si,Ur,Ei,ri,yr,Tr),ke.useEffect(function(){for(var Qo=0;Qo<ri.length;Qo+=1){var nr,qo=ri.slice(0,Qo+1),Go=dt(qo),Lr=(nr=fn.current)===null||nr===void 0?void 0:nr.querySelector('li[data-path-key="'.concat(Go.replace(/\\{0,2}"/g,'\\"'),'"]'));Lr&&xt(Lr)}},[ri]);var Yr=!((Wi=zr[0])!==null&&Wi!==void 0&&(qi=Wi.options)!==null&&qi!==void 0&&qi.length),Un=[($n={},(0,he.Z)($n,Ei.value,"__EMPTY__"),(0,he.Z)($n,un,At),(0,he.Z)($n,"disabled",!0),$n)],Ho=(0,ve.Z)((0,ve.Z)({},Pn),{},{multiple:!Yr&&Qe,onSelect:Fr,onActive:yr,onToggleOpen:cn,checkedSet:Po,halfCheckedSet:Xr,loadingKeys:Zr,isSelectable:er}),Yn=Yr?[{options:Un}]:zr,Ao=Yn.map(function(Qo,nr){var qo=ri.slice(0,nr),Go=ri[nr];return ke.createElement(_n,(0,Ct.Z)({key:nr},Ho,{searchValue:on,prefixCls:Ti,options:Qo.options,prevValuePath:qo,activeValue:Go}))});return ke.createElement(ln,{open:en},ke.createElement("div",{className:Me()("".concat(Ti,"-menus"),(qn={},(0,he.Z)(qn,"".concat(Ti,"-menu-empty"),Yr),(0,he.Z)(qn,"".concat(Ti,"-rtl"),Rn),qn)),ref:fn},Ao))}),be=Ze;function Pe(Pn){var Si=Pn.onPopupVisibleChange,Wi=Pn.popupVisible,qi=Pn.popupClassName,$n=Pn.popupPlacement;warning(!Si,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(Wi===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(qi===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning($n===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Ae(Pn,Si){if(Pn){var Wi=function qi($n){for(var qn=0;qn<$n.length;qn++){var Zt=$n[qn];if(Zt[Si==null?void 0:Si.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Zt[Si==null?void 0:Si.children])&&qi(Zt[Si==null?void 0:Si.children]))return!0}};Wi(Pn)}}var Oe=null,xe=["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 ct(Pn){return Array.isArray(Pn)&&Array.isArray(Pn[0])}function Mt(Pn){return Pn?ct(Pn)?Pn:(Pn.length===0?[]:[Pn]).map(function(Si){return Array.isArray(Si)?Si:[Si]}):[]}var at=ke.forwardRef(function(Pn,Si){var Wi=Pn.id,qi=Pn.prefixCls,$n=qi===void 0?"rc-cascader":qi,qn=Pn.fieldNames,Zt=Pn.defaultValue,$t=Pn.value,Qe=Pn.changeOnSelect,on=Pn.onChange,cn=Pn.displayRender,At=Pn.checkable,ht=Pn.autoClearSearchValue,en=ht===void 0?!0:ht,fn=Pn.searchValue,Rn=Pn.onSearch,Qn=Pn.showSearch,Et=Pn.expandTrigger,wn=Pn.options,Kn=Pn.dropdownPrefixCls,Ei=Pn.loadData,tn=Pn.popupVisible,sn=Pn.open,In=Pn.popupClassName,Oi=Pn.dropdownClassName,Di=Pn.dropdownMenuColumnStyle,vi=Pn.popupPlacement,Ti=Pn.placement,Li=Pn.onDropdownVisibleChange,sr=Pn.onPopupVisibleChange,Zr=Pn.expandIcon,Vr=Zr===void 0?">":Zr,Tn=Pn.loadingIcon,Po=Pn.children,Xr=Pn.dropdownMatchSelectWidth,Cr=Xr===void 0?!1:Xr,Cn=Pn.showCheckedStrategy,ri=Cn===void 0?Xe:Cn,Yi=(0,$e.Z)(Pn,xe),yr=(0,lt.ZP)(Wi),er=!!At,Fr=(0,te.Z)(Zt,{value:$t,postState:Mt}),Ur=(0,wt.Z)(Fr,2),zr=Ur[0],Tr=Ur[1],Yr=ke.useMemo(function(){return ot(qn)},[JSON.stringify(qn)]),Un=ke.useMemo(function(){return wn||[]},[wn]),Ho=_t(Un,Yr),Yn=ke.useCallback(function(Ca){var fa=Ho();return Ca.map(function($a){var Qa=fa[$a].nodes;return Qa.map(function(Es){return Es[Yr.value]})})},[Ho,Yr]),Ao=(0,te.Z)("",{value:fn,postState:function(fa){return fa||""}}),Qo=(0,wt.Z)(Ao,2),nr=Qo[0],qo=Qo[1],Go=function(fa,$a){qo(fa),$a.source!=="blur"&&Rn&&Rn(fa)},Lr=zt(Qn),br=(0,wt.Z)(Lr,2),mo=br[0],Yo=br[1],Ki=ze(nr,Un,Yr,Kn||$n,Yo,Qe),st=vn(Un,Yr),sa=ke.useMemo(function(){var Ca=st(zr),fa=(0,wt.Z)(Ca,2),$a=fa[0],Qa=fa[1];if(!er||!zr.length)return[$a,[],Qa];var Es=He($a),ys=Ho(),Zs=(0,vt.S)(Es,!0,ys),Mn=Zs.checkedKeys,Ss=Zs.halfCheckedKeys;return[Yn(Mn),Yn(Ss),Qa]},[er,zr,Ho,Yn,st]),va=(0,wt.Z)(sa,3),Ma=va[0],hs=va[1],Ga=va[2],Lo=ke.useMemo(function(){var Ca=He(Ma),fa=Wt(Ca,Ho,ri);return[].concat((0,le.Z)(Ga),(0,le.Z)(Yn(fa)))},[Ma,Ho,Yn,Ga,ri]),po=tt(Lo,Un,Yr,er,cn),la=(0,Ie.Z)(function(Ca){if(Tr(Ca),on){var fa=Mt(Ca),$a=fa.map(function(ys){return Dt(ys,Un,Yr).map(function(Zs){return Zs.option})}),Qa=er?fa:fa[0],Es=er?$a:$a[0];on(Qa,Es)}}),Eo=(0,Ie.Z)(function(Ca){if((!er||en)&&qo(""),!er)la(Ca);else{var fa=dt(Ca),$a=He(Ma),Qa=He(hs),Es=$a.includes(fa),ys=Ga.some(function(eu){return dt(eu)===fa}),Zs=Ma,Mn=Ga;if(ys&&!Es)Mn=Ga.filter(function(eu){return dt(eu)!==fa});else{var Ss=Es?$a.filter(function(eu){return eu!==fa}):[].concat((0,le.Z)($a),[fa]),ra=Ho(),hl;if(Es){var Ol=(0,vt.S)(Ss,{checked:!1,halfCheckedKeys:Qa},ra);hl=Ol.checkedKeys}else{var ns=(0,vt.S)(Ss,!0,ra);hl=ns.checkedKeys}var yu=Wt(hl,Ho,ri);Zs=Yn(yu)}la([].concat((0,le.Z)(Mn),(0,le.Z)(Zs)))}}),Na=function(fa,$a){if($a.type==="clear"){la([]);return}var Qa=$a.values[0],Es=Qa.valueCells;Eo(Es)},os=sn!==void 0?sn:tn,xo=Oi||In,Qr=Ti||vi,pi=function(fa){Li==null||Li(fa),sr==null||sr(fa)},io=ke.useMemo(function(){return{options:Un,fieldNames:Yr,values:Ma,halfValues:hs,changeOnSelect:Qe,onSelect:Eo,checkable:At,searchOptions:Ki,dropdownPrefixCls:Kn,loadData:Ei,expandTrigger:Et,expandIcon:Vr,loadingIcon:Tn,dropdownMenuColumnStyle:Di}},[Un,Yr,Ma,hs,Qe,Eo,At,Ki,Kn,Ei,Et,Vr,Tn,Di]),ro=!(nr?Ki:Un).length,Ja=nr&&Yo.matchInputWidth||ro?{}:{minWidth:"auto"};return ke.createElement(de.Provider,{value:io},ke.createElement(Ft.Ac,(0,Ct.Z)({},Yi,{ref:Si,id:yr,prefixCls:$n,autoClearSearchValue:en,dropdownMatchSelectWidth:Cr,dropdownStyle:Ja,displayValues:po,onDisplayValuesChange:Na,mode:er?"multiple":void 0,searchValue:nr,onSearch:Go,showSearch:mo,OptionList:be,emptyOptions:ro,open:os,dropdownClassName:xo,placement:Qr,onDropdownVisibleChange:pi,getRawInputElement:function(){return Po}})))});at.SHOW_PARENT=Xe,at.SHOW_CHILD=Ye;var qe=at,Lt=qe,Bt=pe(2738),ft=pe(62892),Gt=pe(53487),Sn=pe(19080),an=pe(36355),rn=pe(93891),zn=pe(1684),kn=pe(19716),mn=pe(32441),ei=pe(14154),Pi=pe(58582),Hn=pe(84443),bn=pe(66339),wi=pe(33234),Zi=pe(98447),Hi=pe(17313),rr=pe(74207),_r=pe(83116);const gi=Pn=>{const{prefixCls:Si,componentCls:Wi,antCls:qi}=Pn,$n=`${Wi}-menu-item`,qn=`
&${$n}-expand ${$n}-expand-icon,
${$n}-loading-icon
`;return[{[Wi]:{width:Pn.controlWidth}},{[`${Wi}-dropdown`]:[(0,Zi.C2)(`${Si}-checkbox`,Pn),{[`&${qi}-select-dropdown`]:{padding:0}},{[Wi]:{"&-checkbox":{top:0,marginInlineEnd:Pn.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${Wi}-menu-empty`]:{[`${Wi}-menu`]:{width:"100%",height:"auto",[$n]:{color:Pn.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:Pn.controlItemWidth,height:Pn.dropdownHeight,margin:0,padding:Pn.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${Pn.lineWidth}px ${Pn.lineType} ${Pn.colorSplit}`},"&-item":Object.assign(Object.assign({},Hi.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:Pn.optionPadding,lineHeight:Pn.lineHeight,cursor:"pointer",transition:`all ${Pn.motionDurationMid}`,borderRadius:Pn.borderRadiusSM,"&:hover":{background:Pn.controlItemBgHover},"&-disabled":{color:Pn.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[qn]:{color:Pn.colorTextDisabled}},[`&-active:not(${$n}-disabled)`]:{"&, &:hover":{fontWeight:Pn.optionSelectedFontWeight,backgroundColor:Pn.optionSelectedBg}},"&-content":{flex:"auto"},[qn]:{marginInlineStart:Pn.paddingXXS,color:Pn.colorTextDescription,fontSize:Pn.fontSizeIcon},"&-keyword":{color:Pn.colorHighlight}})}}}]},{[`${Wi}-dropdown-rtl`]:{direction:"rtl"}},(0,rr.c)(Pn)]};var di=(0,_r.Z)("Cascader",Pn=>[gi(Pn)],Pn=>{const Si=Math.round((Pn.controlHeight-Pn.fontSize*Pn.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:Pn.controlItemBgActive,optionSelectedFontWeight:Pn.fontWeightStrong,optionPadding:`${Si}px ${Pn.paddingSM}px`,menuPadding:Pn.paddingXXS}}),xi=function(Pn,Si){var Wi={};for(var qi in Pn)Object.prototype.hasOwnProperty.call(Pn,qi)&&Si.indexOf(qi)<0&&(Wi[qi]=Pn[qi]);if(Pn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $n=0,qi=Object.getOwnPropertySymbols(Pn);$n<qi.length;$n++)Si.indexOf(qi[$n])<0&&Object.prototype.propertyIsEnumerable.call(Pn,qi[$n])&&(Wi[qi[$n]]=Pn[qi[$n]]);return Wi};const{SHOW_CHILD:$i,SHOW_PARENT:Ri}=Lt;function Kr(Pn,Si,Wi){const qi=Pn.toLowerCase().split(Si).reduce((Zt,$t,Qe)=>Qe===0?[$t]:[].concat((0,le.Z)(Zt),[Si,$t]),[]),$n=[];let qn=0;return qi.forEach((Zt,$t)=>{const Qe=qn+Zt.length;let on=Pn.slice(qn,Qe);qn=Qe,$t%2===1&&(on=ke.createElement("span",{className:`${Wi}-menu-item-keyword`,key:`separator-${$t}`},on)),$n.push(on)}),$n}const Sr=(Pn,Si,Wi,qi)=>{const $n=[],qn=Pn.toLowerCase();return Si.forEach((Zt,$t)=>{$t!==0&&$n.push(" / ");let Qe=Zt[qi.label];const on=typeof Qe;(on==="string"||on==="number")&&(Qe=Kr(String(Qe),qn,Wi)),$n.push(Qe)}),$n},Ne=ke.forwardRef((Pn,Si)=>{const{prefixCls:Wi,size:qi,disabled:$n,className:qn,rootClassName:Zt,multiple:$t,bordered:Qe=!0,transitionName:on,choiceTransitionName:cn="",popupClassName:At,dropdownClassName:ht,expandIcon:en,placement:fn,showSearch:Rn,allowClear:Qn=!0,notFoundContent:Et,direction:wn,getPopupContainer:Kn,status:Ei,showArrow:tn,builtinPlacements:sn,style:In}=Pn,Oi=xi(Pn,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),Di=(0,Bt.Z)(Oi,["suffixIcon"]),{getPopupContainer:vi,getPrefixCls:Ti,renderEmpty:Li,direction:sr,popupOverflow:Zr,cascader:Vr}=ke.useContext(an.E_),Tn=wn||sr,Po=Tn==="rtl",{status:Xr,hasFeedback:Cr,isFormItemInput:Cn,feedbackIcon:ri}=ke.useContext(mn.aM),Yi=(0,Sn.F)(Xr,Ei),yr=Et||(Li==null?void 0:Li("Cascader"))||ke.createElement(rn.Z,{componentName:"Cascader"}),er=Ti(),Fr=Ti("select",Wi),Ur=Ti("cascader",Wi),[zr,Tr]=(0,ei.Z)(Fr),[Yr]=di(Ur),{compactSize:Un,compactItemClassnames:Ho}=(0,wi.ri)(Fr,wn),Yn=Me()(At||ht,`${Ur}-dropdown`,{[`${Ur}-dropdown-rtl`]:Tn==="rtl"},Zt,Tr),Ao=ke.useMemo(()=>{if(!Rn)return Rn;let Ga={render:Sr};return typeof Rn=="object"&&(Ga=Object.assign(Object.assign({},Ga),Rn)),Ga},[Rn]),Qo=(0,kn.Z)(Ga=>{var Lo;return(Lo=qi!=null?qi:Un)!==null&&Lo!==void 0?Lo:Ga}),nr=ke.useContext(zn.Z),qo=$n!=null?$n:nr;let Go=en;en||(Go=Po?ke.createElement(We.Z,null):ke.createElement(Ge.Z,null));const Lr=ke.createElement("span",{className:`${Fr}-menu-item-loading-icon`},ke.createElement(ut.Z,{spin:!0})),br=ke.useMemo(()=>$t?ke.createElement("span",{className:`${Ur}-checkbox-inner`}):!1,[$t]),mo=(0,Hn.Z)(Pn.suffixIcon,tn),{suffixIcon:Yo,removeIcon:Ki,clearIcon:st}=(0,bn.Z)(Object.assign(Object.assign({},Pn),{hasFeedback:Cr,feedbackIcon:ri,showSuffixIcon:mo,multiple:$t,prefixCls:Fr,componentName:"Cascader"})),sa=ke.useMemo(()=>fn!==void 0?fn:Po?"bottomRight":"bottomLeft",[fn,Po]),va=(0,Pi.Z)(sn,Zr),Ma=Qn===!0?{clearIcon:st}:Qn,hs=ke.createElement(Lt,Object.assign({prefixCls:Fr,className:Me()(!Wi&&Ur,{[`${Fr}-lg`]:Qo==="large",[`${Fr}-sm`]:Qo==="small",[`${Fr}-rtl`]:Po,[`${Fr}-borderless`]:!Qe,[`${Fr}-in-form-item`]:Cn},(0,Sn.Z)(Fr,Yi,Cr),Ho,Vr==null?void 0:Vr.className,qn,Zt,Tr),disabled:qo,style:Object.assign(Object.assign({},Vr==null?void 0:Vr.style),In)},Di,{builtinPlacements:va,direction:Tn,placement:sa,notFoundContent:yr,allowClear:Ma,showSearch:Ao,expandIcon:Go,suffixIcon:Yo,removeIcon:Ki,loadingIcon:Lr,checkable:br,dropdownClassName:Yn,dropdownPrefixCls:Wi||Ur,choiceTransitionName:(0,ft.m)(er,"",cn),transitionName:(0,ft.m)(er,"slide-up",on),getPopupContainer:Kn||vi,ref:Si}));return Yr(zr(hs))}),Ci=(0,Gt.Z)(Ne);Ne.SHOW_PARENT=Ri,Ne.SHOW_CHILD=$i,Ne._InternalPanelDoNotUseOrYouWillBeFired=Ci;var wr=Ne},24905:function(On,pn,pe){"use strict";pe.d(pn,{default:function(){return ze}});var le=pe(92310),ke=pe.n(le),We=pe(5630),ut=pe(59301),Ge=pe(36355),Ue=pe(1684),Me=pe(32441),wt=ut.createContext(null),$e=pe(98447),Ft=pe(14088),lt=pe(4572),vt=function(je,Xe){var Ye={};for(var dt in je)Object.prototype.hasOwnProperty.call(je,dt)&&Xe.indexOf(dt)<0&&(Ye[dt]=je[dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,dt=Object.getOwnPropertySymbols(je);He<dt.length;He++)Xe.indexOf(dt[He])<0&&Object.prototype.propertyIsEnumerable.call(je,dt[He])&&(Ye[dt[He]]=je[dt[He]]);return Ye};const Ie=(je,Xe)=>{var Ye;const{prefixCls:dt,className:He,rootClassName:Nt,children:ot,indeterminate:Tt=!1,style:xt,onMouseEnter:Ot,onMouseLeave:Wt,skipGroup:Dt=!1,disabled:tt}=je,Ve=vt(je,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:_t,direction:vn,checkbox:yn}=ut.useContext(Ge.E_),zt=ut.useContext(wt),{isFormItemInput:qt}=ut.useContext(Me.aM),ln=ut.useContext(Ue.Z),Gn=(Ye=(zt==null?void 0:zt.disabled)||tt)!==null&&Ye!==void 0?Ye:ln,un=ut.useRef(Ve.value);ut.useEffect(()=>{zt==null||zt.registerValue(Ve.value)},[]),ut.useEffect(()=>{if(!Dt)return Ve.value!==un.current&&(zt==null||zt.cancelValue(un.current),zt==null||zt.registerValue(Ve.value),un.current=Ve.value),()=>zt==null?void 0:zt.cancelValue(Ve.value)},[Ve.value]);const _n=_t("checkbox",dt),[St,Zn]=(0,$e.ZP)(_n),ci=Object.assign({},Ve);zt&&!Dt&&(ci.onChange=function(){Ve.onChange&&Ve.onChange.apply(Ve,arguments),zt.toggleOption&&zt.toggleOption({label:ot,value:Ve.value})},ci.name=zt.name,ci.checked=zt.value.includes(Ve.value));const Ze=ke()(`${_n}-wrapper`,{[`${_n}-rtl`]:vn==="rtl",[`${_n}-wrapper-checked`]:ci.checked,[`${_n}-wrapper-disabled`]:Gn,[`${_n}-wrapper-in-form-item`]:qt},yn==null?void 0:yn.className,He,Nt,Zn),be=ke()({[`${_n}-indeterminate`]:Tt},lt.A,Zn),Pe=Tt?"mixed":void 0;return St(ut.createElement(Ft.Z,{component:"Checkbox",disabled:Gn},ut.createElement("label",{className:Ze,style:Object.assign(Object.assign({},yn==null?void 0:yn.style),xt),onMouseEnter:Ot,onMouseLeave:Wt},ut.createElement(We.Z,Object.assign({"aria-checked":Pe},ci,{prefixCls:_n,className:be,disabled:Gn,ref:Xe})),ot!==void 0&&ut.createElement("span",null,ot))))};var ee=ut.forwardRef(Ie),de=pe(19127),se=pe(2738),he=function(je,Xe){var Ye={};for(var dt in je)Object.prototype.hasOwnProperty.call(je,dt)&&Xe.indexOf(dt)<0&&(Ye[dt]=je[dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,dt=Object.getOwnPropertySymbols(je);He<dt.length;He++)Xe.indexOf(dt[He])<0&&Object.prototype.propertyIsEnumerable.call(je,dt[He])&&(Ye[dt[He]]=je[dt[He]]);return Ye};const ve=(je,Xe)=>{const{defaultValue:Ye,children:dt,options:He=[],prefixCls:Nt,className:ot,rootClassName:Tt,style:xt,onChange:Ot}=je,Wt=he(je,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Dt,direction:tt}=ut.useContext(Ge.E_),[Ve,_t]=ut.useState(Wt.value||Ye||[]),[vn,yn]=ut.useState([]);ut.useEffect(()=>{"value"in Wt&&_t(Wt.value||[])},[Wt.value]);const zt=ut.useMemo(()=>He.map(Ae=>typeof Ae=="string"||typeof Ae=="number"?{label:Ae,value:Ae}:Ae),[He]),qt=Ae=>{yn(Oe=>Oe.filter(xe=>xe!==Ae))},ln=Ae=>{yn(Oe=>[].concat((0,de.Z)(Oe),[Ae]))},Gn=Ae=>{const Oe=Ve.indexOf(Ae.value),xe=(0,de.Z)(Ve);Oe===-1?xe.push(Ae.value):xe.splice(Oe,1),"value"in Wt||_t(xe),Ot==null||Ot(xe.filter(ct=>vn.includes(ct)).sort((ct,Mt)=>{const at=zt.findIndex(Lt=>Lt.value===ct),qe=zt.findIndex(Lt=>Lt.value===Mt);return at-qe}))},un=Dt("checkbox",Nt),_n=`${un}-group`,[St,Zn]=(0,$e.ZP)(un),ci=(0,se.Z)(Wt,["value","disabled"]),Ze=He.length?zt.map(Ae=>ut.createElement(ee,{prefixCls:un,key:Ae.value.toString(),disabled:"disabled"in Ae?Ae.disabled:Wt.disabled,value:Ae.value,checked:Ve.includes(Ae.value),onChange:Ae.onChange,className:`${_n}-item`,style:Ae.style,title:Ae.title},Ae.label)):dt,be={toggleOption:Gn,value:Ve,disabled:Wt.disabled,name:Wt.name,registerValue:ln,cancelValue:qt},Pe=ke()(_n,{[`${_n}-rtl`]:tt==="rtl"},ot,Tt,Zn);return St(ut.createElement("div",Object.assign({className:Pe,style:xt},ci,{ref:Xe}),ut.createElement(wt.Provider,{value:be},Ze)))},Ee=ut.forwardRef(ve);var Be=ut.memo(Ee);const Le=ee;Le.Group=Be,Le.__ANT_CHECKBOX=!0;var ze=Le},98447:function(On,pn,pe){"use strict";pe.d(pn,{C2:function(){return Ge}});var le=pe(17313),ke=pe(37613),We=pe(83116);const ut=Ue=>{const{checkboxCls:Me}=Ue,Ct=`${Me}-wrapper`;return[{[`${Me}-group`]:Object.assign(Object.assign({},(0,le.Wf)(Ue)),{display:"inline-flex",flexWrap:"wrap",columnGap:Ue.marginXS,[`> ${Ue.antCls}-row`]:{flex:1}}),[Ct]:Object.assign(Object.assign({},(0,le.Wf)(Ue)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Ct}`]:{marginInlineStart:0},[`&${Ct}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Me]:Object.assign(Object.assign({},(0,le.Wf)(Ue)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Ue.borderRadiusSM,alignSelf:"center",[`${Me}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Me}-inner`]:Object.assign({},(0,le.oN)(Ue))},[`${Me}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Ue.checkboxSize,height:Ue.checkboxSize,direction:"ltr",backgroundColor:Ue.colorBgContainer,border:`${Ue.lineWidth}px ${Ue.lineType} ${Ue.colorBorder}`,borderRadius:Ue.borderRadiusSM,borderCollapse:"separate",transition:`all ${Ue.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Ue.checkboxSize/14*5,height:Ue.checkboxSize/14*8,border:`${Ue.lineWidthBold}px solid ${Ue.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Ue.motionDurationFast} ${Ue.motionEaseInBack}, opacity ${Ue.motionDurationFast}`}},"& + span":{paddingInlineStart:Ue.paddingXS,paddingInlineEnd:Ue.paddingXS}})},{[`
${Ct}:not(${Ct}-disabled),
${Me}:not(${Me}-disabled)
`]:{[`&:hover ${Me}-inner`]:{borderColor:Ue.colorPrimary}},[`${Ct}:not(${Ct}-disabled)`]:{[`&:hover ${Me}-checked:not(${Me}-disabled) ${Me}-inner`]:{backgroundColor:Ue.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Me}-checked:not(${Me}-disabled):after`]:{borderColor:Ue.colorPrimaryHover}}},{[`${Me}-checked`]:{[`${Me}-inner`]:{backgroundColor:Ue.colorPrimary,borderColor:Ue.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Ue.motionDurationMid} ${Ue.motionEaseOutBack} ${Ue.motionDurationFast}`}}},[`
${Ct}-checked:not(${Ct}-disabled),
${Me}-checked:not(${Me}-disabled)
`]:{[`&:hover ${Me}-inner`]:{backgroundColor:Ue.colorPrimaryHover,borderColor:"transparent"}}},{[Me]:{"&-indeterminate":{[`${Me}-inner`]:{backgroundColor:Ue.colorBgContainer,borderColor:Ue.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Ue.fontSizeLG/2,height:Ue.fontSizeLG/2,backgroundColor:Ue.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Ct}-disabled`]:{cursor:"not-allowed"},[`${Me}-disabled`]:{[`&, ${Me}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Me}-inner`]:{background:Ue.colorBgContainerDisabled,borderColor:Ue.colorBorder,"&:after":{borderColor:Ue.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Ue.colorTextDisabled},[`&${Me}-indeterminate ${Me}-inner::after`]:{background:Ue.colorTextDisabled}}}]};function Ge(Ue,Me){const Ct=(0,ke.TS)(Me,{checkboxCls:`.${Ue}`,checkboxSize:Me.controlInteractiveSize});return[ut(Ct)]}pn.ZP=(0,We.Z)("Checkbox",(Ue,Me)=>{let{prefixCls:Ct}=Me;return[Ge(Ct,Ue)]})},36381:function(On,pn,pe){"use strict";pe.d(pn,{default:function(){return ci}});var le=pe(38819),ke=pe(92310),We=pe.n(ke),ut=pe(96663),Ge=pe(19127),Ue=pe(72071),Me=pe(20135),Ct=pe(18929),wt=pe(48736),$e=pe(59301),Ft=pe(6620),lt=pe(11592),vt=pe(90493),Ie=pe(77900),te=pe(10228),ee=$e.forwardRef(function(Ze,be){var Pe=Ze.prefixCls,Ae=Ze.forceRender,Oe=Ze.className,xe=Ze.style,ct=Ze.children,Mt=Ze.isActive,at=Ze.role,qe=$e.useState(Mt||Ae),Lt=(0,Ue.Z)(qe,2),Bt=Lt[0],ft=Lt[1];return $e.useEffect(function(){(Ae||Mt)&&ft(!0)},[Ae,Mt]),Bt?$e.createElement("div",{ref:be,className:We()("".concat(Pe,"-content"),(0,vt.Z)((0,vt.Z)({},"".concat(Pe,"-content-active"),Mt),"".concat(Pe,"-content-inactive"),!Mt),Oe),style:xe,role:at},$e.createElement("div",{className:"".concat(Pe,"-content-box")},ct)):null});ee.displayName="PanelContent";var de=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],he=$e.forwardRef(function(Ze,be){var Pe=Ze.showArrow,Ae=Pe===void 0?!0:Pe,Oe=Ze.headerClass,xe=Ze.isActive,ct=Ze.onItemClick,Mt=Ze.forceRender,at=Ze.className,qe=Ze.prefixCls,Lt=Ze.collapsible,Bt=Ze.accordion,ft=Ze.panelKey,Gt=Ze.extra,Sn=Ze.header,an=Ze.expandIcon,rn=Ze.openMotion,zn=Ze.destroyInactivePanel,kn=Ze.children,mn=(0,Ft.Z)(Ze,se),ei=Lt==="disabled",Pi=Lt==="header",Hn=Lt==="icon",bn=Gt!=null&&typeof Gt!="boolean",wi=function(){ct==null||ct(ft)},Zi=function(xi){(xi.key==="Enter"||xi.keyCode===te.Z.ENTER||xi.which===te.Z.ENTER)&&wi()},Hi=typeof an=="function"?an(Ze):$e.createElement("i",{className:"arrow"});Hi&&(Hi=$e.createElement("div",{className:"".concat(qe,"-expand-icon"),onClick:["header","icon"].includes(Lt)?wi:void 0},Hi));var rr=We()((0,vt.Z)((0,vt.Z)((0,vt.Z)({},"".concat(qe,"-item"),!0),"".concat(qe,"-item-active"),xe),"".concat(qe,"-item-disabled"),ei),at),_r=We()(Oe,(0,vt.Z)((0,vt.Z)((0,vt.Z)({},"".concat(qe,"-header"),!0),"".concat(qe,"-header-collapsible-only"),Pi),"".concat(qe,"-icon-collapsible-only"),Hn)),gi={className:_r,"aria-expanded":xe,"aria-disabled":ei,onKeyDown:Zi};return!Pi&&!Hn&&(gi.onClick=wi,gi.role=Bt?"tab":"button",gi.tabIndex=ei?-1:0),$e.createElement("div",(0,ut.Z)({},mn,{ref:be,className:rr}),$e.createElement("div",gi,Ae&&Hi,$e.createElement("span",{className:"".concat(qe,"-header-text"),onClick:Lt==="header"?wi:void 0},Sn),bn&&$e.createElement("div",{className:"".concat(qe,"-extra")},Gt)),$e.createElement(Ie.default,(0,ut.Z)({visible:xe,leavedClassName:"".concat(qe,"-content-hidden")},rn,{forceRender:Mt,removeOnLeave:zn}),function(di,xi){var $i=di.className,Ri=di.style;return $e.createElement(de,{ref:xi,prefixCls:qe,className:$i,style:Ri,isActive:xe,forceRender:Mt,role:Bt?"tabpanel":void 0},kn)}))}),ve=he,Ee=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Be=function(be,Pe){var Ae=Pe.prefixCls,Oe=Pe.accordion,xe=Pe.collapsible,ct=Pe.destroyInactivePanel,Mt=Pe.onItemClick,at=Pe.activeKey,qe=Pe.openMotion,Lt=Pe.expandIcon;return be.map(function(Bt,ft){var Gt=Bt.children,Sn=Bt.label,an=Bt.key,rn=Bt.collapsible,zn=Bt.onItemClick,kn=Bt.destroyInactivePanel,mn=(0,Ft.Z)(Bt,Ee),ei=String(an!=null?an:ft),Pi=rn!=null?rn:xe,Hn=kn!=null?kn:ct,bn=function(Hi){Pi!=="disabled"&&(Mt(Hi),zn==null||zn(Hi))},wi=!1;return Oe?wi=at[0]===ei:wi=at.indexOf(ei)>-1,$e.createElement(ve,(0,ut.Z)({},mn,{prefixCls:Ae,key:ei,panelKey:ei,isActive:wi,accordion:Oe,openMotion:qe,expandIcon:Lt,header:Sn,collapsible:Pi,onItemClick:bn,destroyInactivePanel:Hn}),Gt)})},Le=function(be,Pe,Ae){if(!be)return null;var Oe=Ae.prefixCls,xe=Ae.accordion,ct=Ae.collapsible,Mt=Ae.destroyInactivePanel,at=Ae.onItemClick,qe=Ae.activeKey,Lt=Ae.openMotion,Bt=Ae.expandIcon,ft=be.key||String(Pe),Gt=be.props,Sn=Gt.header,an=Gt.headerClass,rn=Gt.destroyInactivePanel,zn=Gt.collapsible,kn=Gt.onItemClick,mn=!1;xe?mn=qe[0]===ft:mn=qe.indexOf(ft)>-1;var ei=zn!=null?zn:ct,Pi=function(wi){ei!=="disabled"&&(at(wi),kn==null||kn(wi))},Hn={key:ft,panelKey:ft,header:Sn,headerClass:an,isActive:mn,prefixCls:Oe,destroyInactivePanel:rn!=null?rn:Mt,openMotion:Lt,accordion:xe,children:be.props.children,onItemClick:Pi,expandIcon:Bt,collapsible:ei};return typeof be.type=="string"?be:(Object.keys(Hn).forEach(function(bn){typeof Hn[bn]=="undefined"&&delete Hn[bn]}),$e.cloneElement(be,Hn))};function ze(Ze,be,Pe){return Array.isArray(Ze)?Be(Ze,Pe):(0,lt.Z)(be).map(function(Ae,Oe){return Le(Ae,Oe,Pe)})}var je=ze,Xe=pe(26112);function Ye(Ze){var be=Ze;if(!Array.isArray(be)){var Pe=(0,Me.Z)(be);be=Pe==="number"||Pe==="string"?[be]:[]}return be.map(function(Ae){return String(Ae)})}var dt=$e.forwardRef(function(Ze,be){var Pe=Ze.prefixCls,Ae=Pe===void 0?"rc-collapse":Pe,Oe=Ze.destroyInactivePanel,xe=Oe===void 0?!1:Oe,ct=Ze.style,Mt=Ze.accordion,at=Ze.className,qe=Ze.children,Lt=Ze.collapsible,Bt=Ze.openMotion,ft=Ze.expandIcon,Gt=Ze.activeKey,Sn=Ze.defaultActiveKey,an=Ze.onChange,rn=Ze.items,zn=We()(Ae,at),kn=(0,Ct.Z)([],{value:Gt,onChange:function(Zi){return an==null?void 0:an(Zi)},defaultValue:Sn,postState:Ye}),mn=(0,Ue.Z)(kn,2),ei=mn[0],Pi=mn[1],Hn=function(Zi){return Pi(function(){if(Mt)return ei[0]===Zi?[]:[Zi];var Hi=ei.indexOf(Zi),rr=Hi>-1;return rr?ei.filter(function(_r){return _r!==Zi}):[].concat((0,Ge.Z)(ei),[Zi])})};(0,wt.ZP)(!qe,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var bn=je(rn,qe,{prefixCls:Ae,accordion:Mt,openMotion:Bt,expandIcon:ft,collapsible:Lt,destroyInactivePanel:xe,onItemClick:Hn,activeKey:ei});return $e.createElement("div",(0,ut.Z)({ref:be,className:zn,style:ct,role:Mt?"tablist":void 0},(0,Xe.Z)(Ze,{aria:!0,data:!0})),bn)}),He=Object.assign(dt,{Panel:ve}),Nt=He,ot=He.Panel,Tt=pe(2738),xt=pe(62892),Ot=pe(92343),Wt=pe(36355),Dt=pe(19716),Ve=$e.forwardRef((Ze,be)=>{const{getPrefixCls:Pe}=$e.useContext(Wt.E_),{prefixCls:Ae,className:Oe,showArrow:xe=!0}=Ze,ct=Pe("collapse",Ae),Mt=We()({[`${ct}-no-arrow`]:!xe},Oe);return $e.createElement(Nt.Panel,Object.assign({ref:be},Ze,{prefixCls:ct,className:Mt}))}),_t=pe(17313),vn=pe(8378),yn=pe(83116),zt=pe(37613);const qt=Ze=>{const{componentCls:be,contentBg:Pe,padding:Ae,headerBg:Oe,headerPadding:xe,collapseHeaderPaddingSM:ct,collapseHeaderPaddingLG:Mt,collapsePanelBorderRadius:at,lineWidth:qe,lineType:Lt,colorBorder:Bt,colorText:ft,colorTextHeading:Gt,colorTextDisabled:Sn,fontSize:an,fontSizeLG:rn,lineHeight:zn,marginSM:kn,paddingSM:mn,paddingLG:ei,paddingXS:Pi,motionDurationSlow:Hn,fontSizeIcon:bn,contentPadding:wi}=Ze,Zi=`${qe}px ${Lt} ${Bt}`;return{[be]:Object.assign(Object.assign({},(0,_t.Wf)(Ze)),{backgroundColor:Oe,border:Zi,borderBottom:0,borderRadius:`${at}px`,"&-rtl":{direction:"rtl"},[`& > ${be}-item`]:{borderBottom:Zi,"&:last-child":{[`
&,
& > ${be}-header`]:{borderRadius:`0 0 ${at}px ${at}px`}},[`> ${be}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:xe,color:Gt,lineHeight:zn,cursor:"pointer",transition:`all ${Hn}, visibility 0s`,[`> ${be}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${be}-expand-icon`]:{height:an*zn,display:"flex",alignItems:"center",paddingInlineEnd:kn},[`${be}-arrow`]:Object.assign(Object.assign({},(0,_t.Ro)()),{fontSize:bn,svg:{transition:`transform ${Hn}`}}),[`${be}-header-text`]:{marginInlineEnd:"auto"}},[`${be}-header-collapsible-only`]:{cursor:"default",[`${be}-header-text`]:{flex:"none",cursor:"pointer"}},[`${be}-icon-collapsible-only`]:{cursor:"default",[`${be}-expand-icon`]:{cursor:"pointer"}}},[`${be}-content`]:{color:ft,backgroundColor:Pe,borderTop:Zi,[`& > ${be}-content-box`]:{padding:wi},"&-hidden":{display:"none"}},"&-small":{[`> ${be}-item`]:{[`> ${be}-header`]:{padding:ct,paddingInlineStart:Pi,[`> ${be}-expand-icon`]:{marginInlineStart:mn-Pi}},[`> ${be}-content > ${be}-content-box`]:{padding:mn}}},"&-large":{[`> ${be}-item`]:{fontSize:rn,[`> ${be}-header`]:{padding:Mt,paddingInlineStart:Ae,[`> ${be}-expand-icon`]:{height:rn*zn,marginInlineStart:ei-Ae}},[`> ${be}-content > ${be}-content-box`]:{padding:ei}}},[`${be}-item:last-child`]:{[`> ${be}-content`]:{borderRadius:`0 0 ${at}px ${at}px`}},[`& ${be}-item-disabled > ${be}-header`]:{"\n &,\n & > .arrow\n ":{color:Sn,cursor:"not-allowed"}},[`&${be}-icon-position-end`]:{[`& > ${be}-item`]:{[`> ${be}-header`]:{[`${be}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:kn}}}}})}},ln=Ze=>{const{componentCls:be}=Ze,Pe=`> ${be}-item > ${be}-header ${be}-arrow svg`;return{[`${be}-rtl`]:{[Pe]:{transform:"rotate(180deg)"}}}},Gn=Ze=>{const{componentCls:be,headerBg:Pe,paddingXXS:Ae,colorBorder:Oe}=Ze;return{[`${be}-borderless`]:{backgroundColor:Pe,border:0,[`> ${be}-item`]:{borderBottom:`1px solid ${Oe}`},[`
> ${be}-item:last-child,
> ${be}-item:last-child ${be}-header
`]:{borderRadius:0},[`> ${be}-item:last-child`]:{borderBottom:0},[`> ${be}-item > ${be}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${be}-item > ${be}-content > ${be}-content-box`]:{paddingTop:Ae}}}},un=Ze=>{const{componentCls:be,paddingSM:Pe}=Ze;return{[`${be}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${be}-item`]:{borderBottom:0,[`> ${be}-content`]:{backgroundColor:"transparent",border:0,[`> ${be}-content-box`]:{paddingBlock:Pe}}}}}};var _n=(0,yn.Z)("Collapse",Ze=>{const be=(0,zt.TS)(Ze,{collapseHeaderPaddingSM:`${Ze.paddingXS}px ${Ze.paddingSM}px`,collapseHeaderPaddingLG:`${Ze.padding}px ${Ze.paddingLG}px`,collapsePanelBorderRadius:Ze.borderRadiusLG});return[qt(be),Gn(be),un(be),ln(be),(0,vn.Z)(be)]},Ze=>({headerPadding:`${Ze.paddingSM}px ${Ze.padding}px`,headerBg:Ze.colorFillAlter,contentPadding:`${Ze.padding}px 16px`,contentBg:Ze.colorBgContainer})),Zn=Object.assign($e.forwardRef((Ze,be)=>{const{getPrefixCls:Pe,direction:Ae,collapse:Oe}=$e.useContext(Wt.E_),{prefixCls:xe,className:ct,rootClassName:Mt,style:at,bordered:qe=!0,ghost:Lt,size:Bt,expandIconPosition:ft="start",children:Gt,expandIcon:Sn}=Ze,an=(0,Dt.Z)(Zi=>{var Hi;return(Hi=Bt!=null?Bt:Zi)!==null&&Hi!==void 0?Hi:"middle"}),rn=Pe("collapse",xe),zn=Pe(),[kn,mn]=_n(rn),ei=$e.useMemo(()=>ft==="left"?"start":ft==="right"?"end":ft,[ft]),Pi=function(){let Zi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const Hi=Sn?Sn(Zi):$e.createElement(le.Z,{rotate:Zi.isActive?90:void 0});return(0,Ot.Tm)(Hi,()=>({className:We()(Hi.props.className,`${rn}-arrow`)}))},Hn=We()(`${rn}-icon-position-${ei}`,{[`${rn}-borderless`]:!qe,[`${rn}-rtl`]:Ae==="rtl",[`${rn}-ghost`]:!!Lt,[`${rn}-${an}`]:an!=="middle"},Oe==null?void 0:Oe.className,ct,Mt,mn),bn=Object.assign(Object.assign({},(0,xt.Z)(zn)),{motionAppear:!1,leavedClassName:`${rn}-content-hidden`}),wi=$e.useMemo(()=>Gt?(0,lt.Z)(Gt).map((Zi,Hi)=>{var rr,_r;if(!((rr=Zi.props)===null||rr===void 0)&&rr.disabled){const gi=(_r=Zi.key)!==null&&_r!==void 0?_r:String(Hi),{disabled:di,collapsible:xi}=Zi.props,$i=Object.assign(Object.assign({},(0,Tt.Z)(Zi.props,["disabled"])),{key:gi,collapsible:xi!=null?xi:di?"disabled":void 0});return(0,Ot.Tm)(Zi,$i)}return Zi}):null,[Gt]);return kn($e.createElement(Nt,Object.assign({ref:be,openMotion:bn},(0,Tt.Z)(Ze,["rootClassName"]),{expandIcon:Pi,prefixCls:rn,className:Hn,style:Object.assign(Object.assign({},Oe==null?void 0:Oe.style),at)}),wi))}),{Panel:Ve}),ci=Zn},93891:function(On,pn,pe){"use strict";var le=pe(59301),ke=pe(36355),We=pe(64165);const ut=Ge=>{const{componentName:Ue}=Ge,{getPrefixCls:Me}=(0,le.useContext)(ke.E_),Ct=Me("empty");switch(Ue){case"Table":case"List":return le.createElement(We.Z,{image:We.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return le.createElement(We.Z,{image:We.Z.PRESENTED_IMAGE_SIMPLE,className:`${Ct}-small`});default:return le.createElement(We.Z,null)}};pn.Z=ut},28103:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return lt}});var le=pe(92310),ke=pe.n(le),We=pe(59301),ut=pe(36355),Ge=pe(17313),Ue=pe(83116),Me=pe(37613);const Ct=vt=>{const{componentCls:Ie,sizePaddingEdgeHorizontal:te,colorSplit:ee,lineWidth:de,textPaddingInline:se,orientationMargin:he,verticalMarginInline:ve}=vt;return{[Ie]:Object.assign(Object.assign({},(0,Ge.Wf)(vt)),{borderBlockStart:`${de}px solid ${ee}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:ve,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${de}px solid ${ee}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${vt.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${Ie}-with-text`]:{display:"flex",alignItems:"center",margin:`${vt.dividerHorizontalWithTextGutterMargin}px 0`,color:vt.colorTextHeading,fontWeight:500,fontSize:vt.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${ee}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${de}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${Ie}-with-text-left`]:{"&::before":{width:`${he*100}%`},"&::after":{width:`${100-he*100}%`}},[`&-horizontal${Ie}-with-text-right`]:{"&::before":{width:`${100-he*100}%`},"&::after":{width:`${he*100}%`}},[`${Ie}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:se},"&-dashed":{background:"none",borderColor:ee,borderStyle:"dashed",borderWidth:`${de}px 0 0`},[`&-horizontal${Ie}-with-text${Ie}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${Ie}-dashed`]:{borderInlineStartWidth:de,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${Ie}-with-text`]:{color:vt.colorText,fontWeight:"normal",fontSize:vt.fontSize},[`&-horizontal${Ie}-with-text-left${Ie}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${Ie}-inner-text`]:{paddingInlineStart:te}},[`&-horizontal${Ie}-with-text-right${Ie}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${Ie}-inner-text`]:{paddingInlineEnd:te}}})}};var wt=(0,Ue.Z)("Divider",vt=>{const Ie=(0,Me.TS)(vt,{dividerHorizontalWithTextGutterMargin:vt.margin,dividerHorizontalGutterMargin:vt.marginLG,sizePaddingEdgeHorizontal:0});return[Ct(Ie)]},vt=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:vt.marginXS})),$e=function(vt,Ie){var te={};for(var ee in vt)Object.prototype.hasOwnProperty.call(vt,ee)&&Ie.indexOf(ee)<0&&(te[ee]=vt[ee]);if(vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,ee=Object.getOwnPropertySymbols(vt);de<ee.length;de++)Ie.indexOf(ee[de])<0&&Object.prototype.propertyIsEnumerable.call(vt,ee[de])&&(te[ee[de]]=vt[ee[de]]);return te},lt=vt=>{const{getPrefixCls:Ie,direction:te,divider:ee}=We.useContext(ut.E_),{prefixCls:de,type:se="horizontal",orientation:he="center",orientationMargin:ve,className:Ee,rootClassName:Be,children:Le,dashed:ze,plain:je,style:Xe}=vt,Ye=$e(vt,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),dt=Ie("divider",de),[He,Nt]=wt(dt),ot=he.length>0?`-${he}`:he,Tt=!!Le,xt=he==="left"&&ve!=null,Ot=he==="right"&&ve!=null,Wt=ke()(dt,ee==null?void 0:ee.className,Nt,`${dt}-${se}`,{[`${dt}-with-text`]:Tt,[`${dt}-with-text${ot}`]:Tt,[`${dt}-dashed`]:!!ze,[`${dt}-plain`]:!!je,[`${dt}-rtl`]:te==="rtl",[`${dt}-no-default-orientation-margin-left`]:xt,[`${dt}-no-default-orientation-margin-right`]:Ot},Ee,Be),Dt=We.useMemo(()=>typeof ve=="number"?ve:/^\d+$/.test(ve)?Number(ve):ve,[ve]),tt=Object.assign(Object.assign({},xt&&{marginLeft:Dt}),Ot&&{marginRight:Dt});return He(We.createElement("div",Object.assign({className:Wt,style:Object.assign(Object.assign({},ee==null?void 0:ee.style),Xe)},Ye,{role:"separator"}),Le&&se!=="vertical"&&We.createElement("span",{className:`${dt}-inner-text`,style:tt},Le)))}},91857:function(On,pn,pe){"use strict";var le=pe(59301),ke=pe(38819),We=pe(92310),ut=pe.n(We),Ge=pe(31561),Ue=pe(70425),Me=pe(18929),Ct=pe(2738),wt=pe(79676),$e=pe(53487),Ft=pe(92343),lt=pe(36355),vt=pe(20834),Ie=pe(40875),te=pe(88088),ee=pe(47211);const de=null,se=Be=>{const{menu:Le,arrow:ze,prefixCls:je,children:Xe,trigger:Ye,disabled:dt,dropdownRender:He,getPopupContainer:Nt,overlayClassName:ot,rootClassName:Tt,open:xt,onOpenChange:Ot,visible:Wt,onVisibleChange:Dt,mouseEnterDelay:tt=.15,mouseLeaveDelay:Ve=.1,autoAdjustOverflow:_t=!0,placement:vn="",overlay:yn,transitionName:zt}=Be,{getPopupContainer:qt,getPrefixCls:ln,direction:Gn}=le.useContext(lt.E_),un=le.useMemo(()=>{const ft=ln();return zt!==void 0?zt:vn.includes("top")?`${ft}-slide-down`:`${ft}-slide-up`},[ln,vn,zt]),_n=le.useMemo(()=>vn?vn.includes("Center")?vn.slice(0,vn.indexOf("Center")):vn:Gn==="rtl"?"bottomRight":"bottomLeft",[vn,Gn]),St=ln("dropdown",je),[Zn,ci]=(0,ee.Z)(St),[,Ze]=(0,te.Z)(),be=le.Children.only(Xe),Pe=(0,Ft.Tm)(be,{className:ut()(`${St}-trigger`,{[`${St}-rtl`]:Gn==="rtl"},be.props.className),disabled:dt}),Ae=dt?[]:Ye;let Oe;Ae&&Ae.includes("contextMenu")&&(Oe=!0);const[xe,ct]=(0,Me.Z)(!1,{value:xt!=null?xt:Wt}),Mt=(0,Ue.useEvent)(ft=>{Ot==null||Ot(ft),Dt==null||Dt(ft),ct(ft)}),at=ut()(ot,Tt,ci,{[`${St}-rtl`]:Gn==="rtl"}),qe=(0,wt.Z)({arrowPointAtCenter:typeof ze=="object"&&ze.pointAtCenter,autoAdjustOverflow:_t,offset:Ze.marginXXS,arrowWidth:ze?Ze.sizePopupArrow:0,borderRadius:Ze.borderRadius}),Lt=le.useCallback(()=>{ct(!1)},[]),Bt=()=>{let ft;return Le!=null&&Le.items?ft=le.createElement(vt.default,Object.assign({},Le)):typeof yn=="function"?ft=yn():ft=yn,He&&(ft=He(ft)),ft=le.Children.only(typeof ft=="string"?le.createElement("span",null,ft):ft),le.createElement(Ie.J,{prefixCls:`${St}-menu`,expandIcon:le.createElement("span",{className:`${St}-menu-submenu-arrow`},le.createElement(ke.Z,{className:`${St}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Lt,validator:Gt=>{let{mode:Sn}=Gt}},ft)};return Zn(le.createElement(Ge.Z,Object.assign({alignPoint:Oe},(0,Ct.Z)(Be,["rootClassName"]),{mouseEnterDelay:tt,mouseLeaveDelay:Ve,visible:xe,builtinPlacements:qe,arrow:!!ze,overlayClassName:at,prefixCls:St,getPopupContainer:Nt||qt,transitionName:un,trigger:Ae,overlay:Bt,placement:_n,onVisibleChange:Mt}),Pe))};function he(Be){return Object.assign(Object.assign({},Be),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ve=(0,$e.Z)(se,"dropdown",Be=>Be,he),Ee=Be=>le.createElement(ve,Object.assign({},Be),le.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=Ee,pn.Z=se},38854:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return te}});var le=pe(91857),ke=pe(92310),We=pe.n(ke),ut=pe(59301),Ge=pe(18785),Ue=pe(3113),Me=pe(36355),Ct=pe(81327),wt=pe(33234),$e=pe(47211),Ft=function(ee,de){var se={};for(var he in ee)Object.prototype.hasOwnProperty.call(ee,he)&&de.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++)de.indexOf(he[ve])<0&&Object.prototype.propertyIsEnumerable.call(ee,he[ve])&&(se[he[ve]]=ee[he[ve]]);return se};const lt=ee=>{const{getPopupContainer:de,getPrefixCls:se,direction:he}=ut.useContext(Me.E_),{prefixCls:ve,type:Ee="default",danger:Be,disabled:Le,loading:ze,onClick:je,htmlType:Xe,children:Ye,className:dt,menu:He,arrow:Nt,autoFocus:ot,overlay:Tt,trigger:xt,align:Ot,open:Wt,onOpenChange:Dt,placement:tt,getPopupContainer:Ve,href:_t,icon:vn=ut.createElement(Ge.Z,null),title:yn,buttonsRender:zt=Bt=>Bt,mouseEnterDelay:qt,mouseLeaveDelay:ln,overlayClassName:Gn,overlayStyle:un,destroyPopupOnHide:_n,dropdownRender:St}=ee,Zn=Ft(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"]),ci=se("dropdown",ve),Ze=`${ci}-button`,[be,Pe]=(0,$e.Z)(ci),Ae={menu:He,arrow:Nt,autoFocus:ot,align:Ot,disabled:Le,trigger:Le?[]:xt,onOpenChange:Dt,getPopupContainer:Ve||de,mouseEnterDelay:qt,mouseLeaveDelay:ln,overlayClassName:Gn,overlayStyle:un,destroyPopupOnHide:_n,dropdownRender:St},{compactSize:Oe,compactItemClassnames:xe}=(0,wt.ri)(ci,he),ct=We()(Ze,xe,dt,Pe);"overlay"in ee&&(Ae.overlay=Tt),"open"in ee&&(Ae.open=Wt),"placement"in ee?Ae.placement=tt:Ae.placement=he==="rtl"?"bottomLeft":"bottomRight";const Mt=ut.createElement(Ue.ZP,{type:Ee,danger:Be,disabled:Le,loading:ze,onClick:je,htmlType:Xe,href:_t,title:yn},Ye),at=ut.createElement(Ue.ZP,{type:Ee,danger:Be,icon:vn}),[qe,Lt]=zt([Mt,at]);return be(ut.createElement(Ct.Z.Compact,Object.assign({className:ct,size:Oe,block:!0},Zn),qe,ut.createElement(le.Z,Object.assign({},Ae),Lt)))};lt.__ANT_BUTTON=!0;var vt=lt;const Ie=le.Z;Ie.Button=vt;var te=Ie},47211:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ft}});var le=pe(17313),ke=pe(13826),We=pe(92899),ut=pe(29878),Ge=pe(19447),Ue=pe(83116),Me=pe(37613),wt=lt=>{const{componentCls:vt,menuCls:Ie,colorError:te,colorTextLightSolid:ee}=lt,de=`${Ie}-item`;return{[`${vt}, ${vt}-menu-submenu`]:{[`${Ie} ${de}`]:{[`&${de}-danger:not(${de}-disabled)`]:{color:te,"&:hover":{color:ee,backgroundColor:te}}}}}};const $e=lt=>{const{componentCls:vt,menuCls:Ie,zIndexPopup:te,dropdownArrowDistance:ee,sizePopupArrow:de,antCls:se,iconCls:he,motionDurationMid:ve,dropdownPaddingVertical:Ee,fontSize:Be,dropdownEdgeChildPadding:Le,colorTextDisabled:ze,fontSizeIcon:je,controlPaddingHorizontal:Xe,colorBgElevated:Ye}=lt;return[{[vt]:Object.assign(Object.assign({},(0,le.Wf)(lt)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:te,display:"block","&::before":{position:"absolute",insetBlock:-ee+de/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${se}-btn`]:{[`& > ${he}-down, & > ${se}-btn-icon > ${he}-down`]:{fontSize:je}},[`${vt}-wrap`]:{position:"relative",[`${se}-btn > ${he}-down`]:{fontSize:je},[`${he}-down::before`]:{transition:`transform ${ve}`}},[`${vt}-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${vt}-placement-bottomLeft,
&${se}-slide-down-appear${se}-slide-down-appear-active${vt}-placement-bottomLeft,
&${se}-slide-down-enter${se}-slide-down-enter-active${vt}-placement-bottom,
&${se}-slide-down-appear${se}-slide-down-appear-active${vt}-placement-bottom,
&${se}-slide-down-enter${se}-slide-down-enter-active${vt}-placement-bottomRight,
&${se}-slide-down-appear${se}-slide-down-appear-active${vt}-placement-bottomRight`]:{animationName:ke.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${vt}-placement-topLeft,
&${se}-slide-up-appear${se}-slide-up-appear-active${vt}-placement-topLeft,
&${se}-slide-up-enter${se}-slide-up-enter-active${vt}-placement-top,
&${se}-slide-up-appear${se}-slide-up-appear-active${vt}-placement-top,
&${se}-slide-up-enter${se}-slide-up-enter-active${vt}-placement-topRight,
&${se}-slide-up-appear${se}-slide-up-appear-active${vt}-placement-topRight`]:{animationName:ke.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${vt}-placement-bottomLeft,
&${se}-slide-down-leave${se}-slide-down-leave-active${vt}-placement-bottom,
&${se}-slide-down-leave${se}-slide-down-leave-active${vt}-placement-bottomRight`]:{animationName:ke.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${vt}-placement-topLeft,
&${se}-slide-up-leave${se}-slide-up-leave-active${vt}-placement-top,
&${se}-slide-up-leave${se}-slide-up-leave-active${vt}-placement-topRight`]:{animationName:ke.ly}})},(0,Ge.ZP)(lt,{colorBg:Ye,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${vt} ${Ie}`]:{position:"relative",margin:0},[`${Ie}-submenu-popup`]:{position:"absolute",zIndex:te,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${vt}, ${vt}-menu-submenu`]:{[Ie]:Object.assign(Object.assign({padding:Le,listStyleType:"none",backgroundColor:Ye,backgroundClip:"padding-box",borderRadius:lt.borderRadiusLG,outline:"none",boxShadow:lt.boxShadowSecondary},(0,le.Qy)(lt)),{[`${Ie}-item-group-title`]:{padding:`${Ee}px ${Xe}px`,color:lt.colorTextDescription,transition:`all ${ve}`},[`${Ie}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ie}-item-icon`]:{minWidth:Be,marginInlineEnd:lt.marginXS,fontSize:lt.fontSizeSM},[`${Ie}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ve}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Ie}-item, ${Ie}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Ee}px ${Xe}px`,color:lt.colorText,fontWeight:"normal",fontSize:Be,lineHeight:lt.lineHeight,cursor:"pointer",transition:`all ${ve}`,borderRadius:lt.borderRadiusSM,"&:hover, &-active":{backgroundColor:lt.controlItemBgHover}},(0,le.Qy)(lt)),{"&-selected":{color:lt.colorPrimary,backgroundColor:lt.controlItemBgActive,"&:hover, &-active":{backgroundColor:lt.controlItemBgActiveHover}},"&-disabled":{color:ze,cursor:"not-allowed","&:hover":{color:ze,backgroundColor:Ye,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${lt.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:lt.colorSplit},[`${vt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:lt.paddingXS,[`${vt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:lt.colorTextDescription,fontSize:je,fontStyle:"normal"}}}),[`${Ie}-item-group-list`]:{margin:`0 ${lt.marginXS}px`,padding:0,listStyle:"none"},[`${Ie}-submenu-title`]:{paddingInlineEnd:Xe+lt.fontSizeSM},[`${Ie}-submenu-vertical`]:{position:"relative"},[`${Ie}-submenu${Ie}-submenu-disabled ${vt}-menu-submenu-title`]:{[`&, ${vt}-menu-submenu-arrow-icon`]:{color:ze,backgroundColor:Ye,cursor:"not-allowed"}},[`${Ie}-submenu-selected ${vt}-menu-submenu-title`]:{color:lt.colorPrimary}})}},[(0,ke.oN)(lt,"slide-up"),(0,ke.oN)(lt,"slide-down"),(0,We.Fm)(lt,"move-up"),(0,We.Fm)(lt,"move-down"),(0,ut._y)(lt,"zoom-big")]]};var Ft=(0,Ue.Z)("Dropdown",(lt,vt)=>{let{rootPrefixCls:Ie}=vt;const{marginXXS:te,sizePopupArrow:ee,controlHeight:de,fontSize:se,lineHeight:he,paddingXXS:ve,componentCls:Ee,borderRadiusLG:Be}=lt,Le=(de-se*he)/2,{dropdownArrowOffset:ze}=(0,Ge.fS)({contentRadius:Be}),je=(0,Me.TS)(lt,{menuCls:`${Ee}-menu`,rootPrefixCls:Ie,dropdownArrowDistance:ee/2+te,dropdownArrowOffset:ze,dropdownPaddingVertical:Le,dropdownEdgeChildPadding:ve});return[$e(je),wt(je)]},lt=>({zIndexPopup:lt.zIndexPopupBase+50}))},64165:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ve}});var le=pe(92310),ke=pe.n(le),We=pe(59301),ut=pe(36355),Ge=pe(9763),Ue=pe(64993),Me=pe(88088),wt=()=>{const[,Ee]=(0,Me.Z)(),Le=new Ue.C(Ee.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return We.createElement("svg",{style:Le,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},We.createElement("g",{fill:"none",fillRule:"evenodd"},We.createElement("g",{transform:"translate(24 31.67)"},We.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),We.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"}),We.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)"}),We.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"}),We.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"})),We.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"}),We.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},We.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),We.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Ft=()=>{const[,Ee]=(0,Me.Z)(),{colorFill:Be,colorFillTertiary:Le,colorFillQuaternary:ze,colorBgContainer:je}=Ee,{borderColor:Xe,shadowColor:Ye,contentColor:dt}=(0,We.useMemo)(()=>({borderColor:new Ue.C(Be).onBackground(je).toHexShortString(),shadowColor:new Ue.C(Le).onBackground(je).toHexShortString(),contentColor:new Ue.C(ze).onBackground(je).toHexShortString()}),[Be,Le,ze,je]);return We.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},We.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},We.createElement("ellipse",{fill:Ye,cx:"32",cy:"33",rx:"32",ry:"7"}),We.createElement("g",{fillRule:"nonzero",stroke:Xe},We.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"}),We.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:dt}))))},lt=pe(83116),vt=pe(37613);const Ie=Ee=>{const{componentCls:Be,margin:Le,marginXS:ze,marginXL:je,fontSize:Xe,lineHeight:Ye}=Ee;return{[Be]:{marginInline:ze,fontSize:Xe,lineHeight:Ye,textAlign:"center",[`${Be}-image`]:{height:Ee.emptyImgHeight,marginBottom:ze,opacity:Ee.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Be}-description`]:{color:Ee.colorText},[`${Be}-footer`]:{marginTop:Le},"&-normal":{marginBlock:je,color:Ee.colorTextDisabled,[`${Be}-description`]:{color:Ee.colorTextDisabled},[`${Be}-image`]:{height:Ee.emptyImgHeightMD}},"&-small":{marginBlock:ze,color:Ee.colorTextDisabled,[`${Be}-image`]:{height:Ee.emptyImgHeightSM}}}}};var te=(0,lt.Z)("Empty",Ee=>{const{componentCls:Be,controlHeightLG:Le}=Ee,ze=(0,vt.TS)(Ee,{emptyImgCls:`${Be}-img`,emptyImgHeight:Le*2.5,emptyImgHeightMD:Le,emptyImgHeightSM:Le*.875});return[Ie(ze)]}),ee=function(Ee,Be){var Le={};for(var ze in Ee)Object.prototype.hasOwnProperty.call(Ee,ze)&&Be.indexOf(ze)<0&&(Le[ze]=Ee[ze]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,ze=Object.getOwnPropertySymbols(Ee);je<ze.length;je++)Be.indexOf(ze[je])<0&&Object.prototype.propertyIsEnumerable.call(Ee,ze[je])&&(Le[ze[je]]=Ee[ze[je]]);return Le};const de=We.createElement(wt,null),se=We.createElement(Ft,null),he=Ee=>{var{className:Be,rootClassName:Le,prefixCls:ze,image:je=de,description:Xe,children:Ye,imageStyle:dt,style:He}=Ee,Nt=ee(Ee,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ot,direction:Tt,empty:xt}=We.useContext(ut.E_),Ot=ot("empty",ze),[Wt,Dt]=te(Ot),[tt]=(0,Ge.Z)("Empty"),Ve=typeof Xe!="undefined"?Xe:tt==null?void 0:tt.description,_t=typeof Ve=="string"?Ve:"empty";let vn=null;return typeof je=="string"?vn=We.createElement("img",{alt:_t,src:je}):vn=je,Wt(We.createElement("div",Object.assign({className:ke()(Dt,Ot,xt==null?void 0:xt.className,{[`${Ot}-normal`]:je===se,[`${Ot}-rtl`]:Tt==="rtl"},Be,Le),style:Object.assign(Object.assign({},xt==null?void 0:xt.style),He)},Nt),We.createElement("div",{className:`${Ot}-image`,style:dt},vn),Ve&&We.createElement("div",{className:`${Ot}-description`},Ve),Ye&&We.createElement("div",{className:`${Ot}-footer`},Ye)))};he.PRESENTED_IMAGE_DEFAULT=de,he.PRESENTED_IMAGE_SIMPLE=se;var ve=he},78241:function(On,pn,pe){"use strict";pe.d(pn,{default:function(){return $t}});var le=pe(19127),ke=pe(92310),We=pe.n(ke),ut=pe(77900),Ge=pe(59301),Ue=pe(62892),Me=pe(32441);function Ct(Qe){const[on,cn]=Ge.useState(Qe);return Ge.useEffect(()=>{const At=setTimeout(()=>{cn(Qe)},Qe.length?0:10);return()=>{clearTimeout(At)}},[Qe]),on}var wt=pe(17313),$e=pe(29878),Ft=pe(8378),lt=pe(37613),vt=pe(83116),te=Qe=>{const{componentCls:on}=Qe,cn=`${on}-show-help`,At=`${on}-show-help-item`;return{[cn]:{transition:`opacity ${Qe.motionDurationSlow} ${Qe.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[At]:{overflow:"hidden",transition:`height ${Qe.motionDurationSlow} ${Qe.motionEaseInOut},
opacity ${Qe.motionDurationSlow} ${Qe.motionEaseInOut},
transform ${Qe.motionDurationSlow} ${Qe.motionEaseInOut} !important`,[`&${At}-appear, &${At}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${At}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Qe=>({legend:{display:"block",width:"100%",marginBottom:Qe.marginLG,padding:0,color:Qe.colorTextDescription,fontSize:Qe.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Qe.lineWidth}px ${Qe.lineType} ${Qe.colorBorder}`},label:{fontSize:Qe.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 ${Qe.controlOutlineWidth}px ${Qe.controlOutline}`},output:{display:"block",paddingTop:15,color:Qe.colorText,fontSize:Qe.fontSize,lineHeight:Qe.lineHeight}}),de=(Qe,on)=>{const{formItemCls:cn}=Qe;return{[cn]:{[`${cn}-label > label`]:{height:on},[`${cn}-control-input`]:{minHeight:on}}}},se=Qe=>{const{componentCls:on}=Qe;return{[Qe.componentCls]:Object.assign(Object.assign(Object.assign({},(0,wt.Wf)(Qe)),ee(Qe)),{[`${on}-text`]:{display:"inline-block",paddingInlineEnd:Qe.paddingSM},"&-small":Object.assign({},de(Qe,Qe.controlHeightSM)),"&-large":Object.assign({},de(Qe,Qe.controlHeightLG))})}},he=Qe=>{const{formItemCls:on,iconCls:cn,componentCls:At,rootPrefixCls:ht,labelRequiredMarkColor:en,labelColor:fn,labelFontSize:Rn,labelHeight:Qn,labelColonMarginInlineStart:Et,labelColonMarginInlineEnd:wn,itemMarginBottom:Kn}=Qe;return{[on]:Object.assign(Object.assign({},(0,wt.Wf)(Qe)),{marginBottom:Kn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${ht}-row`]:{display:"none"},"&-has-warning":{[`${on}-split`]:{color:Qe.colorError}},"&-has-error":{[`${on}-split`]:{color:Qe.colorWarning}},[`${on}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Qe.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Qn,color:fn,fontSize:Rn,[`> ${cn}`]:{fontSize:Qe.fontSize,verticalAlign:"top"},[`&${on}-required:not(${on}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Qe.marginXXS,color:en,fontSize:Qe.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${At}-hide-required-mark &`]:{display:"none"}},[`${on}-optional`]:{display:"inline-block",marginInlineStart:Qe.marginXXS,color:Qe.colorTextDescription,[`${At}-hide-required-mark &`]:{display:"none"}},[`${on}-tooltip`]:{color:Qe.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Qe.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Et,marginInlineEnd:wn},[`&${on}-no-colon::after`]:{content:'"\\a0"'}}},[`${on}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${ht}-col-'"]):not([class*="' ${ht}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Qe.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[on]:{"&-explain, &-extra":{clear:"both",color:Qe.colorTextDescription,fontSize:Qe.fontSize,lineHeight:Qe.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Qe.controlHeightSM,transition:`color ${Qe.motionDurationMid} ${Qe.motionEaseOut}`},"&-explain":{"&-error":{color:Qe.colorError},"&-warning":{color:Qe.colorWarning}}},[`&-with-help ${on}-explain`]:{height:"auto",opacity:1},[`${on}-feedback-icon`]:{fontSize:Qe.fontSize,textAlign:"center",visibility:"visible",animationName:$e.kr,animationDuration:Qe.motionDurationMid,animationTimingFunction:Qe.motionEaseOutBack,pointerEvents:"none","&-success":{color:Qe.colorSuccess},"&-error":{color:Qe.colorError},"&-warning":{color:Qe.colorWarning},"&-validating":{color:Qe.colorPrimary}}})}},ve=Qe=>{const{componentCls:on,formItemCls:cn}=Qe;return{[`${on}-horizontal`]:{[`${cn}-label`]:{flexGrow:0},[`${cn}-control`]:{flex:"1 1 0",minWidth:0},[`${cn}-label[class$='-24'], ${cn}-label[class*='-24 ']`]:{[`& + ${cn}-control`]:{minWidth:"unset"}}}}},Ee=Qe=>{const{componentCls:on,formItemCls:cn}=Qe;return{[`${on}-inline`]:{display:"flex",flexWrap:"wrap",[cn]:{flex:"none",marginInlineEnd:Qe.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${cn}-label,
> ${cn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${cn}-label`]:{flex:"none"},[`${on}-text`]:{display:"inline-block"},[`${cn}-has-feedback`]:{display:"inline-block"}}}}},Be=Qe=>({padding:Qe.verticalLabelPadding,margin:Qe.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Le=Qe=>{const{componentCls:on,formItemCls:cn,rootPrefixCls:At}=Qe;return{[`${cn} ${cn}-label`]:Be(Qe),[on]:{[cn]:{flexWrap:"wrap",[`${cn}-label, ${cn}-control`]:{[`&:not([class*=" ${At}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ze=Qe=>{const{componentCls:on,formItemCls:cn,rootPrefixCls:At}=Qe;return{[`${on}-vertical`]:{[cn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${on}-item-control`]:{width:"100%"}}},[`${on}-vertical ${cn}-label,
.${At}-col-24${cn}-label,
.${At}-col-xl-24${cn}-label`]:Be(Qe),[`@media (max-width: ${Qe.screenXSMax}px)`]:[Le(Qe),{[on]:{[`.${At}-col-xs-24${cn}-label`]:Be(Qe)}}],[`@media (max-width: ${Qe.screenSMMax}px)`]:{[on]:{[`.${At}-col-sm-24${cn}-label`]:Be(Qe)}},[`@media (max-width: ${Qe.screenMDMax}px)`]:{[on]:{[`.${At}-col-md-24${cn}-label`]:Be(Qe)}},[`@media (max-width: ${Qe.screenLGMax}px)`]:{[on]:{[`.${At}-col-lg-24${cn}-label`]:Be(Qe)}}}},je=(Qe,on)=>(0,lt.TS)(Qe,{formItemCls:`${Qe.componentCls}-item`,rootPrefixCls:on});var Xe=(0,vt.Z)("Form",(Qe,on)=>{let{rootPrefixCls:cn}=on;const At=je(Qe,cn);return[se(At),he(At),te(At),ve(At),Ee(At),ze(At),(0,Ft.Z)(At),$e.kr]},Qe=>({labelRequiredMarkColor:Qe.colorError,labelColor:Qe.colorTextHeading,labelFontSize:Qe.fontSize,labelHeight:Qe.controlHeight,labelColonMarginInlineStart:Qe.marginXXS/2,labelColonMarginInlineEnd:Qe.marginXS,itemMarginBottom:Qe.marginLG,verticalLabelPadding:`0 0 ${Qe.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ye=[];function dt(Qe,on,cn){let At=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Qe=="string"?Qe:`${on}-${At}`,error:Qe,errorStatus:cn}}var Nt=Qe=>{let{help:on,helpStatus:cn,errors:At=Ye,warnings:ht=Ye,className:en,fieldId:fn,onVisibleChanged:Rn}=Qe;const{prefixCls:Qn}=Ge.useContext(Me.Rk),Et=`${Qn}-item-explain`,[,wn]=Xe(Qn),Kn=(0,Ge.useMemo)(()=>(0,Ue.Z)(Qn),[Qn]),Ei=Ct(At),tn=Ct(ht),sn=Ge.useMemo(()=>on!=null?[dt(on,"help",cn)]:[].concat((0,le.Z)(Ei.map((Oi,Di)=>dt(Oi,"error","error",Di))),(0,le.Z)(tn.map((Oi,Di)=>dt(Oi,"warning","warning",Di)))),[on,cn,Ei,tn]),In={};return fn&&(In.id=`${fn}_help`),Ge.createElement(ut.default,{motionDeadline:Kn.motionDeadline,motionName:`${Qn}-show-help`,visible:!!sn.length,onVisibleChanged:Rn},Oi=>{const{className:Di,style:vi}=Oi;return Ge.createElement("div",Object.assign({},In,{className:We()(Et,Di,en,wn),style:vi,role:"alert"}),Ge.createElement(ut.CSSMotionList,Object.assign({keys:sn},(0,Ue.Z)(Qn),{motionName:`${Qn}-show-help-item`,component:!1}),Ti=>{const{key:Li,error:sr,errorStatus:Zr,className:Vr,style:Tn}=Ti;return Ge.createElement("div",{key:Li,className:We()(Vr,{[`${Et}-${Zr}`]:Zr}),style:Tn},sr)}))})},ot=pe(95013),Tt=pe(36355),xt=pe(1684),Ot=pe(52946),Wt=pe(19716),Dt=pe(16722);const tt=["parentNode"],Ve="form_item";function _t(Qe){return Qe===void 0||Qe===!1?[]:Array.isArray(Qe)?Qe:[Qe]}function vn(Qe,on){if(!Qe.length)return;const cn=Qe.join("_");return on?`${on}_${cn}`:tt.includes(cn)?`${Ve}_${cn}`:cn}function yn(Qe,on,cn,At,ht,en){let fn=At;return en!==void 0?fn=en:cn.validating?fn="validating":Qe.length?fn="error":on.length?fn="warning":(cn.touched||ht&&cn.validated)&&(fn="success"),fn}function zt(Qe){return _t(Qe).join("_")}function qt(Qe){const[on]=(0,ot.useForm)(),cn=Ge.useRef({}),At=Ge.useMemo(()=>Qe!=null?Qe:Object.assign(Object.assign({},on),{__INTERNAL__:{itemRef:ht=>en=>{const fn=zt(ht);en?cn.current[fn]=en:delete cn.current[fn]}},scrollToField:function(ht){let en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const fn=_t(ht),Rn=vn(fn,At.__INTERNAL__.name),Qn=Rn?document.getElementById(Rn):null;Qn&&(0,Dt.Z)(Qn,Object.assign({scrollMode:"if-needed",block:"nearest"},en))},getFieldInstance:ht=>{const en=zt(ht);return cn.current[en]}}),[Qe,on]);return[At]}var ln=pe(28726),Gn=function(Qe,on){var cn={};for(var At in Qe)Object.prototype.hasOwnProperty.call(Qe,At)&&on.indexOf(At)<0&&(cn[At]=Qe[At]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,At=Object.getOwnPropertySymbols(Qe);ht<At.length;ht++)on.indexOf(At[ht])<0&&Object.prototype.propertyIsEnumerable.call(Qe,At[ht])&&(cn[At[ht]]=Qe[At[ht]]);return cn};const un=(Qe,on)=>{const cn=Ge.useContext(xt.Z),{getPrefixCls:At,direction:ht,form:en}=Ge.useContext(Tt.E_),{prefixCls:fn,className:Rn,rootClassName:Qn,size:Et,disabled:wn=cn,form:Kn,colon:Ei,labelAlign:tn,labelWrap:sn,labelCol:In,wrapperCol:Oi,hideRequiredMark:Di,layout:vi="horizontal",scrollToFirstError:Ti,requiredMark:Li,onFinishFailed:sr,name:Zr,style:Vr,feedbackIcons:Tn}=Qe,Po=Gn(Qe,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Xr=(0,Wt.Z)(Et),Cr=Ge.useContext(ln.Z),Cn=(0,Ge.useMemo)(()=>Li!==void 0?Li:en&&en.requiredMark!==void 0?en.requiredMark:!Di,[Di,Li,en]),ri=Ei!=null?Ei:en==null?void 0:en.colon,Yi=At("form",fn),[yr,er]=Xe(Yi),Fr=We()(Yi,`${Yi}-${vi}`,{[`${Yi}-hide-required-mark`]:Cn===!1,[`${Yi}-rtl`]:ht==="rtl",[`${Yi}-${Xr}`]:Xr},er,en==null?void 0:en.className,Rn,Qn),[Ur]=qt(Kn),{__INTERNAL__:zr}=Ur;zr.name=Zr;const Tr=(0,Ge.useMemo)(()=>({name:Zr,labelAlign:tn,labelCol:In,labelWrap:sn,wrapperCol:Oi,vertical:vi==="vertical",colon:ri,requiredMark:Cn,itemRef:zr.itemRef,form:Ur,feedbackIcons:Tn}),[Zr,tn,In,Oi,vi,ri,Cn,Ur,Tn]);Ge.useImperativeHandle(on,()=>Ur);const Yr=(Ho,Yn)=>{if(Ho){let Ao={block:"nearest"};typeof Ho=="object"&&(Ao=Ho),Ur.scrollToField(Yn,Ao)}},Un=Ho=>{if(sr==null||sr(Ho),Ho.errorFields.length){const Yn=Ho.errorFields[0].name;if(Ti!==void 0){Yr(Ti,Yn);return}en&&en.scrollToFirstError!==void 0&&Yr(en.scrollToFirstError,Yn)}};return yr(Ge.createElement(xt.n,{disabled:wn},Ge.createElement(Ot.q,{size:Xr},Ge.createElement(Me.RV,Object.assign({},{validateMessages:Cr}),Ge.createElement(Me.q3.Provider,{value:Tr},Ge.createElement(ot.default,Object.assign({id:Zr},Po,{name:Zr,onFinishFailed:Un,form:Ur,style:Object.assign(Object.assign({},en==null?void 0:en.style),Vr),className:Fr})))))))};var St=Ge.forwardRef(un),Zn=pe(41799),ci=pe(8654),Ze=pe(92343),be=pe(11592);function Pe(Qe){if(typeof Qe=="function")return Qe;const on=(0,be.Z)(Qe);return on.length<=1?on[0]:on}const Ae=()=>{const{status:Qe,errors:on=[],warnings:cn=[]}=(0,Ge.useContext)(Me.aM);return{status:Qe,errors:on,warnings:cn}};Ae.Context=Me.aM;var Oe=Ae,xe=pe(16089);function ct(Qe){const[on,cn]=Ge.useState(Qe),At=(0,Ge.useRef)(null),ht=(0,Ge.useRef)([]),en=(0,Ge.useRef)(!1);Ge.useEffect(()=>(en.current=!1,()=>{en.current=!0,xe.Z.cancel(At.current),At.current=null}),[]);function fn(Rn){en.current||(At.current===null&&(ht.current=[],At.current=(0,xe.Z)(()=>{At.current=null,cn(Qn=>{let Et=Qn;return ht.current.forEach(wn=>{Et=wn(Et)}),Et})})),ht.current.push(Rn))}return[on,fn]}function Mt(){const{itemRef:Qe}=Ge.useContext(Me.q3),on=Ge.useRef({});function cn(At,ht){const en=ht&&typeof ht=="object"&&ht.ref,fn=At.join("_");return(on.current.name!==fn||on.current.originRef!==en)&&(on.current.name=fn,on.current.originRef=en,on.current.ref=(0,ci.sQ)(Qe(At),en)),on.current.ref}return cn}var at=pe(29194),qe=pe(34280),Lt=pe(2738),Bt=pe(27382),ft=pe(37028);const Gt=Qe=>{const{formItemCls:on}=Qe;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${on}-control`]:{display:"flex"}}}};var Sn=(0,vt.b)(["Form","item-item"],(Qe,on)=>{let{rootPrefixCls:cn}=on;const At=je(Qe,cn);return[Gt(At)]}),rn=Qe=>{const{prefixCls:on,status:cn,wrapperCol:At,children:ht,errors:en,warnings:fn,_internalItemRender:Rn,extra:Qn,help:Et,fieldId:wn,marginBottom:Kn,onErrorVisibleChanged:Ei}=Qe,tn=`${on}-item`,sn=Ge.useContext(Me.q3),In=At||sn.wrapperCol||{},Oi=We()(`${tn}-control`,In.className),Di=Ge.useMemo(()=>Object.assign({},sn),[sn]);delete Di.labelCol,delete Di.wrapperCol;const vi=Ge.createElement("div",{className:`${tn}-control-input`},Ge.createElement("div",{className:`${tn}-control-input-content`},ht)),Ti=Ge.useMemo(()=>({prefixCls:on,status:cn}),[on,cn]),Li=Kn!==null||en.length||fn.length?Ge.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ge.createElement(Me.Rk.Provider,{value:Ti},Ge.createElement(Nt,{fieldId:wn,errors:en,warnings:fn,help:Et,helpStatus:cn,className:`${tn}-explain-connected`,onVisibleChanged:Ei})),!!Kn&&Ge.createElement("div",{style:{width:0,height:Kn}})):null,sr={};wn&&(sr.id=`${wn}_extra`);const Zr=Qn?Ge.createElement("div",Object.assign({},sr,{className:`${tn}-extra`}),Qn):null,Vr=Rn&&Rn.mark==="pro_table_render"&&Rn.render?Rn.render(Qe,{input:vi,errorList:Li,extra:Zr}):Ge.createElement(Ge.Fragment,null,vi,Li,Zr);return Ge.createElement(Me.q3.Provider,{value:Di},Ge.createElement(ft.Z,Object.assign({},In,{className:Oi}),Vr),Ge.createElement(Sn,{prefixCls:on}))},zn=pe(61485),kn=pe(31724),mn=pe(9763),ei=pe(6848),Pi=function(Qe,on){var cn={};for(var At in Qe)Object.prototype.hasOwnProperty.call(Qe,At)&&on.indexOf(At)<0&&(cn[At]=Qe[At]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,At=Object.getOwnPropertySymbols(Qe);ht<At.length;ht++)on.indexOf(At[ht])<0&&Object.prototype.propertyIsEnumerable.call(Qe,At[ht])&&(cn[At[ht]]=Qe[At[ht]]);return cn};function Hn(Qe){return Qe?typeof Qe=="object"&&!Ge.isValidElement(Qe)?Qe:{title:Qe}:null}var wi=Qe=>{let{prefixCls:on,label:cn,htmlFor:At,labelCol:ht,labelAlign:en,colon:fn,required:Rn,requiredMark:Qn,tooltip:Et}=Qe;var wn;const[Kn]=(0,mn.Z)("Form"),{vertical:Ei,labelAlign:tn,labelCol:sn,labelWrap:In,colon:Oi}=Ge.useContext(Me.q3);if(!cn)return null;const Di=ht||sn||{},vi=en||tn,Ti=`${on}-item-label`,Li=We()(Ti,vi==="left"&&`${Ti}-left`,Di.className,{[`${Ti}-wrap`]:!!In});let sr=cn;const Zr=fn===!0||Oi!==!1&&fn!==!1;Zr&&!Ei&&typeof cn=="string"&&cn.trim()!==""&&(sr=cn.replace(/[:|]\s*$/,""));const Tn=Hn(Et);if(Tn){const{icon:Cn=Ge.createElement(zn.Z,null)}=Tn,ri=Pi(Tn,["icon"]),Yi=Ge.createElement(ei.Z,Object.assign({},ri),Ge.cloneElement(Cn,{className:`${on}-item-tooltip`,title:""}));sr=Ge.createElement(Ge.Fragment,null,sr,Yi)}const Po=Qn==="optional",Xr=typeof Qn=="function";Xr?sr=Qn(sr,{required:!!Rn}):Po&&!Rn&&(sr=Ge.createElement(Ge.Fragment,null,sr,Ge.createElement("span",{className:`${on}-item-optional`,title:""},(Kn==null?void 0:Kn.optional)||((wn=kn.Z.Form)===null||wn===void 0?void 0:wn.optional))));const Cr=We()({[`${on}-item-required`]:Rn,[`${on}-item-required-mark-optional`]:Po||Xr,[`${on}-item-no-colon`]:!Zr});return Ge.createElement(ft.Z,Object.assign({},Di,{className:Li}),Ge.createElement("label",{htmlFor:At,className:Cr,title:typeof cn=="string"?cn:""},sr))},Zi=pe(29679),Hi=pe(19248),rr=pe(96512),_r=pe(58617);const gi={success:Zi.Z,warning:rr.Z,error:Hi.Z,validating:_r.Z};function di(Qe){let{children:on,errors:cn,warnings:At,hasFeedback:ht,validateStatus:en,prefixCls:fn,meta:Rn,noStyle:Qn}=Qe;const Et=`${fn}-item`,{feedbackIcons:wn}=Ge.useContext(Me.q3),Kn=yn(cn,At,Rn,null,!!ht,en),{isFormItemInput:Ei,status:tn}=Ge.useContext(Me.aM),sn=Ge.useMemo(()=>{var In;let Oi;if(ht){const Ti=ht!==!0&&ht.icons||wn,Li=Kn&&((In=Ti==null?void 0:Ti({status:Kn,errors:cn,warnings:At}))===null||In===void 0?void 0:In[Kn]),sr=Kn&&gi[Kn];Oi=Li!==!1&&sr?Ge.createElement("span",{className:We()(`${Et}-feedback-icon`,`${Et}-feedback-icon-${Kn}`)},Li||Ge.createElement(sr,null)):null}let Di=!0,vi=Kn||"";return Qn&&(Di=Ei,vi=(Kn!=null?Kn:tn)||""),{status:vi,errors:cn,warnings:At,hasFeedback:!!ht,feedbackIcon:Oi,isFormItemInput:Di}},[Kn,ht,Qn,Ei,tn]);return Ge.createElement(Me.aM.Provider,{value:sn},on)}var xi=function(Qe,on){var cn={};for(var At in Qe)Object.prototype.hasOwnProperty.call(Qe,At)&&on.indexOf(At)<0&&(cn[At]=Qe[At]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,At=Object.getOwnPropertySymbols(Qe);ht<At.length;ht++)on.indexOf(At[ht])<0&&Object.prototype.propertyIsEnumerable.call(Qe,At[ht])&&(cn[At[ht]]=Qe[At[ht]]);return cn};function $i(Qe){const{prefixCls:on,className:cn,rootClassName:At,style:ht,help:en,errors:fn,warnings:Rn,validateStatus:Qn,meta:Et,hasFeedback:wn,hidden:Kn,children:Ei,fieldId:tn,required:sn,isRequired:In,onSubItemMetaChange:Oi}=Qe,Di=xi(Qe,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),vi=`${on}-item`,{requiredMark:Ti}=Ge.useContext(Me.q3),Li=Ge.useRef(null),sr=Ct(fn),Zr=Ct(Rn),Vr=en!=null,Tn=!!(Vr||fn.length||Rn.length),Po=!!Li.current&&(0,at.Z)(Li.current),[Xr,Cr]=Ge.useState(null);(0,qe.Z)(()=>{if(Tn&&Li.current){const er=getComputedStyle(Li.current);Cr(parseInt(er.marginBottom,10))}},[Tn,Po]);const Cn=er=>{er||Cr(null)},Yi=function(){let er=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Fr=er?sr:Et.errors,Ur=er?Zr:Et.warnings;return yn(Fr,Ur,Et,"",!!wn,Qn)}(),yr=We()(vi,cn,At,{[`${vi}-with-help`]:Vr||sr.length||Zr.length,[`${vi}-has-feedback`]:Yi&&wn,[`${vi}-has-success`]:Yi==="success",[`${vi}-has-warning`]:Yi==="warning",[`${vi}-has-error`]:Yi==="error",[`${vi}-is-validating`]:Yi==="validating",[`${vi}-hidden`]:Kn});return Ge.createElement("div",{className:yr,style:ht,ref:Li},Ge.createElement(Bt.Z,Object.assign({className:`${vi}-row`},(0,Lt.Z)(Di,["_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(wi,Object.assign({htmlFor:tn},Qe,{requiredMark:Ti,required:sn!=null?sn:In,prefixCls:on})),Ge.createElement(rn,Object.assign({},Qe,Et,{errors:sr,warnings:Zr,prefixCls:on,status:Yi,help:en,marginBottom:Xr,onErrorVisibleChanged:Cn}),Ge.createElement(Me.qI.Provider,{value:Oi},Ge.createElement(di,{prefixCls:on,meta:Et,errors:Et.errors,warnings:Et.warnings,hasFeedback:wn,validateStatus:Yi},Ei)))),!!Xr&&Ge.createElement("div",{className:`${vi}-margin-offset`,style:{marginBottom:-Xr}}))}const Ri="__SPLIT__",Kr=null,Sr=Ge.memo(Qe=>{let{children:on}=Qe;return on},(Qe,on)=>Qe.value===on.value&&Qe.update===on.update&&Qe.childProps.length===on.childProps.length&&Qe.childProps.every((cn,At)=>cn===on.childProps[At]));function Ne(Qe){return Qe!=null}function Ci(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function wr(Qe){const{name:on,noStyle:cn,className:At,dependencies:ht,prefixCls:en,shouldUpdate:fn,rules:Rn,children:Qn,required:Et,label:wn,messageVariables:Kn,trigger:Ei="onChange",validateTrigger:tn,hidden:sn,help:In}=Qe,{getPrefixCls:Oi}=Ge.useContext(Tt.E_),{name:Di}=Ge.useContext(Me.q3),vi=Pe(Qn),Ti=typeof vi=="function",Li=Ge.useContext(Me.qI),{validateTrigger:sr}=Ge.useContext(ot.FieldContext),Zr=tn!==void 0?tn:sr,Vr=Ne(on),Tn=Oi("form",en),[Po,Xr]=Xe(Tn),Cr=Ge.useContext(ot.ListContext),Cn=Ge.useRef(),[ri,Yi]=ct({}),[yr,er]=(0,Zn.Z)(()=>Ci()),Fr=Yn=>{const Ao=Cr==null?void 0:Cr.getKey(Yn.name);if(er(Yn.destroy?Ci():Yn,!0),cn&&In!==!1&&Li){let Qo=Yn.name;if(Yn.destroy)Qo=Cn.current||Qo;else if(Ao!==void 0){const[nr,qo]=Ao;Qo=[nr].concat((0,le.Z)(qo)),Cn.current=Qo}Li(Yn,Qo)}},Ur=(Yn,Ao)=>{Yi(Qo=>{const nr=Object.assign({},Qo),Go=[].concat((0,le.Z)(Yn.name.slice(0,-1)),(0,le.Z)(Ao)).join(Ri);return Yn.destroy?delete nr[Go]:nr[Go]=Yn,nr})},[zr,Tr]=Ge.useMemo(()=>{const Yn=(0,le.Z)(yr.errors),Ao=(0,le.Z)(yr.warnings);return Object.values(ri).forEach(Qo=>{Yn.push.apply(Yn,(0,le.Z)(Qo.errors||[])),Ao.push.apply(Ao,(0,le.Z)(Qo.warnings||[]))}),[Yn,Ao]},[ri,yr.errors,yr.warnings]),Yr=Mt();function Un(Yn,Ao,Qo){return cn&&!sn?Ge.createElement(di,{prefixCls:Tn,hasFeedback:Qe.hasFeedback,validateStatus:Qe.validateStatus,meta:yr,errors:zr,warnings:Tr,noStyle:!0},Yn):Ge.createElement($i,Object.assign({key:"row"},Qe,{className:We()(At,Xr),prefixCls:Tn,fieldId:Ao,isRequired:Qo,errors:zr,warnings:Tr,meta:yr,onSubItemMetaChange:Ur}),Yn)}if(!Vr&&!Ti&&!ht)return Po(Un(vi));let Ho={};return typeof wn=="string"?Ho.label=wn:on&&(Ho.label=String(on)),Kn&&(Ho=Object.assign(Object.assign({},Ho),Kn)),Po(Ge.createElement(ot.Field,Object.assign({},Qe,{messageVariables:Ho,trigger:Ei,validateTrigger:Zr,onMetaChange:Fr}),(Yn,Ao,Qo)=>{const nr=_t(on).length&&Ao?Ao.name:[],qo=vn(nr,Di),Go=Et!==void 0?Et:!!(Rn&&Rn.some(mo=>{if(mo&&typeof mo=="object"&&mo.required&&!mo.warningOnly)return!0;if(typeof mo=="function"){const Yo=mo(Qo);return Yo&&Yo.required&&!Yo.warningOnly}return!1})),Lr=Object.assign({},Yn);let br=null;if(Array.isArray(vi)&&Vr)br=vi;else if(!(Ti&&(!(fn||ht)||Vr))){if(!(ht&&!Ti&&!Vr))if((0,Ze.l$)(vi)){const mo=Object.assign(Object.assign({},vi.props),Lr);if(mo.id||(mo.id=qo),In||zr.length>0||Tr.length>0||Qe.extra){const st=[];(In||zr.length>0)&&st.push(`${qo}_help`),Qe.extra&&st.push(`${qo}_extra`),mo["aria-describedby"]=st.join(" ")}zr.length>0&&(mo["aria-invalid"]="true"),Go&&(mo["aria-required"]="true"),(0,ci.Yr)(vi)&&(mo.ref=Yr(nr,vi)),new Set([].concat((0,le.Z)(_t(Ei)),(0,le.Z)(_t(Zr)))).forEach(st=>{mo[st]=function(){for(var sa,va,Ma,hs,Ga,Lo=arguments.length,po=new Array(Lo),la=0;la<Lo;la++)po[la]=arguments[la];(Ma=Lr[st])===null||Ma===void 0||(sa=Ma).call.apply(sa,[Lr].concat(po)),(Ga=(hs=vi.props)[st])===null||Ga===void 0||(va=Ga).call.apply(va,[hs].concat(po))}});const Ki=[mo["aria-required"],mo["aria-invalid"],mo["aria-describedby"]];br=Ge.createElement(Sr,{value:Lr[Qe.valuePropName||"value"],update:vi,childProps:Ki},(0,Ze.Tm)(vi,mo))}else Ti&&(fn||ht)&&!Vr?br=vi(Qo):br=vi}return Un(br,qo,Go)}))}const Pn=wr;Pn.useStatus=Oe;var Si=Pn,Wi=function(Qe,on){var cn={};for(var At in Qe)Object.prototype.hasOwnProperty.call(Qe,At)&&on.indexOf(At)<0&&(cn[At]=Qe[At]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,At=Object.getOwnPropertySymbols(Qe);ht<At.length;ht++)on.indexOf(At[ht])<0&&Object.prototype.propertyIsEnumerable.call(Qe,At[ht])&&(cn[At[ht]]=Qe[At[ht]]);return cn},$n=Qe=>{var{prefixCls:on,children:cn}=Qe,At=Wi(Qe,["prefixCls","children"]);const{getPrefixCls:ht}=Ge.useContext(Tt.E_),en=ht("form",on),fn=Ge.useMemo(()=>({prefixCls:en,status:"error"}),[en]);return Ge.createElement(ot.List,Object.assign({},At),(Rn,Qn,Et)=>Ge.createElement(Me.Rk.Provider,{value:fn},cn(Rn.map(wn=>Object.assign(Object.assign({},wn),{fieldKey:wn.key})),Qn,{errors:Et.errors,warnings:Et.warnings})))};function qn(){const{form:Qe}=(0,Ge.useContext)(Me.q3);return Qe}const Zt=St;Zt.Item=Si,Zt.List=$n,Zt.ErrorList=Nt,Zt.useForm=qt,Zt.useFormInstance=qn,Zt.useWatch=ot.useWatch,Zt.Provider=Me.RV,Zt.create=()=>{};var $t=Zt},8628:function(On,pn,pe){"use strict";var le=pe(59301),ke=pe(34280),We=pe(56762),ut=pe(69507);function Ge(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Me=(0,le.useRef)({}),Ct=(0,We.Z)(),wt=(0,ut.ZP)();return(0,ke.Z)(()=>{const $e=wt.subscribe(Ft=>{Me.current=Ft,Ue&&Ct()});return()=>wt.unsubscribe($e)},[]),Me.current}pn.Z=Ge},9432:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return he},n:function(){return de}});var le=pe(19248),ke=pe(92310),We=pe.n(ke),ut=pe(93681),Ge=pe(8654),Ue=pe(59301),Me=pe(19080),Ct=pe(36355),wt=pe(1684),$e=pe(19716),Ft=pe(32441),lt=pe(33234),vt=pe(59412),Ie=pe(9937);function te(ve){return!!(ve.prefix||ve.suffix||ve.allowClear)}var ee=function(ve,Ee){var Be={};for(var Le in ve)Object.prototype.hasOwnProperty.call(ve,Le)&&Ee.indexOf(Le)<0&&(Be[Le]=ve[Le]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Le=Object.getOwnPropertySymbols(ve);ze<Le.length;ze++)Ee.indexOf(Le[ze])<0&&Object.prototype.propertyIsEnumerable.call(ve,Le[ze])&&(Be[Le[ze]]=ve[Le[ze]]);return Be};function de(ve,Ee){if(!ve)return;ve.focus(Ee);const{cursor:Be}=Ee||{};if(Be){const Le=ve.value.length;switch(Be){case"start":ve.setSelectionRange(0,0);break;case"end":ve.setSelectionRange(Le,Le);break;default:ve.setSelectionRange(0,Le);break}}}var he=(0,Ue.forwardRef)((ve,Ee)=>{var Be;const{prefixCls:Le,bordered:ze=!0,status:je,size:Xe,disabled:Ye,onBlur:dt,onFocus:He,suffix:Nt,allowClear:ot,addonAfter:Tt,addonBefore:xt,className:Ot,style:Wt,styles:Dt,rootClassName:tt,onChange:Ve,classNames:_t}=ve,vn=ee(ve,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:yn,direction:zt,input:qt}=Ue.useContext(Ct.E_),ln=yn("input",Le),Gn=(0,Ue.useRef)(null),[un,_n]=(0,Ie.ZP)(ln),{compactSize:St,compactItemClassnames:Zn}=(0,lt.ri)(ln,zt),ci=(0,$e.Z)(Sn=>{var an;return(an=Xe!=null?Xe:St)!==null&&an!==void 0?an:Sn}),Ze=Ue.useContext(wt.Z),be=Ye!=null?Ye:Ze,{status:Pe,hasFeedback:Ae,feedbackIcon:Oe}=(0,Ue.useContext)(Ft.aM),xe=(0,Me.F)(Pe,je),ct=te(ve)||!!Ae,Mt=(0,Ue.useRef)(ct);(0,Ue.useEffect)(()=>{var Sn;ct&&Mt.current,Mt.current=ct},[ct]);const at=(0,vt.Z)(Gn,!0),qe=Sn=>{at(),dt==null||dt(Sn)},Lt=Sn=>{at(),He==null||He(Sn)},Bt=Sn=>{at(),Ve==null||Ve(Sn)},ft=(Ae||Nt)&&Ue.createElement(Ue.Fragment,null,Nt,Ae&&Oe);let Gt;return typeof ot=="object"&&(ot!=null&&ot.clearIcon)?Gt=ot:ot&&(Gt={clearIcon:Ue.createElement(le.Z,null)}),un(Ue.createElement(ut.default,Object.assign({ref:(0,Ge.sQ)(Ee,Gn),prefixCls:ln,autoComplete:qt==null?void 0:qt.autoComplete},vn,{disabled:be,onBlur:qe,onFocus:Lt,style:Object.assign(Object.assign({},qt==null?void 0:qt.style),Wt),styles:Object.assign(Object.assign({},qt==null?void 0:qt.styles),Dt),suffix:ft,allowClear:Gt,className:We()(Ot,tt,Zn,qt==null?void 0:qt.className),onChange:Bt,addonAfter:Tt&&Ue.createElement(lt.BR,null,Ue.createElement(Ft.Ux,{override:!0,status:!0},Tt)),addonBefore:xt&&Ue.createElement(lt.BR,null,Ue.createElement(Ft.Ux,{override:!0,status:!0},xt)),classNames:Object.assign(Object.assign(Object.assign({},_t),qt==null?void 0:qt.classNames),{input:We()({[`${ln}-sm`]:ci==="small",[`${ln}-lg`]:ci==="large",[`${ln}-rtl`]:zt==="rtl",[`${ln}-borderless`]:!ze},!ct&&(0,Me.Z)(ln,xe),_t==null?void 0:_t.input,(Be=qt==null?void 0:qt.classNames)===null||Be===void 0?void 0:Be.input,_n)}),classes:{affixWrapper:We()({[`${ln}-affix-wrapper-sm`]:ci==="small",[`${ln}-affix-wrapper-lg`]:ci==="large",[`${ln}-affix-wrapper-rtl`]:zt==="rtl",[`${ln}-affix-wrapper-borderless`]:!ze},(0,Me.Z)(`${ln}-affix-wrapper`,xe,Ae),_n),wrapper:We()({[`${ln}-group-rtl`]:zt==="rtl"},_n),group:We()({[`${ln}-group-wrapper-sm`]:ci==="small",[`${ln}-group-wrapper-lg`]:ci==="large",[`${ln}-group-wrapper-rtl`]:zt==="rtl",[`${ln}-group-wrapper-disabled`]:be},(0,Me.Z)(`${ln}-group-wrapper`,xe,Ae),_n)}})))})},1643:function(On,pn,pe){"use strict";var le=pe(19248),ke=pe(92310),We=pe.n(ke),ut=pe(9296),Ge=pe(59301),Ue=pe(19080),Me=pe(36355),Ct=pe(1684),wt=pe(19716),$e=pe(32441),Ft=pe(9432),lt=pe(9937),vt=function(te,ee){var de={};for(var se in te)Object.prototype.hasOwnProperty.call(te,se)&&ee.indexOf(se)<0&&(de[se]=te[se]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,se=Object.getOwnPropertySymbols(te);he<se.length;he++)ee.indexOf(se[he])<0&&Object.prototype.propertyIsEnumerable.call(te,se[he])&&(de[se[he]]=te[se[he]]);return de};const Ie=(0,Ge.forwardRef)((te,ee)=>{const{prefixCls:de,bordered:se=!0,size:he,disabled:ve,status:Ee,allowClear:Be,showCount:Le,classNames:ze,rootClassName:je,className:Xe}=te,Ye=vt(te,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:dt,direction:He}=Ge.useContext(Me.E_),Nt=(0,wt.Z)(he),ot=Ge.useContext(Ct.Z),Tt=ve!=null?ve:ot,{status:xt,hasFeedback:Ot,feedbackIcon:Wt}=Ge.useContext($e.aM),Dt=(0,Ue.F)(xt,Ee),tt=Ge.useRef(null);Ge.useImperativeHandle(ee,()=>{var zt;return{resizableTextArea:(zt=tt.current)===null||zt===void 0?void 0:zt.resizableTextArea,focus:qt=>{var ln,Gn;(0,Ft.n)((Gn=(ln=tt.current)===null||ln===void 0?void 0:ln.resizableTextArea)===null||Gn===void 0?void 0:Gn.textArea,qt)},blur:()=>{var qt;return(qt=tt.current)===null||qt===void 0?void 0:qt.blur()}}});const Ve=dt("input",de);let _t;typeof Be=="object"&&(Be!=null&&Be.clearIcon)?_t=Be:Be&&(_t={clearIcon:Ge.createElement(le.Z,null)});const[vn,yn]=(0,lt.ZP)(Ve);return vn(Ge.createElement(ut.default,Object.assign({},Ye,{disabled:Tt,allowClear:_t,className:We()(Xe,je),classes:{affixWrapper:We()(`${Ve}-textarea-affix-wrapper`,{[`${Ve}-affix-wrapper-rtl`]:He==="rtl",[`${Ve}-affix-wrapper-borderless`]:!se,[`${Ve}-affix-wrapper-sm`]:Nt==="small",[`${Ve}-affix-wrapper-lg`]:Nt==="large",[`${Ve}-textarea-show-count`]:Le},(0,Ue.Z)(`${Ve}-affix-wrapper`,Dt),yn)},classNames:Object.assign(Object.assign({},ze),{textarea:We()({[`${Ve}-borderless`]:!se,[`${Ve}-sm`]:Nt==="small",[`${Ve}-lg`]:Nt==="large"},(0,Ue.Z)(Ve,Dt),yn,ze==null?void 0:ze.textarea)}),prefixCls:Ve,suffix:Ot&&Ge.createElement("span",{className:`${Ve}-textarea-suffix`},Wt),showCount:Le,ref:tt})))});pn.Z=Ie},59412:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ke}});var le=pe(59301);function ke(We,ut){const Ge=(0,le.useRef)([]),Ue=()=>{Ge.current.push(setTimeout(()=>{var Me,Ct,wt,$e;!((Me=We.current)===null||Me===void 0)&&Me.input&&((Ct=We.current)===null||Ct===void 0?void 0:Ct.input.getAttribute("type"))==="password"&&(!((wt=We.current)===null||wt===void 0)&&wt.input.hasAttribute("value"))&&(($e=We.current)===null||$e===void 0||$e.input.removeAttribute("value"))}))};return(0,le.useEffect)(()=>(ut&&Ue(),()=>Ge.current.forEach(Me=>{Me&&clearTimeout(Me)})),[]),Ue}},92832:function(On,pn,pe){"use strict";pe.d(pn,{default:function(){return Nt}});var le=pe(92310),ke=pe.n(le),We=pe(59301),ut=pe(36355),Ge=pe(32441),Ue=pe(9937),Ct=ot=>{const{getPrefixCls:Tt,direction:xt}=(0,We.useContext)(ut.E_),{prefixCls:Ot,className:Wt}=ot,Dt=Tt("input-group",Ot),tt=Tt("input"),[Ve,_t]=(0,Ue.ZP)(tt),vn=ke()(Dt,{[`${Dt}-lg`]:ot.size==="large",[`${Dt}-sm`]:ot.size==="small",[`${Dt}-compact`]:ot.compact,[`${Dt}-rtl`]:xt==="rtl"},_t,Wt),yn=(0,We.useContext)(Ge.aM),zt=(0,We.useMemo)(()=>Object.assign(Object.assign({},yn),{isFormItemInput:!1}),[yn]);return Ve(We.createElement("span",{className:vn,style:ot.style,onMouseEnter:ot.onMouseEnter,onMouseLeave:ot.onMouseLeave,onFocus:ot.onFocus,onBlur:ot.onBlur},We.createElement(Ge.aM.Provider,{value:zt},ot.children)))},wt=pe(9432),$e=pe(73331),Ft=pe(15277),lt=pe(2738),vt=pe(8654),Ie=pe(59412),te=function(ot,Tt){var xt={};for(var Ot in ot)Object.prototype.hasOwnProperty.call(ot,Ot)&&Tt.indexOf(Ot)<0&&(xt[Ot]=ot[Ot]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Ot=Object.getOwnPropertySymbols(ot);Wt<Ot.length;Wt++)Tt.indexOf(Ot[Wt])<0&&Object.prototype.propertyIsEnumerable.call(ot,Ot[Wt])&&(xt[Ot[Wt]]=ot[Ot[Wt]]);return xt};const ee=ot=>ot?We.createElement(Ft.Z,null):We.createElement($e.Z,null),de={click:"onClick",hover:"onMouseOver"};var he=We.forwardRef((ot,Tt)=>{const{visibilityToggle:xt=!0}=ot,Ot=typeof xt=="object"&&xt.visible!==void 0,[Wt,Dt]=(0,We.useState)(()=>Ot?xt.visible:!1),tt=(0,We.useRef)(null);We.useEffect(()=>{Ot&&Dt(xt.visible)},[Ot,xt]);const Ve=(0,Ie.Z)(tt),_t=()=>{const{disabled:be}=ot;be||(Wt&&Ve(),Dt(Pe=>{var Ae;const Oe=!Pe;return typeof xt=="object"&&((Ae=xt.onVisibleChange)===null||Ae===void 0||Ae.call(xt,Oe)),Oe}))},vn=be=>{const{action:Pe="click",iconRender:Ae=ee}=ot,Oe=de[Pe]||"",xe=Ae(Wt),ct={[Oe]:_t,className:`${be}-icon`,key:"passwordIcon",onMouseDown:Mt=>{Mt.preventDefault()},onMouseUp:Mt=>{Mt.preventDefault()}};return We.cloneElement(We.isValidElement(xe)?xe:We.createElement("span",null,xe),ct)},{className:yn,prefixCls:zt,inputPrefixCls:qt,size:ln}=ot,Gn=te(ot,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:un}=We.useContext(ut.E_),_n=un("input",qt),St=un("input-password",zt),Zn=xt&&vn(St),ci=ke()(St,yn,{[`${St}-${ln}`]:!!ln}),Ze=Object.assign(Object.assign({},(0,lt.Z)(Gn,["suffix","iconRender","visibilityToggle"])),{type:Wt?"text":"password",className:ci,prefixCls:_n,suffix:Zn});return ln&&(Ze.size=ln),We.createElement(wt.Z,Object.assign({ref:(0,vt.sQ)(Tt,tt)},Ze))}),ve=pe(47472),Ee=pe(92343),Be=pe(3113),Le=pe(19716),ze=pe(33234),je=function(ot,Tt){var xt={};for(var Ot in ot)Object.prototype.hasOwnProperty.call(ot,Ot)&&Tt.indexOf(Ot)<0&&(xt[Ot]=ot[Ot]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Ot=Object.getOwnPropertySymbols(ot);Wt<Ot.length;Wt++)Tt.indexOf(Ot[Wt])<0&&Object.prototype.propertyIsEnumerable.call(ot,Ot[Wt])&&(xt[Ot[Wt]]=ot[Ot[Wt]]);return xt},Ye=We.forwardRef((ot,Tt)=>{const{prefixCls:xt,inputPrefixCls:Ot,className:Wt,size:Dt,suffix:tt,enterButton:Ve=!1,addonAfter:_t,loading:vn,disabled:yn,onSearch:zt,onChange:qt,onCompositionStart:ln,onCompositionEnd:Gn}=ot,un=je(ot,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:_n,direction:St}=We.useContext(ut.E_),Zn=We.useRef(!1),ci=_n("input-search",xt),Ze=_n("input",Ot),{compactSize:be}=(0,ze.ri)(ci,St),Pe=(0,Le.Z)(rn=>{var zn;return(zn=Dt!=null?Dt:be)!==null&&zn!==void 0?zn:rn}),Ae=We.useRef(null),Oe=rn=>{rn&&rn.target&&rn.type==="click"&&zt&&zt(rn.target.value,rn,{source:"clear"}),qt&&qt(rn)},xe=rn=>{var zn;document.activeElement===((zn=Ae.current)===null||zn===void 0?void 0:zn.input)&&rn.preventDefault()},ct=rn=>{var zn,kn;zt&&zt((kn=(zn=Ae.current)===null||zn===void 0?void 0:zn.input)===null||kn===void 0?void 0:kn.value,rn,{source:"input"})},Mt=rn=>{Zn.current||vn||ct(rn)},at=typeof Ve=="boolean"?We.createElement(ve.Z,null):null,qe=`${ci}-button`;let Lt;const Bt=Ve||{},ft=Bt.type&&Bt.type.__ANT_BUTTON===!0;ft||Bt.type==="button"?Lt=(0,Ee.Tm)(Bt,Object.assign({onMouseDown:xe,onClick:rn=>{var zn,kn;(kn=(zn=Bt==null?void 0:Bt.props)===null||zn===void 0?void 0:zn.onClick)===null||kn===void 0||kn.call(zn,rn),ct(rn)},key:"enterButton"},ft?{className:qe,size:Pe}:{})):Lt=We.createElement(Be.ZP,{className:qe,type:Ve?"primary":void 0,size:Pe,disabled:yn,key:"enterButton",onMouseDown:xe,onClick:ct,loading:vn,icon:at},Ve),_t&&(Lt=[Lt,(0,Ee.Tm)(_t,{key:"addonAfter"})]);const Gt=ke()(ci,{[`${ci}-rtl`]:St==="rtl",[`${ci}-${Pe}`]:!!Pe,[`${ci}-with-button`]:!!Ve},Wt),Sn=rn=>{Zn.current=!0,ln==null||ln(rn)},an=rn=>{Zn.current=!1,Gn==null||Gn(rn)};return We.createElement(wt.Z,Object.assign({ref:(0,vt.sQ)(Ae,Tt),onPressEnter:Mt},un,{size:Pe,onCompositionStart:Sn,onCompositionEnd:an,prefixCls:Ze,addonAfter:Lt,suffix:tt,onChange:Oe,className:Gt,disabled:yn}))}),dt=pe(1643);const He=wt.Z;He.Group=Ct,He.Search=Ye,He.TextArea=dt.Z,He.Password=he;var Nt=He},45818:function(On,pn,pe){"use strict";pe.d(pn,{D:function(){return ve},Z:function(){return Le}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function(je,Xe){return ke.createElement(Ge.Z,(0,le.Z)({},je,{ref:Xe,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me,wt=pe(33853),$e=pe(38819),Ft=pe(92310),lt=pe.n(Ft),vt=pe(2738),te=ze=>!isNaN(parseFloat(ze))&&isFinite(ze),ee=pe(36355),de=pe(84966),se=function(ze,je){var Xe={};for(var Ye in ze)Object.prototype.hasOwnProperty.call(ze,Ye)&&je.indexOf(Ye)<0&&(Xe[Ye]=ze[Ye]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Ye=Object.getOwnPropertySymbols(ze);dt<Ye.length;dt++)je.indexOf(Ye[dt])<0&&Object.prototype.propertyIsEnumerable.call(ze,Ye[dt])&&(Xe[Ye[dt]]=ze[Ye[dt]]);return Xe};const he={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ve=ke.createContext({}),Ee=(()=>{let ze=0;return function(){let je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return ze+=1,`${je}${ze}`}})();var Le=ke.forwardRef((ze,je)=>{const{prefixCls:Xe,className:Ye,trigger:dt,children:He,defaultCollapsed:Nt=!1,theme:ot="dark",style:Tt={},collapsible:xt=!1,reverseArrow:Ot=!1,width:Wt=200,collapsedWidth:Dt=80,zeroWidthTriggerStyle:tt,breakpoint:Ve,onCollapse:_t,onBreakpoint:vn}=ze,yn=se(ze,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:zt}=(0,ke.useContext)(de.Gs),[qt,ln]=(0,ke.useState)("collapsed"in ze?ze.collapsed:Nt),[Gn,un]=(0,ke.useState)(!1);(0,ke.useEffect)(()=>{"collapsed"in ze&&ln(ze.collapsed)},[ze.collapsed]);const _n=(Pe,Ae)=>{"collapsed"in ze||ln(Pe),_t==null||_t(Pe,Ae)},St=(0,ke.useRef)();St.current=Pe=>{un(Pe.matches),vn==null||vn(Pe.matches),qt!==Pe.matches&&_n(Pe.matches,"responsive")},(0,ke.useEffect)(()=>{function Pe(Oe){return St.current(Oe)}let Ae;if(typeof window!="undefined"){const{matchMedia:Oe}=window;if(Oe&&Ve&&Ve in he){Ae=Oe(`(max-width: ${he[Ve]})`);try{Ae.addEventListener("change",Pe)}catch(xe){Ae.addListener(Pe)}Pe(Ae)}}return()=>{try{Ae==null||Ae.removeEventListener("change",Pe)}catch(Oe){Ae==null||Ae.removeListener(Pe)}}},[Ve]),(0,ke.useEffect)(()=>{const Pe=Ee("ant-sider-");return zt.addSider(Pe),()=>zt.removeSider(Pe)},[]);const Zn=()=>{_n(!qt,"clickTrigger")},{getPrefixCls:ci}=(0,ke.useContext)(ee.E_),Ze=()=>{const Pe=ci("layout-sider",Xe),Ae=(0,vt.Z)(yn,["collapsed"]),Oe=qt?Dt:Wt,xe=te(Oe)?`${Oe}px`:String(Oe),ct=parseFloat(String(Dt||0))===0?ke.createElement("span",{onClick:Zn,className:lt()(`${Pe}-zero-width-trigger`,`${Pe}-zero-width-trigger-${Ot?"right":"left"}`),style:tt},dt||ke.createElement(Ct,null)):null,qe={expanded:Ot?ke.createElement($e.Z,null):ke.createElement(wt.Z,null),collapsed:Ot?ke.createElement(wt.Z,null):ke.createElement($e.Z,null)}[qt?"collapsed":"expanded"],Lt=dt!==null?ct||ke.createElement("div",{className:`${Pe}-trigger`,onClick:Zn,style:{width:xe}},dt||qe):null,Bt=Object.assign(Object.assign({},Tt),{flex:`0 0 ${xe}`,maxWidth:xe,minWidth:xe,width:xe}),ft=lt()(Pe,`${Pe}-${ot}`,{[`${Pe}-collapsed`]:!!qt,[`${Pe}-has-trigger`]:xt&&dt!==null&&!ct,[`${Pe}-below`]:!!Gn,[`${Pe}-zero-width`]:parseFloat(xe)===0},Ye);return ke.createElement("aside",Object.assign({className:ft},Ae,{style:Bt,ref:je}),ke.createElement("div",{className:`${Pe}-children`},He),xt||Gn&&ct?Lt:null)},be=ke.useMemo(()=>({siderCollapsed:qt}),[qt]);return ke.createElement(ve.Provider,{value:be},Ze())})},84966:function(On,pn,pe){"use strict";pe.d(pn,{VY:function(){return ve},$_:function(){return he},h4:function(){return se},Gs:function(){return vt},ZP:function(){return Ee}});var le=pe(19127),ke=pe(92310),We=pe.n(ke),ut=pe(2738),Ge=pe(59301),Ue=pe(36355),Me=pe(83116),wt=Be=>{const{componentCls:Le,bodyBg:ze,lightSiderBg:je,lightTriggerBg:Xe,lightTriggerColor:Ye}=Be;return{[`${Le}-sider-light`]:{background:je,[`${Le}-sider-trigger`]:{color:Ye,background:Xe},[`${Le}-sider-zero-width-trigger`]:{color:Ye,background:Xe,border:`1px solid ${ze}`,borderInlineStart:0}}}};const $e=Be=>{const{antCls:Le,componentCls:ze,colorText:je,triggerColor:Xe,footerBg:Ye,triggerBg:dt,headerHeight:He,headerPadding:Nt,headerColor:ot,footerPadding:Tt,triggerHeight:xt,zeroTriggerHeight:Ot,zeroTriggerWidth:Wt,motionDurationMid:Dt,motionDurationSlow:tt,fontSize:Ve,borderRadius:_t,bodyBg:vn,headerBg:yn,siderBg:zt}=Be;return{[ze]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:vn,"&, *":{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:zt,transition:`all ${Dt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Le}-menu${Le}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:xt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:xt,color:Xe,lineHeight:`${xt}px`,textAlign:"center",background:dt,cursor:"pointer",transition:`all ${Dt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:He,insetInlineEnd:-Wt,zIndex:1,width:Wt,height:Ot,color:Xe,fontSize:Be.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:zt,borderStartStartRadius:0,borderStartEndRadius:_t,borderEndEndRadius:_t,borderEndStartRadius:0,cursor:"pointer",transition:`background ${tt} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${tt}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Wt,borderStartStartRadius:_t,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:_t}}}}},wt(Be)),{"&-rtl":{direction:"rtl"}}),[`${ze}-header`]:{height:He,padding:Nt,color:ot,lineHeight:`${He}px`,background:yn,[`${Le}-menu`]:{lineHeight:"inherit"}},[`${ze}-footer`]:{padding:Tt,color:je,fontSize:Ve,background:Ye},[`${ze}-content`]:{flex:"auto",minHeight:0}}};var Ft=(0,Me.Z)("Layout",Be=>[$e(Be)],Be=>{const{colorBgLayout:Le,controlHeight:ze,controlHeightLG:je,colorText:Xe,controlHeightSM:Ye,marginXXS:dt,colorTextLightSolid:He,colorBgContainer:Nt}=Be,ot=je*1.25;return{colorBgHeader:"#001529",colorBgBody:Le,colorBgTrigger:"#002140",bodyBg:Le,headerBg:"#001529",headerHeight:ze*2,headerPadding:`0 ${ot}px`,headerColor:Xe,footerPadding:`${Ye}px ${ot}px`,footerBg:Le,siderBg:"#001529",triggerHeight:je+dt*2,triggerBg:"#002140",triggerColor:He,zeroTriggerWidth:je,zeroTriggerHeight:je,lightSiderBg:Nt,lightTriggerBg:Nt,lightTriggerColor:Xe}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),lt=function(Be,Le){var ze={};for(var je in Be)Object.prototype.hasOwnProperty.call(Be,je)&&Le.indexOf(je)<0&&(ze[je]=Be[je]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,je=Object.getOwnPropertySymbols(Be);Xe<je.length;Xe++)Le.indexOf(je[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,je[Xe])&&(ze[je[Xe]]=Be[je[Xe]]);return ze};const vt=Ge.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Ie(Be){let{suffixCls:Le,tagName:ze,displayName:je}=Be;return Xe=>Ge.forwardRef((dt,He)=>Ge.createElement(Xe,Object.assign({ref:He,suffixCls:Le,tagName:ze},dt)))}const te=Ge.forwardRef((Be,Le)=>{const{prefixCls:ze,suffixCls:je,className:Xe,tagName:Ye}=Be,dt=lt(Be,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:He}=Ge.useContext(Ue.E_),Nt=He("layout",ze),[ot,Tt]=Ft(Nt),xt=je?`${Nt}-${je}`:Nt;return ot(Ge.createElement(Ye,Object.assign({className:We()(ze||xt,Xe,Tt),ref:Le},dt)))}),ee=Ge.forwardRef((Be,Le)=>{const{direction:ze}=Ge.useContext(Ue.E_),[je,Xe]=Ge.useState([]),{prefixCls:Ye,className:dt,rootClassName:He,children:Nt,hasSider:ot,tagName:Tt,style:xt}=Be,Ot=lt(Be,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Wt=(0,ut.Z)(Ot,["suffixCls"]),{getPrefixCls:Dt,layout:tt}=Ge.useContext(Ue.E_),Ve=Dt("layout",Ye),[_t,vn]=Ft(Ve),yn=We()(Ve,{[`${Ve}-has-sider`]:typeof ot=="boolean"?ot:je.length>0,[`${Ve}-rtl`]:ze==="rtl"},tt==null?void 0:tt.className,dt,He,vn),zt=Ge.useMemo(()=>({siderHook:{addSider:qt=>{Xe(ln=>[].concat((0,le.Z)(ln),[qt]))},removeSider:qt=>{Xe(ln=>ln.filter(Gn=>Gn!==qt))}}}),[]);return _t(Ge.createElement(vt.Provider,{value:zt},Ge.createElement(Tt,Object.assign({ref:Le,className:yn,style:Object.assign(Object.assign({},tt==null?void 0:tt.style),xt)},Wt),Nt)))}),de=Ie({tagName:"div",displayName:"Layout"})(ee),se=Ie({suffixCls:"header",tagName:"header",displayName:"Header"})(te),he=Ie({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(te),ve=Ie({suffixCls:"content",tagName:"main",displayName:"Content"})(te);var Ee=de},40875:function(On,pn,pe){"use strict";pe.d(pn,{J:function(){return Ue}});var le=pe(59301),ke=pe(33234),We=pe(70425),ut=function(Me,Ct){var wt={};for(var $e in Me)Object.prototype.hasOwnProperty.call(Me,$e)&&Ct.indexOf($e)<0&&(wt[$e]=Me[$e]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,$e=Object.getOwnPropertySymbols(Me);Ft<$e.length;Ft++)Ct.indexOf($e[Ft])<0&&Object.prototype.propertyIsEnumerable.call(Me,$e[Ft])&&(wt[$e[Ft]]=Me[$e[Ft]]);return wt};const Ge=le.createContext(null),Ue=le.forwardRef((Me,Ct)=>{const{children:wt}=Me,$e=ut(Me,["children"]),Ft=le.useContext(Ge),lt=le.useMemo(()=>Object.assign(Object.assign({},Ft),$e),[Ft,$e.prefixCls,$e.mode,$e.selectable]);return le.createElement(Ge.Provider,{value:lt},le.createElement(ke.BR,null,(0,We.supportNodeRef)(wt)?le.cloneElement(wt,{ref:Ct}):wt))});pn.Z=Ge},20834:function(On,pn,pe){"use strict";pe.d(pn,{default:function(){return be}});var le=pe(15285),ke=pe(59301),We=pe(45818),ut=pe(92310),Ge=pe.n(ut),Ue=pe(36355),Me=function(Pe,Ae){var Oe={};for(var xe in Pe)Object.prototype.hasOwnProperty.call(Pe,xe)&&Ae.indexOf(xe)<0&&(Oe[xe]=Pe[xe]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,xe=Object.getOwnPropertySymbols(Pe);ct<xe.length;ct++)Ae.indexOf(xe[ct])<0&&Object.prototype.propertyIsEnumerable.call(Pe,xe[ct])&&(Oe[xe[ct]]=Pe[xe[ct]]);return Oe},wt=Pe=>{const{prefixCls:Ae,className:Oe,dashed:xe}=Pe,ct=Me(Pe,["prefixCls","className","dashed"]),{getPrefixCls:Mt}=ke.useContext(Ue.E_),at=Mt("menu",Ae),qe=Ge()({[`${at}-item-divider-dashed`]:!!xe},Oe);return ke.createElement(le.iz,Object.assign({className:qe},ct))},$e=pe(11592),Ft=pe(2738),lt=pe(6848),vt=pe(92343),te=(0,ke.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),de=Pe=>{var Ae;const{className:Oe,children:xe,icon:ct,title:Mt,danger:at}=Pe,{prefixCls:qe,firstLevel:Lt,direction:Bt,disableMenuItemTitleTooltip:ft,inlineCollapsed:Gt}=ke.useContext(te),Sn=ei=>{const Pi=ke.createElement("span",{className:`${qe}-title-content`},xe);return(!ct||(0,vt.l$)(xe)&&xe.type==="span")&&xe&&ei&&Lt&&typeof xe=="string"?ke.createElement("div",{className:`${qe}-inline-collapsed-noicon`},xe.charAt(0)):Pi},{siderCollapsed:an}=ke.useContext(We.D);let rn=Mt;typeof Mt=="undefined"?rn=Lt?xe:"":Mt===!1&&(rn="");const zn={title:rn};!an&&!Gt&&(zn.title=null,zn.open=!1);const kn=(0,$e.Z)(xe).length;let mn=ke.createElement(le.ck,Object.assign({},(0,Ft.Z)(Pe,["title","icon","danger"]),{className:Ge()({[`${qe}-item-danger`]:at,[`${qe}-item-only-child`]:(ct?kn+1:kn)===1},Oe),title:typeof Mt=="string"?Mt:void 0}),(0,vt.Tm)(ct,{className:Ge()((0,vt.l$)(ct)?(Ae=ct.props)===null||Ae===void 0?void 0:Ae.className:"",`${qe}-item-icon`)}),Sn(Gt));return ft||(mn=ke.createElement(lt.Z,Object.assign({},zn,{placement:Bt==="rtl"?"left":"right",overlayClassName:`${qe}-inline-collapsed-tooltip`}),mn)),mn},he=Pe=>{var Ae;const{popupClassName:Oe,icon:xe,title:ct,theme:Mt}=Pe,at=ke.useContext(te),{prefixCls:qe,inlineCollapsed:Lt,theme:Bt}=at,ft=(0,le.Xl)();let Gt;if(!xe)Gt=Lt&&!ft.length&&ct&&typeof ct=="string"?ke.createElement("div",{className:`${qe}-inline-collapsed-noicon`},ct.charAt(0)):ke.createElement("span",{className:`${qe}-title-content`},ct);else{const an=(0,vt.l$)(ct)&&ct.type==="span";Gt=ke.createElement(ke.Fragment,null,(0,vt.Tm)(xe,{className:Ge()((0,vt.l$)(xe)?(Ae=xe.props)===null||Ae===void 0?void 0:Ae.className:"",`${qe}-item-icon`)}),an?ct:ke.createElement("span",{className:`${qe}-title-content`},ct))}const Sn=ke.useMemo(()=>Object.assign(Object.assign({},at),{firstLevel:!1}),[at]);return ke.createElement(te.Provider,{value:Sn},ke.createElement(le.Wd,Object.assign({},(0,Ft.Z)(Pe,["icon"]),{title:Gt,popupClassName:Ge()(qe,Oe,`${qe}-${Mt||Bt}`)})))},ve=pe(18785),Ee=pe(70425),Be=pe(62892),Le=pe(40875),ze=function(Pe,Ae){var Oe={};for(var xe in Pe)Object.prototype.hasOwnProperty.call(Pe,xe)&&Ae.indexOf(xe)<0&&(Oe[xe]=Pe[xe]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,xe=Object.getOwnPropertySymbols(Pe);ct<xe.length;ct++)Ae.indexOf(xe[ct])<0&&Object.prototype.propertyIsEnumerable.call(Pe,xe[ct])&&(Oe[xe[ct]]=Pe[xe[ct]]);return Oe};function je(Pe){return(Pe||[]).map((Ae,Oe)=>{if(Ae&&typeof Ae=="object"){const xe=Ae,{label:ct,children:Mt,key:at,type:qe}=xe,Lt=ze(xe,["label","children","key","type"]),Bt=at!=null?at:`tmp-${Oe}`;return Mt||qe==="group"?qe==="group"?ke.createElement(le.BW,Object.assign({key:Bt},Lt,{title:ct}),je(Mt)):ke.createElement(he,Object.assign({key:Bt},Lt,{title:ct}),je(Mt)):qe==="divider"?ke.createElement(wt,Object.assign({key:Bt},Lt)):ke.createElement(de,Object.assign({key:Bt},Lt),ct)}return null}).filter(Ae=>Ae)}function Xe(Pe){return ke.useMemo(()=>Pe&&je(Pe),[Pe])}var Ye=pe(64993),dt=pe(17313),He=pe(8378),Nt=pe(13826),ot=pe(29878),Tt=pe(83116),xt=pe(37613),Wt=Pe=>{const{componentCls:Ae,motionDurationSlow:Oe,horizontalLineHeight:xe,colorSplit:ct,lineWidth:Mt,lineType:at,itemPaddingInline:qe}=Pe;return{[`${Ae}-horizontal`]:{lineHeight:xe,border:0,borderBottom:`${Mt}px ${at} ${ct}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Ae}-item, ${Ae}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:qe},[`> ${Ae}-item:hover,
> ${Ae}-item-active,
> ${Ae}-submenu ${Ae}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Ae}-item, ${Ae}-submenu-title`]:{transition:[`border-color ${Oe}`,`background ${Oe}`].join(",")},[`${Ae}-submenu-arrow`]:{display:"none"}}}},tt=Pe=>{let{componentCls:Ae,menuArrowOffset:Oe}=Pe;return{[`${Ae}-rtl`]:{direction:"rtl"},[`${Ae}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Ae}-rtl${Ae}-vertical,
${Ae}-submenu-rtl ${Ae}-vertical`]:{[`${Ae}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${Oe})`},"&::after":{transform:`rotate(45deg) translateY(${Oe})`}}}}};const Ve=Pe=>Object.assign({},(0,dt.oN)(Pe));var vn=(Pe,Ae)=>{const{componentCls:Oe,itemColor:xe,itemSelectedColor:ct,groupTitleColor:Mt,itemBg:at,subMenuItemBg:qe,itemSelectedBg:Lt,activeBarHeight:Bt,activeBarWidth:ft,activeBarBorderWidth:Gt,motionDurationSlow:Sn,motionEaseInOut:an,motionEaseOut:rn,itemPaddingInline:zn,motionDurationMid:kn,itemHoverColor:mn,lineType:ei,colorSplit:Pi,itemDisabledColor:Hn,dangerItemColor:bn,dangerItemHoverColor:wi,dangerItemSelectedColor:Zi,dangerItemActiveBg:Hi,dangerItemSelectedBg:rr,itemHoverBg:_r,itemActiveBg:gi,menuSubMenuBg:di,horizontalItemSelectedColor:xi,horizontalItemSelectedBg:$i,horizontalItemBorderRadius:Ri,horizontalItemHoverBg:Kr,popupBg:Sr}=Pe;return{[`${Oe}-${Ae}, ${Oe}-${Ae} > ${Oe}`]:{color:xe,background:at,[`&${Oe}-root:focus-visible`]:Object.assign({},Ve(Pe)),[`${Oe}-item-group-title`]:{color:Mt},[`${Oe}-submenu-selected`]:{[`> ${Oe}-submenu-title`]:{color:ct}},[`${Oe}-item-disabled, ${Oe}-submenu-disabled`]:{color:`${Hn} !important`},[`${Oe}-item:not(${Oe}-item-selected):not(${Oe}-submenu-selected)`]:{[`&:hover, > ${Oe}-submenu-title:hover`]:{color:mn}},[`&:not(${Oe}-horizontal)`]:{[`${Oe}-item:not(${Oe}-item-selected)`]:{"&:hover":{backgroundColor:_r},"&:active":{backgroundColor:gi}},[`${Oe}-submenu-title`]:{"&:hover":{backgroundColor:_r},"&:active":{backgroundColor:gi}}},[`${Oe}-item-danger`]:{color:bn,[`&${Oe}-item:hover`]:{[`&:not(${Oe}-item-selected):not(${Oe}-submenu-selected)`]:{color:wi}},[`&${Oe}-item:active`]:{background:Hi}},[`${Oe}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Oe}-item-selected`]:{color:ct,[`&${Oe}-item-danger`]:{color:Zi},"a, a:hover":{color:"inherit"}},[`& ${Oe}-item-selected`]:{backgroundColor:Lt,[`&${Oe}-item-danger`]:{backgroundColor:rr}},[`${Oe}-item, ${Oe}-submenu-title`]:{[`&:not(${Oe}-item-disabled):focus-visible`]:Object.assign({},Ve(Pe))},[`&${Oe}-submenu > ${Oe}`]:{backgroundColor:di},[`&${Oe}-popup > ${Oe}`]:{backgroundColor:Sr},[`&${Oe}-horizontal`]:Object.assign(Object.assign({},Ae==="dark"?{borderBottom:0}:{}),{[`> ${Oe}-item, > ${Oe}-submenu`]:{top:Gt,marginTop:-Gt,marginBottom:0,borderRadius:Ri,"&::after":{position:"absolute",insetInline:zn,bottom:0,borderBottom:`${Bt}px solid transparent`,transition:`border-color ${Sn} ${an}`,content:'""'},"&:hover, &-active, &-open":{background:Kr,"&::after":{borderBottomWidth:Bt,borderBottomColor:xi}},"&-selected":{color:xi,backgroundColor:$i,"&:hover":{backgroundColor:$i},"&::after":{borderBottomWidth:Bt,borderBottomColor:xi}}}}),[`&${Oe}-root`]:{[`&${Oe}-inline, &${Oe}-vertical`]:{borderInlineEnd:`${Gt}px ${ei} ${Pi}`}},[`&${Oe}-inline`]:{[`${Oe}-sub${Oe}-inline`]:{background:qe},[`${Oe}-item, ${Oe}-submenu-title`]:Gt&&ft?{width:`calc(100% + ${Gt}px)`}:{},[`${Oe}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ft}px solid ${ct}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${kn} ${rn}`,`opacity ${kn} ${rn}`].join(","),content:'""'},[`&${Oe}-item-danger`]:{"&::after":{borderInlineEndColor:Zi}}},[`${Oe}-selected, ${Oe}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${kn} ${an}`,`opacity ${kn} ${an}`].join(",")}}}}}};const yn=Pe=>{const{componentCls:Ae,itemHeight:Oe,itemMarginInline:xe,padding:ct,menuArrowSize:Mt,marginXS:at,itemMarginBlock:qe}=Pe,Lt=ct+Mt+at;return{[`${Ae}-item`]:{position:"relative",overflow:"hidden"},[`${Ae}-item, ${Ae}-submenu-title`]:{height:Oe,lineHeight:`${Oe}px`,paddingInline:ct,overflow:"hidden",textOverflow:"ellipsis",marginInline:xe,marginBlock:qe,width:`calc(100% - ${xe*2}px)`},[`> ${Ae}-item,
> ${Ae}-submenu > ${Ae}-submenu-title`]:{height:Oe,lineHeight:`${Oe}px`},[`${Ae}-item-group-list ${Ae}-submenu-title,
${Ae}-submenu-title`]:{paddingInlineEnd:Lt}}};var qt=Pe=>{const{componentCls:Ae,iconCls:Oe,itemHeight:xe,colorTextLightSolid:ct,dropdownWidth:Mt,controlHeightLG:at,motionDurationMid:qe,motionEaseOut:Lt,paddingXL:Bt,itemMarginInline:ft,fontSizeLG:Gt,motionDurationSlow:Sn,paddingXS:an,boxShadowSecondary:rn,collapsedWidth:zn,collapsedIconSize:kn}=Pe,mn={height:xe,lineHeight:`${xe}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Ae]:{"&-inline, &-vertical":Object.assign({[`&${Ae}-root`]:{boxShadow:"none"}},yn(Pe))},[`${Ae}-submenu-popup`]:{[`${Ae}-vertical`]:Object.assign(Object.assign({},yn(Pe)),{boxShadow:rn})}},{[`${Ae}-submenu-popup ${Ae}-vertical${Ae}-sub`]:{minWidth:Mt,maxHeight:`calc(100vh - ${at*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Ae}-inline`]:{width:"100%",[`&${Ae}-root`]:{[`${Ae}-item, ${Ae}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Sn}`,`background ${Sn}`,`padding ${qe} ${Lt}`].join(","),[`> ${Ae}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Ae}-sub${Ae}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Ae}-submenu > ${Ae}-submenu-title`]:mn,[`& ${Ae}-item-group-title`]:{paddingInlineStart:Bt}},[`${Ae}-item`]:mn}},{[`${Ae}-inline-collapsed`]:{width:zn,[`&${Ae}-root`]:{[`${Ae}-item, ${Ae}-submenu ${Ae}-submenu-title`]:{[`> ${Ae}-inline-collapsed-noicon`]:{fontSize:Gt,textAlign:"center"}}},[`> ${Ae}-item,
> ${Ae}-item-group > ${Ae}-item-group-list > ${Ae}-item,
> ${Ae}-item-group > ${Ae}-item-group-list > ${Ae}-submenu > ${Ae}-submenu-title,
> ${Ae}-submenu > ${Ae}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Gt/2}px - ${ft}px)`,textOverflow:"clip",[`
${Ae}-submenu-arrow,
${Ae}-submenu-expand-icon
`]:{opacity:0},[`${Ae}-item-icon, ${Oe}`]:{margin:0,fontSize:kn,lineHeight:`${xe}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Ae}-item-icon, ${Oe}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Ae}-item-icon, ${Oe}`]:{display:"none"},"a, a:hover":{color:ct}},[`${Ae}-item-group-title`]:Object.assign(Object.assign({},dt.vS),{paddingInline:an})}}]};const ln=Pe=>{const{componentCls:Ae,motionDurationSlow:Oe,motionDurationMid:xe,motionEaseInOut:ct,motionEaseOut:Mt,iconCls:at,iconSize:qe,iconMarginInlineEnd:Lt}=Pe;return{[`${Ae}-item, ${Ae}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Oe}`,`background ${Oe}`,`padding ${Oe} ${ct}`].join(","),[`${Ae}-item-icon, ${at}`]:{minWidth:qe,fontSize:qe,transition:[`font-size ${xe} ${Mt}`,`margin ${Oe} ${ct}`,`color ${Oe}`].join(","),"+ span":{marginInlineStart:Lt,opacity:1,transition:[`opacity ${Oe} ${ct}`,`margin ${Oe}`,`color ${Oe}`].join(",")}},[`${Ae}-item-icon`]:Object.assign({},(0,dt.Ro)()),[`&${Ae}-item-only-child`]:{[`> ${at}, > ${Ae}-item-icon`]:{marginInlineEnd:0}}},[`${Ae}-item-disabled, ${Ae}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Ae}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Gn=Pe=>{const{componentCls:Ae,motionDurationSlow:Oe,motionEaseInOut:xe,borderRadius:ct,menuArrowSize:Mt,menuArrowOffset:at}=Pe;return{[`${Ae}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Pe.margin,width:Mt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Oe} ${xe}, opacity ${Oe}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Mt*.6,height:Mt*.15,backgroundColor:"currentcolor",borderRadius:ct,transition:[`background ${Oe} ${xe}`,`transform ${Oe} ${xe}`,`top ${Oe} ${xe}`,`color ${Oe} ${xe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${at})`},"&::after":{transform:`rotate(-45deg) translateY(${at})`}}}}},un=Pe=>{const{antCls:Ae,componentCls:Oe,fontSize:xe,motionDurationSlow:ct,motionDurationMid:Mt,motionEaseInOut:at,paddingXS:qe,padding:Lt,colorSplit:Bt,lineWidth:ft,zIndexPopup:Gt,borderRadiusLG:Sn,subMenuItemBorderRadius:an,menuArrowSize:rn,menuArrowOffset:zn,lineType:kn,menuPanelMaskInset:mn,groupTitleLineHeight:ei,groupTitleFontSize:Pi}=Pe;return[{"":{[`${Oe}`]:Object.assign(Object.assign({},(0,dt.dF)()),{"&-hidden":{display:"none"}})},[`${Oe}-submenu-hidden`]:{display:"none"}},{[Oe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,dt.Wf)(Pe)),(0,dt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:xe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${ct} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${Oe}-item`]:{flex:"none"}},[`${Oe}-item, ${Oe}-submenu, ${Oe}-submenu-title`]:{borderRadius:Pe.itemBorderRadius},[`${Oe}-item-group-title`]:{padding:`${qe}px ${Lt}px`,fontSize:Pi,lineHeight:ei,transition:`all ${ct}`},[`&-horizontal ${Oe}-submenu`]:{transition:[`border-color ${ct} ${at}`,`background ${ct} ${at}`].join(",")},[`${Oe}-submenu, ${Oe}-submenu-inline`]:{transition:[`border-color ${ct} ${at}`,`background ${ct} ${at}`,`padding ${Mt} ${at}`].join(",")},[`${Oe}-submenu ${Oe}-sub`]:{cursor:"initial",transition:[`background ${ct} ${at}`,`padding ${ct} ${at}`].join(",")},[`${Oe}-title-content`]:{transition:`color ${ct}`},[`${Oe}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Oe}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Bt,borderStyle:kn,borderWidth:0,borderTopWidth:ft,marginBlock:ft,padding:0,"&-dashed":{borderStyle:"dashed"}}}),ln(Pe)),{[`${Oe}-item-group`]:{[`${Oe}-item-group-list`]:{margin:0,padding:0,[`${Oe}-item, ${Oe}-submenu-title`]:{paddingInline:`${xe*2}px ${Lt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Gt,borderRadius:Sn,boxShadow:"none",transformOrigin:"0 0",[`&${Oe}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${mn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:mn},"\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},[`> ${Oe}`]:Object.assign(Object.assign(Object.assign({borderRadius:Sn},ln(Pe)),Gn(Pe)),{[`${Oe}-item, ${Oe}-submenu > ${Oe}-submenu-title`]:{borderRadius:an},[`${Oe}-submenu-title::after`]:{transition:`transform ${ct} ${at}`}})}}),Gn(Pe)),{[`&-inline-collapsed ${Oe}-submenu-arrow,
&-inline ${Oe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${zn})`},"&::after":{transform:`rotate(45deg) translateX(-${zn})`}},[`${Oe}-submenu-open${Oe}-submenu-inline > ${Oe}-submenu-title > ${Oe}-submenu-arrow`]:{transform:`translateY(-${rn*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${zn})`},"&::before":{transform:`rotate(45deg) translateX(${zn})`}}})},{[`${Ae}-layout-header`]:{[Oe]:{lineHeight:"inherit"}}}]};var _n=(Pe,Ae)=>(0,Tt.Z)("Menu",xe=>{if(Ae===!1)return[];const{colorBgElevated:ct,colorPrimary:Mt,colorTextLightSolid:at,controlHeightLG:qe,fontSize:Lt,darkItemColor:Bt,darkDangerItemColor:ft,darkItemBg:Gt,darkSubMenuItemBg:Sn,darkItemSelectedColor:an,darkItemSelectedBg:rn,darkDangerItemSelectedBg:zn,darkItemHoverBg:kn,darkGroupTitleColor:mn,darkItemHoverColor:ei,darkItemDisabledColor:Pi,darkDangerItemHoverColor:Hn,darkDangerItemSelectedColor:bn,darkDangerItemActiveBg:wi}=xe,Zi=Lt/7*5,Hi=(0,xt.TS)(xe,{menuArrowSize:Zi,menuHorizontalHeight:qe*1.15,menuArrowOffset:`${Zi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:ct}),rr=(0,xt.TS)(Hi,{itemColor:Bt,itemHoverColor:ei,groupTitleColor:mn,itemSelectedColor:an,itemBg:Gt,popupBg:Gt,subMenuItemBg:Sn,itemActiveBg:"transparent",itemSelectedBg:rn,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:kn,itemDisabledColor:Pi,dangerItemColor:ft,dangerItemHoverColor:Hn,dangerItemSelectedColor:bn,dangerItemActiveBg:wi,dangerItemSelectedBg:zn,menuSubMenuBg:Sn,horizontalItemSelectedColor:at,horizontalItemSelectedBg:Mt});return[un(Hi),Wt(Hi),qt(Hi),vn(Hi,"light"),vn(rr,"dark"),tt(Hi),(0,He.Z)(Hi),(0,Nt.oN)(Hi,"slide-up"),(0,Nt.oN)(Hi,"slide-down"),(0,ot._y)(Hi,"zoom-big")]},xe=>{const{colorPrimary:ct,colorError:Mt,colorTextDisabled:at,colorErrorBg:qe,colorText:Lt,colorTextDescription:Bt,colorBgContainer:ft,colorFillAlter:Gt,colorFillContent:Sn,lineWidth:an,lineWidthBold:rn,controlItemBgActive:zn,colorBgTextHover:kn,controlHeightLG:mn,lineHeight:ei,colorBgElevated:Pi,marginXXS:Hn,padding:bn,fontSize:wi,controlHeightSM:Zi,fontSizeLG:Hi,colorTextLightSolid:rr,colorErrorHover:_r}=xe,gi=new Ye.C(rr).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:xe.zIndexPopupBase+50,radiusItem:xe.borderRadiusLG,itemBorderRadius:xe.borderRadiusLG,radiusSubMenuItem:xe.borderRadiusSM,subMenuItemBorderRadius:xe.borderRadiusSM,colorItemText:Lt,itemColor:Lt,colorItemTextHover:Lt,itemHoverColor:Lt,colorItemTextHoverHorizontal:ct,horizontalItemHoverColor:ct,colorGroupTitle:Bt,groupTitleColor:Bt,colorItemTextSelected:ct,itemSelectedColor:ct,colorItemTextSelectedHorizontal:ct,horizontalItemSelectedColor:ct,colorItemBg:ft,itemBg:ft,colorItemBgHover:kn,itemHoverBg:kn,colorItemBgActive:Sn,itemActiveBg:zn,colorSubItemBg:Gt,subMenuItemBg:Gt,colorItemBgSelected:zn,itemSelectedBg:zn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:rn,activeBarHeight:rn,colorActiveBarBorderSize:an,activeBarBorderWidth:an,colorItemTextDisabled:at,itemDisabledColor:at,colorDangerItemText:Mt,dangerItemColor:Mt,colorDangerItemTextHover:Mt,dangerItemHoverColor:Mt,colorDangerItemTextSelected:Mt,dangerItemSelectedColor:Mt,colorDangerItemBgActive:qe,dangerItemActiveBg:qe,colorDangerItemBgSelected:qe,dangerItemSelectedBg:qe,itemMarginInline:xe.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:mn,groupTitleLineHeight:ei,collapsedWidth:mn*2,popupBg:Pi,itemMarginBlock:Hn,itemPaddingInline:bn,horizontalLineHeight:`${mn*1.15}px`,iconSize:wi,iconMarginInlineEnd:Zi-wi,collapsedIconSize:Hi,groupTitleFontSize:wi,darkItemDisabledColor:new Ye.C(rr).setAlpha(.25).toRgbString(),darkItemColor:gi,darkDangerItemColor:Mt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:rr,darkItemSelectedBg:ct,darkDangerItemSelectedBg:Mt,darkItemHoverBg:"transparent",darkGroupTitleColor:gi,darkItemHoverColor:rr,darkDangerItemHoverColor:_r,darkDangerItemSelectedColor:rr,darkDangerItemActiveBg:Mt}},{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),St=function(Pe,Ae){var Oe={};for(var xe in Pe)Object.prototype.hasOwnProperty.call(Pe,xe)&&Ae.indexOf(xe)<0&&(Oe[xe]=Pe[xe]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,xe=Object.getOwnPropertySymbols(Pe);ct<xe.length;ct++)Ae.indexOf(xe[ct])<0&&Object.prototype.propertyIsEnumerable.call(Pe,xe[ct])&&(Oe[xe[ct]]=Pe[xe[ct]]);return Oe},ci=(0,ke.forwardRef)((Pe,Ae)=>{var Oe,xe;const ct=ke.useContext(Le.Z),Mt=ct||{},{getPrefixCls:at,getPopupContainer:qe,direction:Lt,menu:Bt}=ke.useContext(Ue.E_),ft=at(),{prefixCls:Gt,className:Sn,style:an,theme:rn="light",expandIcon:zn,_internalDisableMenuItemTitleTooltip:kn,inlineCollapsed:mn,siderCollapsed:ei,items:Pi,children:Hn,rootClassName:bn,mode:wi,selectable:Zi,onClick:Hi,overflowedIndicatorPopupClassName:rr}=Pe,_r=St(Pe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),gi=(0,Ft.Z)(_r,["collapsedWidth"]),di=Xe(Pi)||Hn;(Oe=Mt.validator)===null||Oe===void 0||Oe.call(Mt,{mode:wi});const xi=(0,Ee.useEvent)(function(){var qi;Hi==null||Hi.apply(void 0,arguments),(qi=Mt.onClick)===null||qi===void 0||qi.call(Mt)}),$i=Mt.mode||wi,Ri=Zi!=null?Zi:Mt.selectable,Kr=ke.useMemo(()=>ei!==void 0?ei:mn,[mn,ei]),Sr={horizontal:{motionName:`${ft}-slide-up`},inline:(0,Be.Z)(ft),other:{motionName:`${ft}-zoom-big`}},Ne=at("menu",Gt||Mt.prefixCls),[Ci,wr]=_n(Ne,!ct),Pn=Ge()(`${Ne}-${rn}`,Bt==null?void 0:Bt.className,Sn);let Si;if(typeof zn=="function")Si=zn;else if(zn===null||zn===!1)Si=null;else if(Mt.expandIcon===null||Mt.expandIcon===!1)Si=null;else{const qi=zn!=null?zn:Mt.expandIcon;Si=(0,vt.Tm)(qi,{className:Ge()(`${Ne}-submenu-expand-icon`,(0,vt.l$)(qi)?(xe=qi.props)===null||xe===void 0?void 0:xe.className:"")})}const Wi=ke.useMemo(()=>({prefixCls:Ne,inlineCollapsed:Kr||!1,direction:Lt,firstLevel:!0,theme:rn,mode:$i,disableMenuItemTitleTooltip:kn}),[Ne,Kr,Lt,kn,rn]);return Ci(ke.createElement(Le.Z.Provider,{value:null},ke.createElement(te.Provider,{value:Wi},ke.createElement(le.ZP,Object.assign({getPopupContainer:qe,overflowedIndicator:ke.createElement(ve.Z,null),overflowedIndicatorPopupClassName:Ge()(Ne,`${Ne}-${rn}`,rr),mode:$i,selectable:Ri,onClick:xi},gi,{inlineCollapsed:Kr,style:Object.assign(Object.assign({},Bt==null?void 0:Bt.style),an),className:Pn,prefixCls:Ne,direction:Lt,defaultMotions:Sr,expandIcon:Si,ref:Ae,rootClassName:Ge()(bn,wr)}),di))))});const Ze=(0,ke.forwardRef)((Pe,Ae)=>{const Oe=(0,ke.useRef)(null),xe=ke.useContext(We.D);return(0,ke.useImperativeHandle)(Ae,()=>({menu:Oe.current,focus:ct=>{var Mt;(Mt=Oe.current)===null||Mt===void 0||Mt.focus(ct)}})),ke.createElement(ci,Object.assign({ref:Oe},Pe,xe))});Ze.Item=de,Ze.SubMenu=he,Ze.Divider=wt,Ze.ItemGroup=le.BW;var be=Ze},58421:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Mt}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function(qe,Lt){return ke.createElement(Ge.Z,(0,le.Z)({},qe,{ref:Lt,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me,wt=pe(49198),$e=pe(33853),Ft=pe(38819),lt=pe(92310),vt=pe.n(lt),Ie=pe(90493),te=pe(44127),ee=pe(52884),de=pe(95727),se=pe(65711),he=pe(85745),ve=pe(26112),Ee={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Be=Ee,Le=pe(91735),ze=function(at){(0,se.Z)(Lt,at);var qe=(0,he.Z)(Lt);function Lt(){var Bt;(0,ee.Z)(this,Lt);for(var ft=arguments.length,Gt=new Array(ft),Sn=0;Sn<ft;Sn++)Gt[Sn]=arguments[Sn];return Bt=qe.call.apply(qe,[this].concat(Gt)),Bt.state={goInputText:""},Bt.getValidValue=function(){var an=Bt.state.goInputText;return!an||Number.isNaN(an)?void 0:Number(an)},Bt.buildOptionText=function(an){return"".concat(an," ").concat(Bt.props.locale.items_per_page)},Bt.changeSize=function(an){Bt.props.changeSize(Number(an))},Bt.handleChange=function(an){Bt.setState({goInputText:an.target.value})},Bt.handleBlur=function(an){var rn=Bt.props,zn=rn.goButton,kn=rn.quickGo,mn=rn.rootPrefixCls,ei=Bt.state.goInputText;zn||ei===""||(Bt.setState({goInputText:""}),!(an.relatedTarget&&(an.relatedTarget.className.indexOf("".concat(mn,"-item-link"))>=0||an.relatedTarget.className.indexOf("".concat(mn,"-item"))>=0))&&kn(Bt.getValidValue()))},Bt.go=function(an){var rn=Bt.state.goInputText;rn!==""&&(an.keyCode===Be.ENTER||an.type==="click")&&(Bt.setState({goInputText:""}),Bt.props.quickGo(Bt.getValidValue()))},Bt}return(0,de.Z)(Lt,[{key:"getPageSizeOptions",value:function(){var ft=this.props,Gt=ft.pageSize,Sn=ft.pageSizeOptions;return Sn.some(function(an){return an.toString()===Gt.toString()})?Sn:Sn.concat([Gt.toString()]).sort(function(an,rn){var zn=Number.isNaN(Number(an))?0:Number(an),kn=Number.isNaN(Number(rn))?0:Number(rn);return zn-kn})}},{key:"render",value:function(){var ft=this,Gt=this.props,Sn=Gt.pageSize,an=Gt.locale,rn=Gt.rootPrefixCls,zn=Gt.changeSize,kn=Gt.quickGo,mn=Gt.goButton,ei=Gt.selectComponentClass,Pi=Gt.buildOptionText,Hn=Gt.selectPrefixCls,bn=Gt.disabled,wi=this.state.goInputText,Zi="".concat(rn,"-options"),Hi=ei,rr=null,_r=null,gi=null;if(!zn&&!kn)return null;var di=this.getPageSizeOptions();if(zn&&Hi){var xi=di.map(function($i,Ri){return ke.createElement(Hi.Option,{key:Ri,value:$i.toString()},(Pi||ft.buildOptionText)($i))});rr=ke.createElement(Hi,{disabled:bn,prefixCls:Hn,showSearch:!1,className:"".concat(Zi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(Sn||di[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Ri){return Ri.parentNode},"aria-label":an.page_size,defaultOpen:!1},xi)}return kn&&(mn&&(gi=typeof mn=="boolean"?ke.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:bn,className:"".concat(Zi,"-quick-jumper-button")},an.jump_to_confirm):ke.createElement("span",{onClick:this.go,onKeyUp:this.go},mn)),_r=ke.createElement("div",{className:"".concat(Zi,"-quick-jumper")},an.jump_to,ke.createElement("input",{disabled:bn,type:"text",value:wi,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":an.page}),an.page,gi)),ke.createElement("li",{className:"".concat(Zi)},rr,_r)}}]),Lt}(ke.Component);ze.defaultProps={pageSizeOptions:["10","20","50","100"]};var je=ze,Xe=function(qe){var Lt,Bt=qe.rootPrefixCls,ft=qe.page,Gt=qe.active,Sn=qe.className,an=qe.showTitle,rn=qe.onClick,zn=qe.onKeyPress,kn=qe.itemRender,mn="".concat(Bt,"-item"),ei=vt()(mn,"".concat(mn,"-").concat(ft),(Lt={},(0,Ie.Z)(Lt,"".concat(mn,"-active"),Gt),(0,Ie.Z)(Lt,"".concat(mn,"-disabled"),!ft),(0,Ie.Z)(Lt,qe.className,Sn),Lt)),Pi=function(){rn(ft)},Hn=function(Zi){zn(Zi,rn,ft)},bn=kn(ft,"page",ke.createElement("a",{rel:"nofollow"},ft));return bn?ke.createElement("li",{title:an?ft.toString():null,className:ei,onClick:Pi,onKeyPress:Hn,tabIndex:0},bn):null},Ye=Xe;function dt(){}function He(at){var qe=Number(at);return typeof qe=="number"&&!Number.isNaN(qe)&&isFinite(qe)&&Math.floor(qe)===qe}var Nt=function(qe,Lt,Bt){return Bt};function ot(at,qe,Lt){var Bt=typeof at=="undefined"?qe.pageSize:at;return Math.floor((Lt.total-1)/Bt)+1}var Tt=function(at){(0,se.Z)(Lt,at);var qe=(0,he.Z)(Lt);function Lt(Bt){var ft;(0,ee.Z)(this,Lt),ft=qe.call(this,Bt),ft.paginationNode=ke.createRef(),ft.getJumpPrevPage=function(){return Math.max(1,ft.state.current-(ft.props.showLessItems?3:5))},ft.getJumpNextPage=function(){return Math.min(ot(void 0,ft.state,ft.props),ft.state.current+(ft.props.showLessItems?3:5))},ft.getItemIcon=function(zn,kn){var mn=ft.props.prefixCls,ei=zn||ke.createElement("button",{type:"button","aria-label":kn,className:"".concat(mn,"-item-link")});return typeof zn=="function"&&(ei=ke.createElement(zn,(0,te.Z)({},ft.props))),ei},ft.isValid=function(zn){var kn=ft.props.total;return He(zn)&&zn!==ft.state.current&&He(kn)&&kn>0},ft.shouldDisplayQuickJumper=function(){var zn=ft.props,kn=zn.showQuickJumper,mn=zn.total,ei=ft.state.pageSize;return mn<=ei?!1:kn},ft.handleKeyDown=function(zn){(zn.keyCode===Be.ARROW_UP||zn.keyCode===Be.ARROW_DOWN)&&zn.preventDefault()},ft.handleKeyUp=function(zn){var kn=ft.getValidValue(zn),mn=ft.state.currentInputValue;kn!==mn&&ft.setState({currentInputValue:kn}),zn.keyCode===Be.ENTER?ft.handleChange(kn):zn.keyCode===Be.ARROW_UP?ft.handleChange(kn-1):zn.keyCode===Be.ARROW_DOWN&&ft.handleChange(kn+1)},ft.handleBlur=function(zn){var kn=ft.getValidValue(zn);ft.handleChange(kn)},ft.changePageSize=function(zn){var kn=ft.state.current,mn=ot(zn,ft.state,ft.props);kn=kn>mn?mn:kn,mn===0&&(kn=ft.state.current),typeof zn=="number"&&("pageSize"in ft.props||ft.setState({pageSize:zn}),"current"in ft.props||ft.setState({current:kn,currentInputValue:kn})),ft.props.onShowSizeChange(kn,zn),"onChange"in ft.props&&ft.props.onChange&&ft.props.onChange(kn,zn)},ft.handleChange=function(zn){var kn=ft.props,mn=kn.disabled,ei=kn.onChange,Pi=ft.state,Hn=Pi.pageSize,bn=Pi.current,wi=Pi.currentInputValue;if(ft.isValid(zn)&&!mn){var Zi=ot(void 0,ft.state,ft.props),Hi=zn;return zn>Zi?Hi=Zi:zn<1&&(Hi=1),"current"in ft.props||ft.setState({current:Hi}),Hi!==wi&&ft.setState({currentInputValue:Hi}),ei(Hi,Hn),Hi}return bn},ft.prev=function(){ft.hasPrev()&&ft.handleChange(ft.state.current-1)},ft.next=function(){ft.hasNext()&&ft.handleChange(ft.state.current+1)},ft.jumpPrev=function(){ft.handleChange(ft.getJumpPrevPage())},ft.jumpNext=function(){ft.handleChange(ft.getJumpNextPage())},ft.hasPrev=function(){return ft.state.current>1},ft.hasNext=function(){return ft.state.current<ot(void 0,ft.state,ft.props)},ft.runIfEnter=function(zn,kn){if(zn.key==="Enter"||zn.charCode===13){for(var mn=arguments.length,ei=new Array(mn>2?mn-2:0),Pi=2;Pi<mn;Pi++)ei[Pi-2]=arguments[Pi];kn.apply(void 0,ei)}},ft.runIfEnterPrev=function(zn){ft.runIfEnter(zn,ft.prev)},ft.runIfEnterNext=function(zn){ft.runIfEnter(zn,ft.next)},ft.runIfEnterJumpPrev=function(zn){ft.runIfEnter(zn,ft.jumpPrev)},ft.runIfEnterJumpNext=function(zn){ft.runIfEnter(zn,ft.jumpNext)},ft.handleGoTO=function(zn){(zn.keyCode===Be.ENTER||zn.type==="click")&&ft.handleChange(ft.state.currentInputValue)},ft.renderPrev=function(zn){var kn=ft.props,mn=kn.prevIcon,ei=kn.itemRender,Pi=ei(zn,"prev",ft.getItemIcon(mn,"prev page")),Hn=!ft.hasPrev();return(0,ke.isValidElement)(Pi)?(0,ke.cloneElement)(Pi,{disabled:Hn}):Pi},ft.renderNext=function(zn){var kn=ft.props,mn=kn.nextIcon,ei=kn.itemRender,Pi=ei(zn,"next",ft.getItemIcon(mn,"next page")),Hn=!ft.hasNext();return(0,ke.isValidElement)(Pi)?(0,ke.cloneElement)(Pi,{disabled:Hn}):Pi};var Gt=Bt.onChange!==dt,Sn="current"in Bt;Sn&&!Gt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var an=Bt.defaultCurrent;"current"in Bt&&(an=Bt.current);var rn=Bt.defaultPageSize;return"pageSize"in Bt&&(rn=Bt.pageSize),an=Math.min(an,ot(rn,void 0,Bt)),ft.state={current:an,currentInputValue:an,pageSize:rn},ft}return(0,de.Z)(Lt,[{key:"componentDidUpdate",value:function(ft,Gt){var Sn=this.props.prefixCls;if(Gt.current!==this.state.current&&this.paginationNode.current){var an=this.paginationNode.current.querySelector(".".concat(Sn,"-item-").concat(Gt.current));if(an&&document.activeElement===an){var rn;an==null||(rn=an.blur)===null||rn===void 0||rn.call(an)}}}},{key:"getValidValue",value:function(ft){var Gt=ft.target.value,Sn=ot(void 0,this.state,this.props),an=this.state.currentInputValue,rn;return Gt===""?rn=Gt:Number.isNaN(Number(Gt))?rn=an:Gt>=Sn?rn=Sn:rn=Number(Gt),rn}},{key:"getShowSizeChanger",value:function(){var ft=this.props,Gt=ft.showSizeChanger,Sn=ft.total,an=ft.totalBoundaryShowSizeChanger;return typeof Gt!="undefined"?Gt:Sn>an}},{key:"render",value:function(){var ft=this.props,Gt=ft.prefixCls,Sn=ft.className,an=ft.style,rn=ft.disabled,zn=ft.hideOnSinglePage,kn=ft.total,mn=ft.locale,ei=ft.showQuickJumper,Pi=ft.showLessItems,Hn=ft.showTitle,bn=ft.showTotal,wi=ft.simple,Zi=ft.itemRender,Hi=ft.showPrevNextJumpers,rr=ft.jumpPrevIcon,_r=ft.jumpNextIcon,gi=ft.selectComponentClass,di=ft.selectPrefixCls,xi=ft.pageSizeOptions,$i=this.state,Ri=$i.current,Kr=$i.pageSize,Sr=$i.currentInputValue;if(zn===!0&&kn<=Kr)return null;var Ne=ot(void 0,this.state,this.props),Ci=[],wr=null,Pn=null,Si=null,Wi=null,qi=null,$n=ei&&ei.goButton,qn=Pi?1:2,Zt=Ri-1>0?Ri-1:0,$t=Ri+1<Ne?Ri+1:Ne,Qe=(0,ve.Z)(this.props,{aria:!0,data:!0}),on=bn&&ke.createElement("li",{className:"".concat(Gt,"-total-text")},bn(kn,[kn===0?0:(Ri-1)*Kr+1,Ri*Kr>kn?kn:Ri*Kr]));if(wi){$n&&(typeof $n=="boolean"?qi=ke.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},mn.jump_to_confirm):qi=ke.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},$n),qi=ke.createElement("li",{title:Hn?"".concat(mn.jump_to).concat(Ri,"/").concat(Ne):null,className:"".concat(Gt,"-simple-pager")},qi));var cn=this.renderPrev(Zt);return ke.createElement("ul",(0,le.Z)({className:vt()(Gt,"".concat(Gt,"-simple"),(0,Ie.Z)({},"".concat(Gt,"-disabled"),rn),Sn),style:an,ref:this.paginationNode},Qe),on,cn?ke.createElement("li",{title:Hn?mn.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:vt()("".concat(Gt,"-prev"),(0,Ie.Z)({},"".concat(Gt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},cn):null,ke.createElement("li",{title:Hn?"".concat(Ri,"/").concat(Ne):null,className:"".concat(Gt,"-simple-pager")},ke.createElement("input",{type:"text",value:Sr,disabled:rn,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),ke.createElement("span",{className:"".concat(Gt,"-slash")},"/"),Ne),ke.createElement("li",{title:Hn?mn.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:vt()("".concat(Gt,"-next"),(0,Ie.Z)({},"".concat(Gt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext($t)),qi)}if(Ne<=3+qn*2){var At={locale:mn,rootPrefixCls:Gt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Hn,itemRender:Zi};Ne||Ci.push(ke.createElement(Ye,(0,le.Z)({},At,{key:"noPager",page:1,className:"".concat(Gt,"-item-disabled")})));for(var ht=1;ht<=Ne;ht+=1){var en=Ri===ht;Ci.push(ke.createElement(Ye,(0,le.Z)({},At,{key:ht,page:ht,active:en})))}}else{var fn=Pi?mn.prev_3:mn.prev_5,Rn=Pi?mn.next_3:mn.next_5,Qn=Zi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(rr,"prev page")),Et=Zi(this.getJumpNextPage(),"jump-next",this.getItemIcon(_r,"next page"));Hi&&(wr=Qn?ke.createElement("li",{title:Hn?fn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:vt()("".concat(Gt,"-jump-prev"),(0,Ie.Z)({},"".concat(Gt,"-jump-prev-custom-icon"),!!rr))},Qn):null,Pn=Et?ke.createElement("li",{title:Hn?Rn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:vt()("".concat(Gt,"-jump-next"),(0,Ie.Z)({},"".concat(Gt,"-jump-next-custom-icon"),!!_r))},Et):null),Wi=ke.createElement(Ye,{locale:mn,last:!0,rootPrefixCls:Gt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ne,page:Ne,active:!1,showTitle:Hn,itemRender:Zi}),Si=ke.createElement(Ye,{locale:mn,rootPrefixCls:Gt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Hn,itemRender:Zi});var wn=Math.max(1,Ri-qn),Kn=Math.min(Ri+qn,Ne);Ri-1<=qn&&(Kn=1+qn*2),Ne-Ri<=qn&&(wn=Ne-qn*2);for(var Ei=wn;Ei<=Kn;Ei+=1){var tn=Ri===Ei;Ci.push(ke.createElement(Ye,{locale:mn,rootPrefixCls:Gt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ei,page:Ei,active:tn,showTitle:Hn,itemRender:Zi}))}Ri-1>=qn*2&&Ri!==3&&(Ci[0]=(0,ke.cloneElement)(Ci[0],{className:"".concat(Gt,"-item-after-jump-prev")}),Ci.unshift(wr)),Ne-Ri>=qn*2&&Ri!==Ne-2&&(Ci[Ci.length-1]=(0,ke.cloneElement)(Ci[Ci.length-1],{className:"".concat(Gt,"-item-before-jump-next")}),Ci.push(Pn)),wn!==1&&Ci.unshift(Si),Kn!==Ne&&Ci.push(Wi)}var sn=!this.hasPrev()||!Ne,In=!this.hasNext()||!Ne,Oi=this.renderPrev(Zt),Di=this.renderNext($t);return ke.createElement("ul",(0,le.Z)({className:vt()(Gt,Sn,(0,Ie.Z)({},"".concat(Gt,"-disabled"),rn)),style:an,ref:this.paginationNode},Qe),on,Oi?ke.createElement("li",{title:Hn?mn.prev_page:null,onClick:this.prev,tabIndex:sn?null:0,onKeyPress:this.runIfEnterPrev,className:vt()("".concat(Gt,"-prev"),(0,Ie.Z)({},"".concat(Gt,"-disabled"),sn)),"aria-disabled":sn},Oi):null,Ci,Di?ke.createElement("li",{title:Hn?mn.next_page:null,onClick:this.next,tabIndex:In?null:0,onKeyPress:this.runIfEnterNext,className:vt()("".concat(Gt,"-next"),(0,Ie.Z)({},"".concat(Gt,"-disabled"),In)),"aria-disabled":In},Di):null,ke.createElement(je,{disabled:rn,locale:mn,rootPrefixCls:Gt,selectComponentClass:gi,selectPrefixCls:di,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ri,pageSize:Kr,pageSizeOptions:xi,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:$n}))}}],[{key:"getDerivedStateFromProps",value:function(ft,Gt){var Sn={};if("current"in ft&&(Sn.current=ft.current,ft.current!==Gt.current&&(Sn.currentInputValue=Sn.current)),"pageSize"in ft&&ft.pageSize!==Gt.pageSize){var an=Gt.current,rn=ot(ft.pageSize,Gt,ft);an=an>rn?rn:an,"current"in ft||(Sn.current=an,Sn.currentInputValue=an),Sn.pageSize=ft.pageSize}return Sn}}]),Lt}(ke.Component);Tt.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:dt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:dt,locale:Le.Z,style:{},itemRender:Nt,totalBoundaryShowSizeChanger:50};var xt=Tt,Ot=pe(22075),Wt=pe(36355),Dt=pe(19716),tt=pe(8628),Ve=pe(9763),_t=pe(57809);const vn=at=>ke.createElement(_t.default,Object.assign({},at,{showSearch:!0,size:"small"})),yn=at=>ke.createElement(_t.default,Object.assign({},at,{showSearch:!0,size:"middle"}));vn.Option=_t.default.Option,yn.Option=_t.default.Option;var zt=pe(9937),qt=pe(17313),ln=pe(83116),Gn=pe(37613);const un=at=>{const{componentCls:qe}=at;return{[`${qe}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${qe}-item-link`]:{color:at.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${qe}-item-link`]:{color:at.colorTextDisabled,cursor:"not-allowed"}}},[`&${qe}-disabled`]:{cursor:"not-allowed",[`${qe}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:at.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:at.colorBorder,backgroundColor:at.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:at.itemActiveBgDisabled},a:{color:at.itemActiveColorDisabled}}},[`${qe}-item-link`]:{color:at.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${qe}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${qe}-simple-pager`]:{color:at.colorTextDisabled},[`${qe}-jump-prev, ${qe}-jump-next`]:{[`${qe}-item-link-icon`]:{opacity:0},[`${qe}-item-ellipsis`]:{opacity:1}}},[`&${qe}-simple`]:{[`${qe}-prev, ${qe}-next`]:{[`&${qe}-disabled ${qe}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},_n=at=>{const{componentCls:qe}=at;return{[`&${qe}-mini ${qe}-total-text, &${qe}-mini ${qe}-simple-pager`]:{height:at.itemSizeSM,lineHeight:`${at.itemSizeSM}px`},[`&${qe}-mini ${qe}-item`]:{minWidth:at.itemSizeSM,height:at.itemSizeSM,margin:0,lineHeight:`${at.itemSizeSM-2}px`},[`&${qe}-mini:not(${qe}-disabled) ${qe}-item:not(${qe}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:at.colorBgTextHover},"&:active":{backgroundColor:at.colorBgTextActive}},[`&${qe}-mini ${qe}-prev, &${qe}-mini ${qe}-next`]:{minWidth:at.itemSizeSM,height:at.itemSizeSM,margin:0,lineHeight:`${at.itemSizeSM}px`},[`&${qe}-mini:not(${qe}-disabled)`]:{[`${qe}-prev, ${qe}-next`]:{[`&:hover ${qe}-item-link`]:{backgroundColor:at.colorBgTextHover},[`&:active ${qe}-item-link`]:{backgroundColor:at.colorBgTextActive},[`&${qe}-disabled:hover ${qe}-item-link`]:{backgroundColor:"transparent"}}},[`
&${qe}-mini ${qe}-prev ${qe}-item-link,
&${qe}-mini ${qe}-next ${qe}-item-link
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:at.itemSizeSM,lineHeight:`${at.itemSizeSM}px`}},[`&${qe}-mini ${qe}-jump-prev, &${qe}-mini ${qe}-jump-next`]:{height:at.itemSizeSM,marginInlineEnd:0,lineHeight:`${at.itemSizeSM}px`},[`&${qe}-mini ${qe}-options`]:{marginInlineStart:at.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:at.miniOptionsSizeChangerTop},"&-quick-jumper":{height:at.itemSizeSM,lineHeight:`${at.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,zt.x0)(at)),{width:at.paginationMiniQuickJumperInputWidth,height:at.controlHeightSM})}}}},St=at=>{const{componentCls:qe}=at;return{[`
&${qe}-simple ${qe}-prev,
&${qe}-simple ${qe}-next
`]:{height:at.itemSizeSM,lineHeight:`${at.itemSizeSM}px`,verticalAlign:"top",[`${qe}-item-link`]:{height:at.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:at.colorBgTextHover},"&:active":{backgroundColor:at.colorBgTextActive},"&::after":{height:at.itemSizeSM,lineHeight:`${at.itemSizeSM}px`}}},[`&${qe}-simple ${qe}-simple-pager`]:{display:"inline-block",height:at.itemSizeSM,marginInlineEnd:at.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:at.marginXS,padding:`0 ${at.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:at.itemInputBg,border:`${at.lineWidth}px ${at.lineType} ${at.colorBorder}`,borderRadius:at.borderRadius,outline:"none",transition:`border-color ${at.motionDurationMid}`,color:"inherit","&:hover":{borderColor:at.colorPrimary},"&:focus":{borderColor:at.colorPrimaryHover,boxShadow:`${at.inputOutlineOffset}px 0 ${at.controlOutlineWidth}px ${at.controlOutline}`},"&[disabled]":{color:at.colorTextDisabled,backgroundColor:at.colorBgContainerDisabled,borderColor:at.colorBorder,cursor:"not-allowed"}}}}},Zn=at=>{const{componentCls:qe}=at;return{[`${qe}-jump-prev, ${qe}-jump-next`]:{outline:0,[`${qe}-item-container`]:{position:"relative",[`${qe}-item-link-icon`]:{color:at.colorPrimary,fontSize:at.fontSizeSM,opacity:0,transition:`all ${at.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${qe}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:at.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:at.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:at.paginationEllipsisTextIndent,opacity:1,transition:`all ${at.motionDurationMid}`}},"&:hover":{[`${qe}-item-link-icon`]:{opacity:1},[`${qe}-item-ellipsis`]:{opacity:0}}},[`
${qe}-prev,
${qe}-jump-prev,
${qe}-jump-next
`]:{marginInlineEnd:at.marginXS},[`
${qe}-prev,
${qe}-next,
${qe}-jump-prev,
${qe}-jump-next
`]:{display:"inline-block",minWidth:at.itemSize,height:at.itemSize,color:at.colorText,fontFamily:at.fontFamily,lineHeight:`${at.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:at.borderRadius,cursor:"pointer",transition:`all ${at.motionDurationMid}`},[`${qe}-prev, ${qe}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:at.colorText,cursor:"pointer",userSelect:"none"},[`${qe}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:at.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${at.lineWidth}px ${at.lineType} transparent`,borderRadius:at.borderRadius,outline:"none",transition:`all ${at.motionDurationMid}`},[`&:hover ${qe}-item-link`]:{backgroundColor:at.colorBgTextHover},[`&:active ${qe}-item-link`]:{backgroundColor:at.colorBgTextActive},[`&${qe}-disabled:hover`]:{[`${qe}-item-link`]:{backgroundColor:"transparent"}}},[`${qe}-slash`]:{marginInlineEnd:at.paginationSlashMarginInlineEnd,marginInlineStart:at.paginationSlashMarginInlineStart},[`${qe}-options`]:{display:"inline-block",marginInlineStart:at.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:at.controlHeight,marginInlineStart:at.marginXS,lineHeight:`${at.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,zt.ik)(at)),{width:at.controlHeightLG*1.25,height:at.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:at.marginXS,marginInlineEnd:at.marginXS})}}}},ci=at=>{const{componentCls:qe}=at;return{[`${qe}-item`]:{display:"inline-block",minWidth:at.itemSize,height:at.itemSize,marginInlineEnd:at.marginXS,fontFamily:at.fontFamily,lineHeight:`${at.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${at.lineWidth}px ${at.lineType} transparent`,borderRadius:at.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${at.paginationItemPaddingInline}px`,color:at.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${qe}-item-active)`]:{"&:hover":{transition:`all ${at.motionDurationMid}`,backgroundColor:at.colorBgTextHover},"&:active":{backgroundColor:at.colorBgTextActive}},"&-active":{fontWeight:at.fontWeightStrong,backgroundColor:at.itemActiveBg,borderColor:at.colorPrimary,a:{color:at.colorPrimary},"&:hover":{borderColor:at.colorPrimaryHover},"&:hover a":{color:at.colorPrimaryHover}}}}},Ze=at=>{const{componentCls:qe}=at;return{[qe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,qt.Wf)(at)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${qe}-total-text`]:{display:"inline-block",height:at.itemSize,marginInlineEnd:at.marginXS,lineHeight:`${at.itemSize-2}px`,verticalAlign:"middle"}}),ci(at)),Zn(at)),St(at)),_n(at)),un(at)),{[`@media only screen and (max-width: ${at.screenLG}px)`]:{[`${qe}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${at.screenSM}px)`]:{[`${qe}-options`]:{display:"none"}}}),[`&${at.componentCls}-rtl`]:{direction:"rtl"}}},be=at=>{const{componentCls:qe}=at;return{[`${qe}${qe}-disabled:not(${qe}-mini)`]:{"&, &:hover":{[`${qe}-item-link`]:{borderColor:at.colorBorder}},"&:focus-visible":{[`${qe}-item-link`]:{borderColor:at.colorBorder}},[`${qe}-item, ${qe}-item-link`]:{backgroundColor:at.colorBgContainerDisabled,borderColor:at.colorBorder,[`&:hover:not(${qe}-item-active)`]:{backgroundColor:at.colorBgContainerDisabled,borderColor:at.colorBorder,a:{color:at.colorTextDisabled}},[`&${qe}-item-active`]:{backgroundColor:at.itemActiveBgDisabled}},[`${qe}-prev, ${qe}-next`]:{"&:hover button":{backgroundColor:at.colorBgContainerDisabled,borderColor:at.colorBorder,color:at.colorTextDisabled},[`${qe}-item-link`]:{backgroundColor:at.colorBgContainerDisabled,borderColor:at.colorBorder}}},[`${qe}:not(${qe}-mini)`]:{[`${qe}-prev, ${qe}-next`]:{"&:hover button":{borderColor:at.colorPrimaryHover,backgroundColor:at.itemBg},[`${qe}-item-link`]:{backgroundColor:at.itemLinkBg,borderColor:at.colorBorder},[`&:hover ${qe}-item-link`]:{borderColor:at.colorPrimary,backgroundColor:at.itemBg,color:at.colorPrimary},[`&${qe}-disabled`]:{[`${qe}-item-link`]:{borderColor:at.colorBorder,color:at.colorTextDisabled}}},[`${qe}-item`]:{backgroundColor:at.itemBg,border:`${at.lineWidth}px ${at.lineType} ${at.colorBorder}`,[`&:hover:not(${qe}-item-active)`]:{borderColor:at.colorPrimary,backgroundColor:at.itemBg,a:{color:at.colorPrimary}},"&-active":{borderColor:at.colorPrimary}}}}},Pe=at=>{const{componentCls:qe}=at;return{[`${qe}:not(${qe}-disabled)`]:{[`${qe}-item`]:Object.assign({},(0,qt.Qy)(at)),[`${qe}-jump-prev, ${qe}-jump-next`]:{"&:focus-visible":Object.assign({[`${qe}-item-link-icon`]:{opacity:1},[`${qe}-item-ellipsis`]:{opacity:0}},(0,qt.oN)(at))},[`${qe}-prev, ${qe}-next`]:{[`&:focus-visible ${qe}-item-link`]:Object.assign({},(0,qt.oN)(at))}}}};var Ae=(0,ln.Z)("Pagination",at=>{const qe=(0,Gn.TS)(at,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:at.marginXXS/2,paginationMiniQuickJumperInputWidth:at.controlHeightLG*1.1,paginationItemPaddingInline:at.marginXXS*1.5,paginationEllipsisLetterSpacing:at.marginXXS/2,paginationSlashMarginInlineStart:at.marginXXS,paginationSlashMarginInlineEnd:at.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,zt.e5)(at),(0,zt.TM)(at));return[Ze(qe),Pe(qe),at.wireframe&&be(qe)]},at=>({itemBg:at.colorBgContainer,itemSize:at.controlHeight,itemSizeSM:at.controlHeightSM,itemActiveBg:at.colorBgContainer,itemLinkBg:at.colorBgContainer,itemActiveColorDisabled:at.colorTextDisabled,itemActiveBgDisabled:at.controlItemBgActiveDisabled,itemInputBg:at.colorBgContainer,miniOptionsSizeChangerTop:0})),Oe=function(at,qe){var Lt={};for(var Bt in at)Object.prototype.hasOwnProperty.call(at,Bt)&&qe.indexOf(Bt)<0&&(Lt[Bt]=at[Bt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,Bt=Object.getOwnPropertySymbols(at);ft<Bt.length;ft++)qe.indexOf(Bt[ft])<0&&Object.prototype.propertyIsEnumerable.call(at,Bt[ft])&&(Lt[Bt[ft]]=at[Bt[ft]]);return Lt},ct=at=>{const{prefixCls:qe,selectPrefixCls:Lt,className:Bt,rootClassName:ft,style:Gt,size:Sn,locale:an,selectComponentClass:rn,responsive:zn,showSizeChanger:kn}=at,mn=Oe(at,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:ei}=(0,tt.Z)(zn),{getPrefixCls:Pi,direction:Hn,pagination:bn={}}=ke.useContext(Wt.E_),wi=Pi("pagination",qe),[Zi,Hi]=Ae(wi),rr=kn!=null?kn:bn.showSizeChanger,_r=ke.useMemo(()=>{const Ne=ke.createElement("span",{className:`${wi}-item-ellipsis`},"\u2022\u2022\u2022"),Ci=ke.createElement("button",{className:`${wi}-item-link`,type:"button",tabIndex:-1},Hn==="rtl"?ke.createElement(Ft.Z,null):ke.createElement($e.Z,null)),wr=ke.createElement("button",{className:`${wi}-item-link`,type:"button",tabIndex:-1},Hn==="rtl"?ke.createElement($e.Z,null):ke.createElement(Ft.Z,null)),Pn=ke.createElement("a",{className:`${wi}-item-link`},ke.createElement("div",{className:`${wi}-item-container`},Hn==="rtl"?ke.createElement(wt.Z,{className:`${wi}-item-link-icon`}):ke.createElement(Ct,{className:`${wi}-item-link-icon`}),Ne)),Si=ke.createElement("a",{className:`${wi}-item-link`},ke.createElement("div",{className:`${wi}-item-container`},Hn==="rtl"?ke.createElement(Ct,{className:`${wi}-item-link-icon`}):ke.createElement(wt.Z,{className:`${wi}-item-link-icon`}),Ne));return{prevIcon:Ci,nextIcon:wr,jumpPrevIcon:Pn,jumpNextIcon:Si}},[Hn,wi]),[gi]=(0,Ve.Z)("Pagination",Ot.Z),di=Object.assign(Object.assign({},gi),an),xi=(0,Dt.Z)(Sn),$i=xi==="small"||!!(ei&&!xi&&zn),Ri=Pi("select",Lt),Kr=vt()({[`${wi}-mini`]:$i,[`${wi}-rtl`]:Hn==="rtl"},bn==null?void 0:bn.className,Bt,ft,Hi),Sr=Object.assign(Object.assign({},bn==null?void 0:bn.style),Gt);return Zi(ke.createElement(xt,Object.assign({},_r,mn,{style:Sr,prefixCls:wi,selectPrefixCls:Ri,className:Kr,selectComponentClass:rn||($i?vn:yn),locale:di,showSizeChanger:rr})))},Mt=ct},39722:function(On,pn,pe){"use strict";pe.d(pn,{t5:function(){return $e}});var le=pe(92310),ke=pe.n(le),We=pe(55477),ut=pe(59301),Ge=pe(36355),Ue=pe(77578),Me=pe(17356),Ct=function(lt,vt){var Ie={};for(var te in lt)Object.prototype.hasOwnProperty.call(lt,te)&&vt.indexOf(te)<0&&(Ie[te]=lt[te]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,te=Object.getOwnPropertySymbols(lt);ee<te.length;ee++)vt.indexOf(te[ee])<0&&Object.prototype.propertyIsEnumerable.call(lt,te[ee])&&(Ie[te[ee]]=lt[te[ee]]);return Ie};const wt=(lt,vt,Ie)=>{if(!(!vt&&!Ie))return ut.createElement(ut.Fragment,null,vt&&ut.createElement("div",{className:`${lt}-title`},(0,Ue.Z)(vt)),ut.createElement("div",{className:`${lt}-inner-content`},(0,Ue.Z)(Ie)))},$e=lt=>{const{hashId:vt,prefixCls:Ie,className:te,style:ee,placement:de="top",title:se,content:he,children:ve}=lt;return ut.createElement("div",{className:ke()(vt,Ie,`${Ie}-pure`,`${Ie}-placement-${de}`,te),style:ee},ut.createElement("div",{className:`${Ie}-arrow`}),ut.createElement(We.G,Object.assign({},lt,{className:vt,prefixCls:Ie}),ve||wt(Ie,se,he)))},Ft=lt=>{const{prefixCls:vt}=lt,Ie=Ct(lt,["prefixCls"]),{getPrefixCls:te}=ut.useContext(Ge.E_),ee=te("popover",vt),[de,se]=(0,Me.Z)(ee);return de(ut.createElement($e,Object.assign({},Ie,{prefixCls:ee,hashId:se})))};pn.ZP=Ft},60324:function(On,pn,pe){"use strict";var le=pe(92310),ke=pe.n(le),We=pe(59301),ut=pe(77578),Ge=pe(62892),Ue=pe(36355),Me=pe(6848),Ct=pe(39722),wt=pe(17356),$e=function(vt,Ie){var te={};for(var ee in vt)Object.prototype.hasOwnProperty.call(vt,ee)&&Ie.indexOf(ee)<0&&(te[ee]=vt[ee]);if(vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,ee=Object.getOwnPropertySymbols(vt);de<ee.length;de++)Ie.indexOf(ee[de])<0&&Object.prototype.propertyIsEnumerable.call(vt,ee[de])&&(te[ee[de]]=vt[ee[de]]);return te};const Ft=vt=>{let{title:Ie,content:te,prefixCls:ee}=vt;return We.createElement(We.Fragment,null,Ie&&We.createElement("div",{className:`${ee}-title`},(0,ut.Z)(Ie)),We.createElement("div",{className:`${ee}-inner-content`},(0,ut.Z)(te)))},lt=We.forwardRef((vt,Ie)=>{const{prefixCls:te,title:ee,content:de,overlayClassName:se,placement:he="top",trigger:ve="hover",mouseEnterDelay:Ee=.1,mouseLeaveDelay:Be=.1,overlayStyle:Le={}}=vt,ze=$e(vt,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:je}=We.useContext(Ue.E_),Xe=je("popover",te),[Ye,dt]=(0,wt.Z)(Xe),He=je(),Nt=ke()(se,dt);return Ye(We.createElement(Me.Z,Object.assign({placement:he,trigger:ve,mouseEnterDelay:Ee,mouseLeaveDelay:Be,overlayStyle:Le},ze,{prefixCls:Xe,overlayClassName:Nt,ref:Ie,overlay:ee||de?We.createElement(Ft,{prefixCls:Xe,title:ee,content:de}):null,transitionName:(0,Ge.m)(He,"zoom-big",ze.transitionName),"data-popover-inject":!0})))});lt._InternalPanelDoNotUseOrYouWillBeFired=Ct.ZP,pn.Z=lt},17356:function(On,pn,pe){"use strict";var le=pe(17313),ke=pe(29878),We=pe(19447),ut=pe(33166),Ge=pe(83116),Ue=pe(37613);const Me=$e=>{const{componentCls:Ft,popoverColor:lt,minWidth:vt,fontWeightStrong:Ie,popoverPadding:te,boxShadowSecondary:ee,colorTextHeading:de,borderRadiusLG:se,zIndexPopup:he,marginXS:ve,colorBgElevated:Ee,popoverBg:Be}=$e;return[{[Ft]:Object.assign(Object.assign({},(0,le.Wf)($e)),{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":Ee,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${Ft}-content`]:{position:"relative"},[`${Ft}-inner`]:{backgroundColor:Be,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:te},[`${Ft}-title`]:{minWidth:vt,marginBottom:ve,color:de,fontWeight:Ie},[`${Ft}-inner-content`]:{color:lt}})},(0,We.ZP)($e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${Ft}-pure`]:{position:"relative",maxWidth:"none",margin:$e.sizePopupArrow,display:"inline-block",[`${Ft}-content`]:{display:"inline-block"}}}]},Ct=$e=>{const{componentCls:Ft}=$e;return{[Ft]:ut.i.map(lt=>{const vt=$e[`${lt}6`];return{[`&${Ft}-${lt}`]:{"--antd-arrow-background-color":vt,[`${Ft}-inner`]:{backgroundColor:vt},[`${Ft}-arrow`]:{background:"transparent"}}}})}},wt=$e=>{const{componentCls:Ft,lineWidth:lt,lineType:vt,colorSplit:Ie,paddingSM:te,controlHeight:ee,fontSize:de,lineHeight:se,padding:he}=$e,ve=ee-Math.round(de*se),Ee=ve/2,Be=ve/2-lt,Le=he;return{[Ft]:{[`${Ft}-inner`]:{padding:0},[`${Ft}-title`]:{margin:0,padding:`${Ee}px ${Le}px ${Be}px`,borderBottom:`${lt}px ${vt} ${Ie}`},[`${Ft}-inner-content`]:{padding:`${te}px ${Le}px`}}}};pn.Z=(0,Ge.Z)("Popover",$e=>{const{colorBgElevated:Ft,colorText:lt,wireframe:vt}=$e,Ie=(0,Ue.TS)($e,{popoverPadding:12,popoverBg:Ft,popoverColor:lt});return[Me(Ie),Ct(Ie),vt&&wt(Ie),(0,ke._y)(Ie,"zoom-big")]},$e=>({width:177,minWidth:177,zIndexPopup:$e.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},13570:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ve}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function(vn,yn){return ke.createElement(Ge.Z,(0,le.Z)({},vn,{ref:yn,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me,wt=pe(92310),$e=pe.n(wt),Ft=pe(90493),lt=pe(72071),vt=pe(6620),Ie=pe(18929),te=pe(10228),ee=pe(26112);function de(_t,vn){var yn=_t.disabled,zt=_t.prefixCls,qt=_t.character,ln=_t.characterRender,Gn=_t.index,un=_t.count,_n=_t.value,St=_t.allowHalf,Zn=_t.focused,ci=_t.onHover,Ze=_t.onClick,be=function(qe){ci(qe,Gn)},Pe=function(qe){Ze(qe,Gn)},Ae=function(qe){qe.keyCode===te.Z.ENTER&&Ze(qe,Gn)},Oe=Gn+1,xe=new Set([zt]);_n===0&&Gn===0&&Zn?xe.add("".concat(zt,"-focused")):St&&_n+.5>=Oe&&_n<Oe?(xe.add("".concat(zt,"-half")),xe.add("".concat(zt,"-active")),Zn&&xe.add("".concat(zt,"-focused"))):(Oe<=_n?xe.add("".concat(zt,"-full")):xe.add("".concat(zt,"-zero")),Oe===_n&&Zn&&xe.add("".concat(zt,"-focused")));var ct=typeof qt=="function"?qt(_t):qt,Mt=ke.createElement("li",{className:$e()(Array.from(xe)),ref:vn},ke.createElement("div",{onClick:yn?null:Pe,onKeyDown:yn?null:Ae,onMouseMove:yn?null:be,role:"radio","aria-checked":_n>Gn?"true":"false","aria-posinset":Gn+1,"aria-setsize":un,tabIndex:yn?-1:0},ke.createElement("div",{className:"".concat(zt,"-first")},ct),ke.createElement("div",{className:"".concat(zt,"-second")},ct)));return ln&&(Mt=ln(Mt,_t)),Mt}var se=ke.forwardRef(de);function he(){var _t=ke.useRef({});function vn(zt){return _t.current[zt]}function yn(zt){return function(qt){_t.current[zt]=qt}}return[vn,yn]}function ve(_t){var vn=_t.pageXOffset,yn="scrollLeft";if(typeof vn!="number"){var zt=_t.document;vn=zt.documentElement[yn],typeof vn!="number"&&(vn=zt.body[yn])}return vn}function Ee(_t){var vn,yn,zt=_t.ownerDocument,qt=zt.body,ln=zt&&zt.documentElement,Gn=_t.getBoundingClientRect();return vn=Gn.left,yn=Gn.top,vn-=ln.clientLeft||qt.clientLeft||0,yn-=ln.clientTop||qt.clientTop||0,{left:vn,top:yn}}function Be(_t){var vn=Ee(_t),yn=_t.ownerDocument,zt=yn.defaultView||yn.parentWindow;return vn.left+=ve(zt),vn.left}var Le=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function ze(_t,vn){var yn,zt=_t.prefixCls,qt=zt===void 0?"rc-rate":zt,ln=_t.className,Gn=_t.defaultValue,un=_t.value,_n=_t.count,St=_n===void 0?5:_n,Zn=_t.allowHalf,ci=Zn===void 0?!1:Zn,Ze=_t.allowClear,be=Ze===void 0?!0:Ze,Pe=_t.character,Ae=Pe===void 0?"\u2605":Pe,Oe=_t.characterRender,xe=_t.disabled,ct=_t.direction,Mt=ct===void 0?"ltr":ct,at=_t.tabIndex,qe=at===void 0?0:at,Lt=_t.autoFocus,Bt=_t.onHoverChange,ft=_t.onChange,Gt=_t.onFocus,Sn=_t.onBlur,an=_t.onKeyDown,rn=_t.onMouseLeave,zn=(0,vt.Z)(_t,Le),kn=he(),mn=(0,lt.Z)(kn,2),ei=mn[0],Pi=mn[1],Hn=ke.useRef(null),bn=function(){if(!xe){var ht;(ht=Hn.current)===null||ht===void 0||ht.focus()}};ke.useImperativeHandle(vn,function(){return{focus:bn,blur:function(){if(!xe){var ht;(ht=Hn.current)===null||ht===void 0||ht.blur()}}}});var wi=(0,Ie.Z)(Gn||0,{value:un}),Zi=(0,lt.Z)(wi,2),Hi=Zi[0],rr=Zi[1],_r=(0,Ie.Z)(null),gi=(0,lt.Z)(_r,2),di=gi[0],xi=gi[1],$i=function(ht,en){var fn=Mt==="rtl",Rn=ht+1;if(ci){var Qn=ei(ht),Et=Be(Qn),wn=Qn.clientWidth;(fn&&en-Et>wn/2||!fn&&en-Et<wn/2)&&(Rn-=.5)}return Rn},Ri=function(ht){rr(ht),ft==null||ft(ht)},Kr=ke.useState(!1),Sr=(0,lt.Z)(Kr,2),Ne=Sr[0],Ci=Sr[1],wr=function(){Ci(!0),Gt==null||Gt()},Pn=function(){Ci(!1),Sn==null||Sn()},Si=ke.useState(null),Wi=(0,lt.Z)(Si,2),qi=Wi[0],$n=Wi[1],qn=function(ht,en){var fn=$i(en,ht.pageX);fn!==di&&($n(fn),xi(null)),Bt==null||Bt(fn)},Zt=function(ht){xe||($n(null),xi(null),Bt==null||Bt(void 0)),ht&&(rn==null||rn(ht))},$t=function(ht,en){var fn=$i(en,ht.pageX),Rn=!1;be&&(Rn=fn===Hi),Zt(),Ri(Rn?0:fn),xi(Rn?fn:null)},Qe=function(ht){var en=ht.keyCode,fn=Mt==="rtl",Rn=Hi;en===te.Z.RIGHT&&Rn<St&&!fn?(ci?Rn+=.5:Rn+=1,Ri(Rn),ht.preventDefault()):en===te.Z.LEFT&&Rn>0&&!fn||en===te.Z.RIGHT&&Rn>0&&fn?(ci?Rn-=.5:Rn-=1,Ri(Rn),ht.preventDefault()):en===te.Z.LEFT&&Rn<St&&fn&&(ci?Rn+=.5:Rn+=1,Ri(Rn),ht.preventDefault()),an==null||an(ht)};ke.useEffect(function(){Lt&&!xe&&bn()},[]);var on=new Array(St).fill(0).map(function(At,ht){return ke.createElement(se,{ref:Pi(ht),index:ht,count:St,disabled:xe,prefixCls:"".concat(qt,"-star"),allowHalf:ci,value:qi===null?Hi:qi,onClick:$t,onHover:qn,key:At||ht,character:Ae,characterRender:Oe,focused:Ne})}),cn=$e()(qt,ln,(yn={},(0,Ft.Z)(yn,"".concat(qt,"-disabled"),xe),(0,Ft.Z)(yn,"".concat(qt,"-rtl"),Mt==="rtl"),yn));return ke.createElement("ul",(0,le.Z)({className:cn,onMouseLeave:Zt,tabIndex:xe?-1:qe,onFocus:xe?null:wr,onBlur:xe?null:Pn,onKeyDown:xe?null:Qe,ref:Hn,role:"radiogroup"},(0,ee.Z)(zn,{aria:!0,data:!0,attr:!0})),on)}var je=ke.forwardRef(ze),Xe=je,Ye=pe(36355),dt=pe(6848),He=pe(17313),Nt=pe(83116),ot=pe(37613);const Tt=_t=>{const{componentCls:vn}=_t;return{[`${vn}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:_t.marginXS},"> div":{transition:`all ${_t.motionDurationMid}, outline 0s`,"&:hover":{transform:_t.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${_t.lineWidth}px dashed ${_t.starColor}`,transform:_t.starHoverScale}},"&-first, &-second":{color:_t.starBg,transition:`all ${_t.motionDurationMid}`,userSelect:"none",[_t.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${vn}-star-first, &-half ${vn}-star-second`]:{opacity:1},[`&-half ${vn}-star-first, &-full ${vn}-star-second`]:{color:"inherit"}}}},xt=_t=>({[`&-rtl${_t.componentCls}`]:{direction:"rtl"}}),Ot=_t=>{const{componentCls:vn}=_t;return{[vn]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,He.Wf)(_t)),{display:"inline-block",margin:0,padding:0,color:_t.starColor,fontSize:_t.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${vn} ${vn}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Tt(_t)),{[`+ ${vn}-text`]:{display:"inline-block",marginInlineStart:_t.marginXS,fontSize:_t.fontSize}}),xt(_t))}};var Wt=(0,Nt.Z)("Rate",_t=>{const vn=(0,ot.TS)(_t,{});return[Ot(vn)]},_t=>({starColor:_t.yellow6,starSize:_t.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:_t.colorFillContent})),Dt=function(_t,vn){var yn={};for(var zt in _t)Object.prototype.hasOwnProperty.call(_t,zt)&&vn.indexOf(zt)<0&&(yn[zt]=_t[zt]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,zt=Object.getOwnPropertySymbols(_t);qt<zt.length;qt++)vn.indexOf(zt[qt])<0&&Object.prototype.propertyIsEnumerable.call(_t,zt[qt])&&(yn[zt[qt]]=_t[zt[qt]]);return yn},Ve=ke.forwardRef((_t,vn)=>{const{prefixCls:yn,className:zt,rootClassName:qt,style:ln,tooltips:Gn,character:un=ke.createElement(Ct,null)}=_t,_n=Dt(_t,["prefixCls","className","rootClassName","style","tooltips","character"]),St=(xe,ct)=>{let{index:Mt}=ct;return Gn?ke.createElement(dt.Z,{title:Gn[Mt]},xe):xe},{getPrefixCls:Zn,direction:ci,rate:Ze}=ke.useContext(Ye.E_),be=Zn("rate",yn),[Pe,Ae]=Wt(be),Oe=Object.assign(Object.assign({},Ze==null?void 0:Ze.style),ln);return Pe(ke.createElement(Xe,Object.assign({ref:vn,character:un,characterRender:St},_n,{className:$e()(zt,qt,Ae,Ze==null?void 0:Ze.className),style:Oe,prefixCls:be,direction:ci})))})},57809:function(On,pn,pe){"use strict";var le=pe(92310),ke=pe.n(le),We=pe(77861),ut=pe(2738),Ge=pe(59301),Ue=pe(53487),Me=pe(62892),Ct=pe(19080),wt=pe(36355),$e=pe(1684),Ft=pe(93891),lt=pe(19716),vt=pe(32441),Ie=pe(33234),te=pe(14154),ee=pe(58582),de=pe(84443),se=pe(66339),he=function(ze,je){var Xe={};for(var Ye in ze)Object.prototype.hasOwnProperty.call(ze,Ye)&&je.indexOf(Ye)<0&&(Xe[Ye]=ze[Ye]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Ye=Object.getOwnPropertySymbols(ze);dt<Ye.length;dt++)je.indexOf(Ye[dt])<0&&Object.prototype.propertyIsEnumerable.call(ze,Ye[dt])&&(Xe[Ye[dt]]=ze[Ye[dt]]);return Xe};const ve="SECRET_COMBOBOX_MODE_DO_NOT_USE",Ee=(ze,je)=>{var Xe,{prefixCls:Ye,bordered:dt=!0,className:He,rootClassName:Nt,getPopupContainer:ot,popupClassName:Tt,dropdownClassName:xt,listHeight:Ot=256,placement:Wt,listItemHeight:Dt=24,size:tt,disabled:Ve,notFoundContent:_t,status:vn,builtinPlacements:yn,dropdownMatchSelectWidth:zt,popupMatchSelectWidth:qt,direction:ln,style:Gn,allowClear:un}=ze,_n=he(ze,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:St,getPrefixCls:Zn,renderEmpty:ci,direction:Ze,virtual:be,popupMatchSelectWidth:Pe,popupOverflow:Ae,select:Oe}=Ge.useContext(wt.E_),xe=Zn("select",Ye),ct=Zn(),Mt=ln!=null?ln:Ze,{compactSize:at,compactItemClassnames:qe}=(0,Ie.ri)(xe,Mt),[Lt,Bt]=(0,te.Z)(xe),ft=Ge.useMemo(()=>{const{mode:Sr}=_n;if(Sr!=="combobox")return Sr===ve?"combobox":Sr},[_n.mode]),Gt=ft==="multiple"||ft==="tags",Sn=(0,de.Z)(_n.suffixIcon,_n.showArrow),an=(Xe=qt!=null?qt:zt)!==null&&Xe!==void 0?Xe:Pe,{status:rn,hasFeedback:zn,isFormItemInput:kn,feedbackIcon:mn}=Ge.useContext(vt.aM),ei=(0,Ct.F)(rn,vn);let Pi;_t!==void 0?Pi=_t:ft==="combobox"?Pi=null:Pi=(ci==null?void 0:ci("Select"))||Ge.createElement(Ft.Z,{componentName:"Select"});const{suffixIcon:Hn,itemIcon:bn,removeIcon:wi,clearIcon:Zi}=(0,se.Z)(Object.assign(Object.assign({},_n),{multiple:Gt,hasFeedback:zn,feedbackIcon:mn,showSuffixIcon:Sn,prefixCls:xe,showArrow:_n.showArrow,componentName:"Select"})),Hi=un===!0?{clearIcon:Zi}:un,rr=(0,ut.Z)(_n,["suffixIcon","itemIcon"]),_r=ke()(Tt||xt,{[`${xe}-dropdown-${Mt}`]:Mt==="rtl"},Nt,Bt),gi=(0,lt.Z)(Sr=>{var Ne;return(Ne=tt!=null?tt:at)!==null&&Ne!==void 0?Ne:Sr}),di=Ge.useContext($e.Z),xi=Ve!=null?Ve:di,$i=ke()({[`${xe}-lg`]:gi==="large",[`${xe}-sm`]:gi==="small",[`${xe}-rtl`]:Mt==="rtl",[`${xe}-borderless`]:!dt,[`${xe}-in-form-item`]:kn},(0,Ct.Z)(xe,ei,zn),qe,Oe==null?void 0:Oe.className,He,Nt,Bt),Ri=Ge.useMemo(()=>Wt!==void 0?Wt:Mt==="rtl"?"bottomRight":"bottomLeft",[Wt,Mt]),Kr=(0,ee.Z)(yn,Ae);return Lt(Ge.createElement(We.ZP,Object.assign({ref:je,virtual:be,showSearch:Oe==null?void 0:Oe.showSearch},rr,{style:Object.assign(Object.assign({},Oe==null?void 0:Oe.style),Gn),dropdownMatchSelectWidth:an,builtinPlacements:Kr,transitionName:(0,Me.m)(ct,"slide-up",_n.transitionName),listHeight:Ot,listItemHeight:Dt,mode:ft,prefixCls:xe,placement:Ri,direction:Mt,suffixIcon:Hn,menuItemSelectedIcon:bn,removeIcon:wi,allowClear:Hi,notFoundContent:Pi,className:$i,getPopupContainer:ot||St,dropdownClassName:_r,disabled:xi})))},Be=Ge.forwardRef(Ee),Le=(0,Ue.Z)(Be);Be.SECRET_COMBOBOX_MODE_DO_NOT_USE=ve,Be.Option=We.Wx,Be.OptGroup=We.Xo,Be._InternalPanelDoNotUseOrYouWillBeFired=Le,pn.default=Be},14154:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Be}});var le=pe(17313),ke=pe(74207),We=pe(37613),ut=pe(83116),Ge=pe(13826),Ue=pe(92899);const Me=Le=>{const{optionHeight:ze,optionFontSize:je,optionLineHeight:Xe,optionPadding:Ye}=Le;return{position:"relative",display:"block",minHeight:ze,padding:Ye,color:Le.colorText,fontWeight:"normal",fontSize:je,lineHeight:Xe,boxSizing:"border-box"}};var wt=Le=>{const{antCls:ze,componentCls:je}=Le,Xe=`${je}-item`,Ye=`&${ze}-slide-up-enter${ze}-slide-up-enter-active`,dt=`&${ze}-slide-up-appear${ze}-slide-up-appear-active`,He=`&${ze}-slide-up-leave${ze}-slide-up-leave-active`,Nt=`${je}-dropdown-placement-`;return[{[`${je}-dropdown`]:Object.assign(Object.assign({},(0,le.Wf)(Le)),{position:"absolute",top:-9999,zIndex:Le.zIndexPopup,boxSizing:"border-box",padding:Le.paddingXXS,overflow:"hidden",fontSize:Le.fontSize,fontVariant:"initial",backgroundColor:Le.colorBgElevated,borderRadius:Le.borderRadiusLG,outline:"none",boxShadow:Le.boxShadowSecondary,[`
${Ye}${Nt}bottomLeft,
${dt}${Nt}bottomLeft
`]:{animationName:Ge.fJ},[`
${Ye}${Nt}topLeft,
${dt}${Nt}topLeft,
${Ye}${Nt}topRight,
${dt}${Nt}topRight
`]:{animationName:Ge.Qt},[`${He}${Nt}bottomLeft`]:{animationName:Ge.Uw},[`
${He}${Nt}topLeft,
${He}${Nt}topRight
`]:{animationName:Ge.ly},"&-hidden":{display:"none"},[`${Xe}`]:Object.assign(Object.assign({},Me(Le)),{cursor:"pointer",transition:`background ${Le.motionDurationSlow} ease`,borderRadius:Le.borderRadiusSM,"&-group":{color:Le.colorTextDescription,fontSize:Le.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},le.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Xe}-option-disabled)`]:{backgroundColor:Le.optionActiveBg},[`&-selected:not(${Xe}-option-disabled)`]:{color:Le.optionSelectedColor,fontWeight:Le.optionSelectedFontWeight,backgroundColor:Le.optionSelectedBg,[`${Xe}-option-state`]:{color:Le.colorPrimary}},"&-disabled":{[`&${Xe}-option-selected`]:{backgroundColor:Le.colorBgContainerDisabled},color:Le.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Le.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ge.oN)(Le,"slide-up"),(0,Ge.oN)(Le,"slide-down"),(0,Ue.Fm)(Le,"move-up"),(0,Ue.Fm)(Le,"move-down")]};const $e=2,Ft=Le=>{let{controlHeightSM:ze,controlHeight:je,lineWidth:Xe}=Le;const Ye=(je-ze)/2-Xe,dt=Math.ceil(Ye/2);return[Ye,dt]};function lt(Le,ze){const{componentCls:je,iconCls:Xe}=Le,Ye=`${je}-selection-overflow`,dt=Le.multipleSelectItemHeight,[He]=Ft(Le),Nt=ze?`${je}-${ze}`:"";return{[`${je}-multiple${Nt}`]:{fontSize:Le.fontSize,[Ye]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${je}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${He-$e}px ${$e*2}px`,borderRadius:Le.borderRadius,[`${je}-show-search&`]:{cursor:"text"},[`${je}-disabled&`]:{background:Le.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${$e}px 0`,lineHeight:`${dt}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${je}-show-arrow ${je}-selector,
&${je}-allow-clear ${je}-selector
`]:{paddingInlineEnd:Le.fontSizeIcon+Le.controlPaddingHorizontal},[`${je}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:dt,marginTop:$e,marginBottom:$e,lineHeight:`${dt-Le.lineWidth*2}px`,background:Le.multipleItemBg,border:`${Le.lineWidth}px ${Le.lineType} ${Le.multipleItemBorderColor}`,borderRadius:Le.borderRadiusSM,cursor:"default",transition:`font-size ${Le.motionDurationSlow}, line-height ${Le.motionDurationSlow}, height ${Le.motionDurationSlow}`,userSelect:"none",marginInlineEnd:$e*2,paddingInlineStart:Le.paddingXS,paddingInlineEnd:Le.paddingXS/2,[`${je}-disabled&`]:{color:Le.multipleItemColorDisabled,borderColor:Le.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Le.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,le.Ro)()),{display:"inline-flex",alignItems:"center",color:Le.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Xe}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Le.colorIconHover}})},[`${Ye}-item + ${Ye}-item`]:{[`${je}-selection-search`]:{marginInlineStart:0}},[`${je}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Le.inputPaddingHorizontalBase-He,"\n &-input,\n &-mirror\n ":{height:dt,fontFamily:Le.fontFamily,lineHeight:`${dt}px`,transition:`all ${Le.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${je}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Le.inputPaddingHorizontalBase,insetInlineEnd:Le.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Le.motionDurationSlow}`}}}}var Ie=Le=>{const{componentCls:ze}=Le,je=(0,We.TS)(Le,{controlHeight:Le.controlHeightSM,multipleSelectItemHeight:Le.controlHeightXS,borderRadius:Le.borderRadiusSM,borderRadiusSM:Le.borderRadiusXS}),Xe=(0,We.TS)(Le,{fontSize:Le.fontSizeLG,controlHeight:Le.controlHeightLG,multipleSelectItemHeight:Le.multipleItemHeightLG,borderRadius:Le.borderRadiusLG,borderRadiusSM:Le.borderRadius}),[,Ye]=Ft(Le);return[lt(Le),lt(je,"sm"),{[`${ze}-multiple${ze}-sm`]:{[`${ze}-selection-placeholder`]:{insetInline:Le.controlPaddingHorizontalSM-Le.lineWidth},[`${ze}-selection-search`]:{marginInlineStart:Ye}}},lt(Xe,"lg")]};function te(Le,ze){const{componentCls:je,inputPaddingHorizontalBase:Xe,borderRadius:Ye}=Le,dt=Le.controlHeight-Le.lineWidth*2,He=Math.ceil(Le.fontSize*1.25),Nt=ze?`${je}-${ze}`:"";return{[`${je}-single${Nt}`]:{fontSize:Le.fontSize,[`${je}-selector`]:Object.assign(Object.assign({},(0,le.Wf)(Le)),{display:"flex",borderRadius:Ye,[`${je}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Xe,insetInlineEnd:Xe,bottom:0,"&-input":{width:"100%"}},[`
${je}-selection-item,
${je}-selection-placeholder
`]:{padding:0,lineHeight:`${dt}px`,transition:`all ${Le.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${dt}px`}},[`${je}-selection-item`]:{position:"relative",userSelect:"none"},[`${je}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${je}-selection-item:after`,`${je}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${je}-show-arrow ${je}-selection-item,
&${je}-show-arrow ${je}-selection-placeholder
`]:{paddingInlineEnd:He},[`&${je}-open ${je}-selection-item`]:{color:Le.colorTextPlaceholder},[`&:not(${je}-customize-input)`]:{[`${je}-selector`]:{width:"100%",height:Le.controlHeight,padding:`0 ${Xe}px`,[`${je}-selection-search-input`]:{height:dt},"&:after":{lineHeight:`${dt}px`}}},[`&${je}-customize-input`]:{[`${je}-selector`]:{"&:after":{display:"none"},[`${je}-selection-search`]:{position:"static",width:"100%"},[`${je}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Xe}px`,"&:after":{display:"none"}}}}}}}function ee(Le){const{componentCls:ze}=Le,je=Le.controlPaddingHorizontalSM-Le.lineWidth;return[te(Le),te((0,We.TS)(Le,{controlHeight:Le.controlHeightSM,borderRadius:Le.borderRadiusSM}),"sm"),{[`${ze}-single${ze}-sm`]:{[`&:not(${ze}-customize-input)`]:{[`${ze}-selection-search`]:{insetInlineStart:je,insetInlineEnd:je},[`${ze}-selector`]:{padding:`0 ${je}px`},[`&${ze}-show-arrow ${ze}-selection-search`]:{insetInlineEnd:je+Le.fontSize*1.5},[`
&${ze}-show-arrow ${ze}-selection-item,
&${ze}-show-arrow ${ze}-selection-placeholder
`]:{paddingInlineEnd:Le.fontSize*1.5}}}},te((0,We.TS)(Le,{controlHeight:Le.singleItemHeightLG,fontSize:Le.fontSizeLG,borderRadius:Le.borderRadiusLG}),"lg")]}const de=Le=>{const{componentCls:ze,selectorBg:je}=Le;return{position:"relative",backgroundColor:je,border:`${Le.lineWidth}px ${Le.lineType} ${Le.colorBorder}`,transition:`all ${Le.motionDurationMid} ${Le.motionEaseInOut}`,input:{cursor:"pointer"},[`${ze}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${ze}-disabled&`]:{color:Le.colorTextDisabled,background:Le.colorBgContainerDisabled,cursor:"not-allowed",[`${ze}-multiple&`]:{background:Le.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(Le,ze){let je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Xe,borderHoverColor:Ye,outlineColor:dt,antCls:He}=ze,Nt=je?{[`${Xe}-selector`]:{borderColor:Ye}}:{};return{[Le]:{[`&:not(${Xe}-disabled):not(${Xe}-customize-input):not(${He}-pagination-size-changer)`]:Object.assign(Object.assign({},Nt),{[`${Xe}-focused& ${Xe}-selector`]:{borderColor:Ye,boxShadow:`0 0 0 ${ze.controlOutlineWidth}px ${dt}`,outline:0},[`&:hover ${Xe}-selector`]:{borderColor:Ye}})}}},he=Le=>{const{componentCls:ze}=Le;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=Le=>{const{componentCls:ze,inputPaddingHorizontalBase:je,iconCls:Xe}=Le;return{[ze]:Object.assign(Object.assign({},(0,le.Wf)(Le)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${ze}-customize-input) ${ze}-selector`]:Object.assign(Object.assign({},de(Le)),he(Le)),[`${ze}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},le.vS),[`${ze}-selection-placeholder`]:Object.assign(Object.assign({},le.vS),{flex:1,color:Le.colorTextPlaceholder,pointerEvents:"none"}),[`${ze}-arrow`]:Object.assign(Object.assign({},(0,le.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,height:Le.fontSizeIcon,marginTop:-Le.fontSizeIcon/2,color:Le.colorTextQuaternary,fontSize:Le.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Xe]:{verticalAlign:"top",transition:`transform ${Le.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:je,zIndex:1,display:"inline-block",width:Le.fontSizeIcon,height:Le.fontSizeIcon,marginTop:-Le.fontSizeIcon/2,color:Le.colorTextQuaternary,fontSize:Le.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Le.clearBg,cursor:"pointer",opacity:0,transition:`color ${Le.motionDurationMid} ease, opacity ${Le.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Le.colorTextTertiary}},"&:hover":{[`${ze}-clear`]:{opacity:1}}}),[`${ze}-has-feedback`]:{[`${ze}-clear`]:{insetInlineEnd:je+Le.fontSize+Le.paddingXS}}}},Ee=Le=>{const{componentCls:ze}=Le;return[{[ze]:{[`&-borderless ${ze}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${ze}-in-form-item`]:{width:"100%"}}},ve(Le),ee(Le),Ie(Le),wt(Le),{[`${ze}-rtl`]:{direction:"rtl"}},se(ze,(0,We.TS)(Le,{borderHoverColor:Le.colorPrimaryHover,outlineColor:Le.controlOutline})),se(`${ze}-status-error`,(0,We.TS)(Le,{borderHoverColor:Le.colorErrorHover,outlineColor:Le.colorErrorOutline}),!0),se(`${ze}-status-warning`,(0,We.TS)(Le,{borderHoverColor:Le.colorWarningHover,outlineColor:Le.colorWarningOutline}),!0),(0,ke.c)(Le,{borderElCls:`${ze}-selector`,focusElCls:`${ze}-focused`})]};var Be=(0,ut.Z)("Select",(Le,ze)=>{let{rootPrefixCls:je}=ze;const Xe=(0,We.TS)(Le,{rootPrefixCls:je,inputPaddingHorizontalBase:Le.paddingSM-1,multipleSelectItemHeight:Le.multipleItemHeight});return[Ee(Xe)]},Le=>{const{fontSize:ze,lineHeight:je,controlHeight:Xe,controlPaddingHorizontal:Ye,zIndexPopupBase:dt,colorText:He,fontWeightStrong:Nt,controlItemBgActive:ot,controlItemBgHover:Tt,colorBgContainer:xt,colorFillSecondary:Ot,controlHeightLG:Wt,controlHeightSM:Dt,colorBgContainerDisabled:tt,colorTextDisabled:Ve}=Le;return{zIndexPopup:dt+50,optionSelectedColor:He,optionSelectedFontWeight:Nt,optionSelectedBg:ot,optionActiveBg:Tt,optionPadding:`${(Xe-ze*je)/2}px ${Ye}px`,optionFontSize:ze,optionLineHeight:je,optionHeight:Xe,selectorBg:xt,clearBg:xt,singleItemHeightLG:Wt,multipleItemBg:Ot,multipleItemBorderColor:"transparent",multipleItemHeight:Dt,multipleItemHeightLG:Xe,multipleSelectorBgDisabled:tt,multipleItemColorDisabled:Ve,multipleItemBorderColorDisabled:"transparent"}})},58582:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ke}});const le=We=>{const Ge={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:We==="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 ke(We,ut){return We||le(ut)}},84443:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return le}});function le(ke,We){return We!==void 0?We:ke!==null}},66339:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});var le=pe(40001),ke=pe(19248),We=pe(99267),ut=pe(84105),Ge=pe(58617),Ue=pe(47472),Me=pe(59301);function Ct(wt){let{suffixIcon:$e,clearIcon:Ft,menuItemSelectedIcon:lt,removeIcon:vt,loading:Ie,multiple:te,hasFeedback:ee,prefixCls:de,showSuffixIcon:se,feedbackIcon:he,showArrow:ve,componentName:Ee}=wt;const Be=Ft!=null?Ft:Me.createElement(ke.Z,null),Le=Ye=>$e===null&&!ee&&!ve?null:Me.createElement(Me.Fragment,null,se!==!1&&Ye,ee&&he);let ze=null;if($e!==void 0)ze=Le($e);else if(Ie)ze=Le(Me.createElement(Ge.Z,{spin:!0}));else{const Ye=`${de}-suffix`;ze=dt=>{let{open:He,showSearch:Nt}=dt;return Le(He&&Nt?Me.createElement(Ue.Z,{className:Ye}):Me.createElement(ut.Z,{className:Ye}))}}let je=null;lt!==void 0?je=lt:te?je=Me.createElement(le.Z,null):je=null;let Xe=null;return vt!==void 0?Xe=vt:Xe=Me.createElement(We.Z,null),{clearIcon:Be,suffixIcon:ze,itemIcon:je,removeIcon:Xe}}},61621:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ae}});var le=pe(92310),ke=pe.n(le),We=pe(59301),ut=pe(36355),Ge=pe(2738),Me=Oe=>{const{prefixCls:xe,className:ct,style:Mt,size:at,shape:qe}=Oe,Lt=ke()({[`${xe}-lg`]:at==="large",[`${xe}-sm`]:at==="small"}),Bt=ke()({[`${xe}-circle`]:qe==="circle",[`${xe}-square`]:qe==="square",[`${xe}-round`]:qe==="round"}),ft=We.useMemo(()=>typeof at=="number"?{width:at,height:at,lineHeight:`${at}px`}:{},[at]);return We.createElement("span",{className:ke()(xe,Lt,Bt,ct),style:Object.assign(Object.assign({},ft),Mt)})},Ct=pe(93083),wt=pe(83116),$e=pe(37613);const Ft=new Ct.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),lt=Oe=>({height:Oe,lineHeight:`${Oe}px`}),vt=Oe=>Object.assign({width:Oe},lt(Oe)),Ie=Oe=>({background:Oe.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Ft,animationDuration:Oe.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),te=Oe=>Object.assign({width:Oe*5,minWidth:Oe*5},lt(Oe)),ee=Oe=>{const{skeletonAvatarCls:xe,gradientFromColor:ct,controlHeight:Mt,controlHeightLG:at,controlHeightSM:qe}=Oe;return{[`${xe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:ct},vt(Mt)),[`${xe}${xe}-circle`]:{borderRadius:"50%"},[`${xe}${xe}-lg`]:Object.assign({},vt(at)),[`${xe}${xe}-sm`]:Object.assign({},vt(qe))}},de=Oe=>{const{controlHeight:xe,borderRadiusSM:ct,skeletonInputCls:Mt,controlHeightLG:at,controlHeightSM:qe,gradientFromColor:Lt}=Oe;return{[`${Mt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Lt,borderRadius:ct},te(xe)),[`${Mt}-lg`]:Object.assign({},te(at)),[`${Mt}-sm`]:Object.assign({},te(qe))}},se=Oe=>Object.assign({width:Oe},lt(Oe)),he=Oe=>{const{skeletonImageCls:xe,imageSizeBase:ct,gradientFromColor:Mt,borderRadiusSM:at}=Oe;return{[`${xe}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Mt,borderRadius:at},se(ct*2)),{[`${xe}-path`]:{fill:"#bfbfbf"},[`${xe}-svg`]:Object.assign(Object.assign({},se(ct)),{maxWidth:ct*4,maxHeight:ct*4}),[`${xe}-svg${xe}-svg-circle`]:{borderRadius:"50%"}}),[`${xe}${xe}-circle`]:{borderRadius:"50%"}}},ve=(Oe,xe,ct)=>{const{skeletonButtonCls:Mt}=Oe;return{[`${ct}${Mt}-circle`]:{width:xe,minWidth:xe,borderRadius:"50%"},[`${ct}${Mt}-round`]:{borderRadius:xe}}},Ee=Oe=>Object.assign({width:Oe*2,minWidth:Oe*2},lt(Oe)),Be=Oe=>{const{borderRadiusSM:xe,skeletonButtonCls:ct,controlHeight:Mt,controlHeightLG:at,controlHeightSM:qe,gradientFromColor:Lt}=Oe;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${ct}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Lt,borderRadius:xe,width:Mt*2,minWidth:Mt*2},Ee(Mt))},ve(Oe,Mt,ct)),{[`${ct}-lg`]:Object.assign({},Ee(at))}),ve(Oe,at,`${ct}-lg`)),{[`${ct}-sm`]:Object.assign({},Ee(qe))}),ve(Oe,qe,`${ct}-sm`))},Le=Oe=>{const{componentCls:xe,skeletonAvatarCls:ct,skeletonTitleCls:Mt,skeletonParagraphCls:at,skeletonButtonCls:qe,skeletonInputCls:Lt,skeletonImageCls:Bt,controlHeight:ft,controlHeightLG:Gt,controlHeightSM:Sn,gradientFromColor:an,padding:rn,marginSM:zn,borderRadius:kn,titleHeight:mn,blockRadius:ei,paragraphLiHeight:Pi,controlHeightXS:Hn,paragraphMarginTop:bn}=Oe;return{[`${xe}`]:{display:"table",width:"100%",[`${xe}-header`]:{display:"table-cell",paddingInlineEnd:rn,verticalAlign:"top",[`${ct}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:an},vt(ft)),[`${ct}-circle`]:{borderRadius:"50%"},[`${ct}-lg`]:Object.assign({},vt(Gt)),[`${ct}-sm`]:Object.assign({},vt(Sn))},[`${xe}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Mt}`]:{width:"100%",height:mn,background:an,borderRadius:ei,[`+ ${at}`]:{marginBlockStart:Sn}},[`${at}`]:{padding:0,"> li":{width:"100%",height:Pi,listStyle:"none",background:an,borderRadius:ei,"+ li":{marginBlockStart:Hn}}},[`${at}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${xe}-content`]:{[`${Mt}, ${at} > li`]:{borderRadius:kn}}},[`${xe}-with-avatar ${xe}-content`]:{[`${Mt}`]:{marginBlockStart:zn,[`+ ${at}`]:{marginBlockStart:bn}}},[`${xe}${xe}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Be(Oe)),ee(Oe)),de(Oe)),he(Oe)),[`${xe}${xe}-block`]:{width:"100%",[`${qe}`]:{width:"100%"},[`${Lt}`]:{width:"100%"}},[`${xe}${xe}-active`]:{[`
${Mt},
${at} > li,
${ct},
${qe},
${Lt},
${Bt}
`]:Object.assign({},Ie(Oe))}}};var ze=(0,wt.Z)("Skeleton",Oe=>{const{componentCls:xe}=Oe,ct=(0,$e.TS)(Oe,{skeletonAvatarCls:`${xe}-avatar`,skeletonTitleCls:`${xe}-title`,skeletonParagraphCls:`${xe}-paragraph`,skeletonButtonCls:`${xe}-button`,skeletonInputCls:`${xe}-input`,skeletonImageCls:`${xe}-image`,imageSizeBase:Oe.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Oe.gradientFromColor} 25%, ${Oe.gradientToColor} 37%, ${Oe.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Le(ct)]},Oe=>{const{colorFillContent:xe,colorFill:ct}=Oe,Mt=xe,at=ct;return{color:Mt,colorGradientEnd:at,gradientFromColor:Mt,gradientToColor:at,titleHeight:Oe.controlHeight/2,blockRadius:Oe.borderRadiusSM,paragraphMarginTop:Oe.marginLG+Oe.marginXXS,paragraphLiHeight:Oe.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Xe=Oe=>{const{prefixCls:xe,className:ct,rootClassName:Mt,active:at,shape:qe="circle",size:Lt="default"}=Oe,{getPrefixCls:Bt}=We.useContext(ut.E_),ft=Bt("skeleton",xe),[Gt,Sn]=ze(ft),an=(0,Ge.Z)(Oe,["prefixCls","className"]),rn=ke()(ft,`${ft}-element`,{[`${ft}-active`]:at},ct,Mt,Sn);return Gt(We.createElement("div",{className:rn},We.createElement(Me,Object.assign({prefixCls:`${ft}-avatar`,shape:qe,size:Lt},an))))},dt=Oe=>{const{prefixCls:xe,className:ct,rootClassName:Mt,active:at,block:qe=!1,size:Lt="default"}=Oe,{getPrefixCls:Bt}=We.useContext(ut.E_),ft=Bt("skeleton",xe),[Gt,Sn]=ze(ft),an=(0,Ge.Z)(Oe,["prefixCls"]),rn=ke()(ft,`${ft}-element`,{[`${ft}-active`]:at,[`${ft}-block`]:qe},ct,Mt,Sn);return Gt(We.createElement("div",{className:rn},We.createElement(Me,Object.assign({prefixCls:`${ft}-button`,size:Lt},an))))};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 ot=Oe=>{const{prefixCls:xe,className:ct,rootClassName:Mt,style:at,active:qe}=Oe,{getPrefixCls:Lt}=We.useContext(ut.E_),Bt=Lt("skeleton",xe),[ft,Gt]=ze(Bt),Sn=ke()(Bt,`${Bt}-element`,{[`${Bt}-active`]:qe},ct,Mt,Gt);return ft(We.createElement("div",{className:Sn},We.createElement("div",{className:ke()(`${Bt}-image`,ct),style:at},We.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Bt}-image-svg`},We.createElement("path",{d:He,className:`${Bt}-image-path`})))))},xt=Oe=>{const{prefixCls:xe,className:ct,rootClassName:Mt,active:at,block:qe,size:Lt="default"}=Oe,{getPrefixCls:Bt}=We.useContext(ut.E_),ft=Bt("skeleton",xe),[Gt,Sn]=ze(ft),an=(0,Ge.Z)(Oe,["prefixCls"]),rn=ke()(ft,`${ft}-element`,{[`${ft}-active`]:at,[`${ft}-block`]:qe},ct,Mt,Sn);return Gt(We.createElement("div",{className:rn},We.createElement(Me,Object.assign({prefixCls:`${ft}-input`,size:Lt},an))))},Ot=pe(96663),Wt={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"},Dt=Wt,tt=pe(7657),Ve=function(xe,ct){return We.createElement(tt.Z,(0,Ot.Z)({},xe,{ref:ct,icon:Dt}))},_t=We.forwardRef(Ve),vn=_t,zt=Oe=>{const{prefixCls:xe,className:ct,rootClassName:Mt,style:at,active:qe,children:Lt}=Oe,{getPrefixCls:Bt}=We.useContext(ut.E_),ft=Bt("skeleton",xe),[Gt,Sn]=ze(ft),an=ke()(ft,`${ft}-element`,{[`${ft}-active`]:qe},Sn,ct,Mt),rn=Lt!=null?Lt:We.createElement(vn,null);return Gt(We.createElement("div",{className:an},We.createElement("div",{className:ke()(`${ft}-image`,ct),style:at},rn)))},qt=pe(19127),Gn=Oe=>{const xe=Bt=>{const{width:ft,rows:Gt=2}=Oe;if(Array.isArray(ft))return ft[Bt];if(Gt-1===Bt)return ft},{prefixCls:ct,className:Mt,style:at,rows:qe}=Oe,Lt=(0,qt.Z)(Array(qe)).map((Bt,ft)=>We.createElement("li",{key:ft,style:{width:xe(ft)}}));return We.createElement("ul",{className:ke()(ct,Mt),style:at},Lt)},_n=Oe=>{let{prefixCls:xe,className:ct,width:Mt,style:at}=Oe;return We.createElement("h3",{className:ke()(xe,ct),style:Object.assign({width:Mt},at)})};function St(Oe){return Oe&&typeof Oe=="object"?Oe:{}}function Zn(Oe,xe){return Oe&&!xe?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function ci(Oe,xe){return!Oe&&xe?{width:"38%"}:Oe&&xe?{width:"50%"}:{}}function Ze(Oe,xe){const ct={};return(!Oe||!xe)&&(ct.width="61%"),!Oe&&xe?ct.rows=3:ct.rows=2,ct}const be=Oe=>{const{prefixCls:xe,loading:ct,className:Mt,rootClassName:at,style:qe,children:Lt,avatar:Bt=!1,title:ft=!0,paragraph:Gt=!0,active:Sn,round:an}=Oe,{getPrefixCls:rn,direction:zn,skeleton:kn}=We.useContext(ut.E_),mn=rn("skeleton",xe),[ei,Pi]=ze(mn);if(ct||!("loading"in Oe)){const Hn=!!Bt,bn=!!ft,wi=!!Gt;let Zi;if(Hn){const _r=Object.assign(Object.assign({prefixCls:`${mn}-avatar`},Zn(bn,wi)),St(Bt));Zi=We.createElement("div",{className:`${mn}-header`},We.createElement(Me,Object.assign({},_r)))}let Hi;if(bn||wi){let _r;if(bn){const di=Object.assign(Object.assign({prefixCls:`${mn}-title`},ci(Hn,wi)),St(ft));_r=We.createElement(_n,Object.assign({},di))}let gi;if(wi){const di=Object.assign(Object.assign({prefixCls:`${mn}-paragraph`},Ze(Hn,bn)),St(Gt));gi=We.createElement(Gn,Object.assign({},di))}Hi=We.createElement("div",{className:`${mn}-content`},_r,gi)}const rr=ke()(mn,{[`${mn}-with-avatar`]:Hn,[`${mn}-active`]:Sn,[`${mn}-rtl`]:zn==="rtl",[`${mn}-round`]:an},kn==null?void 0:kn.className,Mt,at,Pi);return ei(We.createElement("div",{className:rr,style:Object.assign(Object.assign({},kn==null?void 0:kn.style),qe)},Zi,Hi))}return typeof Lt!="undefined"?Lt:null};be.Button=dt,be.Avatar=Xe,be.Input=xt,be.Image=ot,be.Node=zt;var Pe=be,Ae=Pe},81327:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return de}});var le=pe(59301),ke=pe(92310),We=pe.n(ke),ut=pe(11592),Ge=pe(36355),Ue=pe(33234);const Me=le.createContext({latestIndex:0}),Ct=Me.Provider;var $e=se=>{let{className:he,index:ve,children:Ee,split:Be,style:Le}=se;const{latestIndex:ze}=le.useContext(Me);return Ee==null?null:le.createElement(le.Fragment,null,le.createElement("div",{className:he,style:Le},Ee),ve<ze&&Be&&le.createElement("span",{className:`${he}-split`},Be))},Ft=pe(2856);function lt(se){return["small","middle","large"].includes(se)}function vt(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var Ie=function(se,he){var ve={};for(var Ee in se)Object.prototype.hasOwnProperty.call(se,Ee)&&he.indexOf(Ee)<0&&(ve[Ee]=se[Ee]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,Ee=Object.getOwnPropertySymbols(se);Be<Ee.length;Be++)he.indexOf(Ee[Be])<0&&Object.prototype.propertyIsEnumerable.call(se,Ee[Be])&&(ve[Ee[Be]]=se[Ee[Be]]);return ve};const ee=le.forwardRef((se,he)=>{var ve,Ee;const{getPrefixCls:Be,space:Le,direction:ze}=le.useContext(Ge.E_),{size:je=(Le==null?void 0:Le.size)||"small",align:Xe,className:Ye,rootClassName:dt,children:He,direction:Nt="horizontal",prefixCls:ot,split:Tt,style:xt,wrap:Ot=!1,classNames:Wt,styles:Dt}=se,tt=Ie(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ve,_t]=Array.isArray(je)?je:[je,je],vn=lt(_t),yn=lt(Ve),zt=vt(_t),qt=vt(Ve),ln=(0,ut.Z)(He,{keepEmpty:!0}),Gn=Xe===void 0&&Nt==="horizontal"?"center":Xe,un=Be("space",ot),[_n,St]=(0,Ft.Z)(un),Zn=We()(un,Le==null?void 0:Le.className,St,`${un}-${Nt}`,{[`${un}-rtl`]:ze==="rtl",[`${un}-align-${Gn}`]:Gn,[`${un}-gap-row-${_t}`]:vn,[`${un}-gap-col-${Ve}`]:yn},Ye,dt),ci=We()(`${un}-item`,(ve=Wt==null?void 0:Wt.item)!==null&&ve!==void 0?ve:(Ee=Le==null?void 0:Le.classNames)===null||Ee===void 0?void 0:Ee.item);let Ze=0;const be=ln.map((Oe,xe)=>{var ct,Mt;Oe!=null&&(Ze=xe);const at=Oe&&Oe.key||`${ci}-${xe}`;return le.createElement($e,{className:ci,key:at,index:xe,split:Tt,style:(ct=Dt==null?void 0:Dt.item)!==null&&ct!==void 0?ct:(Mt=Le==null?void 0:Le.styles)===null||Mt===void 0?void 0:Mt.item},Oe)}),Pe=le.useMemo(()=>({latestIndex:Ze}),[Ze]);if(ln.length===0)return null;const Ae={};return Ot&&(Ae.flexWrap="wrap"),!yn&&qt&&(Ae.columnGap=Ve),!vn&&zt&&(Ae.rowGap=_t),_n(le.createElement("div",Object.assign({ref:he,className:Zn,style:Object.assign(Object.assign(Object.assign({},Ae),Le==null?void 0:Le.style),xt)},tt),le.createElement(Ct,{value:Pe},be)))});ee.Compact=Ue.ZP;var de=ee},31797:function(On,pn,pe){"use strict";pe.d(pn,{default:function(){return ze}});var le=pe(59301),ke=pe(56762),We=pe(92343),ut=pe(92310),Ge=pe.n(ut),Ue=pe(36355),Me=pe(61621),wt=je=>{const{value:Xe,formatter:Ye,precision:dt,decimalSeparator:He,groupSeparator:Nt="",prefixCls:ot}=je;let Tt;if(typeof Ye=="function")Tt=Ye(Xe);else{const xt=String(Xe),Ot=xt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Ot||xt==="-")Tt=xt;else{const Wt=Ot[1];let Dt=Ot[2]||"0",tt=Ot[4]||"";Dt=Dt.replace(/\B(?=(\d{3})+(?!\d))/g,Nt),typeof dt=="number"&&(tt=tt.padEnd(dt,"0").slice(0,dt>0?dt:0)),tt&&(tt=`${He}${tt}`),Tt=[le.createElement("span",{key:"int",className:`${ot}-content-value-int`},Wt,Dt),tt&&le.createElement("span",{key:"decimal",className:`${ot}-content-value-decimal`},tt)]}}return le.createElement("span",{className:`${ot}-content-value`},Tt)},$e=pe(17313),Ft=pe(83116),lt=pe(37613);const vt=je=>{const{componentCls:Xe,marginXXS:Ye,padding:dt,colorTextDescription:He,titleFontSize:Nt,colorTextHeading:ot,contentFontSize:Tt,fontFamily:xt}=je;return{[`${Xe}`]:Object.assign(Object.assign({},(0,$e.Wf)(je)),{[`${Xe}-title`]:{marginBottom:Ye,color:He,fontSize:Nt},[`${Xe}-skeleton`]:{paddingTop:dt},[`${Xe}-content`]:{color:ot,fontSize:Tt,fontFamily:xt,[`${Xe}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Xe}-content-prefix, ${Xe}-content-suffix`]:{display:"inline-block"},[`${Xe}-content-prefix`]:{marginInlineEnd:Ye},[`${Xe}-content-suffix`]:{marginInlineStart:Ye}}})}};var Ie=(0,Ft.Z)("Statistic",je=>{const Xe=(0,lt.TS)(je,{});return[vt(Xe)]},je=>{const{fontSizeHeading3:Xe,fontSize:Ye}=je;return{titleFontSize:Ye,contentFontSize:Xe}}),ee=je=>{const{prefixCls:Xe,className:Ye,rootClassName:dt,style:He,valueStyle:Nt,value:ot=0,title:Tt,valueRender:xt,prefix:Ot,suffix:Wt,loading:Dt=!1,onMouseEnter:tt,onMouseLeave:Ve,decimalSeparator:_t=".",groupSeparator:vn=","}=je,{getPrefixCls:yn,direction:zt,statistic:qt}=le.useContext(Ue.E_),ln=yn("statistic",Xe),[Gn,un]=Ie(ln),_n=le.createElement(wt,Object.assign({decimalSeparator:_t,groupSeparator:vn,prefixCls:ln},je,{value:ot})),St=Ge()(ln,{[`${ln}-rtl`]:zt==="rtl"},qt==null?void 0:qt.className,Ye,dt,un);return Gn(le.createElement("div",{className:St,style:Object.assign(Object.assign({},qt==null?void 0:qt.style),He),onMouseEnter:tt,onMouseLeave:Ve},Tt&&le.createElement("div",{className:`${ln}-title`},Tt),le.createElement(Me.Z,{paragraph:!1,loading:Dt,className:`${ln}-skeleton`},le.createElement("div",{style:Nt,className:`${ln}-content`},Ot&&le.createElement("span",{className:`${ln}-content-prefix`},Ot),xt?xt(_n):_n,Wt&&le.createElement("span",{className:`${ln}-content-suffix`},Wt)))))};const de=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function se(je,Xe){let Ye=je;const dt=/\[[^\]]*]/g,He=(Xe.match(dt)||[]).map(xt=>xt.slice(1,-1)),Nt=Xe.replace(dt,"[]"),ot=de.reduce((xt,Ot)=>{let[Wt,Dt]=Ot;if(xt.includes(Wt)){const tt=Math.floor(Ye/Dt);return Ye-=tt*Dt,xt.replace(new RegExp(`${Wt}+`,"g"),Ve=>{const _t=Ve.length;return tt.toString().padStart(_t,"0")})}return xt},Nt);let Tt=0;return ot.replace(dt,()=>{const xt=He[Tt];return Tt+=1,xt})}function he(je,Xe){const{format:Ye=""}=Xe,dt=new Date(je).getTime(),He=Date.now(),Nt=Math.max(dt-He,0);return se(Nt,Ye)}const ve=1e3/30;function Ee(je){return new Date(je).getTime()}const Be=je=>{const{value:Xe,format:Ye="HH:mm:ss",onChange:dt,onFinish:He}=je,Nt=(0,ke.Z)(),ot=le.useRef(null),Tt=()=>{He==null||He(),ot.current&&(clearInterval(ot.current),ot.current=null)},xt=()=>{const Dt=Ee(Xe);Dt>=Date.now()&&(ot.current=setInterval(()=>{Nt(),dt==null||dt(Dt-Date.now()),Dt<Date.now()&&Tt()},ve))};le.useEffect(()=>(xt(),()=>{ot.current&&(clearInterval(ot.current),ot.current=null)}),[Xe]);const Ot=(Dt,tt)=>he(Dt,Object.assign(Object.assign({},tt),{format:Ye})),Wt=Dt=>(0,We.Tm)(Dt,{title:void 0});return le.createElement(ee,Object.assign({},je,{valueRender:Wt,formatter:Ot}))};var Le=le.memo(Be);ee.Countdown=Le;var ze=ee},15969:function(On,pn,pe){"use strict";pe.d(pn,{N:function(){return le}});const le=ke=>({color:ke.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${ke.motionDurationSlow}`,"&:focus, &:hover":{color:ke.colorLinkHover},"&:active":{color:ke.colorLinkActive}})},78673:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Nt}});var le=pe(58617),ke=pe(92310),We=pe.n(ke),ut=pe(96663),Ge=pe(90493),Ue=pe(72071),Me=pe(6620),Ct=pe(59301),wt=pe(18929),$e=pe(10228),Ft=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],lt=Ct.forwardRef(function(ot,Tt){var xt,Ot=ot.prefixCls,Wt=Ot===void 0?"rc-switch":Ot,Dt=ot.className,tt=ot.checked,Ve=ot.defaultChecked,_t=ot.disabled,vn=ot.loadingIcon,yn=ot.checkedChildren,zt=ot.unCheckedChildren,qt=ot.onClick,ln=ot.onChange,Gn=ot.onKeyDown,un=(0,Me.Z)(ot,Ft),_n=(0,wt.Z)(!1,{value:tt,defaultValue:Ve}),St=(0,Ue.Z)(_n,2),Zn=St[0],ci=St[1];function Ze(Oe,xe){var ct=Zn;return _t||(ct=Oe,ci(ct),ln==null||ln(ct,xe)),ct}function be(Oe){Oe.which===$e.Z.LEFT?Ze(!1,Oe):Oe.which===$e.Z.RIGHT&&Ze(!0,Oe),Gn==null||Gn(Oe)}function Pe(Oe){var xe=Ze(!Zn,Oe);qt==null||qt(xe,Oe)}var Ae=We()(Wt,Dt,(xt={},(0,Ge.Z)(xt,"".concat(Wt,"-checked"),Zn),(0,Ge.Z)(xt,"".concat(Wt,"-disabled"),_t),xt));return Ct.createElement("button",(0,ut.Z)({},un,{type:"button",role:"switch","aria-checked":Zn,disabled:_t,className:Ae,ref:Tt,onKeyDown:be,onClick:Pe}),vn,Ct.createElement("span",{className:"".concat(Wt,"-inner")},Ct.createElement("span",{className:"".concat(Wt,"-inner-checked")},yn),Ct.createElement("span",{className:"".concat(Wt,"-inner-unchecked")},zt)))});lt.displayName="Switch";var vt=lt,Ie=pe(14088),te=pe(36355),ee=pe(1684),de=pe(19716),se=pe(64993),he=pe(17313),ve=pe(83116),Ee=pe(37613);const Be=ot=>{const{componentCls:Tt,trackHeightSM:xt,trackPadding:Ot,trackMinWidthSM:Wt,innerMinMarginSM:Dt,innerMaxMarginSM:tt,handleSizeSM:Ve}=ot,_t=`${Tt}-inner`;return{[Tt]:{[`&${Tt}-small`]:{minWidth:Wt,height:xt,lineHeight:`${xt}px`,[`${Tt}-inner`]:{paddingInlineStart:tt,paddingInlineEnd:Dt,[`${_t}-checked`]:{marginInlineStart:`calc(-100% + ${Ve+Ot*2}px - ${tt*2}px)`,marginInlineEnd:`calc(100% - ${Ve+Ot*2}px + ${tt*2}px)`},[`${_t}-unchecked`]:{marginTop:-xt,marginInlineStart:0,marginInlineEnd:0}},[`${Tt}-handle`]:{width:Ve,height:Ve},[`${Tt}-loading-icon`]:{top:(Ve-ot.switchLoadingIconSize)/2,fontSize:ot.switchLoadingIconSize},[`&${Tt}-checked`]:{[`${Tt}-inner`]:{paddingInlineStart:Dt,paddingInlineEnd:tt,[`${_t}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${_t}-unchecked`]:{marginInlineStart:`calc(100% - ${Ve+Ot*2}px + ${tt*2}px)`,marginInlineEnd:`calc(-100% + ${Ve+Ot*2}px - ${tt*2}px)`}},[`${Tt}-handle`]:{insetInlineStart:`calc(100% - ${Ve+Ot}px)`}},[`&:not(${Tt}-disabled):active`]:{[`&:not(${Tt}-checked) ${_t}`]:{[`${_t}-unchecked`]:{marginInlineStart:ot.marginXXS/2,marginInlineEnd:-ot.marginXXS/2}},[`&${Tt}-checked ${_t}`]:{[`${_t}-checked`]:{marginInlineStart:-ot.marginXXS/2,marginInlineEnd:ot.marginXXS/2}}}}}}},Le=ot=>{const{componentCls:Tt,handleSize:xt}=ot;return{[Tt]:{[`${Tt}-loading-icon${ot.iconCls}`]:{position:"relative",top:(xt-ot.fontSize)/2,color:ot.switchLoadingIconColor,verticalAlign:"top"},[`&${Tt}-checked ${Tt}-loading-icon`]:{color:ot.switchColor}}}},ze=ot=>{const{componentCls:Tt,motion:xt,trackPadding:Ot,handleBg:Wt,handleShadow:Dt,handleSize:tt}=ot,Ve=`${Tt}-handle`;return{[Tt]:{[Ve]:{position:"absolute",top:Ot,insetInlineStart:Ot,width:tt,height:tt,transition:`all ${ot.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Wt,borderRadius:tt/2,boxShadow:Dt,transition:`all ${ot.switchDuration} ease-in-out`,content:'""'}},[`&${Tt}-checked ${Ve}`]:{insetInlineStart:`calc(100% - ${tt+Ot}px)`},[`&:not(${Tt}-disabled):active`]:xt?{[`${Ve}::before`]:{insetInlineEnd:ot.switchHandleActiveInset,insetInlineStart:0},[`&${Tt}-checked ${Ve}::before`]:{insetInlineEnd:0,insetInlineStart:ot.switchHandleActiveInset}}:{}}}},je=ot=>{const{componentCls:Tt,trackHeight:xt,trackPadding:Ot,innerMinMargin:Wt,innerMaxMargin:Dt,handleSize:tt}=ot,Ve=`${Tt}-inner`;return{[Tt]:{[Ve]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Dt,paddingInlineEnd:Wt,transition:`padding-inline-start ${ot.switchDuration} ease-in-out, padding-inline-end ${ot.switchDuration} ease-in-out`,[`${Ve}-checked, ${Ve}-unchecked`]:{display:"block",color:ot.colorTextLightSolid,fontSize:ot.fontSizeSM,transition:`margin-inline-start ${ot.switchDuration} ease-in-out, margin-inline-end ${ot.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ve}-checked`]:{marginInlineStart:`calc(-100% + ${tt+Ot*2}px - ${Dt*2}px)`,marginInlineEnd:`calc(100% - ${tt+Ot*2}px + ${Dt*2}px)`},[`${Ve}-unchecked`]:{marginTop:-xt,marginInlineStart:0,marginInlineEnd:0}},[`&${Tt}-checked ${Ve}`]:{paddingInlineStart:Wt,paddingInlineEnd:Dt,[`${Ve}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ve}-unchecked`]:{marginInlineStart:`calc(100% - ${tt+Ot*2}px + ${Dt*2}px)`,marginInlineEnd:`calc(-100% + ${tt+Ot*2}px - ${Dt*2}px)`}},[`&:not(${Tt}-disabled):active`]:{[`&:not(${Tt}-checked) ${Ve}`]:{[`${Ve}-unchecked`]:{marginInlineStart:Ot*2,marginInlineEnd:-Ot*2}},[`&${Tt}-checked ${Ve}`]:{[`${Ve}-checked`]:{marginInlineStart:-Ot*2,marginInlineEnd:Ot*2}}}}}},Xe=ot=>{const{componentCls:Tt,trackHeight:xt,trackMinWidth:Ot}=ot;return{[Tt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,he.Wf)(ot)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ot,height:xt,lineHeight:`${xt}px`,verticalAlign:"middle",background:ot.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${ot.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Tt}-disabled)`]:{background:ot.colorTextTertiary}}),(0,he.Qy)(ot)),{[`&${Tt}-checked`]:{background:ot.switchColor,[`&:hover:not(${Tt}-disabled)`]:{background:ot.colorPrimaryHover}},[`&${Tt}-loading, &${Tt}-disabled`]:{cursor:"not-allowed",opacity:ot.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Tt}-rtl`]:{direction:"rtl"}})}};var Ye=(0,ve.Z)("Switch",ot=>{const Tt=(0,Ee.TS)(ot,{switchDuration:ot.motionDurationMid,switchColor:ot.colorPrimary,switchDisabledOpacity:ot.opacityLoading,switchLoadingIconSize:ot.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${ot.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Xe(Tt),je(Tt),ze(Tt),Le(Tt),Be(Tt)]},ot=>{const{fontSize:Tt,lineHeight:xt,controlHeight:Ot,colorWhite:Wt}=ot,Dt=Tt*xt,tt=Ot/2,Ve=2,_t=Dt-Ve*2,vn=tt-Ve*2;return{trackHeight:Dt,trackHeightSM:tt,trackMinWidth:_t*2+Ve*4,trackMinWidthSM:vn*2+Ve*2,trackPadding:Ve,handleBg:Wt,handleSize:_t,handleSizeSM:vn,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:_t/2,innerMaxMargin:_t+Ve+Ve*2,innerMinMarginSM:vn/2,innerMaxMarginSM:vn+Ve+Ve*2}}),dt=function(ot,Tt){var xt={};for(var Ot in ot)Object.prototype.hasOwnProperty.call(ot,Ot)&&Tt.indexOf(Ot)<0&&(xt[Ot]=ot[Ot]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Ot=Object.getOwnPropertySymbols(ot);Wt<Ot.length;Wt++)Tt.indexOf(Ot[Wt])<0&&Object.prototype.propertyIsEnumerable.call(ot,Ot[Wt])&&(xt[Ot[Wt]]=ot[Ot[Wt]]);return xt};const He=Ct.forwardRef((ot,Tt)=>{const{prefixCls:xt,size:Ot,disabled:Wt,loading:Dt,className:tt,rootClassName:Ve,style:_t}=ot,vn=dt(ot,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:yn,direction:zt,switch:qt}=Ct.useContext(te.E_),ln=Ct.useContext(ee.Z),Gn=(Wt!=null?Wt:ln)||Dt,un=yn("switch",xt),_n=Ct.createElement("div",{className:`${un}-handle`},Dt&&Ct.createElement(le.Z,{className:`${un}-loading-icon`})),[St,Zn]=Ye(un),ci=(0,de.Z)(Ot),Ze=We()(qt==null?void 0:qt.className,{[`${un}-small`]:ci==="small",[`${un}-loading`]:Dt,[`${un}-rtl`]:zt==="rtl"},tt,Ve,Zn),be=Object.assign(Object.assign({},qt==null?void 0:qt.style),_t);return St(Ct.createElement(Ie.Z,{component:"Switch"},Ct.createElement(vt,Object.assign({},vn,{prefixCls:un,className:Ze,style:be,disabled:Gn,ref:Tt,loadingIcon:_n}))))});He.__ANT_SWITCH=!0;var Nt=He},1710:function(On,pn,pe){"use strict";pe.d(pn,{default:function(){return Xa}});var le={},ke="rc-table-internal-hook",We=pe(72071),ut=pe(6089),Ge=pe(34280),Ue=pe(13697),Me=pe(59301),Ct=pe(4676);function wt(rt){var et=Me.createContext(void 0),Ut=function(gn){var nn=gn.value,Vn=gn.children,jn=Me.useRef(nn);jn.current=nn;var Xn=Me.useState(function(){return{getValue:function(){return jn.current},listeners:new Set}}),yi=(0,We.Z)(Xn,1),Jn=yi[0];return(0,Ge.Z)(function(){(0,Ct.unstable_batchedUpdates)(function(){Jn.listeners.forEach(function(mi){mi(nn)})})},[nn]),Me.createElement(et.Provider,{value:Jn},Vn)};return{Context:et,Provider:Ut,defaultValue:rt}}function $e(rt,et){var Ut=(0,ut.Z)(typeof et=="function"?et:function(mi){if(et===void 0)return mi;if(!Array.isArray(et))return mi[et];var or={};return et.forEach(function(Vi){or[Vi]=mi[Vi]}),or}),Xt=Me.useContext(rt==null?void 0:rt.Context),gn=Xt||{},nn=gn.listeners,Vn=gn.getValue,jn=Me.useRef();jn.current=Ut(Xt?Vn():rt==null?void 0:rt.defaultValue);var Xn=Me.useState({}),yi=(0,We.Z)(Xn,2),Jn=yi[1];return(0,Ge.Z)(function(){if(!Xt)return;function mi(or){var Vi=Ut(or);(0,Ue.Z)(jn.current,Vi,!0)||Jn({})}return nn.add(mi),function(){nn.delete(mi)}},[Xt]),jn.current}var Ft=pe(96663),lt=pe(8654);function vt(){var rt=Me.createContext(null);function et(){return Me.useContext(rt)}function Ut(gn,nn){var Vn=(0,lt.Yr)(gn),jn=function(yi,Jn){var mi=Vn?{ref:Jn}:{},or=Me.useRef(0),Vi=Me.useRef(yi),Ui=et();return Ui!==null?Me.createElement(gn,(0,Ft.Z)({},yi,mi)):((!nn||nn(Vi.current,yi))&&(or.current+=1),Vi.current=yi,Me.createElement(rt.Provider,{value:or.current},Me.createElement(gn,(0,Ft.Z)({},yi,mi))))};return Vn?Me.forwardRef(jn):jn}function Xt(gn,nn){var Vn=(0,lt.Yr)(gn),jn=function(yi,Jn){var mi=Vn?{ref:Jn}:{};return et(),Me.createElement(gn,(0,Ft.Z)({},yi,mi))};return Vn?Me.memo(Me.forwardRef(jn),nn):Me.memo(jn,nn)}return{makeImmutable:Ut,responseImmutable:Xt,useImmutableMark:et}}var Ie=vt(),te=Ie.makeImmutable,ee=Ie.responseImmutable,de=Ie.useImmutableMark,se=vt(),he=se.makeImmutable,ve=se.responseImmutable,Ee=se.useImmutableMark,Be=wt(),Le=Be;function ze(rt,et){var Ut=Me.useRef(0);Ut.current+=1;var Xt=Me.useRef(rt),gn=[];Object.keys(rt||{}).map(function(Vn){var jn;(rt==null?void 0:rt[Vn])!==((jn=Xt.current)===null||jn===void 0?void 0:jn[Vn])&&gn.push(Vn)}),Xt.current=rt;var nn=Me.useRef([]);return gn.length&&(nn.current=gn),Me.useDebugValue(Ut.current),Me.useDebugValue(nn.current.join(", ")),et&&console.log("".concat(et,":"),Ut.current,nn.current),Ut.current}var je=null,Xe=Me.memo(function(){var rt=ze();return Me.createElement("h1",null,"Render Times: ",rt)});Xe.displayName="RenderBlock";var Ye=pe(20135),dt=pe(44127),He=pe(90493),Nt=pe(92310),ot=pe.n(Nt),Tt=pe(80547),xt=pe(97938),Ot=pe(48736),Wt=Me.createContext({renderWithProps:!1}),Dt=Wt,tt="RC_TABLE_KEY";function Ve(rt){return rt==null?[]:Array.isArray(rt)?rt:[rt]}function _t(rt){var et=[],Ut={};return rt.forEach(function(Xt){for(var gn=Xt||{},nn=gn.key,Vn=gn.dataIndex,jn=nn||Ve(Vn).join("-")||tt;Ut[jn];)jn="".concat(jn,"_next");Ut[jn]=!0,et.push(jn)}),et}function vn(rt){return rt!=null}function yn(rt){return rt&&(0,Ye.Z)(rt)==="object"&&!Array.isArray(rt)&&!Me.isValidElement(rt)}function zt(rt,et,Ut,Xt,gn,nn){var Vn=Me.useContext(Dt),jn=Ee(),Xn=(0,Tt.Z)(function(){if(vn(Xt))return[Xt];var yi=et==null||et===""?[]:Array.isArray(et)?et:[et],Jn=(0,xt.Z)(rt,yi),mi=Jn,or=void 0;if(gn){var Vi=gn(Jn,rt,Ut);yn(Vi)?(mi=Vi.children,or=Vi.props,Vn.renderWithProps=!0):mi=Vi}return[mi,or]},[jn,rt,Xt,et,gn,Ut],function(yi,Jn){if(nn){var mi=(0,We.Z)(yi,2),or=mi[1],Vi=(0,We.Z)(Jn,2),Ui=Vi[1];return nn(Ui,or)}return Vn.renderWithProps?!0:!(0,Ue.Z)(yi,Jn,!0)});return Xn}function qt(rt,et,Ut,Xt){var gn=rt+et-1;return rt<=Xt&&gn>=Ut}function ln(rt,et){return $e(Le,function(Ut){var Xt=qt(rt,et||1,Ut.hoverStartRow,Ut.hoverEndRow);return[Xt,Ut.onHover]})}var Gn=function(et){var Ut=et.ellipsis,Xt=et.rowType,gn=et.children,nn,Vn=Ut===!0?{showTitle:!0}:Ut;return Vn&&(Vn.showTitle||Xt==="header")&&(typeof gn=="string"||typeof gn=="number"?nn=gn.toString():Me.isValidElement(gn)&&typeof gn.props.children=="string"&&(nn=gn.props.children)),nn};function un(rt){var et,Ut,Xt,gn,nn,Vn,jn,Xn,yi=rt.component,Jn=rt.children,mi=rt.ellipsis,or=rt.scope,Vi=rt.prefixCls,Ui=rt.className,Jr=rt.align,ir=rt.record,Rr=rt.render,jr=rt.dataIndex,vo=rt.renderIndex,Vo=rt.shouldCellUpdate,ua=rt.index,oo=rt.rowType,Wo=rt.colSpan,Ta=rt.rowSpan,uo=rt.fixLeft,To=rt.fixRight,co=rt.firstFixLeft,Ar=rt.lastFixLeft,Fo=rt.firstFixRight,ta=rt.lastFixRight,Sa=rt.appendNode,Pa=rt.additionalProps,ao=Pa===void 0?{}:Pa,ka=rt.isSticky,Va="".concat(Vi,"-cell"),bs=$e(Le,["supportSticky","allColumnsFixedLeft"]),us=bs.supportSticky,qs=bs.allColumnsFixedLeft,Ls=zt(ir,jr,vo,Jn,Rr,Vo),Za=(0,We.Z)(Ls,2),aa=Za[0],fs=Za[1],el={},Ws=typeof uo=="number"&&us,cl=typeof To=="number"&&us;Ws&&(el.position="sticky",el.left=uo),cl&&(el.position="sticky",el.right=To);var ba=(et=(Ut=(Xt=fs==null?void 0:fs.colSpan)!==null&&Xt!==void 0?Xt:ao.colSpan)!==null&&Ut!==void 0?Ut:Wo)!==null&&et!==void 0?et:1,da=(gn=(nn=(Vn=fs==null?void 0:fs.rowSpan)!==null&&Vn!==void 0?Vn:ao.rowSpan)!==null&&nn!==void 0?nn:Ta)!==null&&gn!==void 0?gn:1,wa=ln(ua,da),Xo=(0,We.Z)(wa,2),Ps=Xo[0],Uo=Xo[1],Ra=function(dl){var Fl;ir&&Uo(ua,ua+da-1),ao==null||(Fl=ao.onMouseEnter)===null||Fl===void 0||Fl.call(ao,dl)},ss=function(dl){var Fl;ir&&Uo(-1,-1),ao==null||(Fl=ao.onMouseLeave)===null||Fl===void 0||Fl.call(ao,dl)};if(ba===0||da===0)return null;var cs=(jn=ao.title)!==null&&jn!==void 0?jn:Gn({rowType:oo,ellipsis:mi,children:aa}),Al=ot()(Va,Ui,(Xn={},(0,He.Z)(Xn,"".concat(Va,"-fix-left"),Ws&&us),(0,He.Z)(Xn,"".concat(Va,"-fix-left-first"),co&&us),(0,He.Z)(Xn,"".concat(Va,"-fix-left-last"),Ar&&us),(0,He.Z)(Xn,"".concat(Va,"-fix-left-all"),Ar&&qs&&us),(0,He.Z)(Xn,"".concat(Va,"-fix-right"),cl&&us),(0,He.Z)(Xn,"".concat(Va,"-fix-right-first"),Fo&&us),(0,He.Z)(Xn,"".concat(Va,"-fix-right-last"),ta&&us),(0,He.Z)(Xn,"".concat(Va,"-ellipsis"),mi),(0,He.Z)(Xn,"".concat(Va,"-with-append"),Sa),(0,He.Z)(Xn,"".concat(Va,"-fix-sticky"),(Ws||cl)&&ka&&us),(0,He.Z)(Xn,"".concat(Va,"-row-hover"),!fs&&Ps),Xn),ao.className,fs==null?void 0:fs.className),bl={};Jr&&(bl.textAlign=Jr);var Vl=(0,dt.Z)((0,dt.Z)((0,dt.Z)((0,dt.Z)({},el),ao.style),bl),fs==null?void 0:fs.style),Fs=aa;return(0,Ye.Z)(Fs)==="object"&&!Array.isArray(Fs)&&!Me.isValidElement(Fs)&&(Fs=null),mi&&(Ar||Fo)&&(Fs=Me.createElement("span",{className:"".concat(Va,"-content")},Fs)),Me.createElement(yi,(0,Ft.Z)({},fs,ao,{className:Al,style:Vl,title:cs,scope:or,onMouseEnter:Ra,onMouseLeave:ss,colSpan:ba!==1?ba:null,rowSpan:da!==1?da:null}),Sa,Fs)}var _n=Me.memo(un);function St(rt,et,Ut,Xt,gn,nn){var Vn=Ut[rt]||{},jn=Ut[et]||{},Xn,yi;Vn.fixed==="left"?Xn=Xt.left[gn==="rtl"?et:rt]:jn.fixed==="right"&&(yi=Xt.right[gn==="rtl"?rt:et]);var Jn=!1,mi=!1,or=!1,Vi=!1,Ui=Ut[et+1],Jr=Ut[rt-1],ir=!(nn!=null&&nn.children);if(gn==="rtl"){if(Xn!==void 0){var Rr=Jr&&Jr.fixed==="left";Vi=!Rr&&ir}else if(yi!==void 0){var jr=Ui&&Ui.fixed==="right";or=!jr&&ir}}else if(Xn!==void 0){var vo=Ui&&Ui.fixed==="left";Jn=!vo&&ir}else if(yi!==void 0){var Vo=Jr&&Jr.fixed==="right";mi=!Vo&&ir}return{fixLeft:Xn,fixRight:yi,lastFixLeft:Jn,firstFixRight:mi,lastFixRight:or,firstFixLeft:Vi,isSticky:Xt.isSticky}}var Zn=Me.createContext({}),ci=Zn;function Ze(rt){var et=rt.className,Ut=rt.index,Xt=rt.children,gn=rt.colSpan,nn=gn===void 0?1:gn,Vn=rt.rowSpan,jn=rt.align,Xn=$e(Le,["prefixCls","direction"]),yi=Xn.prefixCls,Jn=Xn.direction,mi=Me.useContext(ci),or=mi.scrollColumnIndex,Vi=mi.stickyOffsets,Ui=mi.flattenColumns,Jr=mi.columns,ir=Ut+nn-1,Rr=ir+1===or?nn+1:nn,jr=St(Ut,Ut+Rr-1,Ui,Vi,Jn,Jr==null?void 0:Jr[Ut]);return Me.createElement(_n,(0,Ft.Z)({className:et,index:Ut,component:"td",prefixCls:yi,record:null,dataIndex:null,align:jn,colSpan:Rr,rowSpan:Vn,render:function(){return Xt}},jr))}var be=pe(6620),Pe=["children"];function Ae(rt){var et=rt.children,Ut=(0,be.Z)(rt,Pe);return Me.createElement("tr",Ut,et)}function Oe(rt){var et=rt.children;return et}Oe.Row=Ae,Oe.Cell=Ze;var xe=Oe;function ct(rt){var et=rt.children,Ut=rt.stickyOffsets,Xt=rt.flattenColumns,gn=rt.columns,nn=$e(Le,"prefixCls"),Vn=Xt.length-1,jn=Xt[Vn],Xn=Me.useMemo(function(){return{stickyOffsets:Ut,flattenColumns:Xt,scrollColumnIndex:jn!=null&&jn.scrollbar?Vn:null,columns:gn}},[jn,Xt,Vn,Ut,gn]);return Me.createElement(ci.Provider,{value:Xn},Me.createElement("tfoot",{className:"".concat(nn,"-summary")},et))}var Mt=ve(ct),at=xe,qe=pe(70425),Lt=pe(29301),Bt=pe(29194),ft=pe(24514),Gt=pe(75152),Sn=pe(26112);function an(rt,et,Ut,Xt,gn,nn,Vn){rt.push({record:et,indent:Ut,index:Vn});var jn=nn(et),Xn=gn==null?void 0:gn.has(jn);if(et&&Array.isArray(et[Xt])&&Xn)for(var yi=0;yi<et[Xt].length;yi+=1)an(rt,et[Xt][yi],Ut+1,Xt,gn,nn,yi)}function rn(rt,et,Ut,Xt){var gn=Me.useMemo(function(){if(Ut!=null&&Ut.size){for(var nn=[],Vn=0;Vn<(rt==null?void 0:rt.length);Vn+=1){var jn=rt[Vn];an(nn,jn,0,et,Ut,Xt,Vn)}return nn}return rt==null?void 0:rt.map(function(Xn,yi){return{record:Xn,indent:0,index:yi}})},[rt,et,Ut,Xt]);return gn}function zn(rt){var et=rt.prefixCls,Ut=rt.children,Xt=rt.component,gn=rt.cellComponent,nn=rt.className,Vn=rt.expanded,jn=rt.colSpan,Xn=rt.isEmpty,yi=$e(Le,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Jn=yi.scrollbarSize,mi=yi.fixHeader,or=yi.fixColumn,Vi=yi.componentWidth,Ui=yi.horizonScroll,Jr=Ut;return(Xn?Ui&&Vi:or)&&(Jr=Me.createElement("div",{style:{width:Vi-(mi?Jn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(et,"-expanded-row-fixed")},Jr)),Me.createElement(Xt,{className:nn,style:{display:Vn?null:"none"}},Me.createElement(_n,{component:gn,prefixCls:et,colSpan:jn},Jr))}var kn=zn;function mn(rt,et,Ut,Xt){var gn=$e(Le,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),nn=gn.flattenColumns,Vn=gn.expandableType,jn=gn.expandedKeys,Xn=gn.childrenColumnName,yi=gn.onTriggerExpand,Jn=gn.rowExpandable,mi=gn.onRow,or=gn.expandRowByClick,Vi=gn.rowClassName,Ui=Vn==="nest",Jr=Vn==="row"&&(!Jn||Jn(rt)),ir=Jr||Ui,Rr=jn&&jn.has(et),jr=Xn&&rt&&rt[Xn],vo=(0,qe.useEvent)(yi),Vo=mi==null?void 0:mi(rt,Ut),ua=Vo==null?void 0:Vo.onClick,oo=function(To){or&&ir&&yi(rt,To);for(var co=arguments.length,Ar=new Array(co>1?co-1:0),Fo=1;Fo<co;Fo++)Ar[Fo-1]=arguments[Fo];ua==null||ua.apply(void 0,[To].concat(Ar))},Wo;typeof Vi=="string"?Wo=Vi:typeof Vi=="function"&&(Wo=Vi(rt,Ut,Xt));var Ta=_t(nn);return(0,dt.Z)((0,dt.Z)({},gn),{},{columnsKey:Ta,nestExpandable:Ui,expanded:Rr,hasNestChildren:jr,record:rt,onTriggerExpand:vo,rowSupportExpand:Jr,expandable:ir,rowProps:(0,dt.Z)((0,dt.Z)({},Vo),{},{className:ot()(Wo,Vo==null?void 0:Vo.className),onClick:oo})})}function ei(rt,et,Ut,Xt,gn){var nn=rt.record,Vn=rt.prefixCls,jn=rt.columnsKey,Xn=rt.fixedInfoList,yi=rt.expandIconColumnIndex,Jn=rt.nestExpandable,mi=rt.indentSize,or=rt.expandIcon,Vi=rt.expanded,Ui=rt.hasNestChildren,Jr=rt.onTriggerExpand,ir=jn[Ut],Rr=Xn[Ut],jr;Ut===(yi||0)&&Jn&&(jr=Me.createElement(Me.Fragment,null,Me.createElement("span",{style:{paddingLeft:"".concat(mi*Xt,"px")},className:"".concat(Vn,"-row-indent indent-level-").concat(Xt)}),or({prefixCls:Vn,expanded:Vi,expandable:Ui,record:nn,onExpand:Jr})));var vo;return et.onCell&&(vo=et.onCell(nn,gn)),{key:ir,fixedInfo:Rr,appendCellNode:jr,additionalCellProps:vo||{}}}function Pi(rt){var et=rt.className,Ut=rt.style,Xt=rt.record,gn=rt.index,nn=rt.renderIndex,Vn=rt.rowKey,jn=rt.indent,Xn=jn===void 0?0:jn,yi=rt.rowComponent,Jn=rt.cellComponent,mi=rt.scopeCellComponent,or=mn(Xt,Vn,gn,Xn),Vi=or.prefixCls,Ui=or.flattenColumns,Jr=or.expandedRowClassName,ir=or.expandedRowRender,Rr=or.rowProps,jr=or.expanded,vo=or.rowSupportExpand,Vo=Me.useState(!1),ua=(0,We.Z)(Vo,2),oo=ua[0],Wo=ua[1];Me.useEffect(function(){jr&&Wo(!0)},[jr]);var Ta=Me.createElement(yi,(0,Ft.Z)({},Rr,{"data-row-key":Vn,className:ot()(et,"".concat(Vi,"-row"),"".concat(Vi,"-row-level-").concat(Xn),Rr==null?void 0:Rr.className),style:(0,dt.Z)((0,dt.Z)({},Ut),Rr==null?void 0:Rr.style)}),Ui.map(function(Ar,Fo){var ta=Ar.render,Sa=Ar.dataIndex,Pa=Ar.className,ao=ei(or,Ar,Fo,Xn,gn),ka=ao.key,Va=ao.fixedInfo,bs=ao.appendCellNode,us=ao.additionalCellProps;return Me.createElement(_n,(0,Ft.Z)({className:Pa,ellipsis:Ar.ellipsis,align:Ar.align,scope:Ar.rowScope,component:Ar.rowScope?mi:Jn,prefixCls:Vi,key:ka,record:Xt,index:gn,renderIndex:nn,dataIndex:Sa,render:ta,shouldCellUpdate:Ar.shouldCellUpdate},Va,{appendNode:bs,additionalProps:us}))})),uo;if(vo&&(oo||jr)){var To=ir(Xt,gn,Xn+1,jr),co=Jr&&Jr(Xt,gn,Xn);uo=Me.createElement(kn,{expanded:jr,className:ot()("".concat(Vi,"-expanded-row"),"".concat(Vi,"-expanded-row-level-").concat(Xn+1),co),prefixCls:Vi,component:yi,cellComponent:Jn,colSpan:Ui.length,isEmpty:!1},To)}return Me.createElement(Me.Fragment,null,Ta,uo)}Pi.displayName="BodyRow";var Hn=ve(Pi);function bn(rt){var et=rt.columnKey,Ut=rt.onColumnResize,Xt=Me.useRef();return Me.useEffect(function(){Xt.current&&Ut(et,Xt.current.offsetWidth)},[]),Me.createElement(Lt.Z,{data:et},Me.createElement("td",{ref:Xt,style:{padding:0,border:0,height:0}},Me.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function wi(rt){var et=rt.prefixCls,Ut=rt.columnsKey,Xt=rt.onColumnResize;return Me.createElement("tr",{"aria-hidden":"true",className:"".concat(et,"-measure-row"),style:{height:0,fontSize:0}},Me.createElement(Lt.Z.Collection,{onBatchResize:function(nn){nn.forEach(function(Vn){var jn=Vn.data,Xn=Vn.size;Xt(jn,Xn.offsetWidth)})}},Ut.map(function(gn){return Me.createElement(bn,{key:gn,columnKey:gn,onColumnResize:Xt})})))}function Zi(rt){var et=rt.data,Ut=rt.measureColumnWidth,Xt=$e(Le,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),gn=Xt.prefixCls,nn=Xt.getComponent,Vn=Xt.onColumnResize,jn=Xt.flattenColumns,Xn=Xt.getRowKey,yi=Xt.expandedKeys,Jn=Xt.childrenColumnName,mi=Xt.emptyNode,or=rn(et,Jn,yi,Xn),Vi=Me.useRef({renderWithProps:!1}),Ui=nn(["body","wrapper"],"tbody"),Jr=nn(["body","row"],"tr"),ir=nn(["body","cell"],"td"),Rr=nn(["body","cell"],"th"),jr;et.length?jr=or.map(function(Vo,ua){var oo=Vo.record,Wo=Vo.indent,Ta=Vo.index,uo=Xn(oo,ua);return Me.createElement(Hn,{key:uo,rowKey:uo,record:oo,index:ua,renderIndex:Ta,rowComponent:Jr,cellComponent:ir,scopeCellComponent:Rr,getRowKey:Xn,indent:Wo})}):jr=Me.createElement(kn,{expanded:!0,className:"".concat(gn,"-placeholder"),prefixCls:gn,component:Jr,cellComponent:ir,colSpan:jn.length,isEmpty:!0},mi);var vo=_t(jn);return Me.createElement(Dt.Provider,{value:Vi.current},Me.createElement(Ui,{className:"".concat(gn,"-tbody")},Ut&&Me.createElement(wi,{prefixCls:gn,columnsKey:vo,onColumnResize:Vn}),jr))}Zi.displayName="Body";var Hi=ve(Zi),rr=["expandable"],_r="RC_TABLE_INTERNAL_COL_DEFINE";function gi(rt){var et=rt.expandable,Ut=(0,be.Z)(rt,rr),Xt;return"expandable"in rt?Xt=(0,dt.Z)((0,dt.Z)({},Ut),et):Xt=Ut,Xt.showExpandColumn===!1&&(Xt.expandIconColumnIndex=-1),Xt}var di=["columnType"];function xi(rt){for(var et=rt.colWidths,Ut=rt.columns,Xt=rt.columCount,gn=[],nn=Xt||Ut.length,Vn=!1,jn=nn-1;jn>=0;jn-=1){var Xn=et[jn],yi=Ut&&Ut[jn],Jn=yi&&yi[_r];if(Xn||Jn||Vn){var mi=Jn||{},or=mi.columnType,Vi=(0,be.Z)(mi,di);gn.unshift(Me.createElement("col",(0,Ft.Z)({key:jn,style:{width:Xn}},Vi))),Vn=!0}}return Me.createElement("colgroup",null,gn)}var $i=xi,Ri=pe(19127),Kr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Sr(rt,et){return(0,Me.useMemo)(function(){for(var Ut=[],Xt=0;Xt<et;Xt+=1){var gn=rt[Xt];if(gn!==void 0)Ut[Xt]=gn;else return null}return Ut},[rt.join("_"),et])}var Ne=Me.forwardRef(function(rt,et){var Ut=rt.className,Xt=rt.noData,gn=rt.columns,nn=rt.flattenColumns,Vn=rt.colWidths,jn=rt.columCount,Xn=rt.stickyOffsets,yi=rt.direction,Jn=rt.fixHeader,mi=rt.stickyTopOffset,or=rt.stickyBottomOffset,Vi=rt.stickyClassName,Ui=rt.onScroll,Jr=rt.maxContentScroll,ir=rt.children,Rr=(0,be.Z)(rt,Kr),jr=$e(Le,["prefixCls","scrollbarSize","isSticky"]),vo=jr.prefixCls,Vo=jr.scrollbarSize,ua=jr.isSticky,oo=ua&&!Jn?0:Vo,Wo=Me.useRef(null),Ta=Me.useCallback(function(Pa){(0,lt.mH)(et,Pa),(0,lt.mH)(Wo,Pa)},[]);Me.useEffect(function(){var Pa;function ao(ka){var Va=ka,bs=Va.currentTarget,us=Va.deltaX;us&&(Ui({currentTarget:bs,scrollLeft:bs.scrollLeft+us}),ka.preventDefault())}return(Pa=Wo.current)===null||Pa===void 0||Pa.addEventListener("wheel",ao),function(){var ka;(ka=Wo.current)===null||ka===void 0||ka.removeEventListener("wheel",ao)}},[]);var uo=Me.useMemo(function(){return nn.every(function(Pa){return Pa.width})},[nn]),To=nn[nn.length-1],co={fixed:To?To.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(vo,"-cell-scrollbar")}}},Ar=(0,Me.useMemo)(function(){return oo?[].concat((0,Ri.Z)(gn),[co]):gn},[oo,gn]),Fo=(0,Me.useMemo)(function(){return oo?[].concat((0,Ri.Z)(nn),[co]):nn},[oo,nn]),ta=(0,Me.useMemo)(function(){var Pa=Xn.right,ao=Xn.left;return(0,dt.Z)((0,dt.Z)({},Xn),{},{left:yi==="rtl"?[].concat((0,Ri.Z)(ao.map(function(ka){return ka+oo})),[0]):ao,right:yi==="rtl"?Pa:[].concat((0,Ri.Z)(Pa.map(function(ka){return ka+oo})),[0]),isSticky:ua})},[oo,Xn,ua]),Sa=Sr(Vn,jn);return Me.createElement("div",{style:(0,dt.Z)({overflow:"hidden"},ua?{top:mi,bottom:or}:{}),ref:Ta,className:ot()(Ut,(0,He.Z)({},Vi,!!Vi))},Me.createElement("table",{style:{tableLayout:"fixed",visibility:Xt||Sa?null:"hidden"}},(!Xt||!Jr||uo)&&Me.createElement($i,{colWidths:Sa?[].concat((0,Ri.Z)(Sa),[oo]):[],columCount:jn+1,columns:Fo}),ir((0,dt.Z)((0,dt.Z)({},Rr),{},{stickyOffsets:ta,columns:Ar,flattenColumns:Fo}))))});Ne.displayName="FixedHolder";var Ci=Me.memo(Ne);function wr(rt){var et=rt.cells,Ut=rt.stickyOffsets,Xt=rt.flattenColumns,gn=rt.rowComponent,nn=rt.cellComponent,Vn=rt.tdCellComponent,jn=rt.onHeaderRow,Xn=rt.index,yi=$e(Le,["prefixCls","direction"]),Jn=yi.prefixCls,mi=yi.direction,or;jn&&(or=jn(et.map(function(Ui){return Ui.column}),Xn));var Vi=_t(et.map(function(Ui){return Ui.column}));return Me.createElement(gn,or,et.map(function(Ui,Jr){var ir=Ui.column,Rr=St(Ui.colStart,Ui.colEnd,Xt,Ut,mi,ir),jr;return ir&&ir.onHeaderCell&&(jr=Ui.column.onHeaderCell(ir)),Me.createElement(_n,(0,Ft.Z)({},Ui,{scope:ir.title?Ui.colSpan>1?"colgroup":"col":null,ellipsis:ir.ellipsis,align:ir.align,component:ir.title?nn:Vn,prefixCls:Jn,key:Vi[Jr]},Rr,{additionalProps:jr,rowType:"header"}))}))}wr.displayName="HeaderRow";var Pn=wr;function Si(rt){var et=[];function Ut(Vn,jn){var Xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;et[Xn]=et[Xn]||[];var yi=jn,Jn=Vn.filter(Boolean).map(function(mi){var or={key:mi.key,className:mi.className||"",children:mi.title,column:mi,colStart:yi},Vi=1,Ui=mi.children;return Ui&&Ui.length>0&&(Vi=Ut(Ui,yi,Xn+1).reduce(function(Jr,ir){return Jr+ir},0),or.hasSubColumns=!0),"colSpan"in mi&&(Vi=mi.colSpan),"rowSpan"in mi&&(or.rowSpan=mi.rowSpan),or.colSpan=Vi,or.colEnd=or.colStart+Vi-1,et[Xn].push(or),yi+=Vi,Vi});return Jn}Ut(rt,0);for(var Xt=et.length,gn=function(jn){et[jn].forEach(function(Xn){!("rowSpan"in Xn)&&!Xn.hasSubColumns&&(Xn.rowSpan=Xt-jn)})},nn=0;nn<Xt;nn+=1)gn(nn);return et}function Wi(rt){var et=rt.stickyOffsets,Ut=rt.columns,Xt=rt.flattenColumns,gn=rt.onHeaderRow,nn=$e(Le,["prefixCls","getComponent"]),Vn=nn.prefixCls,jn=nn.getComponent,Xn=Me.useMemo(function(){return Si(Ut)},[Ut]),yi=jn(["header","wrapper"],"thead"),Jn=jn(["header","row"],"tr"),mi=jn(["header","cell"],"th"),or=jn(["header","cell"],"td");return Me.createElement(yi,{className:"".concat(Vn,"-thead")},Xn.map(function(Vi,Ui){var Jr=Me.createElement(Pn,{key:Ui,flattenColumns:Xt,cells:Vi,stickyOffsets:et,rowComponent:Jn,cellComponent:mi,tdCellComponent:or,onHeaderRow:gn,index:Ui});return Jr}))}var qi=ve(Wi),$n=pe(11592);function qn(rt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof et=="number"?et:et.endsWith("%")?rt*parseFloat(et)/100:null}function Zt(rt,et){return Me.useMemo(function(){if(et&&et>0){var Ut=0,Xt=0;rt.forEach(function(yi){var Jn=qn(et,yi.width);Jn?Ut+=Jn:Xt+=1});var gn=et-Ut,nn=Xt,Vn=gn/Xt,jn=0,Xn=rt.map(function(yi){var Jn=(0,dt.Z)({},yi),mi=qn(et,Jn.width);if(mi)Jn.width=mi;else{var or=Math.floor(Vn);Jn.width=nn===1?gn:or,gn-=or,nn-=1}return jn+=Jn.width,Jn});return[Xn,jn]}return[rt,et]},[rt,et])}var $t=["children"],Qe=["fixed"];function on(rt){return(0,$n.Z)(rt).filter(function(et){return Me.isValidElement(et)}).map(function(et){var Ut=et.key,Xt=et.props,gn=Xt.children,nn=(0,be.Z)(Xt,$t),Vn=(0,dt.Z)({key:Ut},nn);return gn&&(Vn.children=on(gn)),Vn})}function cn(rt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return rt.filter(function(Ut){return Ut&&(0,Ye.Z)(Ut)==="object"}).reduce(function(Ut,Xt,gn){var nn=Xt.fixed,Vn=nn===!0?"left":nn,jn="".concat(et,"-").concat(gn),Xn=Xt.children;return Xn&&Xn.length>0?[].concat((0,Ri.Z)(Ut),(0,Ri.Z)(cn(Xn,jn).map(function(yi){return(0,dt.Z)({fixed:Vn},yi)}))):[].concat((0,Ri.Z)(Ut),[(0,dt.Z)((0,dt.Z)({key:jn},Xt),{},{fixed:Vn})])},[])}function At(rt){for(var et=!0,Ut=0;Ut<rt.length;Ut+=1){var Xt=rt[Ut];if(et&&Xt.fixed!=="left")et=!1;else if(!et&&Xt.fixed==="left"){warning(!1,"Index ".concat(Ut-1," of `columns` missing `fixed='left'` prop."));break}}for(var gn=!0,nn=rt.length-1;nn>=0;nn-=1){var Vn=rt[nn];if(gn&&Vn.fixed!=="right")gn=!1;else if(!gn&&Vn.fixed==="right"){warning(!1,"Index ".concat(nn+1," of `columns` missing `fixed='right'` prop."));break}}}function ht(rt){return rt.map(function(et){var Ut=et.fixed,Xt=(0,be.Z)(et,Qe),gn=Ut;return Ut==="left"?gn="right":Ut==="right"&&(gn="left"),(0,dt.Z)({fixed:gn},Xt)})}function en(rt,et){var Ut=rt.prefixCls,Xt=rt.columns,gn=rt.children,nn=rt.expandable,Vn=rt.expandedKeys,jn=rt.columnTitle,Xn=rt.getRowKey,yi=rt.onTriggerExpand,Jn=rt.expandIcon,mi=rt.rowExpandable,or=rt.expandIconColumnIndex,Vi=rt.direction,Ui=rt.expandRowByClick,Jr=rt.columnWidth,ir=rt.fixed,Rr=rt.scrollWidth,jr=Me.useMemo(function(){return Xt||on(gn)},[Xt,gn]),vo=Me.useMemo(function(){if(nn){var To,co=jr.slice();if(!co.includes(le)){var Ar=or||0;Ar>=0&&co.splice(Ar,0,le)}var Fo=co.indexOf(le);co=co.filter(function(ao,ka){return ao!==le||ka===Fo});var ta=jr[Fo],Sa;(ir==="left"||ir)&&!or?Sa="left":(ir==="right"||ir)&&or===jr.length?Sa="right":Sa=ta?ta.fixed:null;var Pa=(To={},(0,He.Z)(To,_r,{className:"".concat(Ut,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,He.Z)(To,"title",jn),(0,He.Z)(To,"fixed",Sa),(0,He.Z)(To,"className","".concat(Ut,"-row-expand-icon-cell")),(0,He.Z)(To,"width",Jr),(0,He.Z)(To,"render",function(ka,Va,bs){var us=Xn(Va,bs),qs=Vn.has(us),Ls=mi?mi(Va):!0,Za=Jn({prefixCls:Ut,expanded:qs,expandable:Ls,record:Va,onExpand:yi});return Ui?Me.createElement("span",{onClick:function(fs){return fs.stopPropagation()}},Za):Za}),To);return co.map(function(ao){return ao===le?Pa:ao})}return jr.filter(function(ao){return ao!==le})},[nn,jr,Xn,Vn,Jn,Vi]),Vo=Me.useMemo(function(){var To=vo;return et&&(To=et(To)),To.length||(To=[{render:function(){return null}}]),To},[et,vo,Vi]),ua=Me.useMemo(function(){return Vi==="rtl"?ht(cn(Vo)):cn(Vo)},[Vo,Vi,Rr]),oo=Zt(ua,Rr),Wo=(0,We.Z)(oo,2),Ta=Wo[0],uo=Wo[1];return[Vo,Ta,uo]}var fn=en;function Rn(rt){var et,Ut=rt.prefixCls,Xt=rt.record,gn=rt.onExpand,nn=rt.expanded,Vn=rt.expandable,jn="".concat(Ut,"-row-expand-icon");if(!Vn)return Me.createElement("span",{className:ot()(jn,"".concat(Ut,"-row-spaced"))});var Xn=function(Jn){gn(Xt,Jn),Jn.stopPropagation()};return Me.createElement("span",{className:ot()(jn,(et={},(0,He.Z)(et,"".concat(Ut,"-row-expanded"),nn),(0,He.Z)(et,"".concat(Ut,"-row-collapsed"),!nn),et)),onClick:Xn})}function Qn(rt,et,Ut){var Xt=[];function gn(nn){(nn||[]).forEach(function(Vn,jn){Xt.push(et(Vn,jn)),gn(Vn[Ut])})}return gn(rt),Xt}function Et(rt,et,Ut){var Xt=gi(rt),gn=Xt.expandIcon,nn=Xt.expandedRowKeys,Vn=Xt.defaultExpandedRowKeys,jn=Xt.defaultExpandAllRows,Xn=Xt.expandedRowRender,yi=Xt.onExpand,Jn=Xt.onExpandedRowsChange,mi=Xt.childrenColumnName,or=gn||Rn,Vi=mi||"children",Ui=Me.useMemo(function(){return Xn?"row":rt.expandable&&rt.internalHooks===ke&&rt.expandable.__PARENT_RENDER_ICON__||et.some(function(ua){return ua&&(0,Ye.Z)(ua)==="object"&&ua[Vi]})?"nest":!1},[!!Xn,et]),Jr=Me.useState(function(){return Vn||(jn?Qn(et,Ut,Vi):[])}),ir=(0,We.Z)(Jr,2),Rr=ir[0],jr=ir[1],vo=Me.useMemo(function(){return new Set(nn||Rr||[])},[nn,Rr]),Vo=Me.useCallback(function(ua){var oo=Ut(ua,et.indexOf(ua)),Wo,Ta=vo.has(oo);Ta?(vo.delete(oo),Wo=(0,Ri.Z)(vo)):Wo=[].concat((0,Ri.Z)(vo),[oo]),jr(Wo),yi&&yi(!Ta,ua),Jn&&Jn(Wo)},[Ut,vo,et,yi,Jn]);return[Xt,Ui,vo,or,Vi,Vo]}function wn(rt,et,Ut,Xt){var gn=rt.map(function(nn,Vn){return St(Vn,Vn,rt,et,Ut,Xt==null?void 0:Xt[Vn])});return(0,Tt.Z)(function(){return gn},[gn],function(nn,Vn){return!(0,Ue.Z)(nn,Vn)})}function Kn(rt){var et=(0,Me.useRef)(rt),Ut=(0,Me.useState)({}),Xt=(0,We.Z)(Ut,2),gn=Xt[1],nn=(0,Me.useRef)(null),Vn=(0,Me.useRef)([]);function jn(Xn){Vn.current.push(Xn);var yi=Promise.resolve();nn.current=yi,yi.then(function(){if(nn.current===yi){var Jn=Vn.current,mi=et.current;Vn.current=[],Jn.forEach(function(or){et.current=or(et.current)}),nn.current=null,mi!==et.current&&gn({})}})}return(0,Me.useEffect)(function(){return function(){nn.current=null}},[]),[et.current,jn]}function Ei(rt){var et=(0,Me.useRef)(rt||null),Ut=(0,Me.useRef)();function Xt(){window.clearTimeout(Ut.current)}function gn(Vn){et.current=Vn,Xt(),Ut.current=window.setTimeout(function(){et.current=null,Ut.current=void 0},100)}function nn(){return et.current}return(0,Me.useEffect)(function(){return Xt},[]),[gn,nn]}function tn(){var rt=Me.useState(-1),et=(0,We.Z)(rt,2),Ut=et[0],Xt=et[1],gn=Me.useState(-1),nn=(0,We.Z)(gn,2),Vn=nn[0],jn=nn[1],Xn=Me.useCallback(function(yi,Jn){Xt(yi),jn(Jn)},[]);return[Ut,Vn,Xn]}var sn=pe(47273),In=(0,sn.Z)()?window:null;function Oi(rt,et){var Ut=(0,Ye.Z)(rt)==="object"?rt:{},Xt=Ut.offsetHeader,gn=Xt===void 0?0:Xt,nn=Ut.offsetSummary,Vn=nn===void 0?0:nn,jn=Ut.offsetScroll,Xn=jn===void 0?0:jn,yi=Ut.getContainer,Jn=yi===void 0?function(){return In}:yi,mi=Jn()||In;return Me.useMemo(function(){var or=!!rt;return{isSticky:or,stickyClassName:or?"".concat(et,"-sticky-holder"):"",offsetHeader:gn,offsetSummary:Vn,offsetScroll:Xn,container:mi}},[Xn,gn,Vn,et,mi])}function Di(rt,et,Ut){var Xt=(0,Me.useMemo)(function(){for(var gn=[],nn=[],Vn=0,jn=0,Xn=0;Xn<et;Xn+=1)if(Ut==="rtl"){nn[Xn]=jn,jn+=rt[Xn]||0;var yi=et-Xn-1;gn[yi]=Vn,Vn+=rt[yi]||0}else{gn[Xn]=Vn,Vn+=rt[Xn]||0;var Jn=et-Xn-1;nn[Jn]=jn,jn+=rt[Jn]||0}return{left:gn,right:nn}},[rt,et,Ut]);return Xt}var vi=Di;function Ti(rt){var et=rt.className,Ut=rt.children;return Me.createElement("div",{className:et},Ut)}var Li=Ti,sr=pe(8224),Zr=pe(55468),Vr=function(et,Ut){var Xt,gn,nn=et.scrollBodyRef,Vn=et.onScroll,jn=et.offsetScroll,Xn=et.container,yi=$e(Le,"prefixCls"),Jn=((Xt=nn.current)===null||Xt===void 0?void 0:Xt.scrollWidth)||0,mi=((gn=nn.current)===null||gn===void 0?void 0:gn.clientWidth)||0,or=Jn&&mi*(mi/Jn),Vi=Me.useRef(),Ui=Kn({scrollLeft:0,isHiddenScrollBar:!1}),Jr=(0,We.Z)(Ui,2),ir=Jr[0],Rr=Jr[1],jr=Me.useRef({delta:0,x:0}),vo=Me.useState(!1),Vo=(0,We.Z)(vo,2),ua=Vo[0],oo=Vo[1],Wo=function(){oo(!1)},Ta=function(Fo){Fo.persist(),jr.current.delta=Fo.pageX-ir.scrollLeft,jr.current.x=0,oo(!0),Fo.preventDefault()},uo=function(Fo){var ta,Sa=Fo||((ta=window)===null||ta===void 0?void 0:ta.event),Pa=Sa.buttons;if(!ua||Pa===0){ua&&oo(!1);return}var ao=jr.current.x+Fo.pageX-jr.current.x-jr.current.delta;ao<=0&&(ao=0),ao+or>=mi&&(ao=mi-or),Vn({scrollLeft:ao/mi*(Jn+2)}),jr.current.x=Fo.pageX},To=function(){if(nn.current){var Fo=(0,Zr.os)(nn.current).top,ta=Fo+nn.current.offsetHeight,Sa=Xn===window?document.documentElement.scrollTop+window.innerHeight:(0,Zr.os)(Xn).top+Xn.clientHeight;ta-(0,Gt.Z)()<=Sa||Fo>=Sa-jn?Rr(function(Pa){return(0,dt.Z)((0,dt.Z)({},Pa),{},{isHiddenScrollBar:!0})}):Rr(function(Pa){return(0,dt.Z)((0,dt.Z)({},Pa),{},{isHiddenScrollBar:!1})})}},co=function(Fo){Rr(function(ta){return(0,dt.Z)((0,dt.Z)({},ta),{},{scrollLeft:Fo/Jn*mi||0})})};return Me.useImperativeHandle(Ut,function(){return{setScrollLeft:co}}),Me.useEffect(function(){var Ar=(0,sr.Z)(document.body,"mouseup",Wo,!1),Fo=(0,sr.Z)(document.body,"mousemove",uo,!1);return To(),function(){Ar.remove(),Fo.remove()}},[or,ua]),Me.useEffect(function(){var Ar=(0,sr.Z)(Xn,"scroll",To,!1),Fo=(0,sr.Z)(window,"resize",To,!1);return function(){Ar.remove(),Fo.remove()}},[Xn]),Me.useEffect(function(){ir.isHiddenScrollBar||Rr(function(Ar){var Fo=nn.current;return Fo?(0,dt.Z)((0,dt.Z)({},Ar),{},{scrollLeft:Fo.scrollLeft/Fo.scrollWidth*Fo.clientWidth}):Ar})},[ir.isHiddenScrollBar]),Jn<=mi||!or||ir.isHiddenScrollBar?null:Me.createElement("div",{style:{height:(0,Gt.Z)(),width:mi,bottom:jn},className:"".concat(yi,"-sticky-scroll")},Me.createElement("div",{onMouseDown:Ta,ref:Vi,className:ot()("".concat(yi,"-sticky-scroll-bar"),(0,He.Z)({},"".concat(yi,"-sticky-scroll-bar-active"),ua)),style:{width:"".concat(or,"px"),transform:"translate3d(".concat(ir.scrollLeft,"px, 0, 0)")}}))},Tn=Me.forwardRef(Vr);function Po(rt){return null}var Xr=Po;function Cr(rt){return null}var Cn=Cr,ri="rc-table",Yi=[],yr={};function er(){return"No Data"}function Fr(rt){var et,Ut=(0,dt.Z)({rowKey:"key",prefixCls:ri,emptyText:er},rt),Xt=Ut.prefixCls,gn=Ut.className,nn=Ut.rowClassName,Vn=Ut.style,jn=Ut.data,Xn=Ut.rowKey,yi=Ut.scroll,Jn=Ut.tableLayout,mi=Ut.direction,or=Ut.title,Vi=Ut.footer,Ui=Ut.summary,Jr=Ut.caption,ir=Ut.id,Rr=Ut.showHeader,jr=Ut.components,vo=Ut.emptyText,Vo=Ut.onRow,ua=Ut.onHeaderRow,oo=Ut.internalHooks,Wo=Ut.transformColumns,Ta=Ut.internalRefs,uo=Ut.tailor,To=Ut.sticky,co=jn||Yi,Ar=!!co.length,Fo=oo===ke,ta=Me.useCallback(function(gs,Js){return(0,xt.Z)(jr,gs)||Js},[jr]),Sa=Me.useMemo(function(){return typeof Xn=="function"?Xn:function(gs){var Js=gs&&gs[Xn];return Js}},[Xn]),Pa=ta(["body"]),ao=tn(),ka=(0,We.Z)(ao,3),Va=ka[0],bs=ka[1],us=ka[2],qs=Et(Ut,co,Sa),Ls=(0,We.Z)(qs,6),Za=Ls[0],aa=Ls[1],fs=Ls[2],el=Ls[3],Ws=Ls[4],cl=Ls[5],ba=yi==null?void 0:yi.x,da=Me.useState(0),wa=(0,We.Z)(da,2),Xo=wa[0],Ps=wa[1],Uo=fn((0,dt.Z)((0,dt.Z)((0,dt.Z)({},Ut),Za),{},{expandable:!!Za.expandedRowRender,columnTitle:Za.columnTitle,expandedKeys:fs,getRowKey:Sa,onTriggerExpand:cl,expandIcon:el,expandIconColumnIndex:Za.expandIconColumnIndex,direction:mi,scrollWidth:Fo&&uo&&typeof ba=="number"?ba:null}),Fo?Wo:null),Ra=(0,We.Z)(Uo,3),ss=Ra[0],cs=Ra[1],Al=Ra[2],bl=Al!=null?Al:ba,Vl=Me.useMemo(function(){return{columns:ss,flattenColumns:cs}},[ss,cs]),Fs=Me.useRef(),Zl=Me.useRef(),dl=Me.useRef(),Fl=Me.useRef(),_c=Me.useRef(),Bs=Me.useState(!1),Ts=(0,We.Z)(Bs,2),Ms=Ts[0],Gs=Ts[1],pl=Me.useState(!1),is=(0,We.Z)(pl,2),js=is[0],Dl=is[1],Ul=Kn(new Map),Gu=(0,We.Z)(Ul,2),Du=Gu[0],ml=Gu[1],Iu=_t(cs),Ou=Iu.map(function(gs){return Du.get(gs)}),Ns=Me.useMemo(function(){return Ou},[Ou.join("_")]),Hl=vi(Ns,cs.length,mi),$s=yi&&vn(yi.y),zs=yi&&vn(bl)||!!Za.fixed,$u=zs&&cs.some(function(gs){var Js=gs.fixed;return Js}),Vc=Me.useRef(),sc=Oi(To,Xt),lc=sc.isSticky,Ku=sc.offsetHeader,Tu=sc.offsetSummary,ws=sc.offsetScroll,Ys=sc.stickyClassName,vl=sc.container,Xs=Me.useMemo(function(){return Ui==null?void 0:Ui(co)},[Ui,co]),ms=($s||lc)&&Me.isValidElement(Xs)&&Xs.type===xe&&Xs.props.fixed,yl,Su,xc;$s&&(Su={overflowY:"scroll",maxHeight:yi.y}),zs&&(yl={overflowX:"auto"},$s||(Su={overflowY:"hidden"}),xc={width:bl===!0?"auto":bl,minWidth:"100%"});var jd=Me.useCallback(function(gs,Js){(0,Bt.Z)(Fs.current)&&ml(function(nu){if(nu.get(gs)!==Js){var uc=new Map(nu);return uc.set(gs,Js),uc}return nu})},[]),dn=Ei(null),sd=(0,We.Z)(dn,2),Bc=sd[0],df=sd[1];function zd(gs,Js){Js&&(typeof Js=="function"?Js(gs):Js.scrollLeft!==gs&&(Js.scrollLeft=gs,Js.scrollLeft!==gs&&setTimeout(function(){Js.scrollLeft=gs},0)))}var Zd=(0,ut.Z)(function(gs){var Js=gs.currentTarget,nu=gs.scrollLeft,uc=mi==="rtl",cc=typeof nu=="number"?nu:Js.scrollLeft,$d=Js||yr;if(!df()||df()===$d){var cd;Bc($d),zd(cc,Zl.current),zd(cc,dl.current),zd(cc,_c.current),zd(cc,(cd=Vc.current)===null||cd===void 0?void 0:cd.setScrollLeft)}var vh=Js||Zl.current;if(vh){var Sc=vh.scrollWidth,Yc=vh.clientWidth;if(Sc===Yc){Gs(!1),Dl(!1);return}uc?(Gs(-cc<Sc-Yc),Dl(-cc>0)):(Gs(cc>0),Dl(cc<Sc-Yc))}}),Rh=function(){zs&&dl.current?Zd({currentTarget:dl.current}):(Gs(!1),Dl(!1))},Qg=function(Js){var nu=Js.width;nu!==Xo&&(Rh(),Ps(Fs.current?Fs.current.offsetWidth:nu))},Bl=Me.useRef(!1);Me.useEffect(function(){Bl.current&&Rh()},[zs,jn,ss.length]),Me.useEffect(function(){Bl.current=!0},[]);var dh=Me.useState(0),Hd=(0,We.Z)(dh,2),hh=Hd[0],hf=Hd[1],Hf=Me.useState(!0),fh=(0,We.Z)(Hf,2),gh=fh[0],Vu=fh[1];Me.useEffect(function(){(!uo||!Fo)&&(dl.current instanceof Element?hf((0,Gt.o)(dl.current).width):hf((0,Gt.o)(Fl.current).width)),Vu((0,ft.G)("position","sticky"))},[]),Me.useEffect(function(){Fo&&Ta&&(Ta.body.current=dl.current)});var Wd=Me.useCallback(function(gs){return Me.createElement(Me.Fragment,null,Me.createElement(qi,gs),ms==="top"&&Me.createElement(Mt,gs,Xs))},[ms,Xs]),ff=Me.useCallback(function(gs){return Me.createElement(Mt,gs,Xs)},[Xs]),Mc=ta(["table"],"table"),ld=Me.useMemo(function(){return Jn||($u?bl==="max-content"?"auto":"fixed":$s||lc||cs.some(function(gs){var Js=gs.ellipsis;return Js})?"fixed":"auto")},[$s,$u,cs,Jn,lc]),Gd,Bd={colWidths:Ns,columCount:cs.length,stickyOffsets:Hl,onHeaderRow:ua,fixHeader:$s,scroll:yi},Pu=Me.useMemo(function(){return Ar?null:typeof vo=="function"?vo():vo},[Ar,vo]),Md=Me.createElement(Hi,{data:co,measureColumnWidth:$s||zs||lc}),_h=Me.createElement($i,{colWidths:cs.map(function(gs){var Js=gs.width;return Js}),columns:cs}),ku=Jr!=null?Me.createElement("caption",{className:"".concat(Xt,"-caption")},Jr):void 0,Uc=(0,Sn.Z)(Ut,{data:!0}),ph=(0,Sn.Z)(Ut,{aria:!0});if($s||lc){var mh;typeof Pa=="function"?(mh=Pa(co,{scrollbarSize:hh,ref:dl,onScroll:Zd}),Bd.colWidths=cs.map(function(gs,Js){var nu=gs.width,uc=Js===cs.length-1?nu-hh:nu;return typeof uc=="number"&&!Number.isNaN(uc)?uc:0})):mh=Me.createElement("div",{style:(0,dt.Z)((0,dt.Z)({},yl),Su),onScroll:Zd,ref:dl,className:ot()("".concat(Xt,"-body"))},Me.createElement(Mc,(0,Ft.Z)({style:(0,dt.Z)((0,dt.Z)({},xc),{},{tableLayout:ld})},ph),ku,_h,Md,!ms&&Xs&&Me.createElement(Mt,{stickyOffsets:Hl,flattenColumns:cs,columns:ss},Xs)));var ud=(0,dt.Z)((0,dt.Z)((0,dt.Z)({noData:!co.length,maxContentScroll:zs&&bl==="max-content"},Bd),Vl),{},{direction:mi,stickyClassName:Ys,onScroll:Zd});Gd=Me.createElement(Me.Fragment,null,Rr!==!1&&Me.createElement(Ci,(0,Ft.Z)({},ud,{stickyTopOffset:Ku,className:"".concat(Xt,"-header"),ref:Zl}),Wd),mh,ms&&ms!=="top"&&Me.createElement(Ci,(0,Ft.Z)({},ud,{stickyBottomOffset:Tu,className:"".concat(Xt,"-summary"),ref:_c}),ff),lc&&Me.createElement(Tn,{ref:Vc,offsetScroll:ws,scrollBodyRef:dl,onScroll:Zd,container:vl}))}else Gd=Me.createElement("div",{style:(0,dt.Z)((0,dt.Z)({},yl),Su),className:ot()("".concat(Xt,"-content")),onScroll:Zd,ref:dl},Me.createElement(Mc,(0,Ft.Z)({style:(0,dt.Z)((0,dt.Z)({},xc),{},{tableLayout:ld})},ph),ku,_h,Rr!==!1&&Me.createElement(qi,(0,Ft.Z)({},Bd,Vl)),Md,Xs&&Me.createElement(Mt,{stickyOffsets:Hl,flattenColumns:cs,columns:ss},Xs)));var lu=Me.createElement("div",(0,Ft.Z)({className:ot()(Xt,gn,(et={},(0,He.Z)(et,"".concat(Xt,"-rtl"),mi==="rtl"),(0,He.Z)(et,"".concat(Xt,"-ping-left"),Ms),(0,He.Z)(et,"".concat(Xt,"-ping-right"),js),(0,He.Z)(et,"".concat(Xt,"-layout-fixed"),Jn==="fixed"),(0,He.Z)(et,"".concat(Xt,"-fixed-header"),$s),(0,He.Z)(et,"".concat(Xt,"-fixed-column"),$u),(0,He.Z)(et,"".concat(Xt,"-scroll-horizontal"),zs),(0,He.Z)(et,"".concat(Xt,"-has-fix-left"),cs[0]&&cs[0].fixed),(0,He.Z)(et,"".concat(Xt,"-has-fix-right"),cs[cs.length-1]&&cs[cs.length-1].fixed==="right"),et)),style:Vn,id:ir,ref:Fs},Uc),or&&Me.createElement(Li,{className:"".concat(Xt,"-title")},or(co)),Me.createElement("div",{ref:Fl,className:"".concat(Xt,"-container")},Gd),Vi&&Me.createElement(Li,{className:"".concat(Xt,"-footer")},Vi(co)));zs&&(lu=Me.createElement(Lt.Z,{onResize:Qg},lu));var jh=wn(cs,Hl,mi,ss),Ml=Me.useMemo(function(){return{scrollX:bl,prefixCls:Xt,getComponent:ta,scrollbarSize:hh,direction:mi,fixedInfoList:jh,isSticky:lc,supportSticky:gh,componentWidth:Xo,fixHeader:$s,fixColumn:$u,horizonScroll:zs,tableLayout:ld,rowClassName:nn,expandedRowClassName:Za.expandedRowClassName,expandIcon:el,expandableType:aa,expandRowByClick:Za.expandRowByClick,expandedRowRender:Za.expandedRowRender,onTriggerExpand:cl,expandIconColumnIndex:Za.expandIconColumnIndex,indentSize:Za.indentSize,allColumnsFixedLeft:cs.every(function(gs){return gs.fixed==="left"}),emptyNode:Pu,columns:ss,flattenColumns:cs,onColumnResize:jd,hoverStartRow:Va,hoverEndRow:bs,onHover:us,rowExpandable:Za.rowExpandable,onRow:Vo,getRowKey:Sa,expandedKeys:fs,childrenColumnName:Ws}},[bl,Xt,ta,hh,mi,jh,lc,gh,Xo,$s,$u,zs,ld,nn,Za.expandedRowClassName,el,aa,Za.expandRowByClick,Za.expandedRowRender,cl,Za.expandIconColumnIndex,Za.indentSize,Pu,ss,cs,jd,Va,bs,us,Za.rowExpandable,Vo,Sa,fs,Ws]);return Me.createElement(Le.Provider,{value:Ml},lu)}function Ur(rt){return he(Fr,rt)}var zr=Ur();zr.EXPAND_COLUMN=le,zr.INTERNAL_HOOKS=ke,zr.Column=Xr,zr.ColumnGroup=Cn,zr.Summary=at;var Tr=zr,Yr=pe(24916),Un=wt(null),Ho=wt(null);function Yn(rt,et,Ut){var Xt=et||1;return Ut[rt+Xt]-(Ut[rt]||0)}function Ao(rt){var et=rt.rowInfo,Ut=rt.column,Xt=rt.colIndex,gn=rt.indent,nn=rt.index,Vn=rt.renderIndex,jn=rt.record,Xn=rt.style,yi=rt.className,Jn=rt.inverse,mi=rt.getHeight,or=Ut.render,Vi=Ut.dataIndex,Ui=Ut.className,Jr=Ut.width,ir=$e(Ho,["columnsOffset"]),Rr=ir.columnsOffset,jr=ei(et,Ut,Xt,gn,nn),vo=jr.key,Vo=jr.fixedInfo,ua=jr.appendCellNode,oo=jr.additionalCellProps,Wo=oo.style,Ta=oo.colSpan,uo=Ta===void 0?1:Ta,To=oo.rowSpan,co=To===void 0?1:To,Ar=Xt-1,Fo=Yn(Ar,uo,Rr),ta=uo>1?Jr-Fo:0,Sa=(0,dt.Z)((0,dt.Z)((0,dt.Z)({},Wo),Xn),{},{flex:"0 0 ".concat(Fo,"px"),width:"".concat(Fo,"px"),marginRight:ta,pointerEvents:"auto"}),Pa=Me.useMemo(function(){return Jn?co<=1:uo===0||co===0||co>1},[co,uo,Jn]);Pa?Sa.visibility="hidden":Jn&&(Sa.height=mi==null?void 0:mi(co));var ao=Pa?function(){return null}:or,ka={};return(co===0||uo===0)&&(ka.rowSpan=1,ka.colSpan=1),Me.createElement(_n,(0,Ft.Z)({className:ot()(Ui,yi),ellipsis:Ut.ellipsis,align:Ut.align,scope:Ut.rowScope,component:"div",prefixCls:et.prefixCls,key:vo,record:jn,index:nn,renderIndex:Vn,dataIndex:Vi,render:ao,shouldCellUpdate:Ut.shouldCellUpdate},Vo,{appendNode:ua,additionalProps:(0,dt.Z)((0,dt.Z)({},oo),{},{style:Sa},ka)}))}var Qo=Ao,nr=["data","index","className","rowKey","style","extra","getHeight"],qo=Me.forwardRef(function(rt,et){var Ut=rt.data,Xt=rt.index,gn=rt.className,nn=rt.rowKey,Vn=rt.style,jn=rt.extra,Xn=rt.getHeight,yi=(0,be.Z)(rt,nr),Jn=Ut.record,mi=Ut.indent,or=Ut.index,Vi=$e(Le,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Ui=Vi.scrollX,Jr=Vi.flattenColumns,ir=Vi.prefixCls,Rr=Vi.fixColumn,jr=Vi.componentWidth,vo=mn(Jn,nn,Xt,mi),Vo=vo.rowSupportExpand,ua=vo.expanded,oo=vo.rowProps,Wo=vo.expandedRowRender,Ta=vo.expandedRowClassName,uo;if(Vo&&ua){var To=Wo(Jn,Xt,mi+1,ua),co=Ta==null?void 0:Ta(Jn,Xt,mi),Ar={};Rr&&(Ar={style:(0,He.Z)({},"--virtual-width","".concat(jr,"px"))});var Fo="".concat(ir,"-expanded-row-cell");uo=Me.createElement("div",{className:ot()("".concat(ir,"-expanded-row"),"".concat(ir,"-expanded-row-level-").concat(mi+1),co)},Me.createElement(_n,{component:"div",prefixCls:ir,className:ot()(Fo,(0,He.Z)({},"".concat(Fo,"-fixed"),Rr)),additionalProps:Ar},To))}var ta=(0,dt.Z)((0,dt.Z)({},Vn),{},{width:Ui});jn&&(ta.position="absolute",ta.pointerEvents="none");var Sa=Me.createElement("div",(0,Ft.Z)({},oo,yi,{ref:Vo?null:et,className:ot()(gn,"".concat(ir,"-row"),oo==null?void 0:oo.className,(0,He.Z)({},"".concat(ir,"-row-extra"),jn)),style:(0,dt.Z)((0,dt.Z)({},ta),oo==null?void 0:oo.style)}),Jr.map(function(Pa,ao){return Me.createElement(Qo,{key:ao,rowInfo:vo,column:Pa,colIndex:ao,indent:mi,index:Xt,renderIndex:or,record:Jn,inverse:jn,getHeight:Xn})}));return Vo?Me.createElement("div",{ref:et},Sa,uo):Sa}),Go=ve(qo),Lr=Go,br=Me.forwardRef(function(rt,et){var Ut=rt.data,Xt=rt.onScroll,gn=$e(Le,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),nn=gn.flattenColumns,Vn=gn.onColumnResize,jn=gn.getRowKey,Xn=gn.expandedKeys,yi=gn.prefixCls,Jn=gn.childrenColumnName,mi=gn.emptyNode,or=gn.scrollX,Vi=$e(Un),Ui=Vi.scrollY,Jr=Vi.listItemHeight,ir=Me.useRef(),Rr=rn(Ut,Jn,Xn,jn),jr=Me.useMemo(function(){var uo=0;return nn.map(function(To){var co=To.width,Ar=To.key;return uo+=co,[Ar,co,uo]})},[nn]),vo=Me.useMemo(function(){return jr.map(function(uo){return uo[2]})},[jr]);Me.useEffect(function(){jr.forEach(function(uo){var To=(0,We.Z)(uo,2),co=To[0],Ar=To[1];Vn(co,Ar)})},[jr]),Me.useImperativeHandle(et,function(){var uo={};return Object.defineProperty(uo,"scrollLeft",{get:function(){var co;return((co=ir.current)===null||co===void 0?void 0:co.getScrollInfo().x)||0},set:function(co){var Ar;(Ar=ir.current)===null||Ar===void 0||Ar.scrollTo({left:co})}}),uo});var Vo=function(To,co){var Ar,Fo=(Ar=Rr[co])===null||Ar===void 0?void 0:Ar.record,ta=To.onCell;if(ta){var Sa,Pa=ta(Fo,co);return(Sa=Pa==null?void 0:Pa.rowSpan)!==null&&Sa!==void 0?Sa:1}return 1},ua=function(To){var co=To.start,Ar=To.end,Fo=To.getSize,ta=To.offsetY;if(Ar<0)return null;for(var Sa=nn.filter(function(ba){return Vo(ba,co)===0}),Pa=co,ao=function(da){if(Sa=Sa.filter(function(wa){return Vo(wa,da)===0}),!Sa.length)return Pa=da,"break"},ka=co;ka>=0;ka-=1){var Va=ao(ka);if(Va==="break")break}for(var bs=nn.filter(function(ba){return Vo(ba,Ar)!==1}),us=Ar,qs=function(da){if(bs=bs.filter(function(wa){return Vo(wa,da)!==1}),!bs.length)return us=Math.max(da-1,Ar),"break"},Ls=Ar;Ls<Rr.length;Ls+=1){var Za=qs(Ls);if(Za==="break")break}for(var aa=[],fs=function(da){var wa=Rr[da];if(!wa)return"continue";nn.some(function(Xo){return Vo(Xo,da)>1})&&aa.push(da)},el=Pa;el<=us;el+=1)var Ws=fs(el);var cl=aa.map(function(ba){var da=Rr[ba],wa=jn(da.record,ba),Xo=function(Ra){var ss=ba+Ra-1,cs=jn(Rr[ss].record,ss),Al=Fo(wa,cs);return Al.bottom-Al.top},Ps=Fo(wa);return Me.createElement(Lr,{key:ba,data:da,rowKey:wa,index:ba,style:{top:-ta+Ps.top},extra:!0,getHeight:Xo})});return cl},oo=Me.useMemo(function(){return{columnsOffset:vo}},[vo]),Wo="".concat(yi,"-tbody"),Ta;return Rr.length?Ta=Me.createElement(Yr.Z,{fullHeight:!1,ref:ir,className:ot()(Wo,"".concat(Wo,"-virtual")),height:Ui,itemHeight:Jr||24,data:Rr,itemKey:function(To){return jn(To.record)},scrollWidth:or,onVirtualScroll:function(To){var co=To.x;Xt({scrollLeft:co})},extraRender:ua},function(uo,To,co){var Ar=jn(uo.record,To);return Me.createElement(Lr,(0,Ft.Z)({data:uo,rowKey:Ar,index:To},co))}):Ta=Me.createElement("div",{className:ot()("".concat(yi,"-placeholder"))},Me.createElement(_n,{component:"div",prefixCls:yi},mi)),Me.createElement(Ho.Provider,{value:oo},Ta)}),mo=ve(br),Yo=mo,Ki=function(et,Ut){var Xt=Ut.ref,gn=Ut.onScroll;return Me.createElement(Yo,{ref:Xt,data:et,onScroll:gn})},st=100;function sa(rt){var et=rt.columns,Ut=rt.scroll,Xt=rt.prefixCls,gn=Xt===void 0?ri:Xt,nn=rt.className,Vn=rt.listItemHeight,jn=Ut||{},Xn=jn.x,yi=jn.y;typeof Xn!="number"&&(Xn=((et||[]).length+1)*st),typeof yi!="number"&&(yi=500);var Jn=Me.useMemo(function(){return{scrollY:yi,listItemHeight:Vn}},[yi,Vn]);return Me.createElement(Un.Provider,{value:Jn},Me.createElement(Tr,(0,Ft.Z)({},rt,{className:ot()(nn,"".concat(gn,"-virtual")),scroll:(0,dt.Z)((0,dt.Z)({},Ut),{},{x:Xn}),components:{body:Ki},columns:et,internalHooks:ke,tailor:!0})))}function va(rt){return he(sa,rt)}var Ma=va(),hs=null;function Ga(rt){return null}var Lo=Ga;function po(rt){return null}var la=po,Eo=pe(2738),Na=pe(68031),os=pe(36355),xo=pe(93891),Qr=pe(19716),pi=pe(8628),io=pe(31724),ro=pe(58421),Ja=pe(71418),Ca=pe(88088);function fa(rt){return function(Ut){let{prefixCls:Xt,onExpand:gn,record:nn,expanded:Vn,expandable:jn}=Ut;const Xn=`${Xt}-row-expand-icon`;return Me.createElement("button",{type:"button",onClick:yi=>{gn(nn,yi),yi.stopPropagation()},className:ot()(Xn,{[`${Xn}-spaced`]:!jn,[`${Xn}-expanded`]:jn&&Vn,[`${Xn}-collapsed`]:jn&&!Vn}),"aria-label":Vn?rt.collapse:rt.expand,"aria-expanded":Vn})}}var $a=fa;function Qa(rt,et){return"key"in rt&&rt.key!==void 0&&rt.key!==null?rt.key:rt.dataIndex?Array.isArray(rt.dataIndex)?rt.dataIndex.join("."):rt.dataIndex:et}function Es(rt,et){return et?`${et}-${rt}`:`${rt}`}function ys(rt,et){return typeof rt=="function"?rt(et):rt}function Zs(rt,et){const Ut=ys(rt,et);return Object.prototype.toString.call(Ut)==="[object Object]"?"":Ut}var Mn={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"},Ss=Mn,ra=pe(7657),hl=function(et,Ut){return Me.createElement(ra.Z,(0,Ft.Z)({},et,{ref:Ut,icon:Ss}))},Ol=Me.forwardRef(hl),ns=Ol,yu=pe(56762);function eu(rt){const et=Me.useRef(rt),Ut=(0,yu.Z)();return[()=>et.current,Xt=>{et.current=Xt,Ut()}]}var ps=pe(3113),Ba=pe(24905),tu=pe(38854),Do=pe(64165),Ea=pe(20834),ca=pe(40875),hr=pe(5112),Rs=pe(17574),ls=pe(47472),sl=pe(92832);function jl(rt){let{value:et,onChange:Ut,filterSearch:Xt,tablePrefixCls:gn,locale:nn}=rt;return Xt?Me.createElement("div",{className:`${gn}-filter-dropdown-search`},Me.createElement(sl.default,{prefix:Me.createElement(ls.Z,null),placeholder:nn.filterSearchPlaceholder,onChange:Ut,value:et,htmlSize:1,className:`${gn}-filter-dropdown-search-input`})):null}var ou=jl,Ji=pe(10228);const Cs=rt=>{const{keyCode:et}=rt;et===Ji.Z.ENTER&&rt.stopPropagation()};var $l=Me.forwardRef((rt,et)=>Me.createElement("div",{className:rt.className,onClick:Ut=>Ut.stopPropagation(),onKeyDown:Cs,ref:et},rt.children));function Tl(rt){let et=[];return(rt||[]).forEach(Ut=>{let{value:Xt,children:gn}=Ut;et.push(Xt),gn&&(et=[].concat((0,Ri.Z)(et),(0,Ri.Z)(Tl(gn))))}),et}function Kl(rt){return rt.some(et=>{let{children:Ut}=et;return Ut})}function Oo(rt,et){return typeof et=="string"||typeof et=="number"?et==null?void 0:et.toString().toLowerCase().includes(rt.trim().toLowerCase()):!1}function ic(rt){let{filters:et,prefixCls:Ut,filteredKeys:Xt,filterMultiple:gn,searchValue:nn,filterSearch:Vn}=rt;return et.map((jn,Xn)=>{const yi=String(jn.value);if(jn.children)return{key:yi||Xn,label:jn.text,popupClassName:`${Ut}-dropdown-submenu`,children:ic({filters:jn.children,prefixCls:Ut,filteredKeys:Xt,filterMultiple:gn,searchValue:nn,filterSearch:Vn})};const Jn=gn?Ba.default:hr.ZP,mi={key:jn.value!==void 0?yi:Xn,label:Me.createElement(Me.Fragment,null,Me.createElement(Jn,{checked:Xt.includes(yi)}),Me.createElement("span",null,jn.text))};return nn.trim()?typeof Vn=="function"?Vn(nn,jn)?mi:null:Oo(nn,jn.text)?mi:null:mi})}function zl(rt){var et,Ut;const{tablePrefixCls:Xt,prefixCls:gn,column:nn,dropdownPrefixCls:Vn,columnKey:jn,filterMultiple:Xn,filterMode:yi="menu",filterSearch:Jn=!1,filterState:mi,triggerFilter:or,locale:Vi,children:Ui,getPopupContainer:Jr}=rt,{filterDropdownOpen:ir,onFilterDropdownOpenChange:Rr,filterResetToDefaultFilteredValue:jr,defaultFilteredValue:vo,filterDropdownVisible:Vo,onFilterDropdownVisibleChange:ua}=nn,[oo,Wo]=Me.useState(!1),Ta=!!(mi&&(!((et=mi.filteredKeys)===null||et===void 0)&&et.length||mi.forceFiltered)),uo=Uo=>{Wo(Uo),Rr==null||Rr(Uo),ua==null||ua(Uo)},To=(Ut=ir!=null?ir:Vo)!==null&&Ut!==void 0?Ut:oo,co=mi==null?void 0:mi.filteredKeys,[Ar,Fo]=eu(co||[]),ta=Uo=>{let{selectedKeys:Ra}=Uo;Fo(Ra)},Sa=(Uo,Ra)=>{let{node:ss,checked:cs}=Ra;ta(Xn?{selectedKeys:Uo}:{selectedKeys:cs&&ss.key?[ss.key]:[]})};Me.useEffect(()=>{oo&&ta({selectedKeys:co||[]})},[co]);const[Pa,ao]=Me.useState([]),ka=Uo=>{ao(Uo)},[Va,bs]=Me.useState(""),us=Uo=>{const{value:Ra}=Uo.target;bs(Ra)};Me.useEffect(()=>{oo||bs("")},[oo]);const qs=Uo=>{const Ra=Uo&&Uo.length?Uo:null;if(Ra===null&&(!mi||!mi.filteredKeys)||(0,Ue.Z)(Ra,mi==null?void 0:mi.filteredKeys,!0))return null;or({column:nn,key:jn,filteredKeys:Ra})},Ls=()=>{uo(!1),qs(Ar())},Za=function(){let{confirm:Uo,closeDropdown:Ra}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Uo&&qs([]),Ra&&uo(!1),bs(""),Fo(jr?(vo||[]).map(ss=>String(ss)):[])},aa=function(){let{closeDropdown:Uo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Uo&&uo(!1),qs(Ar())},fs=Uo=>{Uo&&co!==void 0&&Fo(co||[]),uo(Uo),!Uo&&!nn.filterDropdown&&Ls()},el=ot()({[`${Vn}-menu-without-submenu`]:!Kl(nn.filters||[])}),Ws=Uo=>{if(Uo.target.checked){const Ra=Tl(nn==null?void 0:nn.filters).map(ss=>String(ss));Fo(Ra)}else Fo([])},cl=Uo=>{let{filters:Ra}=Uo;return(Ra||[]).map((ss,cs)=>{const Al=String(ss.value),bl={title:ss.text,key:ss.value!==void 0?Al:cs};return ss.children&&(bl.children=cl({filters:ss.children})),bl})},ba=Uo=>{var Ra;return Object.assign(Object.assign({},Uo),{text:Uo.title,value:Uo.key,children:((Ra=Uo.children)===null||Ra===void 0?void 0:Ra.map(ss=>ba(ss)))||[]})};let da;if(typeof nn.filterDropdown=="function")da=nn.filterDropdown({prefixCls:`${Vn}-custom`,setSelectedKeys:Uo=>ta({selectedKeys:Uo}),selectedKeys:Ar(),confirm:aa,clearFilters:Za,filters:nn.filters,visible:To,close:()=>{uo(!1)}});else if(nn.filterDropdown)da=nn.filterDropdown;else{const Uo=Ar()||[],Ra=()=>(nn.filters||[]).length===0?Me.createElement(Do.Z,{image:Do.Z.PRESENTED_IMAGE_SIMPLE,description:Vi.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):yi==="tree"?Me.createElement(Me.Fragment,null,Me.createElement(ou,{filterSearch:Jn,value:Va,onChange:us,tablePrefixCls:Xt,locale:Vi}),Me.createElement("div",{className:`${Xt}-filter-dropdown-tree`},Xn?Me.createElement(Ba.default,{checked:Uo.length===Tl(nn.filters).length,indeterminate:Uo.length>0&&Uo.length<Tl(nn.filters).length,className:`${Xt}-filter-dropdown-checkall`,onChange:Ws},Vi.filterCheckall):null,Me.createElement(Rs.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:Xn,checkStrictly:!Xn,className:`${Vn}-menu`,onCheck:Sa,checkedKeys:Uo,selectedKeys:Uo,showIcon:!1,treeData:cl({filters:nn.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Va.trim()?cs=>typeof Jn=="function"?Jn(Va,ba(cs)):Oo(Va,cs.title):void 0}))):Me.createElement(Me.Fragment,null,Me.createElement(ou,{filterSearch:Jn,value:Va,onChange:us,tablePrefixCls:Xt,locale:Vi}),Me.createElement(Ea.default,{selectable:!0,multiple:Xn,prefixCls:`${Vn}-menu`,className:el,onSelect:ta,onDeselect:ta,selectedKeys:Uo,getPopupContainer:Jr,openKeys:Pa,onOpenChange:ka,items:ic({filters:nn.filters||[],filterSearch:Jn,prefixCls:gn,filteredKeys:Ar(),filterMultiple:Xn,searchValue:Va})})),ss=()=>jr?(0,Ue.Z)((vo||[]).map(cs=>String(cs)),Uo,!0):Uo.length===0;da=Me.createElement(Me.Fragment,null,Ra(),Me.createElement("div",{className:`${gn}-dropdown-btns`},Me.createElement(ps.ZP,{type:"link",size:"small",disabled:ss(),onClick:()=>Za()},Vi.filterReset),Me.createElement(ps.ZP,{type:"primary",size:"small",onClick:Ls},Vi.filterConfirm)))}nn.filterDropdown&&(da=Me.createElement(ca.J,{selectable:void 0},da));const wa=()=>Me.createElement($l,{className:`${gn}-dropdown`},da);let Xo;typeof nn.filterIcon=="function"?Xo=nn.filterIcon(Ta):nn.filterIcon?Xo=nn.filterIcon:Xo=Me.createElement(ns,null);const{direction:Ps}=Me.useContext(os.E_);return Me.createElement("div",{className:`${gn}-column`},Me.createElement("span",{className:`${Xt}-column-title`},Ui),Me.createElement(tu.Z,{dropdownRender:wa,trigger:["click"],open:To,onOpenChange:fs,getPopupContainer:Jr,placement:Ps==="rtl"?"bottomLeft":"bottomRight"},Me.createElement("span",{role:"button",tabIndex:-1,className:ot()(`${gn}-trigger`,{active:Ta}),onClick:Uo=>{Uo.stopPropagation()}},Xo)))}var En=zl;function Nn(rt,et,Ut){let Xt=[];return(rt||[]).forEach((gn,nn)=>{var Vn;const jn=Es(nn,Ut);if(gn.filters||"filterDropdown"in gn||"onFilter"in gn)if("filteredValue"in gn){let Xn=gn.filteredValue;"filterDropdown"in gn||(Xn=(Vn=Xn==null?void 0:Xn.map(String))!==null&&Vn!==void 0?Vn:Xn),Xt.push({column:gn,key:Qa(gn,jn),filteredKeys:Xn,forceFiltered:gn.filtered})}else Xt.push({column:gn,key:Qa(gn,jn),filteredKeys:et&&gn.defaultFilteredValue?gn.defaultFilteredValue:void 0,forceFiltered:gn.filtered});"children"in gn&&(Xt=[].concat((0,Ri.Z)(Xt),(0,Ri.Z)(Nn(gn.children,et,jn))))}),Xt}function ai(rt,et,Ut,Xt,gn,nn,Vn,jn){return Ut.map((Xn,yi)=>{const Jn=Es(yi,jn),{filterMultiple:mi=!0,filterMode:or,filterSearch:Vi}=Xn;let Ui=Xn;if(Ui.filters||Ui.filterDropdown){const Jr=Qa(Ui,Jn),ir=Xt.find(Rr=>{let{key:jr}=Rr;return Jr===jr});Ui=Object.assign(Object.assign({},Ui),{title:Rr=>Me.createElement(En,{tablePrefixCls:rt,prefixCls:`${rt}-filter`,dropdownPrefixCls:et,column:Ui,columnKey:Jr,filterState:ir,filterMultiple:mi,filterMode:or,filterSearch:Vi,triggerFilter:nn,locale:gn,getPopupContainer:Vn},ys(Xn.title,Rr))})}return"children"in Ui&&(Ui=Object.assign(Object.assign({},Ui),{children:ai(rt,et,Ui.children,Xt,gn,nn,Vn,Jn)})),Ui})}function Qi(rt){const et={};return rt.forEach(Ut=>{let{key:Xt,filteredKeys:gn,column:nn}=Ut;const{filters:Vn,filterDropdown:jn}=nn;if(jn)et[Xt]=gn||null;else if(Array.isArray(gn)){const Xn=Tl(Vn);et[Xt]=Xn.filter(yi=>gn.includes(String(yi)))}else et[Xt]=null}),et}function Gi(rt,et){return et.reduce((Ut,Xt)=>{const{column:{onFilter:gn,filters:nn},filteredKeys:Vn}=Xt;return gn&&Vn&&Vn.length?Ut.filter(jn=>Vn.some(Xn=>{const yi=Tl(nn),Jn=yi.findIndex(or=>String(or)===String(Xn)),mi=Jn!==-1?yi[Jn]:Xn;return gn(mi,jn)})):Ut},rt)}const ki=rt=>rt.flatMap(et=>"children"in et?[et].concat((0,Ri.Z)(ki(et.children||[]))):[et]);function _i(rt){let{prefixCls:et,dropdownPrefixCls:Ut,mergedColumns:Xt,onFilterChange:gn,getPopupContainer:nn,locale:Vn}=rt;const jn=Me.useMemo(()=>ki(Xt||[]),[Xt]),[Xn,yi]=Me.useState(()=>Nn(jn,!0)),Jn=Me.useMemo(()=>{const Ui=Nn(jn,!1);if(Ui.length===0)return Ui;let Jr=!0,ir=!0;if(Ui.forEach(Rr=>{let{filteredKeys:jr}=Rr;jr!==void 0?Jr=!1:ir=!1}),Jr){const Rr=(jn||[]).map((jr,vo)=>Qa(jr,Es(vo)));return Xn.filter(jr=>{let{key:vo}=jr;return Rr.includes(vo)}).map(jr=>{const vo=jn[Rr.findIndex(Vo=>Vo===jr.key)];return Object.assign(Object.assign({},jr),{column:Object.assign(Object.assign({},jr.column),vo),forceFiltered:vo.filtered})})}return Ui},[jn,Xn]),mi=Me.useMemo(()=>Qi(Jn),[Jn]),or=Ui=>{const Jr=Jn.filter(ir=>{let{key:Rr}=ir;return Rr!==Ui.key});Jr.push(Ui),yi(Jr),gn(Qi(Jr),Jr)};return[Ui=>ai(et,Ut,Ui,Jn,Vn,or,nn),Jn,mi]}var oi=_i;function Mi(rt,et,Ut){const Xt=Me.useRef({});function gn(nn){if(!Xt.current||Xt.current.data!==rt||Xt.current.childrenColumnName!==et||Xt.current.getRowKey!==Ut){let jn=function(Xn){Xn.forEach((yi,Jn)=>{const mi=Ut(yi,Jn);Vn.set(mi,yi),yi&&typeof yi=="object"&&et in yi&&jn(yi[et]||[])})};const Vn=new Map;jn(rt),Xt.current={data:rt,childrenColumnName:et,kvMap:Vn,getRowKey:Ut}}return Xt.current.kvMap.get(nn)}return[gn]}var cr=pe(50371),Hr=function(rt,et){var Ut={};for(var Xt in rt)Object.prototype.hasOwnProperty.call(rt,Xt)&&et.indexOf(Xt)<0&&(Ut[Xt]=rt[Xt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gn=0,Xt=Object.getOwnPropertySymbols(rt);gn<Xt.length;gn++)et.indexOf(Xt[gn])<0&&Object.prototype.propertyIsEnumerable.call(rt,Xt[gn])&&(Ut[Xt[gn]]=rt[Xt[gn]]);return Ut};const ga=10;function $o(rt,et){const Ut={current:rt.current,pageSize:rt.pageSize};return Object.keys(et&&typeof et=="object"?et:{}).forEach(gn=>{const nn=rt[gn];typeof nn!="function"&&(Ut[gn]=nn)}),Ut}function Ua(rt,et,Ut){const Xt=Ut&&typeof Ut=="object"?Ut:{},{total:gn=0}=Xt,nn=Hr(Xt,["total"]),[Vn,jn]=(0,Me.useState)(()=>({current:"defaultCurrent"in nn?nn.defaultCurrent:1,pageSize:"defaultPageSize"in nn?nn.defaultPageSize:ga})),Xn=(0,cr.Z)(Vn,nn,{total:gn>0?gn:rt}),yi=Math.ceil((gn||rt)/Xn.pageSize);Xn.current>yi&&(Xn.current=yi||1);const Jn=(or,Vi)=>{jn({current:or!=null?or:1,pageSize:Vi||Xn.pageSize})},mi=(or,Vi)=>{var Ui;Ut&&((Ui=Ut.onChange)===null||Ui===void 0||Ui.call(Ut,or,Vi)),Jn(or,Vi),et(or,Vi||(Xn==null?void 0:Xn.pageSize))};return Ut===!1?[{},()=>{}]:[Object.assign(Object.assign({},Xn),{onChange:mi}),Jn]}var Ka=Ua,No=pe(84105),qr=pe(35654),Fi=pe(90782),eo=pe(71430),Ko=pe(18929);const ma={},ya="SELECT_ALL",bo="SELECT_INVERT",oa="SELECT_NONE",Io=[],Dr=(rt,et)=>{let Ut=[];return(et||[]).forEach(Xt=>{Ut.push(Xt),Xt&&typeof Xt=="object"&&rt in Xt&&(Ut=[].concat((0,Ri.Z)(Ut),(0,Ri.Z)(Dr(rt,Xt[rt]))))}),Ut};var Ha=(rt,et)=>{const{preserveSelectedRowKeys:Ut,selectedRowKeys:Xt,defaultSelectedRowKeys:gn,getCheckboxProps:nn,onChange:Vn,onSelect:jn,onSelectAll:Xn,onSelectInvert:yi,onSelectNone:Jn,onSelectMultiple:mi,columnWidth:or,type:Vi,selections:Ui,fixed:Jr,renderCell:ir,hideSelectAll:Rr,checkStrictly:jr=!0}=et||{},{prefixCls:vo,data:Vo,pageData:ua,getRecordByKey:oo,getRowKey:Wo,expandType:Ta,childrenColumnName:uo,locale:To,getPopupContainer:co}=rt,[Ar,Fo]=(0,Ko.Z)(Xt||gn||Io,{value:Xt}),ta=Me.useRef(new Map),Sa=(0,Me.useCallback)(ba=>{if(Ut){const da=new Map;ba.forEach(wa=>{let Xo=oo(wa);!Xo&&ta.current.has(wa)&&(Xo=ta.current.get(wa)),da.set(wa,Xo)}),ta.current=da}},[oo,Ut]);Me.useEffect(()=>{Sa(Ar)},[Ar]);const{keyEntities:Pa}=(0,Me.useMemo)(()=>{if(jr)return{keyEntities:null};let ba=Vo;if(Ut){const da=new Set(Vo.map((Xo,Ps)=>Wo(Xo,Ps))),wa=Array.from(ta.current).reduce((Xo,Ps)=>{let[Uo,Ra]=Ps;return da.has(Uo)?Xo:Xo.concat(Ra)},[]);ba=[].concat((0,Ri.Z)(ba),(0,Ri.Z)(wa))}return(0,eo.I8)(ba,{externalGetKey:Wo,childrenPropName:uo})},[Vo,Wo,jr,uo,Ut]),ao=(0,Me.useMemo)(()=>Dr(uo,ua),[uo,ua]),ka=(0,Me.useMemo)(()=>{const ba=new Map;return ao.forEach((da,wa)=>{const Xo=Wo(da,wa),Ps=(nn?nn(da):null)||{};ba.set(Xo,Ps)}),ba},[ao,Wo,nn]),Va=(0,Me.useCallback)(ba=>{var da;return!!(!((da=ka.get(Wo(ba)))===null||da===void 0)&&da.disabled)},[ka,Wo]),[bs,us]=(0,Me.useMemo)(()=>{if(jr)return[Ar||[],[]];const{checkedKeys:ba,halfCheckedKeys:da}=(0,Fi.S)(Ar,!0,Pa,Va);return[ba||[],da]},[Ar,jr,Pa,Va]),qs=(0,Me.useMemo)(()=>{const ba=Vi==="radio"?bs.slice(0,1):bs;return new Set(ba)},[bs,Vi]),Ls=(0,Me.useMemo)(()=>Vi==="radio"?new Set:new Set(us),[us,Vi]),[Za,aa]=(0,Me.useState)(null);Me.useEffect(()=>{et||Fo(Io)},[!!et]);const fs=(0,Me.useCallback)((ba,da)=>{let wa,Xo;Sa(ba),Ut?(wa=ba,Xo=ba.map(Ps=>ta.current.get(Ps))):(wa=[],Xo=[],ba.forEach(Ps=>{const Uo=oo(Ps);Uo!==void 0&&(wa.push(Ps),Xo.push(Uo))})),Fo(wa),Vn==null||Vn(wa,Xo,{type:da})},[Fo,oo,Vn,Ut]),el=(0,Me.useCallback)((ba,da,wa,Xo)=>{if(jn){const Ps=wa.map(Uo=>oo(Uo));jn(oo(ba),da,Ps,Xo)}fs(wa,"single")},[jn,oo,fs]),Ws=(0,Me.useMemo)(()=>!Ui||Rr?null:(Ui===!0?[ya,bo,oa]:Ui).map(da=>da===ya?{key:"all",text:To.selectionAll,onSelect(){fs(Vo.map((wa,Xo)=>Wo(wa,Xo)).filter(wa=>{const Xo=ka.get(wa);return!(Xo!=null&&Xo.disabled)||qs.has(wa)}),"all")}}:da===bo?{key:"invert",text:To.selectInvert,onSelect(){const wa=new Set(qs);ua.forEach((Ps,Uo)=>{const Ra=Wo(Ps,Uo),ss=ka.get(Ra);ss!=null&&ss.disabled||(wa.has(Ra)?wa.delete(Ra):wa.add(Ra))});const Xo=Array.from(wa);yi&&yi(Xo),fs(Xo,"invert")}}:da===oa?{key:"none",text:To.selectNone,onSelect(){Jn==null||Jn(),fs(Array.from(qs).filter(wa=>{const Xo=ka.get(wa);return Xo==null?void 0:Xo.disabled}),"none")}}:da).map(da=>Object.assign(Object.assign({},da),{onSelect:function(){for(var wa,Xo,Ps=arguments.length,Uo=new Array(Ps),Ra=0;Ra<Ps;Ra++)Uo[Ra]=arguments[Ra];(Xo=da.onSelect)===null||Xo===void 0||(wa=Xo).call.apply(wa,[da].concat(Uo)),aa(null)}})),[Ui,qs,ua,Wo,yi,fs]);return[(0,Me.useCallback)(ba=>{var da;if(!et)return ba.filter(Bs=>Bs!==ma);let wa=(0,Ri.Z)(ba);const Xo=new Set(qs),Ps=ao.map(Wo).filter(Bs=>!ka.get(Bs).disabled),Uo=Ps.every(Bs=>Xo.has(Bs)),Ra=Ps.some(Bs=>Xo.has(Bs)),ss=()=>{const Bs=[];Uo?Ps.forEach(Ms=>{Xo.delete(Ms),Bs.push(Ms)}):Ps.forEach(Ms=>{Xo.has(Ms)||(Xo.add(Ms),Bs.push(Ms))});const Ts=Array.from(Xo);Xn==null||Xn(!Uo,Ts.map(Ms=>oo(Ms)),Bs.map(Ms=>oo(Ms))),fs(Ts,"all"),aa(null)};let cs;if(Vi!=="radio"){let Bs;if(Ws){const is={getPopupContainer:co,items:Ws.map((js,Dl)=>{const{key:Ul,text:Gu,onSelect:Du}=js;return{key:Ul!=null?Ul:Dl,onClick:()=>{Du==null||Du(Ps)},label:Gu}})};Bs=Me.createElement("div",{className:`${vo}-selection-extra`},Me.createElement(tu.Z,{menu:is,getPopupContainer:co},Me.createElement("span",null,Me.createElement(No.Z,null))))}const Ts=ao.map((is,js)=>{const Dl=Wo(is,js),Ul=ka.get(Dl)||{};return Object.assign({checked:Xo.has(Dl)},Ul)}).filter(is=>{let{disabled:js}=is;return js}),Ms=!!Ts.length&&Ts.length===ao.length,Gs=Ms&&Ts.every(is=>{let{checked:js}=is;return js}),pl=Ms&&Ts.some(is=>{let{checked:js}=is;return js});cs=!Rr&&Me.createElement("div",{className:`${vo}-selection`},Me.createElement(Ba.default,{checked:Ms?Gs:!!ao.length&&Uo,indeterminate:Ms?!Gs&&pl:!Uo&&Ra,onChange:ss,disabled:ao.length===0||Ms,"aria-label":Bs?"Custom selection":"Select all",skipGroup:!0}),Bs)}let Al;Vi==="radio"?Al=(Bs,Ts,Ms)=>{const Gs=Wo(Ts,Ms),pl=Xo.has(Gs);return{node:Me.createElement(hr.ZP,Object.assign({},ka.get(Gs),{checked:pl,onClick:is=>is.stopPropagation(),onChange:is=>{Xo.has(Gs)||el(Gs,!0,[Gs],is.nativeEvent)}})),checked:pl}}:Al=(Bs,Ts,Ms)=>{var Gs;const pl=Wo(Ts,Ms),is=Xo.has(pl),js=Ls.has(pl),Dl=ka.get(pl);let Ul;return Ta==="nest"?Ul=js:Ul=(Gs=Dl==null?void 0:Dl.indeterminate)!==null&&Gs!==void 0?Gs:js,{node:Me.createElement(Ba.default,Object.assign({},Dl,{indeterminate:Ul,checked:is,skipGroup:!0,onClick:Gu=>Gu.stopPropagation(),onChange:Gu=>{let{nativeEvent:Du}=Gu;const{shiftKey:ml}=Du;let Iu=-1,Ou=-1;if(ml&&jr){const Ns=new Set([Za,pl]);Ps.some((Hl,$s)=>{if(Ns.has(Hl))if(Iu===-1)Iu=$s;else return Ou=$s,!0;return!1})}if(Ou!==-1&&Iu!==Ou&&jr){const Ns=Ps.slice(Iu,Ou+1),Hl=[];is?Ns.forEach(zs=>{Xo.has(zs)&&(Hl.push(zs),Xo.delete(zs))}):Ns.forEach(zs=>{Xo.has(zs)||(Hl.push(zs),Xo.add(zs))});const $s=Array.from(Xo);mi==null||mi(!is,$s.map(zs=>oo(zs)),Hl.map(zs=>oo(zs))),fs($s,"multiple")}else{const Ns=bs;if(jr){const Hl=is?(0,qr._5)(Ns,pl):(0,qr.L0)(Ns,pl);el(pl,!is,Hl,Du)}else{const Hl=(0,Fi.S)([].concat((0,Ri.Z)(Ns),[pl]),!0,Pa,Va),{checkedKeys:$s,halfCheckedKeys:zs}=Hl;let $u=$s;if(is){const Vc=new Set($s);Vc.delete(pl),$u=(0,Fi.S)(Array.from(Vc),{checked:!1,halfCheckedKeys:zs},Pa,Va).checkedKeys}el(pl,!is,$u,Du)}}aa(is?null:pl)}})),checked:is}};const bl=(Bs,Ts,Ms)=>{const{node:Gs,checked:pl}=Al(Bs,Ts,Ms);return ir?ir(pl,Ts,Ms,Gs):Gs};if(!wa.includes(ma))if(wa.findIndex(Bs=>{var Ts;return((Ts=Bs[_r])===null||Ts===void 0?void 0:Ts.columnType)==="EXPAND_COLUMN"})===0){const[Bs,...Ts]=wa;wa=[Bs,ma].concat((0,Ri.Z)(Ts))}else wa=[ma].concat((0,Ri.Z)(wa));const Vl=wa.indexOf(ma);wa=wa.filter((Bs,Ts)=>Bs!==ma||Ts===Vl);const Fs=wa[Vl-1],Zl=wa[Vl+1];let dl=Jr;dl===void 0&&((Zl==null?void 0:Zl.fixed)!==void 0?dl=Zl.fixed:(Fs==null?void 0:Fs.fixed)!==void 0&&(dl=Fs.fixed)),dl&&Fs&&((da=Fs[_r])===null||da===void 0?void 0:da.columnType)==="EXPAND_COLUMN"&&Fs.fixed===void 0&&(Fs.fixed=dl);const Fl=ot()(`${vo}-selection-col`,{[`${vo}-selection-col-with-dropdown`]:Ui&&Vi==="checkbox"}),_c={fixed:dl,width:or,className:`${vo}-selection-column`,title:et.columnTitle||cs,render:bl,onCell:et.onCell,[_r]:{className:Fl}};return wa.map(Bs=>Bs===ma?_c:Bs)},[Wo,ao,et,bs,qs,Ls,or,Ws,Ta,Za,ka,mi,el,Va]),qs]},La=pe(89489),fl=pe(59477),xu=pe(6848);const Jt="ascend",Yt="descend";function Dn(rt){return typeof rt.sorter=="object"&&typeof rt.sorter.multiple=="number"?rt.sorter.multiple:!1}function nt(rt){return typeof rt=="function"?rt:rt&&typeof rt=="object"&&rt.compare?rt.compare:!1}function Qt(rt,et){return et?rt[rt.indexOf(et)+1]:rt[0]}function lr(rt,et,Ut){let Xt=[];function gn(nn,Vn){Xt.push({column:nn,key:Qa(nn,Vn),multiplePriority:Dn(nn),sortOrder:nn.sortOrder})}return(rt||[]).forEach((nn,Vn)=>{const jn=Es(Vn,Ut);nn.children?("sortOrder"in nn&&gn(nn,jn),Xt=[].concat((0,Ri.Z)(Xt),(0,Ri.Z)(lr(nn.children,et,jn)))):nn.sorter&&("sortOrder"in nn?gn(nn,jn):et&&nn.defaultSortOrder&&Xt.push({column:nn,key:Qa(nn,jn),multiplePriority:Dn(nn),sortOrder:nn.defaultSortOrder}))}),Xt}function Ir(rt,et,Ut,Xt,gn,nn,Vn,jn){return(et||[]).map((Xn,yi)=>{const Jn=Es(yi,jn);let mi=Xn;if(mi.sorter){const or=mi.sortDirections||gn,Vi=mi.showSorterTooltip===void 0?Vn:mi.showSorterTooltip,Ui=Qa(mi,Jn),Jr=Ut.find(Ta=>{let{key:uo}=Ta;return uo===Ui}),ir=Jr?Jr.sortOrder:null,Rr=Qt(or,ir);let jr;if(Xn.sortIcon)jr=Xn.sortIcon({sortOrder:ir});else{const Ta=or.includes(Jt)&&Me.createElement(fl.Z,{className:ot()(`${rt}-column-sorter-up`,{active:ir===Jt})}),uo=or.includes(Yt)&&Me.createElement(La.Z,{className:ot()(`${rt}-column-sorter-down`,{active:ir===Yt})});jr=Me.createElement("span",{className:ot()(`${rt}-column-sorter`,{[`${rt}-column-sorter-full`]:!!(Ta&&uo)})},Me.createElement("span",{className:`${rt}-column-sorter-inner`,"aria-hidden":"true"},Ta,uo))}const{cancelSort:vo,triggerAsc:Vo,triggerDesc:ua}=nn||{};let oo=vo;Rr===Yt?oo=ua:Rr===Jt&&(oo=Vo);const Wo=typeof Vi=="object"?Vi:{title:oo};mi=Object.assign(Object.assign({},mi),{className:ot()(mi.className,{[`${rt}-column-sort`]:ir}),title:Ta=>{const uo=Me.createElement("div",{className:`${rt}-column-sorters`},Me.createElement("span",{className:`${rt}-column-title`},ys(Xn.title,Ta)),jr);return Vi?Me.createElement(xu.Z,Object.assign({},Wo),uo):uo},onHeaderCell:Ta=>{const uo=Xn.onHeaderCell&&Xn.onHeaderCell(Ta)||{},To=uo.onClick,co=uo.onKeyDown;uo.onClick=ta=>{Xt({column:Xn,key:Ui,sortOrder:Rr,multiplePriority:Dn(Xn)}),To==null||To(ta)},uo.onKeyDown=ta=>{ta.keyCode===Ji.Z.ENTER&&(Xt({column:Xn,key:Ui,sortOrder:Rr,multiplePriority:Dn(Xn)}),co==null||co(ta))};const Ar=Zs(Xn.title,{}),Fo=Ar==null?void 0:Ar.toString();return ir?uo["aria-sort"]=ir==="ascend"?"ascending":"descending":uo["aria-label"]=Fo||"",uo.className=ot()(uo.className,`${rt}-column-has-sorters`),uo.tabIndex=0,Xn.ellipsis&&(uo.title=(Ar!=null?Ar:"").toString()),uo}})}return"children"in mi&&(mi=Object.assign(Object.assign({},mi),{children:Ir(rt,mi.children,Ut,Xt,gn,nn,Vn,Jn)})),mi})}function mr(rt){const{column:et,sortOrder:Ut}=rt;return{column:et,order:Ut,field:et.dataIndex,columnKey:et.key}}function ur(rt){const et=rt.filter(Ut=>{let{sortOrder:Xt}=Ut;return Xt}).map(mr);return et.length===0&&rt.length?Object.assign(Object.assign({},mr(rt[rt.length-1])),{column:void 0}):et.length<=1?et[0]||{}:et}function Bi(rt,et,Ut){const Xt=et.slice().sort((Vn,jn)=>jn.multiplePriority-Vn.multiplePriority),gn=rt.slice(),nn=Xt.filter(Vn=>{let{column:{sorter:jn},sortOrder:Xn}=Vn;return nt(jn)&&Xn});return nn.length?gn.sort((Vn,jn)=>{for(let Xn=0;Xn<nn.length;Xn+=1){const yi=nn[Xn],{column:{sorter:Jn},sortOrder:mi}=yi,or=nt(Jn);if(or&&mi){const Vi=or(Vn,jn,mi);if(Vi!==0)return mi===Jt?Vi:-Vi}}return 0}).map(Vn=>{const jn=Vn[Ut];return jn?Object.assign(Object.assign({},Vn),{[Ut]:Bi(jn,et,Ut)}):Vn}):gn}function Pr(rt){let{prefixCls:et,mergedColumns:Ut,onSorterChange:Xt,sortDirections:gn,tableLocale:nn,showSorterTooltip:Vn}=rt;const[jn,Xn]=Me.useState(lr(Ut,!0)),yi=Me.useMemo(()=>{let Ui=!0;const Jr=lr(Ut,!1);if(!Jr.length)return jn;const ir=[];function Rr(vo){Ui?ir.push(vo):ir.push(Object.assign(Object.assign({},vo),{sortOrder:null}))}let jr=null;return Jr.forEach(vo=>{jr===null?(Rr(vo),vo.sortOrder&&(vo.multiplePriority===!1?Ui=!1:jr=!0)):(jr&&vo.multiplePriority!==!1||(Ui=!1),Rr(vo))}),ir},[Ut,jn]),Jn=Me.useMemo(()=>{const Ui=yi.map(Jr=>{let{column:ir,sortOrder:Rr}=Jr;return{column:ir,order:Rr}});return{sortColumns:Ui,sortColumn:Ui[0]&&Ui[0].column,sortOrder:Ui[0]&&Ui[0].order}},[yi]);function mi(Ui){let Jr;Ui.multiplePriority===!1||!yi.length||yi[0].multiplePriority===!1?Jr=[Ui]:Jr=[].concat((0,Ri.Z)(yi.filter(ir=>{let{key:Rr}=ir;return Rr!==Ui.key})),[Ui]),Xn(Jr),Xt(ur(Jr),Jr)}return[Ui=>Ir(et,Ui,yi,mi,gn,nn,Vn),yi,Jn,()=>ur(yi)]}function to(rt,et){return rt.map(Ut=>{const Xt=Object.assign({},Ut);return Xt.title=ys(Ut.title,et),"children"in Xt&&(Xt.children=to(Xt.children,et)),Xt})}function So(rt){return[Me.useCallback(Ut=>to(Ut,rt),[rt])]}var fr=Ur((rt,et)=>{const{_renderTimes:Ut}=rt,{_renderTimes:Xt}=et;return Ut!==Xt}),pr=va((rt,et)=>{const{_renderTimes:Ut}=rt,{_renderTimes:Xt}=et;return Ut!==Xt}),vr=pe(64993),ji=pe(17313),Ai=pe(83116),Wr=pe(37613),Br=rt=>{const{componentCls:et}=rt,Ut=`${rt.lineWidth}px ${rt.lineType} ${rt.tableBorderColor}`,Xt=(gn,nn,Vn)=>({[`&${et}-${gn}`]:{[`> ${et}-container`]:{[`> ${et}-content, > ${et}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${et}-expanded-row-fixed`]:{margin:`-${nn}px -${Vn+rt.lineWidth}px`}}}}}});return{[`${et}-wrapper`]:{[`${et}${et}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${et}-title`]:{border:Ut,borderBottom:0},[`> ${et}-container`]:{borderInlineStart:Ut,borderTop:Ut,[`
> ${et}-content,
> ${et}-header,
> ${et}-body,
> ${et}-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:Ut},"> thead":{"> tr:not(:last-child) > th":{borderBottom:Ut},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${et}-cell-fix-right-first::after`]:{borderInlineEnd:Ut}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${et}-expanded-row-fixed`]:{margin:`-${rt.tablePaddingVertical}px -${rt.tablePaddingHorizontal+rt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:rt.lineWidth,bottom:0,borderInlineEnd:Ut,content:'""'}}}}}},[`&${et}-scroll-horizontal`]:{[`> ${et}-container > ${et}-body`]:{"> table > tbody":{[`
> tr${et}-expanded-row,
> tr${et}-placeholder
`]:{"> th, > td":{borderInlineEnd:0}}}}}},Xt("middle",rt.tablePaddingVerticalMiddle,rt.tablePaddingHorizontalMiddle)),Xt("small",rt.tablePaddingVerticalSmall,rt.tablePaddingHorizontalSmall)),{[`> ${et}-footer`]:{border:Ut,borderTop:0}}),[`${et}-cell`]:{[`${et}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${rt.lineWidth}px 0 ${rt.lineWidth}px ${rt.tableHeaderBg}`}},[`${et}-bordered ${et}-cell-scrollbar`]:{borderInlineEnd:Ut}}}},Or=rt=>{const{componentCls:et}=rt;return{[`${et}-wrapper`]:{[`${et}-cell-ellipsis`]:Object.assign(Object.assign({},ji.vS),{wordBreak:"keep-all",[`
&${et}-cell-fix-left-last,
&${et}-cell-fix-right-first
`]:{overflow:"visible",[`${et}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${et}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},gr=rt=>{const{componentCls:et}=rt;return{[`${et}-wrapper`]:{[`${et}-tbody > tr${et}-placeholder`]:{textAlign:"center",color:rt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:rt.colorBgContainer}}}}},Aa=pe(15969),xa=rt=>{const{componentCls:et,antCls:Ut,controlInteractiveSize:Xt,motionDurationSlow:gn,lineWidth:nn,paddingXS:Vn,lineType:jn,tableBorderColor:Xn,tableExpandIconBg:yi,tableExpandColumnWidth:Jn,borderRadius:mi,fontSize:or,fontSizeSM:Vi,lineHeight:Ui,tablePaddingVertical:Jr,tablePaddingHorizontal:ir,tableExpandedRowBg:Rr,paddingXXS:jr}=rt,vo=Xt/2-nn,Vo=vo*2+nn*3,ua=`${nn}px ${jn} ${Xn}`,oo=jr-nn;return{[`${et}-wrapper`]:{[`${et}-expand-icon-col`]:{width:Jn},[`${et}-row-expand-icon-cell`]:{textAlign:"center",[`${et}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${et}-row-indent`]:{height:1,float:"left"},[`${et}-row-expand-icon`]:Object.assign(Object.assign({},(0,Aa.N)(rt)),{position:"relative",float:"left",boxSizing:"border-box",width:Vo,height:Vo,padding:0,color:"inherit",lineHeight:`${Vo}px`,background:yi,border:ua,borderRadius:mi,transform:`scale(${Xt/Vo})`,transition:`all ${gn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${gn} ease-out`,content:'""'},"&::before":{top:vo,insetInlineEnd:oo,insetInlineStart:oo,height:nn},"&::after":{top:oo,bottom:oo,insetInlineStart:vo,width:nn,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"}}),[`${et}-row-indent + ${et}-row-expand-icon`]:{marginTop:(or*Ui-nn*3)/2-Math.ceil((Vi*1.4-nn*3)/2),marginInlineEnd:Vn},[`tr${et}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Rr}},[`${Ut}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${et}-expanded-row-fixed`]:{position:"relative",margin:`-${Jr}px -${ir}px`,padding:`${Jr}px ${ir}px`}}}},wo=rt=>{const{componentCls:et,antCls:Ut,iconCls:Xt,tableFilterDropdownWidth:gn,tableFilterDropdownSearchWidth:nn,paddingXXS:Vn,paddingXS:jn,colorText:Xn,lineWidth:yi,lineType:Jn,tableBorderColor:mi,tableHeaderIconColor:or,fontSizeSM:Vi,tablePaddingHorizontal:Ui,borderRadius:Jr,motionDurationSlow:ir,colorTextDescription:Rr,colorPrimary:jr,tableHeaderFilterActiveBg:vo,colorTextDisabled:Vo,tableFilterDropdownBg:ua,tableFilterDropdownHeight:oo,controlItemBgHover:Wo,controlItemBgActive:Ta,boxShadowSecondary:uo,filterDropdownMenuBg:To}=rt,co=`${Ut}-dropdown`,Ar=`${et}-filter-dropdown`,Fo=`${Ut}-tree`,ta=`${yi}px ${Jn} ${mi}`;return[{[`${et}-wrapper`]:{[`${et}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${et}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Vn,marginInline:`${Vn}px ${-Ui/2}px`,padding:`0 ${Vn}px`,color:or,fontSize:Vi,borderRadius:Jr,cursor:"pointer",transition:`all ${ir}`,"&:hover":{color:Rr,background:vo},"&.active":{color:jr}}}},{[`${Ut}-dropdown`]:{[Ar]:Object.assign(Object.assign({},(0,ji.Wf)(rt)),{minWidth:gn,backgroundColor:ua,borderRadius:Jr,boxShadow:uo,overflow:"hidden",[`${co}-menu`]:{maxHeight:oo,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:To,"&:empty::after":{display:"block",padding:`${jn}px 0`,color:Vo,fontSize:Vi,textAlign:"center",content:'"Not Found"'}},[`${Ar}-tree`]:{paddingBlock:`${jn}px 0`,paddingInline:jn,[Fo]:{padding:0},[`${Fo}-treenode ${Fo}-node-content-wrapper:hover`]:{backgroundColor:Wo},[`${Fo}-treenode-checkbox-checked ${Fo}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:Ta}}},[`${Ar}-search`]:{padding:jn,borderBottom:ta,"&-input":{input:{minWidth:nn},[Xt]:{color:Vo}}},[`${Ar}-checkall`]:{width:"100%",marginBottom:Vn,marginInlineStart:Vn},[`${Ar}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${jn-yi}px ${jn}px`,overflow:"hidden",borderTop:ta}})}},{[`${Ut}-dropdown ${Ar}, ${Ar}-submenu`]:{[`${Ut}-checkbox-wrapper + span`]:{paddingInlineStart:jn,color:Xn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},El=rt=>{const{componentCls:et,lineWidth:Ut,colorSplit:Xt,motionDurationSlow:gn,zIndexTableFixed:nn,tableBg:Vn,zIndexTableSticky:jn}=rt,Xn=Xt;return{[`${et}-wrapper`]:{[`
${et}-cell-fix-left,
${et}-cell-fix-right
`]:{position:"sticky !important",zIndex:nn,background:Vn},[`
${et}-cell-fix-left-first::after,
${et}-cell-fix-left-last::after
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-Ut,width:30,transform:"translateX(100%)",transition:`box-shadow ${gn}`,content:'""',pointerEvents:"none"},[`${et}-cell-fix-left-all::after`]:{display:"none"},[`
${et}-cell-fix-right-first::after,
${et}-cell-fix-right-last::after
`]:{position:"absolute",top:0,bottom:-Ut,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${gn}`,content:'""',pointerEvents:"none"},[`${et}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:jn+1,width:30,transition:`box-shadow ${gn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${et}-ping-left`]:{[`&:not(${et}-has-fix-left) ${et}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${Xn}`}},[`
${et}-cell-fix-left-first::after,
${et}-cell-fix-left-last::after
`]:{boxShadow:`inset 10px 0 8px -8px ${Xn}`},[`${et}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${et}-ping-right`]:{[`&:not(${et}-has-fix-right) ${et}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${Xn}`}},[`
${et}-cell-fix-right-first::after,
${et}-cell-fix-right-last::after
`]:{boxShadow:`inset -10px 0 8px -8px ${Xn}`}}}}},_s=rt=>{const{componentCls:et,antCls:Ut}=rt;return{[`${et}-wrapper`]:{[`${et}-pagination${Ut}-pagination`]:{margin:`${rt.margin}px 0`},[`${et}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:rt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Hs=rt=>{const{componentCls:et,tableRadius:Ut}=rt;return{[`${et}-wrapper`]:{[et]:{[`${et}-title, ${et}-header`]:{borderRadius:`${Ut}px ${Ut}px 0 0`},[`${et}-title + ${et}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${et}-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:Ut,borderStartEndRadius:Ut,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:Ut},"> *:last-child":{borderStartEndRadius:Ut}}},"&-footer":{borderRadius:`0 0 ${Ut}px ${Ut}px`}}}}},rc=rt=>{const{componentCls:et}=rt;return{[`${et}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${et}-pagination-left`]:{justifyContent:"flex-end"},[`${et}-pagination-right`]:{justifyContent:"flex-start"},[`${et}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${et}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${et}-row-indent`]:{float:"right"}}}}},kc=rt=>{const{componentCls:et,antCls:Ut,iconCls:Xt,fontSizeIcon:gn,padding:nn,paddingXS:Vn,tableHeaderIconColor:jn,tableHeaderIconColorHover:Xn,tableSelectionColumnWidth:yi}=rt;return{[`${et}-wrapper`]:{[`${et}-selection-col`]:{width:yi,[`&${et}-selection-col-with-dropdown`]:{width:yi+gn+nn/4}},[`${et}-bordered ${et}-selection-col`]:{width:yi+Vn*2,[`&${et}-selection-col-with-dropdown`]:{width:yi+gn+nn/4+Vn*2}},[`
table tr th${et}-selection-column,
table tr td${et}-selection-column
`]:{paddingInlineEnd:rt.paddingXS,paddingInlineStart:rt.paddingXS,textAlign:"center",[`${Ut}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${et}-selection-column${et}-cell-fix-left`]:{zIndex:rt.zIndexTableFixed+1},[`table tr th${et}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${et}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${et}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${rt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${rt.tablePaddingHorizontal/4}px`,[Xt]:{color:jn,fontSize:gn,verticalAlign:"baseline","&:hover":{color:Xn}}}}}},vc=rt=>{const{componentCls:et}=rt,Ut=(Xt,gn,nn,Vn)=>({[`${et}${et}-${Xt}`]:{fontSize:Vn,[`
${et}-title,
${et}-footer,
${et}-cell,
${et}-thead > tr > th,
${et}-tbody > tr > th,
${et}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{padding:`${gn}px ${nn}px`},[`${et}-filter-trigger`]:{marginInlineEnd:`-${nn/2}px`},[`${et}-expanded-row-fixed`]:{margin:`-${gn}px -${nn}px`},[`${et}-tbody`]:{[`${et}-wrapper:only-child ${et}`]:{marginBlock:`-${gn}px`,marginInline:`${rt.tableExpandColumnWidth-nn}px -${nn}px`}},[`${et}-selection-column`]:{paddingInlineStart:`${nn/4}px`}}});return{[`${et}-wrapper`]:Object.assign(Object.assign({},Ut("middle",rt.tablePaddingVerticalMiddle,rt.tablePaddingHorizontalMiddle,rt.tableFontSizeMiddle)),Ut("small",rt.tablePaddingVerticalSmall,rt.tablePaddingHorizontalSmall,rt.tableFontSizeSmall))}},du=rt=>{const{componentCls:et,marginXXS:Ut,fontSizeIcon:Xt,tableHeaderIconColor:gn,tableHeaderIconColorHover:nn}=rt;return{[`${et}-wrapper`]:{[`${et}-thead th${et}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${rt.motionDurationSlow}`,"&:hover":{background:rt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:rt.colorPrimary},[`
&${et}-cell-fix-left:hover,
&${et}-cell-fix-right:hover
`]:{background:rt.tableFixedHeaderSortActiveBg}},[`${et}-thead th${et}-column-sort`]:{background:rt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${et}-column-sort`]:{background:rt.tableBodySortBg},[`${et}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${et}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${et}-column-sorter`]:{marginInlineStart:Ut,color:gn,fontSize:0,transition:`color ${rt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:Xt,"&.active":{color:rt.colorPrimary}},[`${et}-column-sorter-up + ${et}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${et}-column-sorters:hover ${et}-column-sorter`]:{color:nn}}}},ac=rt=>{const{componentCls:et,opacityLoading:Ut,tableScrollThumbBg:Xt,tableScrollThumbBgHover:gn,tableScrollThumbSize:nn,tableScrollBg:Vn,zIndexTableSticky:jn,stickyScrollBarBorderRadius:Xn}=rt,yi=`${rt.lineWidth}px ${rt.lineType} ${rt.tableBorderColor}`;return{[`${et}-wrapper`]:{[`${et}-sticky`]:{"&-holder":{position:"sticky",zIndex:jn,background:rt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${nn}px !important`,zIndex:jn,display:"flex",alignItems:"center",background:Vn,borderTop:yi,opacity:Ut,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:nn,backgroundColor:Xt,borderRadius:Xn,transition:`all ${rt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:gn}}}}}}},au=rt=>{const{componentCls:et,lineWidth:Ut,tableBorderColor:Xt}=rt,gn=`${Ut}px ${rt.lineType} ${Xt}`;return{[`${et}-wrapper`]:{[`${et}-summary`]:{position:"relative",zIndex:rt.zIndexTableFixed,background:rt.tableBg,"> tr":{"> th, > td":{borderBottom:gn}}},[`div${et}-summary`]:{boxShadow:`0 -${Ut}px 0 ${Xt}`}}}},Wu=rt=>{const{componentCls:et}=rt,Ut=`${rt.lineWidth}px ${rt.lineType} ${rt.tableBorderColor}`,Xt=`${et}-expanded-row-cell`;return{[`${et}-wrapper`]:{[`${et}-tbody-virtual`]:{[`${et}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${et}-cell`]:{borderBottom:Ut},[`${et}-expanded-row`]:{[`${Xt}${Xt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${rt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${et}-bordered`]:{[`${et}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:Ut,position:"absolute"},[`${et}-cell`]:{borderInlineEnd:Ut,[`&${et}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-rt.lineWidth,borderInlineStart:Ut}}}}}}};const Au=rt=>{const{componentCls:et,fontWeightStrong:Ut,tablePaddingVertical:Xt,tablePaddingHorizontal:gn,lineWidth:nn,lineType:Vn,tableBorderColor:jn,tableFontSize:Xn,tableBg:yi,tableRadius:Jn,tableHeaderTextColor:mi,motionDurationMid:or,tableHeaderBg:Vi,tableHeaderCellSplitColor:Ui,tableRowHoverBg:Jr,tableSelectedRowBg:ir,tableSelectedRowHoverBg:Rr,tableFooterTextColor:jr,tableFooterBg:vo,paddingContentVerticalLG:Vo}=rt,ua=`${nn}px ${Vn} ${jn}`;return{[`${et}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,ji.dF)()),{[et]:Object.assign(Object.assign({},(0,ji.Wf)(rt)),{fontSize:Xn,background:yi,borderRadius:`${Jn}px ${Jn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Jn}px ${Jn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
${et}-cell,
${et}-thead > tr > th,
${et}-tbody > tr > th,
${et}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{position:"relative",padding:`${Vo}px ${gn}px`,overflowWrap:"break-word"},[`${et}-title`]:{padding:`${Xt}px ${gn}px`},[`${et}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:mi,fontWeight:Ut,textAlign:"start",background:Vi,borderBottom:ua,transition:`background ${or} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${et}-selection-column):not(${et}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Ui,transform:"translateY(-50%)",transition:`background-color ${or}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${et}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${or}, border-color ${or}`,borderBottom:ua,[`
> ${et}-wrapper:only-child,
> ${et}-expanded-row-fixed > ${et}-wrapper:only-child
`]:{[et]:{marginBlock:`-${Xt}px`,marginInline:`${rt.tableExpandColumnWidth-gn}px -${gn}px`,[`${et}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:mi,fontWeight:Ut,textAlign:"start",background:Vi,borderBottom:ua,transition:`background ${or} ease`},[`
&${et}-row:hover > th,
&${et}-row:hover > td,
> th${et}-cell-row-hover,
> td${et}-cell-row-hover
`]:{background:Jr},[`&${et}-row-selected`]:{"> th, > td":{background:ir},"&:hover > th, &:hover > td":{background:Rr}}}},[`${et}-footer`]:{padding:`${Xt}px ${gn}px`,color:jr,background:vo}})}};var yc=(0,Ai.Z)("Table",rt=>{const{colorTextHeading:et,colorSplit:Ut,colorIcon:Xt,colorIconHover:gn,opacityLoading:nn,colorBgContainer:Vn,controlInteractiveSize:jn,headerBg:Xn,headerColor:yi,headerSortActiveBg:Jn,headerSortHoverBg:mi,bodySortBg:or,rowHoverBg:Vi,rowSelectedBg:Ui,rowSelectedHoverBg:Jr,rowExpandedBg:ir,cellPaddingBlock:Rr,cellPaddingInline:jr,cellPaddingBlockMD:vo,cellPaddingInlineMD:Vo,cellPaddingBlockSM:ua,cellPaddingInlineSM:oo,borderColor:Wo,footerBg:Ta,footerColor:uo,headerBorderRadius:To,cellFontSize:co,cellFontSizeMD:Ar,cellFontSizeSM:Fo,headerSplitColor:ta,fixedHeaderSortActiveBg:Sa,headerFilterHoverBg:Pa,filterDropdownBg:ao,expandIconBg:ka,selectionColumnWidth:Va,stickyScrollBarBg:bs}=rt,us=new vr.C(Xt),qs=new vr.C(gn),Ls=2,Za=(0,Wr.TS)(rt,{tableFontSize:co,tableBg:Vn,tableRadius:To,tablePaddingVertical:Rr,tablePaddingHorizontal:jr,tablePaddingVerticalMiddle:vo,tablePaddingHorizontalMiddle:Vo,tablePaddingVerticalSmall:ua,tablePaddingHorizontalSmall:oo,tableBorderColor:Wo,tableHeaderTextColor:yi,tableHeaderBg:Xn,tableFooterTextColor:uo,tableFooterBg:Ta,tableHeaderCellSplitColor:ta,tableHeaderSortBg:Jn,tableHeaderSortHoverBg:mi,tableHeaderIconColor:us.clone().setAlpha(us.getAlpha()*nn).toRgbString(),tableHeaderIconColorHover:qs.clone().setAlpha(qs.getAlpha()*nn).toRgbString(),tableBodySortBg:or,tableFixedHeaderSortActiveBg:Sa,tableHeaderFilterActiveBg:Pa,tableFilterDropdownBg:ao,tableRowHoverBg:Vi,tableSelectedRowBg:Ui,tableSelectedRowHoverBg:Jr,zIndexTableFixed:Ls,zIndexTableSticky:Ls+1,tableFontSizeMiddle:Ar,tableFontSizeSmall:Fo,tableSelectionColumnWidth:Va,tableExpandIconBg:ka,tableExpandColumnWidth:jn+2*rt.padding,tableExpandedRowBg:ir,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:bs,tableScrollThumbBgHover:et,tableScrollBg:Ut});return[Au(Za),_s(Za),au(Za),du(Za),wo(Za),Br(Za),Hs(Za),xa(Za),au(Za),gr(Za),kc(Za),El(Za),ac(Za),Or(Za),vc(Za),rc(Za),Wu(Za)]},rt=>{const{colorFillAlter:et,colorBgContainer:Ut,colorTextHeading:Xt,colorFillSecondary:gn,colorFillContent:nn,controlItemBgActive:Vn,controlItemBgActiveHover:jn,padding:Xn,paddingSM:yi,paddingXS:Jn,colorBorderSecondary:mi,borderRadiusLG:or,fontSize:Vi,controlHeight:Ui,colorTextPlaceholder:Jr}=rt,ir=new vr.C(gn).onBackground(Ut).toHexShortString(),Rr=new vr.C(nn).onBackground(Ut).toHexShortString(),jr=new vr.C(et).onBackground(Ut).toHexShortString();return{headerBg:jr,headerColor:Xt,headerSortActiveBg:ir,headerSortHoverBg:Rr,bodySortBg:jr,rowHoverBg:jr,rowSelectedBg:Vn,rowSelectedHoverBg:jn,rowExpandedBg:et,cellPaddingBlock:Xn,cellPaddingInline:Xn,cellPaddingBlockMD:yi,cellPaddingInlineMD:Jn,cellPaddingBlockSM:Jn,cellPaddingInlineSM:Jn,borderColor:mi,headerBorderRadius:or,footerBg:jr,footerColor:Xt,cellFontSize:Vi,cellFontSizeMD:Vi,cellFontSizeSM:Vi,headerSplitColor:mi,fixedHeaderSortActiveBg:ir,headerFilterHoverBg:nn,filterDropdownMenuBg:Ut,filterDropdownBg:Ut,expandIconBg:Ut,selectionColumnWidth:Ui,stickyScrollBarBg:Jr,stickyScrollBarBorderRadius:100}});const bd=[],_d=(rt,et)=>{const{prefixCls:Ut,className:Xt,rootClassName:gn,style:nn,size:Vn,bordered:jn,dropdownPrefixCls:Xn,dataSource:yi,pagination:Jn,rowSelection:mi,rowKey:or="key",rowClassName:Vi,columns:Ui,children:Jr,childrenColumnName:ir,onChange:Rr,getPopupContainer:jr,loading:vo,expandIcon:Vo,expandable:ua,expandedRowRender:oo,expandIconColumnIndex:Wo,indentSize:Ta,scroll:uo,sortDirections:To,locale:co,showSorterTooltip:Ar=!0,virtual:Fo}=rt,ta=Me.useMemo(()=>Ui||on(Jr),[Ui,Jr]),Sa=Me.useMemo(()=>ta.some(ws=>ws.responsive),[ta]),Pa=(0,pi.Z)(Sa),ao=Me.useMemo(()=>{const ws=new Set(Object.keys(Pa).filter(Ys=>Pa[Ys]));return ta.filter(Ys=>!Ys.responsive||Ys.responsive.some(vl=>ws.has(vl)))},[ta,Pa]),ka=(0,Eo.Z)(rt,["className","style","columns"]),{locale:Va=io.Z,direction:bs,table:us,renderEmpty:qs,getPrefixCls:Ls,getPopupContainer:Za}=Me.useContext(os.E_),aa=(0,Qr.Z)(Vn),fs=Object.assign(Object.assign({},Va.Table),co),el=yi||bd,Ws=Ls("table",Ut),cl=Ls("dropdown",Xn),ba=Object.assign({childrenColumnName:ir,expandIconColumnIndex:Wo},ua),{childrenColumnName:da="children"}=ba,wa=Me.useMemo(()=>el.some(ws=>ws==null?void 0:ws[da])?"nest":oo||ua&&ua.expandedRowRender?"row":null,[el]),Xo={body:Me.useRef()},Ps=Me.useMemo(()=>typeof or=="function"?or:ws=>ws==null?void 0:ws[or],[or]),[Uo]=Mi(el,da,Ps),Ra={},ss=function(ws,Ys){let vl=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Xs,ms,yl;const Su=Object.assign(Object.assign({},Ra),ws);vl&&((Xs=Ra.resetPagination)===null||Xs===void 0||Xs.call(Ra),!((ms=Su.pagination)===null||ms===void 0)&&ms.current&&(Su.pagination.current=1),Jn&&Jn.onChange&&Jn.onChange(1,(yl=Su.pagination)===null||yl===void 0?void 0:yl.pageSize)),uo&&uo.scrollToFirstRowOnChange!==!1&&Xo.body.current&&(0,Na.Z)(0,{getContainer:()=>Xo.body.current}),Rr==null||Rr(Su.pagination,Su.filters,Su.sorter,{currentDataSource:Gi(Bi(el,Su.sorterStates,da),Su.filterStates),action:Ys})},cs=(ws,Ys)=>{ss({sorter:ws,sorterStates:Ys},"sort",!1)},[Al,bl,Vl,Fs]=Pr({prefixCls:Ws,mergedColumns:ao,onSorterChange:cs,sortDirections:To||["ascend","descend"],tableLocale:fs,showSorterTooltip:Ar}),Zl=Me.useMemo(()=>Bi(el,bl,da),[el,bl]);Ra.sorter=Fs(),Ra.sorterStates=bl;const dl=(ws,Ys)=>{ss({filters:ws,filterStates:Ys},"filter",!0)},[Fl,_c,Bs]=oi({prefixCls:Ws,locale:fs,dropdownPrefixCls:cl,mergedColumns:ao,onFilterChange:dl,getPopupContainer:jr||Za}),Ts=Gi(Zl,_c);Ra.filters=Bs,Ra.filterStates=_c;const Ms=Me.useMemo(()=>{const ws={};return Object.keys(Bs).forEach(Ys=>{Bs[Ys]!==null&&(ws[Ys]=Bs[Ys])}),Object.assign(Object.assign({},Vl),{filters:ws})},[Vl,Bs]),[Gs]=So(Ms),pl=(ws,Ys)=>{ss({pagination:Object.assign(Object.assign({},Ra.pagination),{current:ws,pageSize:Ys})},"paginate")},[is,js]=Ka(Ts.length,pl,Jn);Ra.pagination=Jn===!1?{}:$o(is,Jn),Ra.resetPagination=js;const Dl=Me.useMemo(()=>{if(Jn===!1||!is.pageSize)return Ts;const{current:ws=1,total:Ys,pageSize:vl=ga}=is;return Ts.length<Ys?Ts.length>vl?Ts.slice((ws-1)*vl,ws*vl):Ts:Ts.slice((ws-1)*vl,ws*vl)},[!!Jn,Ts,is&&is.current,is&&is.pageSize,is&&is.total]),[Ul,Gu]=Ha({prefixCls:Ws,data:Ts,pageData:Dl,getRowKey:Ps,getRecordByKey:Uo,expandType:wa,childrenColumnName:da,locale:fs,getPopupContainer:jr||Za},mi),Du=(ws,Ys,vl)=>{let Xs;return typeof Vi=="function"?Xs=ot()(Vi(ws,Ys,vl)):Xs=ot()(Vi),ot()({[`${Ws}-row-selected`]:Gu.has(Ps(ws,Ys))},Xs)};ba.__PARENT_RENDER_ICON__=ba.expandIcon,ba.expandIcon=ba.expandIcon||Vo||$a(fs),wa==="nest"&&ba.expandIconColumnIndex===void 0?ba.expandIconColumnIndex=mi?1:0:ba.expandIconColumnIndex>0&&mi&&(ba.expandIconColumnIndex-=1),typeof ba.indentSize!="number"&&(ba.indentSize=typeof Ta=="number"?Ta:15);const ml=Me.useCallback(ws=>Gs(Ul(Fl(Al(ws)))),[Al,Fl,Ul]);let Iu,Ou;if(Jn!==!1&&(is!=null&&is.total)){let ws;is.size?ws=is.size:ws=aa==="small"||aa==="middle"?"small":void 0;const Ys=ms=>Me.createElement(ro.Z,Object.assign({},is,{className:ot()(`${Ws}-pagination ${Ws}-pagination-${ms}`,is.className),size:ws})),vl=bs==="rtl"?"left":"right",{position:Xs}=is;if(Xs!==null&&Array.isArray(Xs)){const ms=Xs.find(xc=>xc.includes("top")),yl=Xs.find(xc=>xc.includes("bottom")),Su=Xs.every(xc=>`${xc}`=="none");!ms&&!yl&&!Su&&(Ou=Ys(vl)),ms&&(Iu=Ys(ms.toLowerCase().replace("top",""))),yl&&(Ou=Ys(yl.toLowerCase().replace("bottom","")))}else Ou=Ys(vl)}let Ns;typeof vo=="boolean"?Ns={spinning:vo}:typeof vo=="object"&&(Ns=Object.assign({spinning:!0},vo));const[Hl,$s]=yc(Ws),[,zs]=(0,Ca.Z)(),$u=ot()(`${Ws}-wrapper`,us==null?void 0:us.className,{[`${Ws}-wrapper-rtl`]:bs==="rtl"},Xt,gn,$s),Vc=Object.assign(Object.assign({},us==null?void 0:us.style),nn),sc=co&&co.emptyText||(qs==null?void 0:qs("Table"))||Me.createElement(xo.Z,{componentName:"Table"}),lc=Fo?pr:fr,Ku={},Tu=Me.useMemo(()=>{const{fontSize:ws,lineHeight:Ys,padding:vl,paddingXS:Xs,paddingSM:ms}=zs,yl=Math.floor(ws*Ys);switch(aa){case"large":return vl*2+yl;case"small":return Xs*2+yl;default:return ms*2+yl}},[zs,aa]);return Fo&&(Ku.listItemHeight=Tu),Hl(Me.createElement("div",{ref:et,className:$u,style:Vc},Me.createElement(Ja.Z,Object.assign({spinning:!1},Ns),Iu,Me.createElement(lc,Object.assign({},Ku,ka,{columns:ao,direction:bs,expandable:ba,prefixCls:Ws,className:ot()({[`${Ws}-middle`]:aa==="middle",[`${Ws}-small`]:aa==="small",[`${Ws}-bordered`]:jn,[`${Ws}-empty`]:el.length===0}),data:Dl,rowKey:Ps,rowClassName:Du,emptyText:sc,internalHooks:ke,internalRefs:Xo,transformColumns:ml})),Ou)))};var Fd=Me.forwardRef(_d);const ch=(rt,et)=>{const Ut=Me.useRef(0);return Ut.current+=1,Me.createElement(Fd,Object.assign({},rt,{ref:et,_renderTimes:Ut.current}))},li=Me.forwardRef(ch);li.SELECTION_COLUMN=ma,li.EXPAND_COLUMN=le,li.SELECTION_ALL=ya,li.SELECTION_INVERT=bo,li.SELECTION_NONE=oa,li.Column=Lo,li.ColumnGroup=la,li.Summary=at;var fo=li,Xa=fo},12563:function(On,pn,pe){"use strict";pe.d(pn,{default:function(){return dt}});var le=pe(59301),ke=pe(99267),We=pe(92310),ut=pe.n(We),Ge=pe(36785),Ue=pe(47729),Me=pe(14088),Ct=pe(36355),wt=pe(17313),$e=pe(37613),Ft=pe(83116);const lt=He=>{const{paddingXXS:Nt,lineWidth:ot,tagPaddingHorizontal:Tt,componentCls:xt}=He,Ot=Tt-ot,Wt=Nt-ot;return{[xt]:Object.assign(Object.assign({},(0,wt.Wf)(He)),{display:"inline-block",height:"auto",marginInlineEnd:He.marginXS,paddingInline:Ot,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",[`&${xt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:He.defaultColor},[`${xt}-close-icon`]:{marginInlineStart:Wt,color:He.colorTextDescription,fontSize:He.tagIconSize,cursor:"pointer",transition:`all ${He.motionDurationMid}`,"&:hover":{color:He.colorTextHeading}},[`&${xt}-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(${xt}-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:Ot}}),[`${xt}-borderless`]:{borderColor:"transparent",background:He.tagBorderlessBg}}},vt=He=>{const{lineWidth:Nt,fontSizeIcon:ot}=He,Tt=He.fontSizeSM,xt=`${He.lineHeightSM*Tt}px`;return(0,$e.TS)(He,{tagFontSize:Tt,tagLineHeight:xt,tagIconSize:ot-2*Nt,tagPaddingHorizontal:8,tagBorderlessBg:He.colorFillTertiary})},Ie=He=>({defaultBg:He.colorFillQuaternary,defaultColor:He.colorText});var te=(0,Ft.Z)("Tag",He=>{const Nt=vt(He);return lt(Nt)},Ie),ee=function(He,Nt){var ot={};for(var Tt in He)Object.prototype.hasOwnProperty.call(He,Tt)&&Nt.indexOf(Tt)<0&&(ot[Tt]=He[Tt]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xt=0,Tt=Object.getOwnPropertySymbols(He);xt<Tt.length;xt++)Nt.indexOf(Tt[xt])<0&&Object.prototype.propertyIsEnumerable.call(He,Tt[xt])&&(ot[Tt[xt]]=He[Tt[xt]]);return ot},se=He=>{const{prefixCls:Nt,style:ot,className:Tt,checked:xt,onChange:Ot,onClick:Wt}=He,Dt=ee(He,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:tt,tag:Ve}=le.useContext(Ct.E_),_t=ln=>{Ot==null||Ot(!xt),Wt==null||Wt(ln)},vn=tt("tag",Nt),[yn,zt]=te(vn),qt=ut()(vn,`${vn}-checkable`,{[`${vn}-checkable-checked`]:xt},Ve==null?void 0:Ve.className,Tt,zt);return yn(le.createElement("span",Object.assign({},Dt,{style:Object.assign(Object.assign({},ot),Ve==null?void 0:Ve.style),className:qt,onClick:_t})))},he=pe(45157);const ve=He=>(0,he.Z)(He,(Nt,ot)=>{let{textColor:Tt,lightBorderColor:xt,lightColor:Ot,darkColor:Wt}=ot;return{[`${He.componentCls}-${Nt}`]:{color:Tt,background:Ot,borderColor:xt,"&-inverse":{color:He.colorTextLightSolid,background:Wt,borderColor:Wt},[`&${He.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Ee=(0,Ft.b)(["Tag","preset"],He=>{const Nt=vt(He);return ve(Nt)},Ie);function Be(He){return typeof He!="string"?He:He.charAt(0).toUpperCase()+He.slice(1)}const Le=(He,Nt,ot)=>{const Tt=Be(ot);return{[`${He.componentCls}-${Nt}`]:{color:He[`color${ot}`],background:He[`color${Tt}Bg`],borderColor:He[`color${Tt}Border`],[`&${He.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ze=(0,Ft.b)(["Tag","status"],He=>{const Nt=vt(He);return[Le(Nt,"success","Success"),Le(Nt,"processing","Info"),Le(Nt,"error","Error"),Le(Nt,"warning","Warning")]},Ie),je=function(He,Nt){var ot={};for(var Tt in He)Object.prototype.hasOwnProperty.call(He,Tt)&&Nt.indexOf(Tt)<0&&(ot[Tt]=He[Tt]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xt=0,Tt=Object.getOwnPropertySymbols(He);xt<Tt.length;xt++)Nt.indexOf(Tt[xt])<0&&Object.prototype.propertyIsEnumerable.call(He,Tt[xt])&&(ot[Tt[xt]]=He[Tt[xt]]);return ot};const Xe=(He,Nt)=>{const{prefixCls:ot,className:Tt,rootClassName:xt,style:Ot,children:Wt,icon:Dt,color:tt,onClose:Ve,closeIcon:_t,closable:vn,bordered:yn=!0}=He,zt=je(He,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:qt,direction:ln,tag:Gn}=le.useContext(Ct.E_),[un,_n]=le.useState(!0);le.useEffect(()=>{"visible"in zt&&_n(zt.visible)},[zt.visible]);const St=(0,Ge.o2)(tt),Zn=(0,Ge.yT)(tt),ci=St||Zn,Ze=Object.assign(Object.assign({backgroundColor:tt&&!ci?tt:void 0},Gn==null?void 0:Gn.style),Ot),be=qt("tag",ot),[Pe,Ae]=te(be),Oe=ut()(be,Gn==null?void 0:Gn.className,{[`${be}-${tt}`]:ci,[`${be}-has-color`]:tt&&!ci,[`${be}-hidden`]:!un,[`${be}-rtl`]:ln==="rtl",[`${be}-borderless`]:!yn},Tt,xt,Ae),xe=Bt=>{Bt.stopPropagation(),Ve==null||Ve(Bt),!Bt.defaultPrevented&&_n(!1)},[,ct]=(0,Ue.Z)(vn,_t,Bt=>Bt===null?le.createElement(ke.Z,{className:`${be}-close-icon`,onClick:xe}):le.createElement("span",{className:`${be}-close-icon`,onClick:xe},Bt),null,!1),Mt=typeof zt.onClick=="function"||Wt&&Wt.type==="a",at=Dt||null,qe=at?le.createElement(le.Fragment,null,at,Wt&&le.createElement("span",null,Wt)):Wt,Lt=le.createElement("span",Object.assign({},zt,{ref:Nt,className:Oe,style:Ze}),qe,ct,St&&le.createElement(Ee,{key:"preset",prefixCls:be}),Zn&&le.createElement(ze,{key:"status",prefixCls:be}));return Pe(Mt?le.createElement(Me.Z,{component:"Tag"},Lt):Lt)},Ye=le.forwardRef(Xe);Ye.CheckableTag=se;var dt=Ye},10777:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ze}});var le=pe(92310),ke=pe.n(le),We=pe(59301),ut=pe(36355),Ge=function(je,Xe){var Ye={};for(var dt in je)Object.prototype.hasOwnProperty.call(je,dt)&&Xe.indexOf(dt)<0&&(Ye[dt]=je[dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,dt=Object.getOwnPropertySymbols(je);He<dt.length;He++)Xe.indexOf(dt[He])<0&&Object.prototype.propertyIsEnumerable.call(je,dt[He])&&(Ye[dt[He]]=je[dt[He]]);return Ye},Me=je=>{var{prefixCls:Xe,className:Ye,color:dt="blue",dot:He,pending:Nt=!1,position:ot,label:Tt,children:xt}=je,Ot=Ge(je,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:Wt}=We.useContext(ut.E_),Dt=Wt("timeline",Xe),tt=ke()(`${Dt}-item`,{[`${Dt}-item-pending`]:Nt},Ye),Ve=/blue|red|green|gray/.test(dt||"")?void 0:dt,_t=ke()(`${Dt}-item-head`,{[`${Dt}-item-head-custom`]:!!He,[`${Dt}-item-head-${dt}`]:!Ve});return We.createElement("li",Object.assign({},Ot,{className:tt}),Tt&&We.createElement("div",{className:`${Dt}-item-label`},Tt),We.createElement("div",{className:`${Dt}-item-tail`}),We.createElement("div",{className:_t,style:{borderColor:Ve,color:Ve}},He),We.createElement("div",{className:`${Dt}-item-content`},xt))},Ct=pe(19127),wt=pe(58617),$e=function(je,Xe){var Ye={};for(var dt in je)Object.prototype.hasOwnProperty.call(je,dt)&&Xe.indexOf(dt)<0&&(Ye[dt]=je[dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,dt=Object.getOwnPropertySymbols(je);He<dt.length;He++)Xe.indexOf(dt[He])<0&&Object.prototype.propertyIsEnumerable.call(je,dt[He])&&(Ye[dt[He]]=je[dt[He]]);return Ye},lt=je=>{var{prefixCls:Xe,className:Ye,pending:dt=!1,children:He,items:Nt,rootClassName:ot,reverse:Tt=!1,direction:xt,hashId:Ot,pendingDot:Wt,mode:Dt=""}=je,tt=$e(je,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const Ve=(un,_n)=>Dt==="alternate"?un==="right"?`${Xe}-item-right`:un==="left"?`${Xe}-item-left`:_n%2===0?`${Xe}-item-left`:`${Xe}-item-right`:Dt==="left"?`${Xe}-item-left`:Dt==="right"?`${Xe}-item-right`:un==="right"?`${Xe}-item-right`:"",_t=(0,Ct.Z)(Nt||[]),vn=typeof dt=="boolean"?null:dt;dt&&_t.push({pending:!!dt,dot:Wt||We.createElement(wt.Z,null),children:vn}),Tt&&_t.reverse();const yn=_t.length,zt=`${Xe}-item-last`,qt=_t.filter(un=>!!un).map((un,_n)=>{var St;const Zn=_n===yn-2?zt:"",ci=_n===yn-1?zt:"",{className:Ze}=un,be=$e(un,["className"]);return We.createElement(Me,Object.assign({},be,{className:ke()([Ze,!Tt&&dt?Zn:ci,Ve((St=un==null?void 0:un.position)!==null&&St!==void 0?St:"",_n)]),key:(un==null?void 0:un.key)||_n}))}),ln=_t.some(un=>!!(un!=null&&un.label)),Gn=ke()(Xe,{[`${Xe}-pending`]:!!dt,[`${Xe}-reverse`]:!!Tt,[`${Xe}-${Dt}`]:!!Dt&&!ln,[`${Xe}-label`]:ln,[`${Xe}-rtl`]:xt==="rtl"},Ye,ot,Ot);return We.createElement("ul",Object.assign({},tt,{className:Gn}),qt)},vt=pe(11592);function Ie(je,Xe){return je&&Array.isArray(je)?je:(0,vt.Z)(Xe).map(Ye=>{var dt,He;return Object.assign({children:(He=(dt=Ye==null?void 0:Ye.props)===null||dt===void 0?void 0:dt.children)!==null&&He!==void 0?He:""},Ye.props)})}var te=Ie,ee=pe(17313),de=pe(83116),se=pe(37613);const he=je=>{const{componentCls:Xe}=je;return{[Xe]:Object.assign(Object.assign({},(0,ee.Wf)(je)),{margin:0,padding:0,listStyle:"none",[`${Xe}-item`]:{position:"relative",margin:0,paddingBottom:je.itemPaddingBottom,fontSize:je.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:je.itemHeadSize,insetInlineStart:(je.itemHeadSize-je.tailWidth)/2,height:`calc(100% - ${je.itemHeadSize}px)`,borderInlineStart:`${je.tailWidth}px ${je.lineType} ${je.tailColor}`},"&-pending":{[`${Xe}-item-head`]:{fontSize:je.fontSizeSM,backgroundColor:"transparent"},[`${Xe}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:je.itemHeadSize,height:je.itemHeadSize,backgroundColor:je.dotBg,border:`${je.dotBorderWidth}px ${je.lineType} transparent`,borderRadius:"50%","&-blue":{color:je.colorPrimary,borderColor:je.colorPrimary},"&-red":{color:je.colorError,borderColor:je.colorError},"&-green":{color:je.colorSuccess,borderColor:je.colorSuccess},"&-gray":{color:je.colorTextDisabled,borderColor:je.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:je.itemHeadSize/2,insetInlineStart:je.itemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:je.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(je.fontSize*je.lineHeight-je.fontSize)+je.lineWidth,marginInlineStart:je.margin+je.itemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${Xe}-item-tail`]:{display:"none"},[`> ${Xe}-item-content`]:{minHeight:je.controlHeightLG*1.2}}},[`&${Xe}-alternate,
&${Xe}-right,
&${Xe}-label`]:{[`${Xe}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${je.marginXXS}px`,"&-custom":{marginInlineStart:je.tailWidth/2}},"&-left":{[`${Xe}-item-content`]:{insetInlineStart:`calc(50% - ${je.marginXXS}px)`,width:`calc(50% - ${je.marginSM}px)`,textAlign:"start"}},"&-right":{[`${Xe}-item-content`]:{width:`calc(50% - ${je.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${Xe}-right`]:{[`${Xe}-item-right`]:{[`${Xe}-item-tail,
${Xe}-item-head,
${Xe}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(je.itemHeadSize+je.tailWidth)/2}px)`},[`${Xe}-item-content`]:{width:`calc(100% - ${je.itemHeadSize+je.marginXS}px)`}}},[`&${Xe}-pending
${Xe}-item-last
${Xe}-item-tail`]:{display:"block",height:`calc(100% - ${je.margin}px)`,borderInlineStart:`${je.tailWidth}px dotted ${je.tailColor}`},[`&${Xe}-reverse
${Xe}-item-last
${Xe}-item-tail`]:{display:"none"},[`&${Xe}-reverse ${Xe}-item-pending`]:{[`${Xe}-item-tail`]:{insetBlockStart:je.margin,display:"block",height:`calc(100% - ${je.margin}px)`,borderInlineStart:`${je.tailWidth}px dotted ${je.tailColor}`},[`${Xe}-item-content`]:{minHeight:je.controlHeightLG*1.2}},[`&${Xe}-label`]:{[`${Xe}-item-label`]:{position:"absolute",insetBlockStart:-(je.fontSize*je.lineHeight-je.fontSize)+je.tailWidth,width:`calc(50% - ${je.marginSM}px)`,textAlign:"end"},[`${Xe}-item-right`]:{[`${Xe}-item-label`]:{insetInlineStart:`calc(50% + ${je.marginSM}px)`,width:`calc(50% - ${je.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${Xe}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}};var ve=(0,de.Z)("Timeline",je=>{const Xe=(0,se.TS)(je,{itemHeadSize:10,customHeadPaddingVertical:je.paddingXXS,paddingInlineEnd:2});return[he(Xe)]},je=>({tailColor:je.colorSplit,tailWidth:je.lineWidthBold,dotBorderWidth:je.wireframe?je.lineWidthBold:je.lineWidth*3,dotBg:je.colorBgContainer,itemPaddingBottom:je.padding*1.25})),Ee=function(je,Xe){var Ye={};for(var dt in je)Object.prototype.hasOwnProperty.call(je,dt)&&Xe.indexOf(dt)<0&&(Ye[dt]=je[dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,dt=Object.getOwnPropertySymbols(je);He<dt.length;He++)Xe.indexOf(dt[He])<0&&Object.prototype.propertyIsEnumerable.call(je,dt[He])&&(Ye[dt[He]]=je[dt[He]]);return Ye};const Be=je=>{const{getPrefixCls:Xe,direction:Ye,timeline:dt}=We.useContext(ut.E_),{prefixCls:He,children:Nt,items:ot,className:Tt,style:xt}=je,Ot=Ee(je,["prefixCls","children","items","className","style"]),Wt=Xe("timeline",He),[Dt,tt]=ve(Wt),Ve=te(ot,Nt);return Dt(We.createElement(lt,Object.assign({},Ot,{className:ke()(dt==null?void 0:dt.className,Tt),style:Object.assign(Object.assign({},dt==null?void 0:dt.style),xt),prefixCls:Wt,direction:Ye,items:Ve,hashId:tt})))};Be.Item=Me;var Le=Be,ze=Le},17574:function(On,pn,pe){"use strict";pe.d(pn,{default:function(){return tt}});var le=pe(43858),ke=pe(19127),We=pe(52671),ut=pe(8657),Ge=pe(96663),Ue=pe(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},Ct=Me,wt=pe(7657),$e=function(_t,vn){return Ue.createElement(wt.Z,(0,Ge.Z)({},_t,{ref:vn,icon:Ct}))},Ft=Ue.forwardRef($e),lt=Ft,vt=pe(92310),Ie=pe.n(vt),te=pe(35654),ee=pe(71430),de=pe(36355),se=pe(56082),he=pe(62892),ve=pe(20648);const Ee=4;function Be(Ve){const{dropPosition:_t,dropLevelOffset:vn,prefixCls:yn,indent:zt,direction:qt="ltr"}=Ve,ln=qt==="ltr"?"left":"right",Gn=qt==="ltr"?"right":"left",un={[ln]:-vn*zt+Ee,[Gn]:0};switch(_t){case-1:un.top=-3;break;case 1:un.bottom=-3;break;default:un.bottom=-3,un[ln]=zt+Ee;break}return Ue.createElement("div",{style:un,className:`${yn}-drop-indicator`})}var Le=pe(71997),je=Ue.forwardRef((Ve,_t)=>{const{getPrefixCls:vn,direction:yn,virtual:zt,tree:qt}=Ue.useContext(de.E_),{prefixCls:ln,className:Gn,showIcon:un=!1,showLine:_n,switcherIcon:St,blockNode:Zn=!1,children:ci,checkable:Ze=!1,selectable:be=!0,draggable:Pe,motion:Ae,style:Oe}=Ve,xe=vn("tree",ln),ct=vn(),Mt=Ae!=null?Ae:Object.assign(Object.assign({},(0,he.Z)(ct)),{motionAppear:!1}),at=Object.assign(Object.assign({},Ve),{checkable:Ze,selectable:be,showIcon:un,motion:Mt,blockNode:Zn,showLine:!!_n,dropIndicatorRender:Be}),[qe,Lt]=(0,ve.ZP)(xe),Bt=Ue.useMemo(()=>{if(!Pe)return!1;let Gt={};switch(typeof Pe){case"function":Gt.nodeDraggable=Pe;break;case"object":Gt=Object.assign({},Pe);break;default:break}return Gt.icon!==!1&&(Gt.icon=Gt.icon||Ue.createElement(se.Z,null)),Gt},[Pe]),ft=Gt=>Ue.createElement(Le.Z,{prefixCls:xe,switcherIcon:St,treeNodeProps:Gt,showLine:_n});return qe(Ue.createElement(le.Z,Object.assign({itemHeight:20,ref:_t,virtual:zt},at,{style:Object.assign(Object.assign({},qt==null?void 0:qt.style),Oe),prefixCls:xe,className:Ie()({[`${xe}-icon-hide`]:!un,[`${xe}-block-node`]:Zn,[`${xe}-unselectable`]:!be,[`${xe}-rtl`]:yn==="rtl"},qt==null?void 0:qt.className,Gn,Lt),direction:yn,checkable:Ze&&Ue.createElement("span",{className:`${xe}-checkbox-inner`}),selectable:be,switcherIcon:ft,draggable:Bt}),ci))}),Xe;(function(Ve){Ve[Ve.None=0]="None",Ve[Ve.Start=1]="Start",Ve[Ve.End=2]="End"})(Xe||(Xe={}));function Ye(Ve,_t){function vn(yn){const{key:zt,children:qt}=yn;_t(zt,yn)!==!1&&Ye(qt||[],_t)}Ve.forEach(vn)}function dt(Ve){let{treeData:_t,expandedKeys:vn,startKey:yn,endKey:zt}=Ve;const qt=[];let ln=Xe.None;if(yn&&yn===zt)return[yn];if(!yn||!zt)return[];function Gn(un){return un===yn||un===zt}return Ye(_t,un=>{if(ln===Xe.End)return!1;if(Gn(un)){if(qt.push(un),ln===Xe.None)ln=Xe.Start;else if(ln===Xe.Start)return ln=Xe.End,!1}else ln===Xe.Start&&qt.push(un);return vn.includes(un)}),qt}function He(Ve,_t){const vn=(0,ke.Z)(_t),yn=[];return Ye(Ve,(zt,qt)=>{const ln=vn.indexOf(zt);return ln!==-1&&(yn.push(qt),vn.splice(ln,1)),!!vn.length}),yn}var Nt=function(Ve,_t){var vn={};for(var yn in Ve)Object.prototype.hasOwnProperty.call(Ve,yn)&&_t.indexOf(yn)<0&&(vn[yn]=Ve[yn]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,yn=Object.getOwnPropertySymbols(Ve);zt<yn.length;zt++)_t.indexOf(yn[zt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,yn[zt])&&(vn[yn[zt]]=Ve[yn[zt]]);return vn};function ot(Ve){const{isLeaf:_t,expanded:vn}=Ve;return _t?Ue.createElement(We.Z,null):vn?Ue.createElement(ut.Z,null):Ue.createElement(lt,null)}function Tt(Ve){let{treeData:_t,children:vn}=Ve;return _t||(0,ee.zn)(vn)}const xt=(Ve,_t)=>{var{defaultExpandAll:vn,defaultExpandParent:yn,defaultExpandedKeys:zt}=Ve,qt=Nt(Ve,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const ln=Ue.useRef(),Gn=Ue.useRef(),un=()=>{const{keyEntities:Bt}=(0,ee.I8)(Tt(qt));let ft;return vn?ft=Object.keys(Bt):yn?ft=(0,te.r7)(qt.expandedKeys||zt||[],Bt):ft=qt.expandedKeys||zt,ft},[_n,St]=Ue.useState(qt.selectedKeys||qt.defaultSelectedKeys||[]),[Zn,ci]=Ue.useState(()=>un());Ue.useEffect(()=>{"selectedKeys"in qt&&St(qt.selectedKeys)},[qt.selectedKeys]),Ue.useEffect(()=>{"expandedKeys"in qt&&ci(qt.expandedKeys)},[qt.expandedKeys]);const Ze=(Bt,ft)=>{var Gt;return"expandedKeys"in qt||ci(Bt),(Gt=qt.onExpand)===null||Gt===void 0?void 0:Gt.call(qt,Bt,ft)},be=(Bt,ft)=>{var Gt;const{multiple:Sn}=qt,{node:an,nativeEvent:rn}=ft,{key:zn=""}=an,kn=Tt(qt),mn=Object.assign(Object.assign({},ft),{selected:!0}),ei=(rn==null?void 0:rn.ctrlKey)||(rn==null?void 0:rn.metaKey),Pi=rn==null?void 0:rn.shiftKey;let Hn;Sn&&ei?(Hn=Bt,ln.current=zn,Gn.current=Hn,mn.selectedNodes=He(kn,Hn)):Sn&&Pi?(Hn=Array.from(new Set([].concat((0,ke.Z)(Gn.current||[]),(0,ke.Z)(dt({treeData:kn,expandedKeys:Zn,startKey:zn,endKey:ln.current}))))),mn.selectedNodes=He(kn,Hn)):(Hn=[zn],ln.current=zn,Gn.current=Hn,mn.selectedNodes=He(kn,Hn)),(Gt=qt.onSelect)===null||Gt===void 0||Gt.call(qt,Hn,mn),"selectedKeys"in qt||St(Hn)},{getPrefixCls:Pe,direction:Ae}=Ue.useContext(de.E_),{prefixCls:Oe,className:xe,showIcon:ct=!0,expandAction:Mt="click"}=qt,at=Nt(qt,["prefixCls","className","showIcon","expandAction"]),qe=Pe("tree",Oe),Lt=Ie()(`${qe}-directory`,{[`${qe}-directory-rtl`]:Ae==="rtl"},xe);return Ue.createElement(je,Object.assign({icon:ot,ref:_t,blockNode:!0},at,{showIcon:ct,expandAction:Mt,prefixCls:qe,className:Lt,expandedKeys:Zn,selectedKeys:_n,onSelect:be,onExpand:Ze}))};var Wt=Ue.forwardRef(xt);const Dt=je;Dt.DirectoryTree=Wt,Dt.TreeNode=le.O;var tt=Dt},20648:function(On,pn,pe){"use strict";pe.d(pn,{TM:function(){return vt},Yk:function(){return lt}});var le=pe(93083),ke=pe(98447),We=pe(17313),ut=pe(8378),Ge=pe(37613),Ue=pe(83116);const Me=new le.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Ct=(Ie,te)=>({[`.${Ie}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${te.motionDurationSlow}`}}}),wt=(Ie,te)=>({[`.${Ie}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:te.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${te.lineWidthBold}px solid ${te.colorPrimary}`,borderRadius:"50%",content:'""'}}}),$e=(Ie,te)=>{const{treeCls:ee,treeNodeCls:de,treeNodePadding:se,titleHeight:he,nodeSelectedBg:ve,nodeHoverBg:Ee}=te,Be=te.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,We.Wf)(te)),{background:te.colorBgContainer,borderRadius:te.borderRadius,transition:`background-color ${te.motionDurationSlow}`,[`&${ee}-rtl`]:{[`${ee}-switcher`]:{"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${ee}-active-focused)`]:Object.assign({},(0,We.oN)(te)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${de}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:se,insetInlineStart:0,border:`1px solid ${te.colorPrimary}`,opacity:0,animationName:Me,animationDuration:te.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${de}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${se}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:te.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,We.oN)(te)),[`&:not(${de}-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 ${te.motionDurationSlow}`,[`${de}:hover &`]:{opacity:.45}},[`&${de}-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({},Ct(Ie,te)),{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:te.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 ${te.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:he/2*.8,height:he/2,borderBottom:`1px solid ${te.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:Be},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:he,margin:0,padding:`0 ${te.paddingXS/2}px`,color:"inherit",lineHeight:`${he}px`,background:"transparent",borderRadius:te.borderRadius,cursor:"pointer",transition:`all ${te.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:Ee},[`&${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"},wt(Ie,te)),[`${de}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${te.colorPrimary}`}},"&-show-line":{[`${ee}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:he/2,bottom:-se,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${de}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${he/2}px !important`}}}}})}},Ft=Ie=>{const{treeCls:te,treeNodeCls:ee,treeNodePadding:de,directoryNodeSelectedBg:se,directoryNodeSelectedColor:he}=Ie;return{[`${te}${te}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:de,insetInlineStart:0,transition:`background-color ${Ie.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Ie.controlItemBgHover}},"> *":{zIndex:1},[`${te}-switcher`]:{transition:`color ${Ie.motionDurationMid}`},[`${te}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${te}-node-selected`]:{color:he,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:se},[`${te}-switcher`]:{color:he},[`${te}-node-content-wrapper`]:{color:he,background:"transparent"}}}}}},lt=(Ie,te)=>{const ee=`.${Ie}`,de=`${ee}-treenode`,se=te.paddingXS/2,he=(0,Ge.TS)(te,{treeCls:ee,treeNodeCls:de,treeNodePadding:se});return[$e(Ie,he),Ft(he)]},vt=Ie=>{const{controlHeightSM:te}=Ie;return{titleHeight:te,nodeHoverBg:Ie.controlItemBgHover,nodeSelectedBg:Ie.controlItemBgActive}};pn.ZP=(0,Ue.Z)("Tree",(Ie,te)=>{let{prefixCls:ee}=te;return[{[Ie.componentCls]:(0,ke.C2)(`${ee}-checkbox`,Ie)},lt(ee,Ie),(0,ut.Z)(Ie)]},Ie=>{const{colorTextLightSolid:te,colorPrimary:ee}=Ie;return Object.assign(Object.assign({},vt(Ie)),{directoryNodeSelectedColor:te,directoryNodeSelectedBg:ee})})},71997:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return de}});var le=pe(96663),ke=pe(59301),We={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"},ut=We,Ge=pe(7657),Ue=function(he,ve){return ke.createElement(Ge.Z,(0,le.Z)({},he,{ref:ve,icon:ut}))},Me=ke.forwardRef(Ue),Ct=Me,wt=pe(52671),$e=pe(58617),Ft=pe(15075),lt=pe(43531),vt=pe(92310),Ie=pe.n(vt),te=pe(92343),de=se=>{const{prefixCls:he,switcherIcon:ve,treeNodeProps:Ee,showLine:Be}=se,{isLeaf:Le,expanded:ze,loading:je}=Ee;if(je)return ke.createElement($e.Z,{className:`${he}-switcher-loading-icon`});let Xe;if(Be&&typeof Be=="object"&&(Xe=Be.showLeafIcon),Le){if(!Be)return null;if(typeof Xe!="boolean"&&Xe){const He=typeof Xe=="function"?Xe(Ee):Xe,Nt=`${he}-switcher-line-custom-icon`;return(0,te.l$)(He)?(0,te.Tm)(He,{className:Ie()(He.props.className||"",Nt)}):He}return Xe?ke.createElement(wt.Z,{className:`${he}-switcher-line-icon`}):ke.createElement("span",{className:`${he}-switcher-leaf-line`})}const Ye=`${he}-switcher-icon`,dt=typeof ve=="function"?ve(Ee):ve;return(0,te.l$)(dt)?(0,te.Tm)(dt,{className:Ie()(dt.props.className||"",Ye)}):dt!==void 0?dt:Be?ze?ke.createElement(Ft.Z,{className:`${he}-switcher-line-icon`}):ke.createElement(lt.Z,{className:`${he}-switcher-line-icon`}):ke.createElement(Ct,{className:Ye})}},99498:function(On,pn,pe){(function(le){le(pe(89780))})(function(le){le.defineOption("placeholder","",function(Ct,wt,$e){var Ft=$e&&$e!=le.Init;if(wt&&!Ft)Ct.on("blur",Ge),Ct.on("change",Ue),Ct.on("swapDoc",Ue),le.on(Ct.getInputField(),"compositionupdate",Ct.state.placeholderCompose=function(){ut(Ct)}),Ue(Ct);else if(!wt&&Ft){Ct.off("blur",Ge),Ct.off("change",Ue),Ct.off("swapDoc",Ue),le.off(Ct.getInputField(),"compositionupdate",Ct.state.placeholderCompose),ke(Ct);var lt=Ct.getWrapperElement();lt.className=lt.className.replace(" CodeMirror-empty","")}wt&&!Ct.hasFocus()&&Ge(Ct)});function ke(Ct){Ct.state.placeholder&&(Ct.state.placeholder.parentNode.removeChild(Ct.state.placeholder),Ct.state.placeholder=null)}function We(Ct){ke(Ct);var wt=Ct.state.placeholder=document.createElement("pre");wt.style.cssText="height: 0; overflow: visible",wt.style.direction=Ct.getOption("direction"),wt.className="CodeMirror-placeholder CodeMirror-line-like";var $e=Ct.getOption("placeholder");typeof $e=="string"&&($e=document.createTextNode($e)),wt.appendChild($e),Ct.display.lineSpace.insertBefore(wt,Ct.display.lineSpace.firstChild)}function ut(Ct){setTimeout(function(){var wt=!1,$e=Ct.getInputField();$e.nodeName=="TEXTAREA"?wt=!$e.value:Ct.lineCount()==1&&(wt=!/[^\u200b]/.test($e.querySelector(".CodeMirror-line").textContent)),wt?We(Ct):ke(Ct)},20)}function Ge(Ct){Me(Ct)&&We(Ct)}function Ue(Ct){var wt=Ct.getWrapperElement(),$e=Me(Ct);wt.className=wt.className.replace(" CodeMirror-empty","")+($e?" CodeMirror-empty":""),$e?We(Ct):ke(Ct)}function Me(Ct){return Ct.lineCount()===1&&Ct.getLine(0)===""}})},25717:function(On,pn,pe){(function(le){le(pe(89780))})(function(le){var ke={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},We=le.Pos;le.defineOption("autoCloseBrackets",!1,function(te,ee,de){de&&de!=le.Init&&(te.removeKeyMap(Ge),te.state.closeBrackets=null),ee&&(Ue(ut(ee,"pairs")),te.state.closeBrackets=ee,te.addKeyMap(Ge))});function ut(te,ee){return ee=="pairs"&&typeof te=="string"?te:typeof te=="object"&&te[ee]!=null?te[ee]:ke[ee]}var Ge={Backspace:wt,Enter:$e};function Ue(te){for(var ee=0;ee<te.length;ee++){var de=te.charAt(ee),se="'"+de+"'";Ge[se]||(Ge[se]=Me(de))}}Ue(ke.pairs+"`");function Me(te){return function(ee){return lt(ee,te)}}function Ct(te){var ee=te.state.closeBrackets;if(!ee||ee.override)return ee;var de=te.getModeAt(te.getCursor());return de.closeBrackets||ee}function wt(te){var ee=Ct(te);if(!ee||te.getOption("disableInput"))return le.Pass;for(var de=ut(ee,"pairs"),se=te.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return le.Pass;var ve=vt(te,se[he].head);if(!ve||de.indexOf(ve)%2!=0)return le.Pass}for(var he=se.length-1;he>=0;he--){var Ee=se[he].head;te.replaceRange("",We(Ee.line,Ee.ch-1),We(Ee.line,Ee.ch+1),"+delete")}}function $e(te){var ee=Ct(te),de=ee&&ut(ee,"explode");if(!de||te.getOption("disableInput"))return le.Pass;for(var se=te.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return le.Pass;var ve=vt(te,se[he].head);if(!ve||de.indexOf(ve)%2!=0)return le.Pass}te.operation(function(){var Ee=te.lineSeparator()||`
`;te.replaceSelection(Ee+Ee,null),te.execCommand("goCharLeft"),se=te.listSelections();for(var Be=0;Be<se.length;Be++){var Le=se[Be].head.line;te.indentLine(Le,null,!0),te.indentLine(Le+1,null,!0)}})}function Ft(te){var ee=le.cmpPos(te.anchor,te.head)>0;return{anchor:new We(te.anchor.line,te.anchor.ch+(ee?-1:1)),head:new We(te.head.line,te.head.ch+(ee?1:-1))}}function lt(te,ee){var de=Ct(te);if(!de||te.getOption("disableInput"))return le.Pass;var se=ut(de,"pairs"),he=se.indexOf(ee);if(he==-1)return le.Pass;for(var ve=ut(de,"closeBefore"),Ee=ut(de,"triples"),Be=se.charAt(he+1)==ee,Le=te.listSelections(),ze=he%2==0,je,Xe=0;Xe<Le.length;Xe++){var Ye=Le[Xe],dt=Ye.head,He,Nt=te.getRange(dt,We(dt.line,dt.ch+1));if(ze&&!Ye.empty())He="surround";else if((Be||!ze)&&Nt==ee)Be&&Ie(te,dt)?He="both":Ee.indexOf(ee)>=0&&te.getRange(dt,We(dt.line,dt.ch+3))==ee+ee+ee?He="skipThree":He="skip";else if(Be&&dt.ch>1&&Ee.indexOf(ee)>=0&&te.getRange(We(dt.line,dt.ch-2),dt)==ee+ee){if(dt.ch>2&&/\bstring/.test(te.getTokenTypeAt(We(dt.line,dt.ch-2))))return le.Pass;He="addFour"}else if(Be){var ot=dt.ch==0?" ":te.getRange(We(dt.line,dt.ch-1),dt);if(!le.isWordChar(Nt)&&ot!=ee&&!le.isWordChar(ot))He="both";else return le.Pass}else if(ze&&(Nt.length===0||/\s/.test(Nt)||ve.indexOf(Nt)>-1))He="both";else return le.Pass;if(!je)je=He;else if(je!=He)return le.Pass}var Tt=he%2?se.charAt(he-1):ee,xt=he%2?ee:se.charAt(he+1);te.operation(function(){if(je=="skip")te.execCommand("goCharRight");else if(je=="skipThree")for(var Ot=0;Ot<3;Ot++)te.execCommand("goCharRight");else if(je=="surround"){for(var Wt=te.getSelections(),Ot=0;Ot<Wt.length;Ot++)Wt[Ot]=Tt+Wt[Ot]+xt;te.replaceSelections(Wt,"around"),Wt=te.listSelections().slice();for(var Ot=0;Ot<Wt.length;Ot++)Wt[Ot]=Ft(Wt[Ot]);te.setSelections(Wt)}else je=="both"?(te.replaceSelection(Tt+xt,null),te.triggerElectric(Tt+xt),te.execCommand("goCharLeft")):je=="addFour"&&(te.replaceSelection(Tt+Tt+Tt+Tt,"before"),te.execCommand("goCharRight"))})}function vt(te,ee){var de=te.getRange(We(ee.line,ee.ch-1),We(ee.line,ee.ch+1));return de.length==2?de:null}function Ie(te,ee){var de=te.getTokenAt(We(ee.line,ee.ch+1));return/\bstring/.test(de.type)&&de.start==ee.ch&&(ee.ch==0||!/\bstring/.test(te.getTokenTypeAt(ee)))}})},6313:function(On,pn,pe){(function(le){le(pe(89780),pe(32855))})(function(le){le.defineOption("autoCloseTags",!1,function(wt,$e,Ft){if(Ft!=le.Init&&Ft&&wt.removeKeyMap("autoCloseTags"),!!$e){var lt={name:"autoCloseTags"};(typeof $e!="object"||$e.whenClosing!==!1)&&(lt["'/'"]=function(vt){return Ue(vt)}),(typeof $e!="object"||$e.whenOpening!==!1)&&(lt["'>'"]=function(vt){return ut(vt)}),wt.addKeyMap(lt)}});var ke=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],We=["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 ut(wt){if(wt.getOption("disableInput"))return le.Pass;for(var $e=wt.listSelections(),Ft=[],lt=wt.getOption("autoCloseTags"),vt=0;vt<$e.length;vt++){if(!$e[vt].empty())return le.Pass;var Ie=$e[vt].head,te=wt.getTokenAt(Ie),ee=le.innerMode(wt.getMode(),te.state),de=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(de),he=se&&se.name;if(!he)return le.Pass;var ve=ee.mode.configuration=="html",Ee=typeof lt=="object"&&lt.dontCloseTags||ve&&ke,Be=typeof lt=="object"&&lt.indentTags||ve&&We;te.end>Ie.ch&&(he=he.slice(0,he.length-te.end+Ie.ch));var Le=he.toLowerCase();if(!he||te.type=="string"&&(te.end!=Ie.ch||!/[\"\']/.test(te.string.charAt(te.string.length-1))||te.string.length==1)||te.type=="tag"&&se.close||te.string.indexOf("/")==Ie.ch-te.start-1||Ee&&Me(Ee,Le)>-1||Ct(wt,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(de)||[],he,Ie,!0))return le.Pass;var ze=typeof lt=="object"&&lt.emptyTags;if(ze&&Me(ze,he)>-1){Ft[vt]={text:"/>",newPos:le.Pos(Ie.line,Ie.ch+2)};continue}var je=Be&&Me(Be,Le)>-1;Ft[vt]={indent:je,text:">"+(je?`
`:"")+"</"+he+">",newPos:je?le.Pos(Ie.line+1,0):le.Pos(Ie.line,Ie.ch+1)}}for(var Xe=typeof lt=="object"&&lt.dontIndentOnAutoClose,vt=$e.length-1;vt>=0;vt--){var Ye=Ft[vt];wt.replaceRange(Ye.text,$e[vt].head,$e[vt].anchor,"+insert");var dt=wt.listSelections().slice(0);dt[vt]={head:Ye.newPos,anchor:Ye.newPos},wt.setSelections(dt),!Xe&&Ye.indent&&(wt.indentLine(Ye.newPos.line,null,!0),wt.indentLine(Ye.newPos.line+1,null,!0))}}function Ge(wt,$e){for(var Ft=wt.listSelections(),lt=[],vt=$e?"/":"</",Ie=wt.getOption("autoCloseTags"),te=typeof Ie=="object"&&Ie.dontIndentOnSlash,ee=0;ee<Ft.length;ee++){if(!Ft[ee].empty())return le.Pass;var de=Ft[ee].head,se=wt.getTokenAt(de),he=le.innerMode(wt.getMode(),se.state),ve=he.state;if($e&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=de.ch-1))return le.Pass;var Ee,Be=he.mode.name!="xml"&&wt.getMode().name=="htmlmixed";if(Be&&he.mode.name=="javascript")Ee=vt+"script";else if(Be&&he.mode.name=="css")Ee=vt+"style";else{var Le=he.mode.xmlCurrentContext&&he.mode.xmlCurrentContext(ve);if(!Le||Le.length&&Ct(wt,Le,Le[Le.length-1],de))return le.Pass;Ee=vt+Le[Le.length-1]}wt.getLine(de.line).charAt(se.end)!=">"&&(Ee+=">"),lt[ee]=Ee}if(wt.replaceSelections(lt),Ft=wt.listSelections(),!te)for(var ee=0;ee<Ft.length;ee++)(ee==Ft.length-1||Ft[ee].head.line<Ft[ee+1].head.line)&&wt.indentLine(Ft[ee].head.line)}function Ue(wt){return wt.getOption("disableInput")?le.Pass:Ge(wt,!0)}le.commands.closeTag=function(wt){return Ge(wt)};function Me(wt,$e){if(wt.indexOf)return wt.indexOf($e);for(var Ft=0,lt=wt.length;Ft<lt;++Ft)if(wt[Ft]==$e)return Ft;return-1}function Ct(wt,$e,Ft,lt,vt){if(!le.scanForClosingTag)return!1;var Ie=Math.min(wt.lastLine()+1,lt.line+500),te=le.scanForClosingTag(wt,lt,null,Ie);if(!te||te.tag!=Ft)return!1;for(var ee=vt?1:0,de=$e.length-1;de>=0&&$e[de]==Ft;de--)++ee;lt=te.to;for(var de=1;de<ee;de++){var se=le.scanForClosingTag(wt,lt,null,Ie);if(!se||se.tag!=Ft)return!1;lt=se.to}return!0}})},32855:function(On,pn,pe){(function(le){le(pe(89780))})(function(le){"use strict";var ke=le.Pos;function We(de,se){return de.line-se.line||de.ch-se.ch}var ut="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=ut+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ue=new RegExp("<(/?)(["+ut+"]["+Ge+"]*)","g");function Me(de,se,he,ve){this.line=se,this.ch=he,this.cm=de,this.text=de.getLine(se),this.min=ve?Math.max(ve.from,de.firstLine()):de.firstLine(),this.max=ve?Math.min(ve.to-1,de.lastLine()):de.lastLine()}function Ct(de,se){var he=de.cm.getTokenTypeAt(ke(de.line,se));return he&&/\btag\b/.test(he)}function wt(de){if(!(de.line>=de.max))return de.ch=0,de.text=de.cm.getLine(++de.line),!0}function $e(de){if(!(de.line<=de.min))return de.text=de.cm.getLine(--de.line),de.ch=de.text.length,!0}function Ft(de){for(;;){var se=de.text.indexOf(">",de.ch);if(se==-1){if(wt(de))continue;return}if(!Ct(de,se+1)){de.ch=se+1;continue}var he=de.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(de.text.slice(he+1,se));return de.ch=se+1,ve?"selfClose":"regular"}}function lt(de){for(;;){var se=de.ch?de.text.lastIndexOf("<",de.ch-1):-1;if(se==-1){if($e(de))continue;return}if(!Ct(de,se+1)){de.ch=se;continue}Ue.lastIndex=se,de.ch=se;var he=Ue.exec(de.text);if(he&&he.index==se)return he}}function vt(de){for(;;){Ue.lastIndex=de.ch;var se=Ue.exec(de.text);if(!se){if(wt(de))continue;return}if(!Ct(de,se.index+1)){de.ch=se.index+1;continue}return de.ch=se.index+se[0].length,se}}function Ie(de){for(;;){var se=de.ch?de.text.lastIndexOf(">",de.ch-1):-1;if(se==-1){if($e(de))continue;return}if(!Ct(de,se+1)){de.ch=se;continue}var he=de.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(de.text.slice(he+1,se));return de.ch=se+1,ve?"selfClose":"regular"}}function te(de,se){for(var he=[];;){var ve=vt(de),Ee,Be=de.line,Le=de.ch-(ve?ve[0].length:0);if(!ve||!(Ee=Ft(de)))return;if(Ee!="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:ke(Be,Le),to:ke(de.line,de.ch)}}else he.push(ve[2])}}function ee(de,se){for(var he=[];;){var ve=Ie(de);if(!ve)return;if(ve=="selfClose"){lt(de);continue}var Ee=de.line,Be=de.ch,Le=lt(de);if(!Le)return;if(Le[1])he.push(Le[2]);else{for(var ze=he.length-1;ze>=0;--ze)if(he[ze]==Le[2]){he.length=ze;break}if(ze<0&&(!se||se==Le[2]))return{tag:Le[2],from:ke(de.line,de.ch),to:ke(Ee,Be)}}}}le.registerHelper("fold","xml",function(de,se){for(var he=new Me(de,se.line,0);;){var ve=vt(he);if(!ve||he.line!=se.line)return;var Ee=Ft(he);if(!Ee)return;if(!ve[1]&&Ee!="selfClose"){var Be=ke(he.line,he.ch),Le=te(he,ve[2]);return Le&&We(Le.from,Be)>0?{from:Be,to:Le.from}:null}}}),le.findMatchingTag=function(de,se,he){var ve=new Me(de,se.line,se.ch,he);if(!(ve.text.indexOf(">")==-1&&ve.text.indexOf("<")==-1)){var Ee=Ft(ve),Be=Ee&&ke(ve.line,ve.ch),Le=Ee&&lt(ve);if(!(!Ee||!Le||We(ve,se)>0)){var ze={from:ke(ve.line,ve.ch),to:Be,tag:Le[2]};return Ee=="selfClose"?{open:ze,close:null,at:"open"}:Le[1]?{open:ee(ve,Le[2]),close:ze,at:"close"}:(ve=new Me(de,Be.line,Be.ch,he),{open:ze,close:te(ve,Le[2]),at:"open"})}}},le.findEnclosingTag=function(de,se,he,ve){for(var Ee=new Me(de,se.line,se.ch,he);;){var Be=ee(Ee,ve);if(!Be)break;var Le=new Me(de,se.line,se.ch,he),ze=te(Le,Be.tag);if(ze)return{open:Be,close:ze}}},le.scanForClosingTag=function(de,se,he,ve){var Ee=new Me(de,se.line,se.ch,ve?{from:0,to:ve}:null);return te(Ee,he)}})},89780:function(On){(function(pn,pe){On.exports=pe()})(this,function(){"use strict";var pn=navigator.userAgent,pe=navigator.platform,le=/gecko\/\d/i.test(pn),ke=/MSIE \d/.test(pn),We=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pn),ut=/Edge\/(\d+)/.exec(pn),Ge=ke||We||ut,Ue=Ge&&(ke?document.documentMode||6:+(ut||We)[1]),Me=!ut&&/WebKit\//.test(pn),Ct=Me&&/Qt\/\d+\.\d+/.test(pn),wt=!ut&&/Chrome\//.test(pn),$e=/Opera\//.test(pn),Ft=/Apple Computer/.test(navigator.vendor),lt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(pn),vt=/PhantomJS/.test(pn),Ie=!ut&&/AppleWebKit/.test(pn)&&/Mobile\/\w+/.test(pn),te=/Android/.test(pn),ee=Ie||te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(pn),de=Ie||/Mac/.test(pe),se=/\bCrOS\b/.test(pn),he=/win/i.test(pe),ve=$e&&pn.match(/Version\/(\d*\.\d*)/);ve&&(ve=Number(ve[1])),ve&&ve>=15&&($e=!1,Me=!0);var Ee=de&&(Ct||$e&&(ve==null||ve<12.11)),Be=le||Ge&&Ue>=9;function Le(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var ze=function(ie,ae){var ge=ie.className,fe=Le(ae).exec(ge);if(fe){var ye=ge.slice(fe.index+fe[0].length);ie.className=ge.slice(0,fe.index)+(ye?fe[1]+ye:"")}};function je(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function Xe(ie,ae){return je(ie).appendChild(ae)}function Ye(ie,ae,ge,fe){var ye=document.createElement(ie);if(ge&&(ye.className=ge),fe&&(ye.style.cssText=fe),typeof ae=="string")ye.appendChild(document.createTextNode(ae));else if(ae)for(var Re=0;Re<ae.length;++Re)ye.appendChild(ae[Re]);return ye}function dt(ie,ae,ge,fe){var ye=Ye(ie,ae,ge,fe);return ye.setAttribute("role","presentation"),ye}var He;document.createRange?He=function(ie,ae,ge,fe){var ye=document.createRange();return ye.setEnd(fe||ie,ge),ye.setStart(ie,ae),ye}:He=function(ie,ae,ge){var fe=document.body.createTextRange();try{fe.moveToElementText(ie.parentNode)}catch(ye){return fe}return fe.collapse(!0),fe.moveEnd("character",ge),fe.moveStart("character",ae),fe};function Nt(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 ot(){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 Tt(ie,ae){var ge=ie.className;Le(ae).test(ge)||(ie.className+=(ge?" ":"")+ae)}function xt(ie,ae){for(var ge=ie.split(" "),fe=0;fe<ge.length;fe++)ge[fe]&&!Le(ge[fe]).test(ae)&&(ae+=" "+ge[fe]);return ae}var Ot=function(ie){ie.select()};Ie?Ot=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:Ge&&(Ot=function(ie){try{ie.select()}catch(ae){}});function Wt(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function Dt(ie,ae,ge){ae||(ae={});for(var fe in ie)ie.hasOwnProperty(fe)&&(ge!==!1||!ae.hasOwnProperty(fe))&&(ae[fe]=ie[fe]);return ae}function tt(ie,ae,ge,fe,ye){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Re=fe||0,Je=ye||0;;){var mt=ie.indexOf(" ",Re);if(mt<0||mt>=ae)return Je+(ae-Re);Je+=mt-Re,Je+=ge-Je%ge,Re=mt+1}}var Ve=function(){this.id=null,this.f=null,this.time=0,this.handler=Wt(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 ge=+new Date+ie;(!this.id||ge<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=ge)};function _t(ie,ae){for(var ge=0;ge<ie.length;++ge)if(ie[ge]==ae)return ge;return-1}var vn=50,yn={toString:function(){return"CodeMirror.Pass"}},zt={scroll:!1},qt={origin:"*mouse"},ln={origin:"+move"};function Gn(ie,ae,ge){for(var fe=0,ye=0;;){var Re=ie.indexOf(" ",fe);Re==-1&&(Re=ie.length);var Je=Re-fe;if(Re==ie.length||ye+Je>=ae)return fe+Math.min(Je,ae-ye);if(ye+=Re-fe,ye+=ge-ye%ge,fe=Re+1,ye>=ae)return fe}}var un=[""];function _n(ie){for(;un.length<=ie;)un.push(St(un)+" ");return un[ie]}function St(ie){return ie[ie.length-1]}function Zn(ie,ae){for(var ge=[],fe=0;fe<ie.length;fe++)ge[fe]=ae(ie[fe],fe);return ge}function ci(ie,ae,ge){for(var fe=0,ye=ge(ae);fe<ie.length&&ge(ie[fe])<=ye;)fe++;ie.splice(fe,0,ae)}function Ze(){}function be(ie,ae){var ge;return Object.create?ge=Object.create(ie):(Ze.prototype=ie,ge=new Ze),ae&&Dt(ae,ge),ge}var Pe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ae(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Pe.test(ie))}function Oe(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Ae(ie)?!0:ae.test(ie):Ae(ie)}function xe(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var ct=/[\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 Mt(ie){return ie.charCodeAt(0)>=768&&ct.test(ie)}function at(ie,ae,ge){for(;(ge<0?ae>0:ae<ie.length)&&Mt(ie.charAt(ae));)ae+=ge;return ae}function qe(ie,ae,ge){for(var fe=ae>ge?-1:1;;){if(ae==ge)return ae;var ye=(ae+ge)/2,Re=fe<0?Math.ceil(ye):Math.floor(ye);if(Re==ae)return ie(Re)?ae:ge;ie(Re)?ge=Re:ae=Re+fe}}function Lt(ie,ae,ge,fe){if(!ie)return fe(ae,ge,"ltr",0);for(var ye=!1,Re=0;Re<ie.length;++Re){var Je=ie[Re];(Je.from<ge&&Je.to>ae||ae==ge&&Je.to==ae)&&(fe(Math.max(Je.from,ae),Math.min(Je.to,ge),Je.level==1?"rtl":"ltr",Re),ye=!0)}ye||fe(ae,ge,"ltr")}var Bt=null;function ft(ie,ae,ge){var fe;Bt=null;for(var ye=0;ye<ie.length;++ye){var Re=ie[ye];if(Re.from<ae&&Re.to>ae)return ye;Re.to==ae&&(Re.from!=Re.to&&ge=="before"?fe=ye:Bt=ye),Re.from==ae&&(Re.from!=Re.to&&ge!="before"?fe=ye:Bt=ye)}return fe!=null?fe:Bt}var Gt=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ge(jt){return jt<=247?ie.charAt(jt):1424<=jt&&jt<=1524?"R":1536<=jt&&jt<=1785?ae.charAt(jt-1536):1774<=jt&&jt<=2220?"r":8192<=jt&&jt<=8203?"w":jt==8204?"b":"L"}var fe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ye=/[stwN]/,Re=/[LRr]/,Je=/[Lb1n]/,mt=/[1n]/;function gt(jt,Ln,Vt){this.level=jt,this.from=Ln,this.to=Vt}return function(jt,Ln){var Vt=Ln=="ltr"?"L":"R";if(jt.length==0||Ln=="ltr"&&!fe.test(jt))return!1;for(var si=jt.length,ii=[],tr=0;tr<si;++tr)ii.push(ge(jt.charCodeAt(tr)));for(var dr=0,Mr=Vt;dr<si;++dr){var so=ii[dr];so=="m"?ii[dr]=Mr:Mr=so}for(var Zo=0,Bo=Vt;Zo<si;++Zo){var ea=ii[Zo];ea=="1"&&Bo=="r"?ii[Zo]="n":Re.test(ea)&&(Bo=ea,ea=="r"&&(ii[Zo]="R"))}for(var _a=1,Mo=ii[0];_a<si-1;++_a){var rs=ii[_a];rs=="+"&&Mo=="1"&&ii[_a+1]=="1"?ii[_a]="1":rs==","&&Mo==ii[_a+1]&&(Mo=="1"||Mo=="n")&&(ii[_a]=Mo),Mo=rs}for(var rl=0;rl<si;++rl){var ru=ii[rl];if(ru==",")ii[rl]="N";else if(ru=="%"){var xl=void 0;for(xl=rl+1;xl<si&&ii[xl]=="%";++xl);for(var Uu=rl&&ii[rl-1]=="!"||xl<si&&ii[xl]=="1"?"1":"N",wu=rl;wu<xl;++wu)ii[wu]=Uu;rl=xl-1}}for(var Xl=0,Yu=Vt;Xl<si;++Xl){var hu=ii[Xl];Yu=="L"&&hu=="1"?ii[Xl]="L":Re.test(hu)&&(Yu=hu)}for(var Jl=0;Jl<si;++Jl)if(ye.test(ii[Jl])){var Ds=void 0;for(Ds=Jl+1;Ds<si&&ye.test(ii[Ds]);++Ds);for(var Sl=(Jl?ii[Jl-1]:Vt)=="L",uu=(Ds<si?ii[Ds]:Vt)=="L",fu=Sl==uu?Sl?"L":"R":Vt,jc=Jl;jc<Ds;++jc)ii[jc]=fu;Jl=Ds-1}for(var Pl=[],Pc,Se=0;Se<si;)if(Je.test(ii[Se])){var Ce=Se;for(++Se;Se<si&&Je.test(ii[Se]);++Se);Pl.push(new gt(0,Ce,Se))}else{var Te=Se,Ke=Pl.length,Pt=Ln=="rtl"?1:0;for(++Se;Se<si&&ii[Se]!="L";++Se);for(var yt=Te;yt<Se;)if(mt.test(ii[yt])){Te<yt&&(Pl.splice(Ke,0,new gt(1,Te,yt)),Ke+=Pt);var kt=yt;for(++yt;yt<Se&&mt.test(ii[yt]);++yt);Pl.splice(Ke,0,new gt(2,kt,yt)),Ke+=Pt,Te=yt}else++yt;Te<Se&&Pl.splice(Ke,0,new gt(1,Te,Se))}return Ln=="ltr"&&(Pl[0].level==1&&(Pc=jt.match(/^\s+/))&&(Pl[0].from=Pc[0].length,Pl.unshift(new gt(0,0,Pc[0].length))),St(Pl).level==1&&(Pc=jt.match(/\s+$/))&&(St(Pl).to-=Pc[0].length,Pl.push(new gt(0,si-Pc[0].length,si)))),Ln=="rtl"?Pl.reverse():Pl}}();function Sn(ie,ae){var ge=ie.order;return ge==null&&(ge=ie.order=Gt(ie.text,ae)),ge}var an=[],rn=function(ie,ae,ge){if(ie.addEventListener)ie.addEventListener(ae,ge,!1);else if(ie.attachEvent)ie.attachEvent("on"+ae,ge);else{var fe=ie._handlers||(ie._handlers={});fe[ae]=(fe[ae]||an).concat(ge)}};function zn(ie,ae){return ie._handlers&&ie._handlers[ae]||an}function kn(ie,ae,ge){if(ie.removeEventListener)ie.removeEventListener(ae,ge,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,ge);else{var fe=ie._handlers,ye=fe&&fe[ae];if(ye){var Re=_t(ye,ge);Re>-1&&(fe[ae]=ye.slice(0,Re).concat(ye.slice(Re+1)))}}}function mn(ie,ae){var ge=zn(ie,ae);if(ge.length)for(var fe=Array.prototype.slice.call(arguments,2),ye=0;ye<ge.length;++ye)ge[ye].apply(null,fe)}function ei(ie,ae,ge){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),mn(ie,ge||ae.type,ie,ae),Hi(ae)||ae.codemirrorIgnore}function Pi(ie){var ae=ie._handlers&&ie._handlers.cursorActivity;if(ae)for(var ge=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),fe=0;fe<ae.length;++fe)_t(ge,ae[fe])==-1&&ge.push(ae[fe])}function Hn(ie,ae){return zn(ie,ae).length>0}function bn(ie){ie.prototype.on=function(ae,ge){rn(this,ae,ge)},ie.prototype.off=function(ae,ge){kn(this,ae,ge)}}function wi(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function Zi(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function Hi(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function rr(ie){wi(ie),Zi(ie)}function _r(ie){return ie.target||ie.srcElement}function gi(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),de&&ie.ctrlKey&&ae==1&&(ae=3),ae}var di=function(){if(Ge&&Ue<9)return!1;var ie=Ye("div");return"draggable"in ie||"dragDrop"in ie}(),xi;function $i(ie){if(xi==null){var ae=Ye("span","\u200B");Xe(ie,Ye("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(xi=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(Ge&&Ue<8))}var ge=xi?Ye("span","\u200B"):Ye("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ge.setAttribute("cm-text",""),ge}var Ri;function Kr(ie){if(Ri!=null)return Ri;var ae=Xe(ie,document.createTextNode("A\u062EA")),ge=He(ae,0,1).getBoundingClientRect(),fe=He(ae,1,2).getBoundingClientRect();return je(ie),!ge||ge.left==ge.right?!1:Ri=fe.right-ge.right<3}var Sr=`
b`.split(/\n/).length!=3?function(ie){for(var ae=0,ge=[],fe=ie.length;ae<=fe;){var ye=ie.indexOf(`
`,ae);ye==-1&&(ye=ie.length);var Re=ie.slice(ae,ie.charAt(ye-1)=="\r"?ye-1:ye),Je=Re.indexOf("\r");Je!=-1?(ge.push(Re.slice(0,Je)),ae+=Je+1):(ge.push(Re),ae=ye+1)}return ge}: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(ge){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},Ci=function(){var ie=Ye("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),wr=null;function Pn(ie){if(wr!=null)return wr;var ae=Xe(ie,Ye("span","x")),ge=ae.getBoundingClientRect(),fe=He(ae,0,1).getBoundingClientRect();return wr=Math.abs(ge.left-fe.left)>1}var Si={},Wi={};function qi(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),Si[ie]=ae}function $n(ie,ae){Wi[ie]=ae}function qn(ie){if(typeof ie=="string"&&Wi.hasOwnProperty(ie))ie=Wi[ie];else if(ie&&typeof ie.name=="string"&&Wi.hasOwnProperty(ie.name)){var ae=Wi[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=be(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return qn("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return qn("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Zt(ie,ae){ae=qn(ae);var ge=Si[ae.name];if(!ge)return Zt(ie,"text/plain");var fe=ge(ie,ae);if($t.hasOwnProperty(ae.name)){var ye=$t[ae.name];for(var Re in ye)ye.hasOwnProperty(Re)&&(fe.hasOwnProperty(Re)&&(fe["_"+Re]=fe[Re]),fe[Re]=ye[Re])}if(fe.name=ae.name,ae.helperType&&(fe.helperType=ae.helperType),ae.modeProps)for(var Je in ae.modeProps)fe[Je]=ae.modeProps[Je];return fe}var $t={};function Qe(ie,ae){var ge=$t.hasOwnProperty(ie)?$t[ie]:$t[ie]={};Dt(ae,ge)}function on(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var ge={};for(var fe in ae){var ye=ae[fe];ye instanceof Array&&(ye=ye.concat([])),ge[fe]=ye}return ge}function cn(ie,ae){for(var ge;ie.innerMode&&(ge=ie.innerMode(ae),!(!ge||ge.mode==ie));)ae=ge.state,ie=ge.mode;return ge||{mode:ie,state:ae}}function At(ie,ae,ge){return ie.startState?ie.startState(ae,ge):!0}var ht=function(ie,ae,ge){this.pos=this.start=0,this.string=ie,this.tabSize=ae||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ge};ht.prototype.eol=function(){return this.pos>=this.string.length},ht.prototype.sol=function(){return this.pos==this.lineStart},ht.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ht.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ht.prototype.eat=function(ie){var ae=this.string.charAt(this.pos),ge;if(typeof ie=="string"?ge=ae==ie:ge=ae&&(ie.test?ie.test(ae):ie(ae)),ge)return++this.pos,ae},ht.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},ht.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},ht.prototype.skipToEnd=function(){this.pos=this.string.length},ht.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},ht.prototype.backUp=function(ie){this.pos-=ie},ht.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=tt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?tt(this.string,this.lineStart,this.tabSize):0)},ht.prototype.indentation=function(){return tt(this.string,null,this.tabSize)-(this.lineStart?tt(this.string,this.lineStart,this.tabSize):0)},ht.prototype.match=function(ie,ae,ge){if(typeof ie=="string"){var fe=function(Je){return ge?Je.toLowerCase():Je},ye=this.string.substr(this.pos,ie.length);if(fe(ye)==fe(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)}},ht.prototype.current=function(){return this.string.slice(this.start,this.pos)},ht.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},ht.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},ht.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function en(ie,ae){if(ae-=ie.first,ae<0||ae>=ie.size)throw new Error("There is no line "+(ae+ie.first)+" in the document.");for(var ge=ie;!ge.lines;)for(var fe=0;;++fe){var ye=ge.children[fe],Re=ye.chunkSize();if(ae<Re){ge=ye;break}ae-=Re}return ge.lines[ae]}function fn(ie,ae,ge){var fe=[],ye=ae.line;return ie.iter(ae.line,ge.line+1,function(Re){var Je=Re.text;ye==ge.line&&(Je=Je.slice(0,ge.ch)),ye==ae.line&&(Je=Je.slice(ae.ch)),fe.push(Je),++ye}),fe}function Rn(ie,ae,ge){var fe=[];return ie.iter(ae,ge,function(ye){fe.push(ye.text)}),fe}function Qn(ie,ae){var ge=ae-ie.height;if(ge)for(var fe=ie;fe;fe=fe.parent)fe.height+=ge}function Et(ie){if(ie.parent==null)return null;for(var ae=ie.parent,ge=_t(ae.lines,ie),fe=ae.parent;fe;ae=fe,fe=fe.parent)for(var ye=0;fe.children[ye]!=ae;++ye)ge+=fe.children[ye].chunkSize();return ge+ae.first}function wn(ie,ae){var ge=ie.first;e:do{for(var fe=0;fe<ie.children.length;++fe){var ye=ie.children[fe],Re=ye.height;if(ae<Re){ie=ye;continue e}ae-=Re,ge+=ye.chunkSize()}return ge}while(!ie.lines);for(var Je=0;Je<ie.lines.length;++Je){var mt=ie.lines[Je],gt=mt.height;if(ae<gt)break;ae-=gt}return ge+Je}function Kn(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function Ei(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function tn(ie,ae,ge){if(ge===void 0&&(ge=null),!(this instanceof tn))return new tn(ie,ae,ge);this.line=ie,this.ch=ae,this.sticky=ge}function sn(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function In(ie,ae){return ie.sticky==ae.sticky&&sn(ie,ae)==0}function Oi(ie){return tn(ie.line,ie.ch)}function Di(ie,ae){return sn(ie,ae)<0?ae:ie}function vi(ie,ae){return sn(ie,ae)<0?ie:ae}function Ti(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function Li(ie,ae){if(ae.line<ie.first)return tn(ie.first,0);var ge=ie.first+ie.size-1;return ae.line>ge?tn(ge,en(ie,ge).text.length):sr(ae,en(ie,ae.line).text.length)}function sr(ie,ae){var ge=ie.ch;return ge==null||ge>ae?tn(ie.line,ae):ge<0?tn(ie.line,0):ie}function Zr(ie,ae){for(var ge=[],fe=0;fe<ae.length;fe++)ge[fe]=Li(ie,ae[fe]);return ge}var Vr=function(ie,ae){this.state=ie,this.lookAhead=ae},Tn=function(ie,ae,ge,fe){this.state=ae,this.doc=ie,this.line=ge,this.maxLookAhead=fe||0,this.baseTokens=null,this.baseTokenPos=1};Tn.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},Tn.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}},Tn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Tn.fromSaved=function(ie,ae,ge){return ae instanceof Vr?new Tn(ie,on(ie.mode,ae.state),ge,ae.lookAhead):new Tn(ie,on(ie.mode,ae),ge)},Tn.prototype.save=function(ie){var ae=ie!==!1?on(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Vr(ae,this.maxLookAhead):ae};function Po(ie,ae,ge,fe){var ye=[ie.state.modeGen],Re={};Ur(ie,ae.text,ie.doc.mode,ge,function(jt,Ln){return ye.push(jt,Ln)},Re,fe);for(var Je=ge.state,mt=function(jt){ge.baseTokens=ye;var Ln=ie.state.overlays[jt],Vt=1,si=0;ge.state=!0,Ur(ie,ae.text,Ln.mode,ge,function(ii,tr){for(var dr=Vt;si<ii;){var Mr=ye[Vt];Mr>ii&&ye.splice(Vt,1,ii,ye[Vt+1],Mr),Vt+=2,si=Math.min(ii,Mr)}if(tr)if(Ln.opaque)ye.splice(dr,Vt-dr,ii,"overlay "+tr),Vt=dr+2;else for(;dr<Vt;dr+=2){var so=ye[dr+1];ye[dr+1]=(so?so+" ":"")+"overlay "+tr}},Re),ge.state=Je,ge.baseTokens=null,ge.baseTokenPos=1},gt=0;gt<ie.state.overlays.length;++gt)mt(gt);return{styles:ye,classes:Re.bgClass||Re.textClass?Re:null}}function Xr(ie,ae,ge){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var fe=Cr(ie,Et(ae)),ye=ae.text.length>ie.options.maxHighlightLength&&on(ie.doc.mode,fe.state),Re=Po(ie,ae,fe);ye&&(fe.state=ye),ae.stateAfter=fe.save(!ye),ae.styles=Re.styles,Re.classes?ae.styleClasses=Re.classes:ae.styleClasses&&(ae.styleClasses=null),ge===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function Cr(ie,ae,ge){var fe=ie.doc,ye=ie.display;if(!fe.mode.startState)return new Tn(fe,!0,ae);var Re=zr(ie,ae,ge),Je=Re>fe.first&&en(fe,Re-1).stateAfter,mt=Je?Tn.fromSaved(fe,Je,Re):new Tn(fe,At(fe.mode),Re);return fe.iter(Re,ae,function(gt){Cn(ie,gt.text,mt);var jt=mt.line;gt.stateAfter=jt==ae-1||jt%5==0||jt>=ye.viewFrom&&jt<ye.viewTo?mt.save():null,mt.nextLine()}),ge&&(fe.modeFrontier=mt.line),mt}function Cn(ie,ae,ge,fe){var ye=ie.doc.mode,Re=new ht(ae,ie.options.tabSize,ge);for(Re.start=Re.pos=fe||0,ae==""&&ri(ye,ge.state);!Re.eol();)Yi(ye,Re,ge.state),Re.start=Re.pos}function ri(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var ge=cn(ie,ae);if(ge.mode.blankLine)return ge.mode.blankLine(ge.state)}}function Yi(ie,ae,ge,fe){for(var ye=0;ye<10;ye++){fe&&(fe[0]=cn(ie,ge).mode);var Re=ie.token(ae,ge);if(ae.pos>ae.start)return Re}throw new Error("Mode "+ie.name+" failed to advance stream.")}var yr=function(ie,ae,ge){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=ge};function er(ie,ae,ge,fe){var ye=ie.doc,Re=ye.mode,Je;ae=Li(ye,ae);var mt=en(ye,ae.line),gt=Cr(ie,ae.line,ge),jt=new ht(mt.text,ie.options.tabSize,gt),Ln;for(fe&&(Ln=[]);(fe||jt.pos<ae.ch)&&!jt.eol();)jt.start=jt.pos,Je=Yi(Re,jt,gt.state),fe&&Ln.push(new yr(jt,Je,on(ye.mode,gt.state)));return fe?Ln:new yr(jt,Je,gt.state)}function Fr(ie,ae){if(ie)for(;;){var ge=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ge)break;ie=ie.slice(0,ge.index)+ie.slice(ge.index+ge[0].length);var fe=ge[1]?"bgClass":"textClass";ae[fe]==null?ae[fe]=ge[2]:new RegExp("(?:^|\\s)"+ge[2]+"(?:$|\\s)").test(ae[fe])||(ae[fe]+=" "+ge[2])}return ie}function Ur(ie,ae,ge,fe,ye,Re,Je){var mt=ge.flattenSpans;mt==null&&(mt=ie.options.flattenSpans);var gt=0,jt=null,Ln=new ht(ae,ie.options.tabSize,fe),Vt,si=ie.options.addModeClass&&[null];for(ae==""&&Fr(ri(ge,fe.state),Re);!Ln.eol();){if(Ln.pos>ie.options.maxHighlightLength?(mt=!1,Je&&Cn(ie,ae,fe,Ln.pos),Ln.pos=ae.length,Vt=null):Vt=Fr(Yi(ge,Ln,fe.state,si),Re),si){var ii=si[0].name;ii&&(Vt="m-"+(Vt?ii+" "+Vt:ii))}if(!mt||jt!=Vt){for(;gt<Ln.start;)gt=Math.min(Ln.start,gt+5e3),ye(gt,jt);jt=Vt}Ln.start=Ln.pos}for(;gt<Ln.pos;){var tr=Math.min(Ln.pos,gt+5e3);ye(tr,jt),gt=tr}}function zr(ie,ae,ge){for(var fe,ye,Re=ie.doc,Je=ge?-1:ae-(ie.doc.mode.innerMode?1e3:100),mt=ae;mt>Je;--mt){if(mt<=Re.first)return Re.first;var gt=en(Re,mt-1),jt=gt.stateAfter;if(jt&&(!ge||mt+(jt instanceof Vr?jt.lookAhead:0)<=Re.modeFrontier))return mt;var Ln=tt(gt.text,null,ie.options.tabSize);(ye==null||fe>Ln)&&(ye=mt-1,fe=Ln)}return ye}function Tr(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var ge=ie.first,fe=ae-1;fe>ge;fe--){var ye=en(ie,fe).stateAfter;if(ye&&(!(ye instanceof Vr)||fe+ye.lookAhead<ae)){ge=fe+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,ge)}}var Yr=!1,Un=!1;function Ho(){Yr=!0}function Yn(){Un=!0}function Ao(ie,ae,ge){this.marker=ie,this.from=ae,this.to=ge}function Qo(ie,ae){if(ie)for(var ge=0;ge<ie.length;++ge){var fe=ie[ge];if(fe.marker==ae)return fe}}function nr(ie,ae){for(var ge,fe=0;fe<ie.length;++fe)ie[fe]!=ae&&(ge||(ge=[])).push(ie[fe]);return ge}function qo(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function Go(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var Re=ie[ye],Je=Re.marker,mt=Re.from==null||(Je.inclusiveLeft?Re.from<=ae:Re.from<ae);if(mt||Re.from==ae&&Je.type=="bookmark"&&(!ge||!Re.marker.insertLeft)){var gt=Re.to==null||(Je.inclusiveRight?Re.to>=ae:Re.to>ae);(fe||(fe=[])).push(new Ao(Je,Re.from,gt?null:Re.to))}}return fe}function Lr(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var Re=ie[ye],Je=Re.marker,mt=Re.to==null||(Je.inclusiveRight?Re.to>=ae:Re.to>ae);if(mt||Re.from==ae&&Je.type=="bookmark"&&(!ge||Re.marker.insertLeft)){var gt=Re.from==null||(Je.inclusiveLeft?Re.from<=ae:Re.from<ae);(fe||(fe=[])).push(new Ao(Je,gt?null:Re.from-ae,Re.to==null?null:Re.to-ae))}}return fe}function br(ie,ae){if(ae.full)return null;var ge=Kn(ie,ae.from.line)&&en(ie,ae.from.line).markedSpans,fe=Kn(ie,ae.to.line)&&en(ie,ae.to.line).markedSpans;if(!ge&&!fe)return null;var ye=ae.from.ch,Re=ae.to.ch,Je=sn(ae.from,ae.to)==0,mt=Go(ge,ye,Je),gt=Lr(fe,Re,Je),jt=ae.text.length==1,Ln=St(ae.text).length+(jt?ye:0);if(mt)for(var Vt=0;Vt<mt.length;++Vt){var si=mt[Vt];if(si.to==null){var ii=Qo(gt,si.marker);ii?jt&&(si.to=ii.to==null?null:ii.to+Ln):si.to=ye}}if(gt)for(var tr=0;tr<gt.length;++tr){var dr=gt[tr];if(dr.to!=null&&(dr.to+=Ln),dr.from==null){var Mr=Qo(mt,dr.marker);Mr||(dr.from=Ln,jt&&(mt||(mt=[])).push(dr))}else dr.from+=Ln,jt&&(mt||(mt=[])).push(dr)}mt&&(mt=mo(mt)),gt&&gt!=mt&&(gt=mo(gt));var so=[mt];if(!jt){var Zo=ae.text.length-2,Bo;if(Zo>0&&mt)for(var ea=0;ea<mt.length;++ea)mt[ea].to==null&&(Bo||(Bo=[])).push(new Ao(mt[ea].marker,null,null));for(var _a=0;_a<Zo;++_a)so.push(Bo);so.push(gt)}return so}function mo(ie){for(var ae=0;ae<ie.length;++ae){var ge=ie[ae];ge.from!=null&&ge.from==ge.to&&ge.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function Yo(ie,ae,ge){var fe=null;if(ie.iter(ae.line,ge.line+1,function(ii){if(ii.markedSpans)for(var tr=0;tr<ii.markedSpans.length;++tr){var dr=ii.markedSpans[tr].marker;dr.readOnly&&(!fe||_t(fe,dr)==-1)&&(fe||(fe=[])).push(dr)}}),!fe)return null;for(var ye=[{from:ae,to:ge}],Re=0;Re<fe.length;++Re)for(var Je=fe[Re],mt=Je.find(0),gt=0;gt<ye.length;++gt){var jt=ye[gt];if(!(sn(jt.to,mt.from)<0||sn(jt.from,mt.to)>0)){var Ln=[gt,1],Vt=sn(jt.from,mt.from),si=sn(jt.to,mt.to);(Vt<0||!Je.inclusiveLeft&&!Vt)&&Ln.push({from:jt.from,to:mt.from}),(si>0||!Je.inclusiveRight&&!si)&&Ln.push({from:mt.to,to:jt.to}),ye.splice.apply(ye,Ln),gt+=Ln.length-3}}return ye}function Ki(ie){var ae=ie.markedSpans;if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.detachLine(ie);ie.markedSpans=null}}function st(ie,ae){if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.attachLine(ie);ie.markedSpans=ae}}function sa(ie){return ie.inclusiveLeft?-1:0}function va(ie){return ie.inclusiveRight?1:0}function Ma(ie,ae){var ge=ie.lines.length-ae.lines.length;if(ge!=0)return ge;var fe=ie.find(),ye=ae.find(),Re=sn(fe.from,ye.from)||sa(ie)-sa(ae);if(Re)return-Re;var Je=sn(fe.to,ye.to)||va(ie)-va(ae);return Je||ae.id-ie.id}function hs(ie,ae){var ge=Un&&ie.markedSpans,fe;if(ge)for(var ye=void 0,Re=0;Re<ge.length;++Re)ye=ge[Re],ye.marker.collapsed&&(ae?ye.from:ye.to)==null&&(!fe||Ma(fe,ye.marker)<0)&&(fe=ye.marker);return fe}function Ga(ie){return hs(ie,!0)}function Lo(ie){return hs(ie,!1)}function po(ie,ae){var ge=Un&&ie.markedSpans,fe;if(ge)for(var ye=0;ye<ge.length;++ye){var Re=ge[ye];Re.marker.collapsed&&(Re.from==null||Re.from<ae)&&(Re.to==null||Re.to>ae)&&(!fe||Ma(fe,Re.marker)<0)&&(fe=Re.marker)}return fe}function la(ie,ae,ge,fe,ye){var Re=en(ie,ae),Je=Un&&Re.markedSpans;if(Je)for(var mt=0;mt<Je.length;++mt){var gt=Je[mt];if(gt.marker.collapsed){var jt=gt.marker.find(0),Ln=sn(jt.from,ge)||sa(gt.marker)-sa(ye),Vt=sn(jt.to,fe)||va(gt.marker)-va(ye);if(!(Ln>=0&&Vt<=0||Ln<=0&&Vt>=0)&&(Ln<=0&&(gt.marker.inclusiveRight&&ye.inclusiveLeft?sn(jt.to,ge)>=0:sn(jt.to,ge)>0)||Ln>=0&&(gt.marker.inclusiveRight&&ye.inclusiveLeft?sn(jt.from,fe)<=0:sn(jt.from,fe)<0)))return!0}}}function Eo(ie){for(var ae;ae=Ga(ie);)ie=ae.find(-1,!0).line;return ie}function Na(ie){for(var ae;ae=Lo(ie);)ie=ae.find(1,!0).line;return ie}function os(ie){for(var ae,ge;ae=Lo(ie);)ie=ae.find(1,!0).line,(ge||(ge=[])).push(ie);return ge}function xo(ie,ae){var ge=en(ie,ae),fe=Eo(ge);return ge==fe?ae:Et(fe)}function Qr(ie,ae){if(ae>ie.lastLine())return ae;var ge=en(ie,ae),fe;if(!pi(ie,ge))return ae;for(;fe=Lo(ge);)ge=fe.find(1,!0).line;return Et(ge)+1}function pi(ie,ae){var ge=Un&&ae.markedSpans;if(ge){for(var fe=void 0,ye=0;ye<ge.length;++ye)if(fe=ge[ye],!!fe.marker.collapsed){if(fe.from==null)return!0;if(!fe.marker.widgetNode&&fe.from==0&&fe.marker.inclusiveLeft&&io(ie,ae,fe))return!0}}}function io(ie,ae,ge){if(ge.to==null){var fe=ge.marker.find(1,!0);return io(ie,fe.line,Qo(fe.line.markedSpans,ge.marker))}if(ge.marker.inclusiveRight&&ge.to==ae.text.length)return!0;for(var ye=void 0,Re=0;Re<ae.markedSpans.length;++Re)if(ye=ae.markedSpans[Re],ye.marker.collapsed&&!ye.marker.widgetNode&&ye.from==ge.to&&(ye.to==null||ye.to!=ge.from)&&(ye.marker.inclusiveLeft||ge.marker.inclusiveRight)&&io(ie,ae,ye))return!0}function ro(ie){ie=Eo(ie);for(var ae=0,ge=ie.parent,fe=0;fe<ge.lines.length;++fe){var ye=ge.lines[fe];if(ye==ie)break;ae+=ye.height}for(var Re=ge.parent;Re;ge=Re,Re=ge.parent)for(var Je=0;Je<Re.children.length;++Je){var mt=Re.children[Je];if(mt==ge)break;ae+=mt.height}return ae}function Ja(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,ge,fe=ie;ge=Ga(fe);){var ye=ge.find(0,!0);fe=ye.from.line,ae+=ye.from.ch-ye.to.ch}for(fe=ie;ge=Lo(fe);){var Re=ge.find(0,!0);ae-=fe.text.length-Re.from.ch,fe=Re.to.line,ae+=fe.text.length-Re.to.ch}return ae}function Ca(ie){var ae=ie.display,ge=ie.doc;ae.maxLine=en(ge,ge.first),ae.maxLineLength=Ja(ae.maxLine),ae.maxLineChanged=!0,ge.iter(function(fe){var ye=Ja(fe);ye>ae.maxLineLength&&(ae.maxLineLength=ye,ae.maxLine=fe)})}var fa=function(ie,ae,ge){this.text=ie,st(this,ae),this.height=ge?ge(this):1};fa.prototype.lineNo=function(){return Et(this)},bn(fa);function $a(ie,ae,ge,fe){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),Ki(ie),st(ie,ge);var ye=fe?fe(ie):1;ye!=ie.height&&Qn(ie,ye)}function Qa(ie){ie.parent=null,Ki(ie)}var Es={},ys={};function Zs(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var ge=ae.addModeClass?ys:Es;return ge[ie]||(ge[ie]=ie.replace(/\S+/g,"cm-$&"))}function Mn(ie,ae){var ge=dt("span",null,null,Me?"padding-right: .1px":null),fe={pre:dt("pre",[ge],"CodeMirror-line"),content:ge,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ae.measure={};for(var ye=0;ye<=(ae.rest?ae.rest.length:0);ye++){var Re=ye?ae.rest[ye-1]:ae.line,Je=void 0;fe.pos=0,fe.addToken=ra,Kr(ie.display.measure)&&(Je=Sn(Re,ie.doc.direction))&&(fe.addToken=Ol(fe.addToken,Je)),fe.map=[];var mt=ae!=ie.display.externalMeasured&&Et(Re);yu(Re,fe,Xr(ie,Re,mt)),Re.styleClasses&&(Re.styleClasses.bgClass&&(fe.bgClass=xt(Re.styleClasses.bgClass,fe.bgClass||"")),Re.styleClasses.textClass&&(fe.textClass=xt(Re.styleClasses.textClass,fe.textClass||""))),fe.map.length==0&&fe.map.push(0,0,fe.content.appendChild($i(ie.display.measure))),ye==0?(ae.measure.map=fe.map,ae.measure.cache={}):((ae.measure.maps||(ae.measure.maps=[])).push(fe.map),(ae.measure.caches||(ae.measure.caches=[])).push({}))}if(Me){var gt=fe.content.lastChild;(/\bcm-tab\b/.test(gt.className)||gt.querySelector&&gt.querySelector(".cm-tab"))&&(fe.content.className="cm-tab-wrap-hack")}return mn(ie,"renderLine",ie,ae.line,fe.pre),fe.pre.className&&(fe.textClass=xt(fe.pre.className,fe.textClass||"")),fe}function Ss(ie){var ae=Ye("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function ra(ie,ae,ge,fe,ye,Re,Je){if(ae){var mt=ie.splitSpaces?hl(ae,ie.trailingSpace):ae,gt=ie.cm.state.specialChars,jt=!1,Ln;if(!gt.test(ae))ie.col+=ae.length,Ln=document.createTextNode(mt),ie.map.push(ie.pos,ie.pos+ae.length,Ln),Ge&&Ue<9&&(jt=!0),ie.pos+=ae.length;else{Ln=document.createDocumentFragment();for(var Vt=0;;){gt.lastIndex=Vt;var si=gt.exec(ae),ii=si?si.index-Vt:ae.length-Vt;if(ii){var tr=document.createTextNode(mt.slice(Vt,Vt+ii));Ge&&Ue<9?Ln.appendChild(Ye("span",[tr])):Ln.appendChild(tr),ie.map.push(ie.pos,ie.pos+ii,tr),ie.col+=ii,ie.pos+=ii}if(!si)break;Vt+=ii+1;var dr=void 0;if(si[0]==" "){var Mr=ie.cm.options.tabSize,so=Mr-ie.col%Mr;dr=Ln.appendChild(Ye("span",_n(so),"cm-tab")),dr.setAttribute("role","presentation"),dr.setAttribute("cm-text"," "),ie.col+=so}else si[0]=="\r"||si[0]==`
`?(dr=Ln.appendChild(Ye("span",si[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),dr.setAttribute("cm-text",si[0]),ie.col+=1):(dr=ie.cm.options.specialCharPlaceholder(si[0]),dr.setAttribute("cm-text",si[0]),Ge&&Ue<9?Ln.appendChild(Ye("span",[dr])):Ln.appendChild(dr),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,dr),ie.pos++}}if(ie.trailingSpace=mt.charCodeAt(ae.length-1)==32,ge||fe||ye||jt||Re||Je){var Zo=ge||"";fe&&(Zo+=fe),ye&&(Zo+=ye);var Bo=Ye("span",[Ln],Zo,Re);if(Je)for(var ea in Je)Je.hasOwnProperty(ea)&&ea!="style"&&ea!="class"&&Bo.setAttribute(ea,Je[ea]);return ie.content.appendChild(Bo)}ie.content.appendChild(Ln)}}function hl(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var ge=ae,fe="",ye=0;ye<ie.length;ye++){var Re=ie.charAt(ye);Re==" "&&ge&&(ye==ie.length-1||ie.charCodeAt(ye+1)==32)&&(Re="\xA0"),fe+=Re,ge=Re==" "}return fe}function Ol(ie,ae){return function(ge,fe,ye,Re,Je,mt,gt){ye=ye?ye+" cm-force-border":"cm-force-border";for(var jt=ge.pos,Ln=jt+fe.length;;){for(var Vt=void 0,si=0;si<ae.length&&(Vt=ae[si],!(Vt.to>jt&&Vt.from<=jt));si++);if(Vt.to>=Ln)return ie(ge,fe,ye,Re,Je,mt,gt);ie(ge,fe.slice(0,Vt.to-jt),ye,Re,null,mt,gt),Re=null,fe=fe.slice(Vt.to-jt),jt=Vt.to}}}function ns(ie,ae,ge,fe){var ye=!fe&&ge.widgetNode;ye&&ie.map.push(ie.pos,ie.pos+ae,ye),!fe&&ie.cm.display.input.needsContentAttribute&&(ye||(ye=ie.content.appendChild(document.createElement("span"))),ye.setAttribute("cm-marker",ge.id)),ye&&(ie.cm.display.input.setUneditable(ye),ie.content.appendChild(ye)),ie.pos+=ae,ie.trailingSpace=!1}function yu(ie,ae,ge){var fe=ie.markedSpans,ye=ie.text,Re=0;if(!fe){for(var Je=1;Je<ge.length;Je+=2)ae.addToken(ae,ye.slice(Re,Re=ge[Je]),Zs(ge[Je+1],ae.cm.options));return}for(var mt=ye.length,gt=0,jt=1,Ln="",Vt,si,ii=0,tr,dr,Mr,so,Zo;;){if(ii==gt){tr=dr=Mr=si="",Zo=null,so=null,ii=1/0;for(var Bo=[],ea=void 0,_a=0;_a<fe.length;++_a){var Mo=fe[_a],rs=Mo.marker;if(rs.type=="bookmark"&&Mo.from==gt&&rs.widgetNode)Bo.push(rs);else if(Mo.from<=gt&&(Mo.to==null||Mo.to>gt||rs.collapsed&&Mo.to==gt&&Mo.from==gt)){if(Mo.to!=null&&Mo.to!=gt&&ii>Mo.to&&(ii=Mo.to,dr=""),rs.className&&(tr+=" "+rs.className),rs.css&&(si=(si?si+";":"")+rs.css),rs.startStyle&&Mo.from==gt&&(Mr+=" "+rs.startStyle),rs.endStyle&&Mo.to==ii&&(ea||(ea=[])).push(rs.endStyle,Mo.to),rs.title&&((Zo||(Zo={})).title=rs.title),rs.attributes)for(var rl in rs.attributes)(Zo||(Zo={}))[rl]=rs.attributes[rl];rs.collapsed&&(!so||Ma(so.marker,rs)<0)&&(so=Mo)}else Mo.from>gt&&ii>Mo.from&&(ii=Mo.from)}if(ea)for(var ru=0;ru<ea.length;ru+=2)ea[ru+1]==ii&&(dr+=" "+ea[ru]);if(!so||so.from==gt)for(var xl=0;xl<Bo.length;++xl)ns(ae,0,Bo[xl]);if(so&&(so.from||0)==gt){if(ns(ae,(so.to==null?mt+1:so.to)-gt,so.marker,so.from==null),so.to==null)return;so.to==gt&&(so=!1)}}if(gt>=mt)break;for(var Uu=Math.min(mt,ii);;){if(Ln){var wu=gt+Ln.length;if(!so){var Xl=wu>Uu?Ln.slice(0,Uu-gt):Ln;ae.addToken(ae,Xl,Vt?Vt+tr:tr,Mr,gt+Xl.length==ii?dr:"",si,Zo)}if(wu>=Uu){Ln=Ln.slice(Uu-gt),gt=Uu;break}gt=wu,Mr=""}Ln=ye.slice(Re,Re=ge[jt++]),Vt=Zs(ge[jt++],ae.cm.options)}}}function eu(ie,ae,ge){this.line=ae,this.rest=os(ae),this.size=this.rest?Et(St(this.rest))-ge+1:1,this.node=this.text=null,this.hidden=pi(ie,ae)}function ps(ie,ae,ge){for(var fe=[],ye,Re=ae;Re<ge;Re=ye){var Je=new eu(ie.doc,en(ie.doc,Re),Re);ye=Re+Je.size,fe.push(Je)}return fe}var Ba=null;function tu(ie){Ba?Ba.ops.push(ie):ie.ownsGroup=Ba={ops:[ie],delayedCallbacks:[]}}function Do(ie){var ae=ie.delayedCallbacks,ge=0;do{for(;ge<ae.length;ge++)ae[ge].call(null);for(var fe=0;fe<ie.ops.length;fe++){var ye=ie.ops[fe];if(ye.cursorActivityHandlers)for(;ye.cursorActivityCalled<ye.cursorActivityHandlers.length;)ye.cursorActivityHandlers[ye.cursorActivityCalled++].call(null,ye.cm)}}while(ge<ae.length)}function Ea(ie,ae){var ge=ie.ownsGroup;if(ge)try{Do(ge)}finally{Ba=null,ae(ge)}}var ca=null;function hr(ie,ae){var ge=zn(ie,ae);if(ge.length){var fe=Array.prototype.slice.call(arguments,2),ye;Ba?ye=Ba.delayedCallbacks:ca?ye=ca:(ye=ca=[],setTimeout(Rs,0));for(var Re=function(mt){ye.push(function(){return ge[mt].apply(null,fe)})},Je=0;Je<ge.length;++Je)Re(Je)}}function Rs(){var ie=ca;ca=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function ls(ie,ae,ge,fe){for(var ye=0;ye<ae.changes.length;ye++){var Re=ae.changes[ye];Re=="text"?Ji(ie,ae):Re=="gutter"?Us(ie,ae,ge,fe):Re=="class"?Cs(ie,ae):Re=="widget"&&$l(ie,ae,fe)}ae.changes=null}function sl(ie){return ie.node==ie.text&&(ie.node=Ye("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),Ge&&Ue<8&&(ie.node.style.zIndex=2)),ie.node}function jl(ie,ae){var ge=ae.bgClass?ae.bgClass+" "+(ae.line.bgClass||""):ae.line.bgClass;if(ge&&(ge+=" CodeMirror-linebackground"),ae.background)ge?ae.background.className=ge:(ae.background.parentNode.removeChild(ae.background),ae.background=null);else if(ge){var fe=sl(ae);ae.background=fe.insertBefore(Ye("div",null,ge),fe.firstChild),ie.display.input.setUneditable(ae.background)}}function ou(ie,ae){var ge=ie.display.externalMeasured;return ge&&ge.line==ae.line?(ie.display.externalMeasured=null,ae.measure=ge.measure,ge.built):Mn(ie,ae)}function Ji(ie,ae){var ge=ae.text.className,fe=ou(ie,ae);ae.text==ae.node&&(ae.node=fe.pre),ae.text.parentNode.replaceChild(fe.pre,ae.text),ae.text=fe.pre,fe.bgClass!=ae.bgClass||fe.textClass!=ae.textClass?(ae.bgClass=fe.bgClass,ae.textClass=fe.textClass,Cs(ie,ae)):ge&&(ae.text.className=ge)}function Cs(ie,ae){jl(ie,ae),ae.line.wrapClass?sl(ae).className=ae.line.wrapClass:ae.node!=ae.text&&(ae.node.className="");var ge=ae.textClass?ae.textClass+" "+(ae.line.textClass||""):ae.line.textClass;ae.text.className=ge||""}function Us(ie,ae,ge,fe){if(ae.gutter&&(ae.node.removeChild(ae.gutter),ae.gutter=null),ae.gutterBackground&&(ae.node.removeChild(ae.gutterBackground),ae.gutterBackground=null),ae.line.gutterClass){var ye=sl(ae);ae.gutterBackground=Ye("div",null,"CodeMirror-gutter-background "+ae.line.gutterClass,"left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px; width: "+fe.gutterTotalWidth+"px"),ie.display.input.setUneditable(ae.gutterBackground),ye.insertBefore(ae.gutterBackground,ae.text)}var Re=ae.line.gutterMarkers;if(ie.options.lineNumbers||Re){var Je=sl(ae),mt=ae.gutter=Ye("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(mt),Je.insertBefore(mt,ae.text),ae.line.gutterClass&&(mt.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Re||!Re["CodeMirror-linenumbers"])&&(ae.lineNumber=mt.appendChild(Ye("div",Ei(ie.options,ge),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Re)for(var gt=0;gt<ie.display.gutterSpecs.length;++gt){var jt=ie.display.gutterSpecs[gt].className,Ln=Re.hasOwnProperty(jt)&&Re[jt];Ln&&mt.appendChild(Ye("div",[Ln],"CodeMirror-gutter-elt","left: "+fe.gutterLeft[jt]+"px; width: "+fe.gutterWidth[jt]+"px"))}}}function $l(ie,ae,ge){ae.alignable&&(ae.alignable=null);for(var fe=Le("CodeMirror-linewidget"),ye=ae.node.firstChild,Re=void 0;ye;ye=Re)Re=ye.nextSibling,fe.test(ye.className)&&ae.node.removeChild(ye);Kl(ie,ae,ge)}function Tl(ie,ae,ge,fe){var ye=ou(ie,ae);return ae.text=ae.node=ye.pre,ye.bgClass&&(ae.bgClass=ye.bgClass),ye.textClass&&(ae.textClass=ye.textClass),Cs(ie,ae),Us(ie,ae,ge,fe),Kl(ie,ae,fe),ae.node}function Kl(ie,ae,ge){if(Oo(ie,ae.line,ae,ge,!0),ae.rest)for(var fe=0;fe<ae.rest.length;fe++)Oo(ie,ae.rest[fe],ae,ge,!1)}function Oo(ie,ae,ge,fe,ye){if(ae.widgets)for(var Re=sl(ge),Je=0,mt=ae.widgets;Je<mt.length;++Je){var gt=mt[Je],jt=Ye("div",[gt.node],"CodeMirror-linewidget"+(gt.className?" "+gt.className:""));gt.handleMouseEvents||jt.setAttribute("cm-ignore-events","true"),ic(gt,jt,ge,fe),ie.display.input.setUneditable(jt),ye&&gt.above?Re.insertBefore(jt,ge.gutter||ge.text):Re.appendChild(jt),hr(gt,"redraw")}}function ic(ie,ae,ge,fe){if(ie.noHScroll){(ge.alignable||(ge.alignable=[])).push(ae);var ye=fe.wrapperWidth;ae.style.left=fe.fixedPos+"px",ie.coverGutter||(ye-=fe.gutterTotalWidth,ae.style.paddingLeft=fe.gutterTotalWidth+"px"),ae.style.width=ye+"px"}ie.coverGutter&&(ae.style.zIndex=5,ae.style.position="relative",ie.noHScroll||(ae.style.marginLeft=-fe.gutterTotalWidth+"px"))}function zl(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!Nt(document.body,ie.node)){var ge="position: relative;";ie.coverGutter&&(ge+="margin-left: -"+ae.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(ge+="width: "+ae.display.wrapper.clientWidth+"px;"),Xe(ae.display.measure,Ye("div",[ie.node],null,ge))}return ie.height=ie.node.parentNode.offsetHeight}function En(ie,ae){for(var ge=_r(ae);ge!=ie.wrapper;ge=ge.parentNode)if(!ge||ge.nodeType==1&&ge.getAttribute("cm-ignore-events")=="true"||ge.parentNode==ie.sizer&&ge!=ie.mover)return!0}function Nn(ie){return ie.lineSpace.offsetTop}function ai(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function Qi(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=Xe(ie.measure,Ye("pre","x","CodeMirror-line-like")),ge=window.getComputedStyle?window.getComputedStyle(ae):ae.currentStyle,fe={left:parseInt(ge.paddingLeft),right:parseInt(ge.paddingRight)};return!isNaN(fe.left)&&!isNaN(fe.right)&&(ie.cachedPaddingH=fe),fe}function Gi(ie){return vn-ie.display.nativeBarWidth}function ki(ie){return ie.display.scroller.clientWidth-Gi(ie)-ie.display.barWidth}function _i(ie){return ie.display.scroller.clientHeight-Gi(ie)-ie.display.barHeight}function oi(ie,ae,ge){var fe=ie.options.lineWrapping,ye=fe&&ki(ie);if(!ae.measure.heights||fe&&ae.measure.width!=ye){var Re=ae.measure.heights=[];if(fe){ae.measure.width=ye;for(var Je=ae.text.firstChild.getClientRects(),mt=0;mt<Je.length-1;mt++){var gt=Je[mt],jt=Je[mt+1];Math.abs(gt.bottom-jt.bottom)>2&&Re.push((gt.bottom+jt.top)/2-ge.top)}}Re.push(ge.bottom-ge.top)}}function Mi(ie,ae,ge){if(ie.line==ae)return{map:ie.measure.map,cache:ie.measure.cache};for(var fe=0;fe<ie.rest.length;fe++)if(ie.rest[fe]==ae)return{map:ie.measure.maps[fe],cache:ie.measure.caches[fe]};for(var ye=0;ye<ie.rest.length;ye++)if(Et(ie.rest[ye])>ge)return{map:ie.measure.maps[ye],cache:ie.measure.caches[ye],before:!0}}function cr(ie,ae){ae=Eo(ae);var ge=Et(ae),fe=ie.display.externalMeasured=new eu(ie.doc,ae,ge);fe.lineN=ge;var ye=fe.built=Mn(ie,fe);return fe.text=ye.pre,Xe(ie.display.lineMeasure,ye.pre),fe}function Hr(ie,ae,ge,fe){return Ua(ie,$o(ie,ae),ge,fe)}function ga(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[vr(ie,ae)];var ge=ie.display.externalMeasured;if(ge&&ae>=ge.lineN&&ae<ge.lineN+ge.size)return ge}function $o(ie,ae){var ge=Et(ae),fe=ga(ie,ge);fe&&!fe.text?fe=null:fe&&fe.changes&&(ls(ie,fe,ge,Pr(ie)),ie.curOp.forceUpdate=!0),fe||(fe=cr(ie,ae));var ye=Mi(fe,ae,ge);return{line:ae,view:fe,rect:null,map:ye.map,cache:ye.cache,before:ye.before,hasHeights:!1}}function Ua(ie,ae,ge,fe,ye){ae.before&&(ge=-1);var Re=ge+(fe||""),Je;return ae.cache.hasOwnProperty(Re)?Je=ae.cache[Re]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(oi(ie,ae.view,ae.rect),ae.hasHeights=!0),Je=Fi(ie,ae,ge,fe),Je.bogus||(ae.cache[Re]=Je)),{left:Je.left,right:Je.right,top:ye?Je.rtop:Je.top,bottom:ye?Je.rbottom:Je.bottom}}var Ka={left:0,right:0,top:0,bottom:0};function No(ie,ae,ge){for(var fe,ye,Re,Je,mt,gt,jt=0;jt<ie.length;jt+=3)if(mt=ie[jt],gt=ie[jt+1],ae<mt?(ye=0,Re=1,Je="left"):ae<gt?(ye=ae-mt,Re=ye+1):(jt==ie.length-3||ae==gt&&ie[jt+3]>ae)&&(Re=gt-mt,ye=Re-1,ae>=gt&&(Je="right")),ye!=null){if(fe=ie[jt+2],mt==gt&&ge==(fe.insertLeft?"left":"right")&&(Je=ge),ge=="left"&&ye==0)for(;jt&&ie[jt-2]==ie[jt-3]&&ie[jt-1].insertLeft;)fe=ie[(jt-=3)+2],Je="left";if(ge=="right"&&ye==gt-mt)for(;jt<ie.length-3&&ie[jt+3]==ie[jt+4]&&!ie[jt+5].insertLeft;)fe=ie[(jt+=3)+2],Je="right";break}return{node:fe,start:ye,end:Re,collapse:Je,coverStart:mt,coverEnd:gt}}function qr(ie,ae){var ge=Ka;if(ae=="left")for(var fe=0;fe<ie.length&&(ge=ie[fe]).left==ge.right;fe++);else for(var ye=ie.length-1;ye>=0&&(ge=ie[ye]).left==ge.right;ye--);return ge}function Fi(ie,ae,ge,fe){var ye=No(ae.map,ge,fe),Re=ye.node,Je=ye.start,mt=ye.end,gt=ye.collapse,jt;if(Re.nodeType==3){for(var Ln=0;Ln<4;Ln++){for(;Je&&Mt(ae.line.text.charAt(ye.coverStart+Je));)--Je;for(;ye.coverStart+mt<ye.coverEnd&&Mt(ae.line.text.charAt(ye.coverStart+mt));)++mt;if(Ge&&Ue<9&&Je==0&&mt==ye.coverEnd-ye.coverStart?jt=Re.parentNode.getBoundingClientRect():jt=qr(He(Re,Je,mt).getClientRects(),fe),jt.left||jt.right||Je==0)break;mt=Je,Je=Je-1,gt="right"}Ge&&Ue<11&&(jt=eo(ie.display.measure,jt))}else{Je>0&&(gt=fe="right");var Vt;ie.options.lineWrapping&&(Vt=Re.getClientRects()).length>1?jt=Vt[fe=="right"?Vt.length-1:0]:jt=Re.getBoundingClientRect()}if(Ge&&Ue<9&&!Je&&(!jt||!jt.left&&!jt.right)){var si=Re.parentNode.getClientRects()[0];si?jt={left:si.left,right:si.left+Bi(ie.display),top:si.top,bottom:si.bottom}:jt=Ka}for(var ii=jt.top-ae.rect.top,tr=jt.bottom-ae.rect.top,dr=(ii+tr)/2,Mr=ae.view.measure.heights,so=0;so<Mr.length-1&&!(dr<Mr[so]);so++);var Zo=so?Mr[so-1]:0,Bo=Mr[so],ea={left:(gt=="right"?jt.right:jt.left)-ae.rect.left,right:(gt=="left"?jt.left:jt.right)-ae.rect.left,top:Zo,bottom:Bo};return!jt.left&&!jt.right&&(ea.bogus=!0),ie.options.singleCursorHeightPerLine||(ea.rtop=ii,ea.rbottom=tr),ea}function eo(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Pn(ie))return ae;var ge=screen.logicalXDPI/screen.deviceXDPI,fe=screen.logicalYDPI/screen.deviceYDPI;return{left:ae.left*ge,right:ae.right*ge,top:ae.top*fe,bottom:ae.bottom*fe}}function Ko(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 ma(ie){ie.display.externalMeasure=null,je(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)Ko(ie.display.view[ae])}function ya(ie){ma(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function bo(){return wt&&te?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function oa(){return wt&&te?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Io(ie){var ae=0;if(ie.widgets)for(var ge=0;ge<ie.widgets.length;++ge)ie.widgets[ge].above&&(ae+=zl(ie.widgets[ge]));return ae}function Dr(ie,ae,ge,fe,ye){if(!ye){var Re=Io(ae);ge.top+=Re,ge.bottom+=Re}if(fe=="line")return ge;fe||(fe="local");var Je=ro(ae);if(fe=="local"?Je+=Nn(ie.display):Je-=ie.display.viewOffset,fe=="page"||fe=="window"){var mt=ie.display.lineSpace.getBoundingClientRect();Je+=mt.top+(fe=="window"?0:oa());var gt=mt.left+(fe=="window"?0:bo());ge.left+=gt,ge.right+=gt}return ge.top+=Je,ge.bottom+=Je,ge}function Da(ie,ae,ge){if(ge=="div")return ae;var fe=ae.left,ye=ae.top;if(ge=="page")fe-=bo(),ye-=oa();else if(ge=="local"||!ge){var Re=ie.display.sizer.getBoundingClientRect();fe+=Re.left,ye+=Re.top}var Je=ie.display.lineSpace.getBoundingClientRect();return{left:fe-Je.left,top:ye-Je.top}}function Ha(ie,ae,ge,fe,ye){return fe||(fe=en(ie.doc,ae.line)),Dr(ie,fe,Hr(ie,fe,ae.ch,ye),ge)}function La(ie,ae,ge,fe,ye,Re){fe=fe||en(ie.doc,ae.line),ye||(ye=$o(ie,fe));function Je(tr,dr){var Mr=Ua(ie,ye,tr,dr?"right":"left",Re);return dr?Mr.left=Mr.right:Mr.right=Mr.left,Dr(ie,fe,Mr,ge)}var mt=Sn(fe,ie.doc.direction),gt=ae.ch,jt=ae.sticky;if(gt>=fe.text.length?(gt=fe.text.length,jt="before"):gt<=0&&(gt=0,jt="after"),!mt)return Je(jt=="before"?gt-1:gt,jt=="before");function Ln(tr,dr,Mr){var so=mt[dr],Zo=so.level==1;return Je(Mr?tr-1:tr,Zo!=Mr)}var Vt=ft(mt,gt,jt),si=Bt,ii=Ln(gt,Vt,jt=="before");return si!=null&&(ii.other=Ln(gt,si,jt!="before")),ii}function fl(ie,ae){var ge=0;ae=Li(ie.doc,ae),ie.options.lineWrapping||(ge=Bi(ie.display)*ae.ch);var fe=en(ie.doc,ae.line),ye=ro(fe)+Nn(ie.display);return{left:ge,right:ge,top:ye,bottom:ye+fe.height}}function xu(ie,ae,ge,fe,ye){var Re=tn(ie,ae,ge);return Re.xRel=ye,fe&&(Re.outside=fe),Re}function Jt(ie,ae,ge){var fe=ie.doc;if(ge+=ie.display.viewOffset,ge<0)return xu(fe.first,0,null,-1,-1);var ye=wn(fe,ge),Re=fe.first+fe.size-1;if(ye>Re)return xu(fe.first+fe.size-1,en(fe,Re).text.length,null,1,1);ae<0&&(ae=0);for(var Je=en(fe,ye);;){var mt=Qt(ie,Je,ye,ae,ge),gt=po(Je,mt.ch+(mt.xRel>0||mt.outside>0?1:0));if(!gt)return mt;var jt=gt.find(1);if(jt.line==ye)return jt;Je=en(fe,ye=jt.line)}}function Yt(ie,ae,ge,fe){fe-=Io(ae);var ye=ae.text.length,Re=qe(function(Je){return Ua(ie,ge,Je-1).bottom<=fe},ye,0);return ye=qe(function(Je){return Ua(ie,ge,Je).top>fe},Re,ye),{begin:Re,end:ye}}function Dn(ie,ae,ge,fe){ge||(ge=$o(ie,ae));var ye=Dr(ie,ae,Ua(ie,ge,fe),"line").top;return Yt(ie,ae,ge,ye)}function nt(ie,ae,ge,fe){return ie.bottom<=ge?!1:ie.top>ge?!0:(fe?ie.left:ie.right)>ae}function Qt(ie,ae,ge,fe,ye){ye-=ro(ae);var Re=$o(ie,ae),Je=Io(ae),mt=0,gt=ae.text.length,jt=!0,Ln=Sn(ae,ie.doc.direction);if(Ln){var Vt=(ie.options.lineWrapping?Ir:lr)(ie,ae,ge,Re,Ln,fe,ye);jt=Vt.level!=1,mt=jt?Vt.from:Vt.to-1,gt=jt?Vt.to:Vt.from-1}var si=null,ii=null,tr=qe(function(_a){var Mo=Ua(ie,Re,_a);return Mo.top+=Je,Mo.bottom+=Je,nt(Mo,fe,ye,!1)?(Mo.top<=ye&&Mo.left<=fe&&(si=_a,ii=Mo),!0):!1},mt,gt),dr,Mr,so=!1;if(ii){var Zo=fe-ii.left<ii.right-fe,Bo=Zo==jt;tr=si+(Bo?0:1),Mr=Bo?"after":"before",dr=Zo?ii.left:ii.right}else{!jt&&(tr==gt||tr==mt)&&tr++,Mr=tr==0?"after":tr==ae.text.length?"before":Ua(ie,Re,tr-(jt?1:0)).bottom+Je<=ye==jt?"after":"before";var ea=La(ie,tn(ge,tr,Mr),"line",ae,Re);dr=ea.left,so=ye<ea.top?-1:ye>=ea.bottom?1:0}return tr=at(ae.text,tr,1),xu(ge,tr,Mr,so,fe-dr)}function lr(ie,ae,ge,fe,ye,Re,Je){var mt=qe(function(Vt){var si=ye[Vt],ii=si.level!=1;return nt(La(ie,tn(ge,ii?si.to:si.from,ii?"before":"after"),"line",ae,fe),Re,Je,!0)},0,ye.length-1),gt=ye[mt];if(mt>0){var jt=gt.level!=1,Ln=La(ie,tn(ge,jt?gt.from:gt.to,jt?"after":"before"),"line",ae,fe);nt(Ln,Re,Je,!0)&&Ln.top>Je&&(gt=ye[mt-1])}return gt}function Ir(ie,ae,ge,fe,ye,Re,Je){var mt=Yt(ie,ae,fe,Je),gt=mt.begin,jt=mt.end;/\s/.test(ae.text.charAt(jt-1))&&jt--;for(var Ln=null,Vt=null,si=0;si<ye.length;si++){var ii=ye[si];if(!(ii.from>=jt||ii.to<=gt)){var tr=ii.level!=1,dr=Ua(ie,fe,tr?Math.min(jt,ii.to)-1:Math.max(gt,ii.from)).right,Mr=dr<Re?Re-dr+1e9:dr-Re;(!Ln||Vt>Mr)&&(Ln=ii,Vt=Mr)}}return Ln||(Ln=ye[ye.length-1]),Ln.from<gt&&(Ln={from:gt,to:Ln.to,level:Ln.level}),Ln.to>jt&&(Ln={from:Ln.from,to:jt,level:Ln.level}),Ln}var mr;function ur(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(mr==null){mr=Ye("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)mr.appendChild(document.createTextNode("x")),mr.appendChild(Ye("br"));mr.appendChild(document.createTextNode("x"))}Xe(ie.measure,mr);var ge=mr.offsetHeight/50;return ge>3&&(ie.cachedTextHeight=ge),je(ie.measure),ge||1}function Bi(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=Ye("span","xxxxxxxxxx"),ge=Ye("pre",[ae],"CodeMirror-line-like");Xe(ie.measure,ge);var fe=ae.getBoundingClientRect(),ye=(fe.right-fe.left)/10;return ye>2&&(ie.cachedCharWidth=ye),ye||10}function Pr(ie){for(var ae=ie.display,ge={},fe={},ye=ae.gutters.clientLeft,Re=ae.gutters.firstChild,Je=0;Re;Re=Re.nextSibling,++Je){var mt=ie.display.gutterSpecs[Je].className;ge[mt]=Re.offsetLeft+Re.clientLeft+ye,fe[mt]=Re.clientWidth}return{fixedPos:to(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:ge,gutterWidth:fe,wrapperWidth:ae.wrapper.clientWidth}}function to(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function So(ie){var ae=ur(ie.display),ge=ie.options.lineWrapping,fe=ge&&Math.max(5,ie.display.scroller.clientWidth/Bi(ie.display)-3);return function(ye){if(pi(ie.doc,ye))return 0;var Re=0;if(ye.widgets)for(var Je=0;Je<ye.widgets.length;Je++)ye.widgets[Je].height&&(Re+=ye.widgets[Je].height);return ge?Re+(Math.ceil(ye.text.length/fe)||1)*ae:Re+ae}}function fr(ie){var ae=ie.doc,ge=So(ie);ae.iter(function(fe){var ye=ge(fe);ye!=fe.height&&Qn(fe,ye)})}function pr(ie,ae,ge,fe){var ye=ie.display;if(!ge&&_r(ae).getAttribute("cm-not-content")=="true")return null;var Re,Je,mt=ye.lineSpace.getBoundingClientRect();try{Re=ae.clientX-mt.left,Je=ae.clientY-mt.top}catch(Vt){return null}var gt=Jt(ie,Re,Je),jt;if(fe&&gt.xRel>0&&(jt=en(ie.doc,gt.line).text).length==gt.ch){var Ln=tt(jt,jt.length,ie.options.tabSize)-jt.length;gt=tn(gt.line,Math.max(0,Math.round((Re-Qi(ie.display).left)/Bi(ie.display))-Ln))}return gt}function vr(ie,ae){if(ae>=ie.display.viewTo||(ae-=ie.display.viewFrom,ae<0))return null;for(var ge=ie.display.view,fe=0;fe<ge.length;fe++)if(ae-=ge[fe].size,ae<0)return fe}function ji(ie,ae,ge,fe){ae==null&&(ae=ie.doc.first),ge==null&&(ge=ie.doc.first+ie.doc.size),fe||(fe=0);var ye=ie.display;if(fe&&ge<ye.viewTo&&(ye.updateLineNumbers==null||ye.updateLineNumbers>ae)&&(ye.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=ye.viewTo)Un&&xo(ie.doc,ae)<ye.viewTo&&Wr(ie);else if(ge<=ye.viewFrom)Un&&Qr(ie.doc,ge+fe)>ye.viewFrom?Wr(ie):(ye.viewFrom+=fe,ye.viewTo+=fe);else if(ae<=ye.viewFrom&&ge>=ye.viewTo)Wr(ie);else if(ae<=ye.viewFrom){var Re=zo(ie,ge,ge+fe,1);Re?(ye.view=ye.view.slice(Re.index),ye.viewFrom=Re.lineN,ye.viewTo+=fe):Wr(ie)}else if(ge>=ye.viewTo){var Je=zo(ie,ae,ae,-1);Je?(ye.view=ye.view.slice(0,Je.index),ye.viewTo=Je.lineN):Wr(ie)}else{var mt=zo(ie,ae,ae,-1),gt=zo(ie,ge,ge+fe,1);mt&&gt?(ye.view=ye.view.slice(0,mt.index).concat(ps(ie,mt.lineN,gt.lineN)).concat(ye.view.slice(gt.index)),ye.viewTo+=fe):Wr(ie)}var jt=ye.externalMeasured;jt&&(ge<jt.lineN?jt.lineN+=fe:ae<jt.lineN+jt.size&&(ye.externalMeasured=null))}function Ai(ie,ae,ge){ie.curOp.viewChanged=!0;var fe=ie.display,ye=ie.display.externalMeasured;if(ye&&ae>=ye.lineN&&ae<ye.lineN+ye.size&&(fe.externalMeasured=null),!(ae<fe.viewFrom||ae>=fe.viewTo)){var Re=fe.view[vr(ie,ae)];if(Re.node!=null){var Je=Re.changes||(Re.changes=[]);_t(Je,ge)==-1&&Je.push(ge)}}}function Wr(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function zo(ie,ae,ge,fe){var ye=vr(ie,ae),Re,Je=ie.display.view;if(!Un||ge==ie.doc.first+ie.doc.size)return{index:ye,lineN:ge};for(var mt=ie.display.viewFrom,gt=0;gt<ye;gt++)mt+=Je[gt].size;if(mt!=ae){if(fe>0){if(ye==Je.length-1)return null;Re=mt+Je[ye].size-ae,ye++}else Re=mt-ae;ae+=Re,ge+=Re}for(;xo(ie.doc,ge)!=ge;){if(ye==(fe<0?0:Je.length-1))return null;ge+=fe*Je[ye-(fe<0?1:0)].size,ye+=fe}return{index:ye,lineN:ge}}function Br(ie,ae,ge){var fe=ie.display,ye=fe.view;ye.length==0||ae>=fe.viewTo||ge<=fe.viewFrom?(fe.view=ps(ie,ae,ge),fe.viewFrom=ae):(fe.viewFrom>ae?fe.view=ps(ie,ae,fe.viewFrom).concat(fe.view):fe.viewFrom<ae&&(fe.view=fe.view.slice(vr(ie,ae))),fe.viewFrom=ae,fe.viewTo<ge?fe.view=fe.view.concat(ps(ie,fe.viewTo,ge)):fe.viewTo>ge&&(fe.view=fe.view.slice(0,vr(ie,ge)))),fe.viewTo=ge}function Er(ie){for(var ae=ie.display.view,ge=0,fe=0;fe<ae.length;fe++){var ye=ae[fe];!ye.hidden&&(!ye.node||ye.changes)&&++ge}return ge}function Or(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function kr(ie,ae){ae===void 0&&(ae=!0);for(var ge=ie.doc,fe={},ye=fe.cursors=document.createDocumentFragment(),Re=fe.selection=document.createDocumentFragment(),Je=0;Je<ge.sel.ranges.length;Je++)if(!(!ae&&Je==ge.sel.primIndex)){var mt=ge.sel.ranges[Je];if(!(mt.from().line>=ie.display.viewTo||mt.to().line<ie.display.viewFrom)){var gt=mt.empty();(gt||ie.options.showCursorWhenSelecting)&&gr(ie,mt.head,ye),gt||_o(ie,mt,Re)}}return fe}function gr(ie,ae,ge){var fe=La(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),ye=ge.appendChild(Ye("div","\xA0","CodeMirror-cursor"));if(ye.style.left=fe.left+"px",ye.style.top=fe.top+"px",ye.style.height=Math.max(0,fe.bottom-fe.top)*ie.options.cursorHeight+"px",fe.other){var Re=ge.appendChild(Ye("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Re.style.display="",Re.style.left=fe.other.left+"px",Re.style.top=fe.other.top+"px",Re.style.height=(fe.other.bottom-fe.other.top)*.85+"px"}}function Aa(ie,ae){return ie.top-ae.top||ie.left-ae.left}function _o(ie,ae,ge){var fe=ie.display,ye=ie.doc,Re=document.createDocumentFragment(),Je=Qi(ie.display),mt=Je.left,gt=Math.max(fe.sizerWidth,ki(ie)-fe.sizer.offsetLeft)-Je.right,jt=ye.direction=="ltr";function Ln(Bo,ea,_a,Mo){ea<0&&(ea=0),ea=Math.round(ea),Mo=Math.round(Mo),Re.appendChild(Ye("div",null,"CodeMirror-selected","position: absolute; left: "+Bo+`px;
top: `+ea+"px; width: "+(_a==null?gt-Bo:_a)+`px;
height: `+(Mo-ea)+"px"))}function Vt(Bo,ea,_a){var Mo=en(ye,Bo),rs=Mo.text.length,rl,ru;function xl(Xl,Yu){return Ha(ie,tn(Bo,Xl),"div",Mo,Yu)}function Uu(Xl,Yu,hu){var Jl=Dn(ie,Mo,null,Xl),Ds=Yu=="ltr"==(hu=="after")?"left":"right",Sl=hu=="after"?Jl.begin:Jl.end-(/\s/.test(Mo.text.charAt(Jl.end-1))?2:1);return xl(Sl,Ds)[Ds]}var wu=Sn(Mo,ye.direction);return Lt(wu,ea||0,_a==null?rs:_a,function(Xl,Yu,hu,Jl){var Ds=hu=="ltr",Sl=xl(Xl,Ds?"left":"right"),uu=xl(Yu-1,Ds?"right":"left"),fu=ea==null&&Xl==0,jc=_a==null&&Yu==rs,Pl=Jl==0,Pc=!wu||Jl==wu.length-1;if(uu.top-Sl.top<=3){var Se=(jt?fu:jc)&&Pl,Ce=(jt?jc:fu)&&Pc,Te=Se?mt:(Ds?Sl:uu).left,Ke=Ce?gt:(Ds?uu:Sl).right;Ln(Te,Sl.top,Ke-Te,Sl.bottom)}else{var Pt,yt,kt,Ht;Ds?(Pt=jt&&fu&&Pl?mt:Sl.left,yt=jt?gt:Uu(Xl,hu,"before"),kt=jt?mt:Uu(Yu,hu,"after"),Ht=jt&&jc&&Pc?gt:uu.right):(Pt=jt?Uu(Xl,hu,"before"):mt,yt=!jt&&fu&&Pl?gt:Sl.right,kt=!jt&&jc&&Pc?mt:uu.left,Ht=jt?Uu(Yu,hu,"after"):gt),Ln(Pt,Sl.top,yt-Pt,Sl.bottom),Sl.bottom<uu.top&&Ln(mt,Sl.bottom,null,uu.top),Ln(kt,uu.top,Ht-kt,uu.bottom)}(!rl||Aa(Sl,rl)<0)&&(rl=Sl),Aa(uu,rl)<0&&(rl=uu),(!ru||Aa(Sl,ru)<0)&&(ru=Sl),Aa(uu,ru)<0&&(ru=uu)}),{start:rl,end:ru}}var si=ae.from(),ii=ae.to();if(si.line==ii.line)Vt(si.line,si.ch,ii.ch);else{var tr=en(ye,si.line),dr=en(ye,ii.line),Mr=Eo(tr)==Eo(dr),so=Vt(si.line,si.ch,Mr?tr.text.length+1:null).end,Zo=Vt(ii.line,Mr?0:null,ii.ch).start;Mr&&(so.top<Zo.top-2?(Ln(so.right,so.top,null,so.bottom),Ln(mt,Zo.top,Zo.left,Zo.bottom)):Ln(so.right,so.top,Zo.left-so.right,so.bottom)),so.bottom<Zo.top&&Ln(mt,so.bottom,null,Zo.top)}ge.appendChild(Re)}function xa(ie){if(ie.state.focused){var ae=ie.display;clearInterval(ae.blinker);var ge=!0;ae.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ae.blinker=setInterval(function(){ie.hasFocus()||El(ie),ae.cursorDiv.style.visibility=(ge=!ge)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function Wa(ie){ie.state.focused||(ie.display.input.focus(),Oa(ie))}function wo(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,El(ie))},100)}function Oa(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(mn(ie,"focus",ie,ae),ie.state.focused=!0,Tt(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Me&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),xa(ie))}function El(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(mn(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 Nr(ie){for(var ae=ie.display,ge=ae.lineDiv.offsetTop,fe=0;fe<ae.view.length;fe++){var ye=ae.view[fe],Re=ie.options.lineWrapping,Je=void 0,mt=0;if(!ye.hidden){if(Ge&&Ue<8){var gt=ye.node.offsetTop+ye.node.offsetHeight;Je=gt-ge,ge=gt}else{var jt=ye.node.getBoundingClientRect();Je=jt.bottom-jt.top,!Re&&ye.text.firstChild&&(mt=ye.text.firstChild.getBoundingClientRect().right-jt.left-1)}var Ln=ye.line.height-Je;if((Ln>.005||Ln<-.005)&&(Qn(ye.line,Je),_s(ye.line),ye.rest))for(var Vt=0;Vt<ye.rest.length;Vt++)_s(ye.rest[Vt]);if(mt>ie.display.sizerWidth){var si=Math.ceil(mt/Bi(ie.display));si>ie.display.maxLineLength&&(ie.display.maxLineLength=si,ie.display.maxLine=ye.line,ie.display.maxLineChanged=!0)}}}}function _s(ie){if(ie.widgets)for(var ae=0;ae<ie.widgets.length;++ae){var ge=ie.widgets[ae],fe=ge.node.parentNode;fe&&(ge.height=fe.offsetHeight)}}function jo(ie,ae,ge){var fe=ge&&ge.top!=null?Math.max(0,ge.top):ie.scroller.scrollTop;fe=Math.floor(fe-Nn(ie));var ye=ge&&ge.bottom!=null?ge.bottom:fe+ie.wrapper.clientHeight,Re=wn(ae,fe),Je=wn(ae,ye);if(ge&&ge.ensure){var mt=ge.ensure.from.line,gt=ge.ensure.to.line;mt<Re?(Re=mt,Je=wn(ae,ro(en(ae,mt))+ie.wrapper.clientHeight)):Math.min(gt,ae.lastLine())>=Je&&(Re=wn(ae,ro(en(ae,gt))-ie.wrapper.clientHeight),Je=gt)}return{from:Re,to:Math.max(Je,Re+1)}}function Hs(ie,ae){if(!ei(ie,"scrollCursorIntoView")){var ge=ie.display,fe=ge.sizer.getBoundingClientRect(),ye=null;if(ae.top+fe.top<0?ye=!0:ae.bottom+fe.top>(window.innerHeight||document.documentElement.clientHeight)&&(ye=!1),ye!=null&&!vt){var Re=Ye("div","\u200B",null,`position: absolute;
top: `+(ae.top-ge.viewOffset-Nn(ie.display))+`px;
height: `+(ae.bottom-ae.top+Gi(ie)+ge.barHeight)+`px;
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Re),Re.scrollIntoView(ye),ie.display.lineSpace.removeChild(Re)}}}function gl(ie,ae,ge,fe){fe==null&&(fe=0);var ye;!ie.options.lineWrapping&&ae==ge&&(ae=ae.ch?tn(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,ge=ae.sticky=="before"?tn(ae.line,ae.ch+1,"before"):ae);for(var Re=0;Re<5;Re++){var Je=!1,mt=La(ie,ae),gt=!ge||ge==ae?mt:La(ie,ge);ye={left:Math.min(mt.left,gt.left),top:Math.min(mt.top,gt.top)-fe,right:Math.max(mt.left,gt.left),bottom:Math.max(mt.bottom,gt.bottom)+fe};var jt=ad(ie,ye),Ln=ie.doc.scrollTop,Vt=ie.doc.scrollLeft;if(jt.scrollTop!=null&&(ac(ie,jt.scrollTop),Math.abs(ie.doc.scrollTop-Ln)>1&&(Je=!0)),jt.scrollLeft!=null&&(au(ie,jt.scrollLeft),Math.abs(ie.doc.scrollLeft-Vt)>1&&(Je=!0)),!Je)break}return ye}function rc(ie,ae){var ge=ad(ie,ae);ge.scrollTop!=null&&ac(ie,ge.scrollTop),ge.scrollLeft!=null&&au(ie,ge.scrollLeft)}function ad(ie,ae){var ge=ie.display,fe=ur(ie.display);ae.top<0&&(ae.top=0);var ye=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:ge.scroller.scrollTop,Re=_i(ie),Je={};ae.bottom-ae.top>Re&&(ae.bottom=ae.top+Re);var mt=ie.doc.height+ai(ge),gt=ae.top<fe,jt=ae.bottom>mt-fe;if(ae.top<ye)Je.scrollTop=gt?0:ae.top;else if(ae.bottom>ye+Re){var Ln=Math.min(ae.top,(jt?mt:ae.bottom)-Re);Ln!=ye&&(Je.scrollTop=Ln)}var Vt=ie.options.fixedGutter?0:ge.gutters.offsetWidth,si=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:ge.scroller.scrollLeft-Vt,ii=ki(ie)-ge.gutters.offsetWidth,tr=ae.right-ae.left>ii;return tr&&(ae.right=ae.left+ii),ae.left<10?Je.scrollLeft=0:ae.left<si?Je.scrollLeft=Math.max(0,ae.left+Vt-(tr?0:10)):ae.right>ii+si-3&&(Je.scrollLeft=ae.right+(tr?0:10)-ii),Je}function kc(ie,ae){ae!=null&&(du(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ae)}function oc(ie){du(ie);var ae=ie.getCursor();ie.curOp.scrollToPos={from:ae,to:ae,margin:ie.options.cursorScrollMargin}}function vc(ie,ae,ge){(ae!=null||ge!=null)&&du(ie),ae!=null&&(ie.curOp.scrollLeft=ae),ge!=null&&(ie.curOp.scrollTop=ge)}function as(ie,ae){du(ie),ie.curOp.scrollToPos=ae}function du(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var ge=fl(ie,ae.from),fe=fl(ie,ae.to);Rc(ie,ge,fe,ae.margin)}}function Rc(ie,ae,ge,fe){var ye=ad(ie,{left:Math.min(ae.left,ge.left),top:Math.min(ae.top,ge.top)-fe,right:Math.max(ae.right,ge.right),bottom:Math.max(ae.bottom,ge.bottom)+fe});vc(ie,ye.scrollLeft,ye.scrollTop)}function ac(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(le||Rr(ie,{top:ae}),Rd(ie,ae,!0),le&&Rr(ie),yi(ie,100))}function Rd(ie,ae,ge){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!ge)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function au(ie,ae,ge,fe){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((ge?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!fe)&&(ie.doc.scrollLeft=ae,ua(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function su(ie){var ae=ie.display,ge=ae.gutters.offsetWidth,fe=Math.round(ie.doc.height+ai(ie.display));return{clientHeight:ae.scroller.clientHeight,viewHeight:ae.wrapper.clientHeight,scrollWidth:ae.scroller.scrollWidth,clientWidth:ae.scroller.clientWidth,viewWidth:ae.wrapper.clientWidth,barLeft:ie.options.fixedGutter?ge:0,docHeight:fe,scrollHeight:fe+Gi(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:ge}}var Wu=function(ie,ae,ge){this.cm=ge;var fe=this.vert=Ye("div",[Ye("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ye=this.horiz=Ye("div",[Ye("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fe.tabIndex=ye.tabIndex=-1,ie(fe),ie(ye),rn(fe,"scroll",function(){fe.clientHeight&&ae(fe.scrollTop,"vertical")}),rn(ye,"scroll",function(){ye.clientWidth&&ae(ye.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ge&&Ue<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Wu.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,ge=ie.scrollHeight>ie.clientHeight+1,fe=ie.nativeBarWidth;if(ge){this.vert.style.display="block",this.vert.style.bottom=ae?fe+"px":"0";var ye=ie.viewHeight-(ae?fe:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+ye)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ae){this.horiz.style.display="block",this.horiz.style.right=ge?fe+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Re=ie.viewWidth-ie.barLeft-(ge?fe: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&&(fe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ge?fe:0,bottom:ae?fe:0}},Wu.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Wu.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Wu.prototype.zeroWidthHack=function(){var ie=de&&!lt?"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},Wu.prototype.enableZeroWidthBar=function(ie,ae,ge){ie.style.pointerEvents="auto";function fe(){var ye=ie.getBoundingClientRect(),Re=ge=="vert"?document.elementFromPoint(ye.right-1,(ye.top+ye.bottom)/2):document.elementFromPoint((ye.right+ye.left)/2,ye.bottom-1);Re!=ie?ie.style.pointerEvents="none":ae.set(1e3,fe)}ae.set(1e3,fe)},Wu.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Au=function(){};Au.prototype.update=function(){return{bottom:0,right:0}},Au.prototype.setScrollLeft=function(){},Au.prototype.setScrollTop=function(){},Au.prototype.clear=function(){};function yc(ie,ae){ae||(ae=su(ie));var ge=ie.display.barWidth,fe=ie.display.barHeight;bd(ie,ae);for(var ye=0;ye<4&&ge!=ie.display.barWidth||fe!=ie.display.barHeight;ye++)ge!=ie.display.barWidth&&ie.options.lineWrapping&&Nr(ie),bd(ie,su(ie)),ge=ie.display.barWidth,fe=ie.display.barHeight}function bd(ie,ae){var ge=ie.display,fe=ge.scrollbars.update(ae);ge.sizer.style.paddingRight=(ge.barWidth=fe.right)+"px",ge.sizer.style.paddingBottom=(ge.barHeight=fe.bottom)+"px",ge.heightForcer.style.borderBottom=fe.bottom+"px solid transparent",fe.right&&fe.bottom?(ge.scrollbarFiller.style.display="block",ge.scrollbarFiller.style.height=fe.bottom+"px",ge.scrollbarFiller.style.width=fe.right+"px"):ge.scrollbarFiller.style.display="",fe.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(ge.gutterFiller.style.display="block",ge.gutterFiller.style.height=fe.bottom+"px",ge.gutterFiller.style.width=ae.gutterWidth+"px"):ge.gutterFiller.style.display=""}var _d={native:Wu,null:Au};function Fd(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&ze(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new _d[ie.options.scrollbarStyle](function(ae){ie.display.wrapper.insertBefore(ae,ie.display.scrollbarFiller),rn(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,ge){ge=="horizontal"?au(ie,ae):ac(ie,ae)},ie),ie.display.scrollbars.addClass&&Tt(ie.display.wrapper,ie.display.scrollbars.addClass)}var ch=0;function li(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:++ch},tu(ie.curOp)}function fo(ie){var ae=ie.curOp;ae&&Ea(ae,function(ge){for(var fe=0;fe<ge.ops.length;fe++)ge.ops[fe].cm.curOp=null;Xa(ge)})}function Xa(ie){for(var ae=ie.ops,ge=0;ge<ae.length;ge++)rt(ae[ge]);for(var fe=0;fe<ae.length;fe++)et(ae[fe]);for(var ye=0;ye<ae.length;ye++)Ut(ae[ye]);for(var Re=0;Re<ae.length;Re++)Xt(ae[Re]);for(var Je=0;Je<ae.length;Je++)gn(ae[Je])}function rt(ie){var ae=ie.cm,ge=ae.display;or(ae),ie.updateMaxLine&&Ca(ae),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<ge.viewFrom||ie.scrollToPos.to.line>=ge.viewTo)||ge.maxLineChanged&&ae.options.lineWrapping,ie.update=ie.mustUpdate&&new mi(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function et(ie){ie.updatedDisplay=ie.mustUpdate&&Jr(ie.cm,ie.update)}function Ut(ie){var ae=ie.cm,ge=ae.display;ie.updatedDisplay&&Nr(ae),ie.barMeasure=su(ae),ge.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=Hr(ae,ge.maxLine,ge.maxLine.text.length).left+3,ae.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(ge.scroller.clientWidth,ge.sizer.offsetLeft+ie.adjustWidthTo+Gi(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,ge.sizer.offsetLeft+ie.adjustWidthTo-ki(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=ge.input.prepareSelection())}function Xt(ie){var ae=ie.cm;ie.adjustWidthTo!=null&&(ae.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ae.doc.scrollLeft&&au(ae,Math.min(ae.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ae.display.maxLineChanged=!1);var ge=ie.focus&&ie.focus==ot();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,ge),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&yc(ae,ie.barMeasure),ie.updatedDisplay&&Vo(ae,ie.barMeasure),ie.selectionChanged&&xa(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),ge&&Wa(ie.cm)}function gn(ie){var ae=ie.cm,ge=ae.display,fe=ae.doc;if(ie.updatedDisplay&&ir(ae,ie.update),ge.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(ge.wheelStartX=ge.wheelStartY=null),ie.scrollTop!=null&&Rd(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&au(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var ye=gl(ae,Li(fe,ie.scrollToPos.from),Li(fe,ie.scrollToPos.to),ie.scrollToPos.margin);Hs(ae,ye)}var Re=ie.maybeHiddenMarkers,Je=ie.maybeUnhiddenMarkers;if(Re)for(var mt=0;mt<Re.length;++mt)Re[mt].lines.length||mn(Re[mt],"hide");if(Je)for(var gt=0;gt<Je.length;++gt)Je[gt].lines.length&&mn(Je[gt],"unhide");ge.wrapper.offsetHeight&&(fe.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&mn(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function nn(ie,ae){if(ie.curOp)return ae();li(ie);try{return ae()}finally{fo(ie)}}function Vn(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);li(ie);try{return ae.apply(ie,arguments)}finally{fo(ie)}}}function jn(ie){return function(){if(this.curOp)return ie.apply(this,arguments);li(this);try{return ie.apply(this,arguments)}finally{fo(this)}}}function Xn(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);li(ae);try{return ie.apply(this,arguments)}finally{fo(ae)}}}function yi(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,Wt(Jn,ie))}function Jn(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var ge=+new Date+ie.options.workTime,fe=Cr(ie,ae.highlightFrontier),ye=[];ae.iter(fe.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Re){if(fe.line>=ie.display.viewFrom){var Je=Re.styles,mt=Re.text.length>ie.options.maxHighlightLength?on(ae.mode,fe.state):null,gt=Po(ie,Re,fe,!0);mt&&(fe.state=mt),Re.styles=gt.styles;var jt=Re.styleClasses,Ln=gt.classes;Ln?Re.styleClasses=Ln:jt&&(Re.styleClasses=null);for(var Vt=!Je||Je.length!=Re.styles.length||jt!=Ln&&(!jt||!Ln||jt.bgClass!=Ln.bgClass||jt.textClass!=Ln.textClass),si=0;!Vt&&si<Je.length;++si)Vt=Je[si]!=Re.styles[si];Vt&&ye.push(fe.line),Re.stateAfter=fe.save(),fe.nextLine()}else Re.text.length<=ie.options.maxHighlightLength&&Cn(ie,Re.text,fe),Re.stateAfter=fe.line%5==0?fe.save():null,fe.nextLine();if(+new Date>ge)return yi(ie,ie.options.workDelay),!0}),ae.highlightFrontier=fe.line,ae.modeFrontier=Math.max(ae.modeFrontier,fe.line),ye.length&&nn(ie,function(){for(var Re=0;Re<ye.length;Re++)Ai(ie,ye[Re],"text")})}}var mi=function(ie,ae,ge){var fe=ie.display;this.viewport=ae,this.visible=jo(fe,ie.doc,ae),this.editorIsHidden=!fe.wrapper.offsetWidth,this.wrapperHeight=fe.wrapper.clientHeight,this.wrapperWidth=fe.wrapper.clientWidth,this.oldDisplayWidth=ki(ie),this.force=ge,this.dims=Pr(ie),this.events=[]};mi.prototype.signal=function(ie,ae){Hn(ie,ae)&&this.events.push(arguments)},mi.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)mn.apply(null,this.events[ie])};function or(ie){var ae=ie.display;!ae.scrollbarsClipped&&ae.scroller.offsetWidth&&(ae.nativeBarWidth=ae.scroller.offsetWidth-ae.scroller.clientWidth,ae.heightForcer.style.height=Gi(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=Gi(ie)+"px",ae.scrollbarsClipped=!0)}function Vi(ie){if(ie.hasFocus())return null;var ae=ot();if(!ae||!Nt(ie.display.lineDiv,ae))return null;var ge={activeElt:ae};if(window.getSelection){var fe=window.getSelection();fe.anchorNode&&fe.extend&&Nt(ie.display.lineDiv,fe.anchorNode)&&(ge.anchorNode=fe.anchorNode,ge.anchorOffset=fe.anchorOffset,ge.focusNode=fe.focusNode,ge.focusOffset=fe.focusOffset)}return ge}function Ui(ie){if(!(!ie||!ie.activeElt||ie.activeElt==ot())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&Nt(document.body,ie.anchorNode)&&Nt(document.body,ie.focusNode))){var ae=window.getSelection(),ge=document.createRange();ge.setEnd(ie.anchorNode,ie.anchorOffset),ge.collapse(!1),ae.removeAllRanges(),ae.addRange(ge),ae.extend(ie.focusNode,ie.focusOffset)}}function Jr(ie,ae){var ge=ie.display,fe=ie.doc;if(ae.editorIsHidden)return Wr(ie),!1;if(!ae.force&&ae.visible.from>=ge.viewFrom&&ae.visible.to<=ge.viewTo&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo)&&ge.renderedView==ge.view&&Er(ie)==0)return!1;oo(ie)&&(Wr(ie),ae.dims=Pr(ie));var ye=fe.first+fe.size,Re=Math.max(ae.visible.from-ie.options.viewportMargin,fe.first),Je=Math.min(ye,ae.visible.to+ie.options.viewportMargin);ge.viewFrom<Re&&Re-ge.viewFrom<20&&(Re=Math.max(fe.first,ge.viewFrom)),ge.viewTo>Je&&ge.viewTo-Je<20&&(Je=Math.min(ye,ge.viewTo)),Un&&(Re=xo(ie.doc,Re),Je=Qr(ie.doc,Je));var mt=Re!=ge.viewFrom||Je!=ge.viewTo||ge.lastWrapHeight!=ae.wrapperHeight||ge.lastWrapWidth!=ae.wrapperWidth;Br(ie,Re,Je),ge.viewOffset=ro(en(ie.doc,ge.viewFrom)),ie.display.mover.style.top=ge.viewOffset+"px";var gt=Er(ie);if(!mt&&gt==0&&!ae.force&&ge.renderedView==ge.view&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo))return!1;var jt=Vi(ie);return gt>4&&(ge.lineDiv.style.display="none"),jr(ie,ge.updateLineNumbers,ae.dims),gt>4&&(ge.lineDiv.style.display=""),ge.renderedView=ge.view,Ui(jt),je(ge.cursorDiv),je(ge.selectionDiv),ge.gutters.style.height=ge.sizer.style.minHeight=0,mt&&(ge.lastWrapHeight=ae.wrapperHeight,ge.lastWrapWidth=ae.wrapperWidth,yi(ie,400)),ge.updateLineNumbers=null,!0}function ir(ie,ae){for(var ge=ae.viewport,fe=!0;;fe=!1){if(!fe||!ie.options.lineWrapping||ae.oldDisplayWidth==ki(ie)){if(ge&&ge.top!=null&&(ge={top:Math.min(ie.doc.height+ai(ie.display)-_i(ie),ge.top)}),ae.visible=jo(ie.display,ie.doc,ge),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else fe&&(ae.visible=jo(ie.display,ie.doc,ge));if(!Jr(ie,ae))break;Nr(ie);var ye=su(ie);Or(ie),yc(ie,ye),Vo(ie,ye),ae.force=!1}ae.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(ae.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function Rr(ie,ae){var ge=new mi(ie,ae);if(Jr(ie,ge)){Nr(ie),ir(ie,ge);var fe=su(ie);Or(ie),yc(ie,fe),Vo(ie,fe),ge.finish()}}function jr(ie,ae,ge){var fe=ie.display,ye=ie.options.lineNumbers,Re=fe.lineDiv,Je=Re.firstChild;function mt(tr){var dr=tr.nextSibling;return Me&&de&&ie.display.currentWheelTarget==tr?tr.style.display="none":tr.parentNode.removeChild(tr),dr}for(var gt=fe.view,jt=fe.viewFrom,Ln=0;Ln<gt.length;Ln++){var Vt=gt[Ln];if(!Vt.hidden)if(!Vt.node||Vt.node.parentNode!=Re){var si=Tl(ie,Vt,jt,ge);Re.insertBefore(si,Je)}else{for(;Je!=Vt.node;)Je=mt(Je);var ii=ye&&ae!=null&&ae<=jt&&Vt.lineNumber;Vt.changes&&(_t(Vt.changes,"gutter")>-1&&(ii=!1),ls(ie,Vt,jt,ge)),ii&&(je(Vt.lineNumber),Vt.lineNumber.appendChild(document.createTextNode(Ei(ie.options,jt)))),Je=Vt.node.nextSibling}jt+=Vt.size}for(;Je;)Je=mt(Je)}function vo(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function Vo(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+Gi(ie)+"px"}function ua(ie){var ae=ie.display,ge=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var fe=to(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,ye=ae.gutters.offsetWidth,Re=fe+"px",Je=0;Je<ge.length;Je++)if(!ge[Je].hidden){ie.options.fixedGutter&&(ge[Je].gutter&&(ge[Je].gutter.style.left=Re),ge[Je].gutterBackground&&(ge[Je].gutterBackground.style.left=Re));var mt=ge[Je].alignable;if(mt)for(var gt=0;gt<mt.length;gt++)mt[gt].style.left=Re}ie.options.fixedGutter&&(ae.gutters.style.left=fe+ye+"px")}}function oo(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,ge=Ei(ie.options,ae.first+ae.size-1),fe=ie.display;if(ge.length!=fe.lineNumChars){var ye=fe.measure.appendChild(Ye("div",[Ye("div",ge)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Re=ye.firstChild.offsetWidth,Je=ye.offsetWidth-Re;return fe.lineGutter.style.width="",fe.lineNumInnerWidth=Math.max(Re,fe.lineGutter.offsetWidth-Je)+1,fe.lineNumWidth=fe.lineNumInnerWidth+Je,fe.lineNumChars=fe.lineNumInnerWidth?ge.length:-1,fe.lineGutter.style.width=fe.lineNumWidth+"px",vo(ie.display),!0}return!1}function Wo(ie,ae){for(var ge=[],fe=!1,ye=0;ye<ie.length;ye++){var Re=ie[ye],Je=null;if(typeof Re!="string"&&(Je=Re.style,Re=Re.className),Re=="CodeMirror-linenumbers")if(ae)fe=!0;else continue;ge.push({className:Re,style:Je})}return ae&&!fe&&ge.push({className:"CodeMirror-linenumbers",style:null}),ge}function Ta(ie){var ae=ie.gutters,ge=ie.gutterSpecs;je(ae),ie.lineGutter=null;for(var fe=0;fe<ge.length;++fe){var ye=ge[fe],Re=ye.className,Je=ye.style,mt=ae.appendChild(Ye("div",null,"CodeMirror-gutter "+Re));Je&&(mt.style.cssText=Je),Re=="CodeMirror-linenumbers"&&(ie.lineGutter=mt,mt.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=ge.length?"":"none",vo(ie)}function uo(ie){Ta(ie.display),ji(ie),ua(ie)}function To(ie,ae,ge,fe){var ye=this;this.input=ge,ye.scrollbarFiller=Ye("div",null,"CodeMirror-scrollbar-filler"),ye.scrollbarFiller.setAttribute("cm-not-content","true"),ye.gutterFiller=Ye("div",null,"CodeMirror-gutter-filler"),ye.gutterFiller.setAttribute("cm-not-content","true"),ye.lineDiv=dt("div",null,"CodeMirror-code"),ye.selectionDiv=Ye("div",null,null,"position: relative; z-index: 1"),ye.cursorDiv=Ye("div",null,"CodeMirror-cursors"),ye.measure=Ye("div",null,"CodeMirror-measure"),ye.lineMeasure=Ye("div",null,"CodeMirror-measure"),ye.lineSpace=dt("div",[ye.measure,ye.lineMeasure,ye.selectionDiv,ye.cursorDiv,ye.lineDiv],null,"position: relative; outline: none");var Re=dt("div",[ye.lineSpace],"CodeMirror-lines");ye.mover=Ye("div",[Re],null,"position: relative"),ye.sizer=Ye("div",[ye.mover],"CodeMirror-sizer"),ye.sizerWidth=null,ye.heightForcer=Ye("div",null,null,"position: absolute; height: "+vn+"px; width: 1px;"),ye.gutters=Ye("div",null,"CodeMirror-gutters"),ye.lineGutter=null,ye.scroller=Ye("div",[ye.sizer,ye.heightForcer,ye.gutters],"CodeMirror-scroll"),ye.scroller.setAttribute("tabIndex","-1"),ye.wrapper=Ye("div",[ye.scrollbarFiller,ye.gutterFiller,ye.scroller],"CodeMirror"),Ge&&Ue<8&&(ye.gutters.style.zIndex=-1,ye.scroller.style.paddingRight=0),!Me&&!(le&&ee)&&(ye.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(ye.wrapper):ie(ye.wrapper)),ye.viewFrom=ye.viewTo=ae.first,ye.reportedViewFrom=ye.reportedViewTo=ae.first,ye.view=[],ye.renderedView=null,ye.externalMeasured=null,ye.viewOffset=0,ye.lastWrapHeight=ye.lastWrapWidth=0,ye.updateLineNumbers=null,ye.nativeBarWidth=ye.barHeight=ye.barWidth=0,ye.scrollbarsClipped=!1,ye.lineNumWidth=ye.lineNumInnerWidth=ye.lineNumChars=null,ye.alignWidgets=!1,ye.cachedCharWidth=ye.cachedTextHeight=ye.cachedPaddingH=null,ye.maxLine=null,ye.maxLineLength=0,ye.maxLineChanged=!1,ye.wheelDX=ye.wheelDY=ye.wheelStartX=ye.wheelStartY=null,ye.shift=!1,ye.selForContextMenu=null,ye.activeTouch=null,ye.gutterSpecs=Wo(fe.gutters,fe.lineNumbers),Ta(ye),ge.init(ye)}var co=0,Ar=null;Ge?Ar=-.53:le?Ar=15:wt?Ar=-.7:Ft&&(Ar=-1/3);function Fo(ie){var ae=ie.wheelDeltaX,ge=ie.wheelDeltaY;return ae==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ae=ie.detail),ge==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?ge=ie.detail:ge==null&&(ge=ie.wheelDelta),{x:ae,y:ge}}function ta(ie){var ae=Fo(ie);return ae.x*=Ar,ae.y*=Ar,ae}function Sa(ie,ae){var ge=Fo(ae),fe=ge.x,ye=ge.y,Re=ie.display,Je=Re.scroller,mt=Je.scrollWidth>Je.clientWidth,gt=Je.scrollHeight>Je.clientHeight;if(fe&&mt||ye&&gt){if(ye&&de&&Me){e:for(var jt=ae.target,Ln=Re.view;jt!=Je;jt=jt.parentNode)for(var Vt=0;Vt<Ln.length;Vt++)if(Ln[Vt].node==jt){ie.display.currentWheelTarget=jt;break e}}if(fe&&!le&&!$e&&Ar!=null){ye&&gt&&ac(ie,Math.max(0,Je.scrollTop+ye*Ar)),au(ie,Math.max(0,Je.scrollLeft+fe*Ar)),(!ye||ye&&gt)&&wi(ae),Re.wheelStartX=null;return}if(ye&&Ar!=null){var si=ye*Ar,ii=ie.doc.scrollTop,tr=ii+Re.wrapper.clientHeight;si<0?ii=Math.max(0,ii+si-50):tr=Math.min(ie.doc.height,tr+si+50),Rr(ie,{top:ii,bottom:tr})}co<20&&(Re.wheelStartX==null?(Re.wheelStartX=Je.scrollLeft,Re.wheelStartY=Je.scrollTop,Re.wheelDX=fe,Re.wheelDY=ye,setTimeout(function(){if(Re.wheelStartX!=null){var dr=Je.scrollLeft-Re.wheelStartX,Mr=Je.scrollTop-Re.wheelStartY,so=Mr&&Re.wheelDY&&Mr/Re.wheelDY||dr&&Re.wheelDX&&dr/Re.wheelDX;Re.wheelStartX=Re.wheelStartY=null,so&&(Ar=(Ar*co+so)/(co+1),++co)}},200)):(Re.wheelDX+=fe,Re.wheelDY+=ye))}}var Pa=function(ie,ae){this.ranges=ie,this.primIndex=ae};Pa.prototype.primary=function(){return this.ranges[this.primIndex]},Pa.prototype.equals=function(ie){if(ie==this)return!0;if(ie.primIndex!=this.primIndex||ie.ranges.length!=this.ranges.length)return!1;for(var ae=0;ae<this.ranges.length;ae++){var ge=this.ranges[ae],fe=ie.ranges[ae];if(!In(ge.anchor,fe.anchor)||!In(ge.head,fe.head))return!1}return!0},Pa.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new ao(Oi(this.ranges[ae].anchor),Oi(this.ranges[ae].head));return new Pa(ie,this.primIndex)},Pa.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Pa.prototype.contains=function(ie,ae){ae||(ae=ie);for(var ge=0;ge<this.ranges.length;ge++){var fe=this.ranges[ge];if(sn(ae,fe.from())>=0&&sn(ie,fe.to())<=0)return ge}return-1};var ao=function(ie,ae){this.anchor=ie,this.head=ae};ao.prototype.from=function(){return vi(this.anchor,this.head)},ao.prototype.to=function(){return Di(this.anchor,this.head)},ao.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ka(ie,ae,ge){var fe=ie&&ie.options.selectionsMayTouch,ye=ae[ge];ae.sort(function(si,ii){return sn(si.from(),ii.from())}),ge=_t(ae,ye);for(var Re=1;Re<ae.length;Re++){var Je=ae[Re],mt=ae[Re-1],gt=sn(mt.to(),Je.from());if(fe&&!Je.empty()?gt>0:gt>=0){var jt=vi(mt.from(),Je.from()),Ln=Di(mt.to(),Je.to()),Vt=mt.empty()?Je.from()==Je.head:mt.from()==mt.head;Re<=ge&&--ge,ae.splice(--Re,2,new ao(Vt?Ln:jt,Vt?jt:Ln))}}return new Pa(ae,ge)}function Va(ie,ae){return new Pa([new ao(ie,ae||ie)],0)}function bs(ie){return ie.text?tn(ie.from.line+ie.text.length-1,St(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function us(ie,ae){if(sn(ie,ae.from)<0)return ie;if(sn(ie,ae.to)<=0)return bs(ae);var ge=ie.line+ae.text.length-(ae.to.line-ae.from.line)-1,fe=ie.ch;return ie.line==ae.to.line&&(fe+=bs(ae).ch-ae.to.ch),tn(ge,fe)}function qs(ie,ae){for(var ge=[],fe=0;fe<ie.sel.ranges.length;fe++){var ye=ie.sel.ranges[fe];ge.push(new ao(us(ye.anchor,ae),us(ye.head,ae)))}return ka(ie.cm,ge,ie.sel.primIndex)}function Ls(ie,ae,ge){return ie.line==ae.line?tn(ge.line,ie.ch-ae.ch+ge.ch):tn(ge.line+(ie.line-ae.line),ie.ch)}function Za(ie,ae,ge){for(var fe=[],ye=tn(ie.first,0),Re=ye,Je=0;Je<ae.length;Je++){var mt=ae[Je],gt=Ls(mt.from,ye,Re),jt=Ls(bs(mt),ye,Re);if(ye=mt.to,Re=jt,ge=="around"){var Ln=ie.sel.ranges[Je],Vt=sn(Ln.head,Ln.anchor)<0;fe[Je]=new ao(Vt?jt:gt,Vt?gt:jt)}else fe[Je]=new ao(gt,gt)}return new Pa(fe,ie.sel.primIndex)}function aa(ie){ie.doc.mode=Zt(ie.options,ie.doc.modeOption),fs(ie)}function fs(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,yi(ie,100),ie.state.modeGen++,ie.curOp&&ji(ie)}function el(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&St(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Ws(ie,ae,ge,fe){function ye(Zo){return ge?ge[Zo]:null}function Re(Zo,Bo,ea){$a(Zo,Bo,ea,fe),hr(Zo,"change",Zo,ae)}function Je(Zo,Bo){for(var ea=[],_a=Zo;_a<Bo;++_a)ea.push(new fa(jt[_a],ye(_a),fe));return ea}var mt=ae.from,gt=ae.to,jt=ae.text,Ln=en(ie,mt.line),Vt=en(ie,gt.line),si=St(jt),ii=ye(jt.length-1),tr=gt.line-mt.line;if(ae.full)ie.insert(0,Je(0,jt.length)),ie.remove(jt.length,ie.size-jt.length);else if(el(ie,ae)){var dr=Je(0,jt.length-1);Re(Vt,Vt.text,ii),tr&&ie.remove(mt.line,tr),dr.length&&ie.insert(mt.line,dr)}else if(Ln==Vt)if(jt.length==1)Re(Ln,Ln.text.slice(0,mt.ch)+si+Ln.text.slice(gt.ch),ii);else{var Mr=Je(1,jt.length-1);Mr.push(new fa(si+Ln.text.slice(gt.ch),ii,fe)),Re(Ln,Ln.text.slice(0,mt.ch)+jt[0],ye(0)),ie.insert(mt.line+1,Mr)}else if(jt.length==1)Re(Ln,Ln.text.slice(0,mt.ch)+jt[0]+Vt.text.slice(gt.ch),ye(0)),ie.remove(mt.line+1,tr);else{Re(Ln,Ln.text.slice(0,mt.ch)+jt[0],ye(0)),Re(Vt,si+Vt.text.slice(gt.ch),ii);var so=Je(1,jt.length-1);tr>1&&ie.remove(mt.line+1,tr-1),ie.insert(mt.line+1,so)}hr(ie,"change",ie,ae)}function cl(ie,ae,ge){function fe(ye,Re,Je){if(ye.linked)for(var mt=0;mt<ye.linked.length;++mt){var gt=ye.linked[mt];if(gt.doc!=Re){var jt=Je&&gt.sharedHist;ge&&!jt||(ae(gt.doc,jt),fe(gt.doc,ye,jt))}}}fe(ie,null,!0)}function ba(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,fr(ie),aa(ie),da(ie),ie.options.lineWrapping||Ca(ie),ie.options.mode=ae.modeOption,ji(ie)}function da(ie){(ie.doc.direction=="rtl"?Tt:ze)(ie.display.lineDiv,"CodeMirror-rtl")}function wa(ie){nn(ie,function(){da(ie),ji(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 Ps(ie,ae){var ge={from:Oi(ae.from),to:bs(ae),text:fn(ie,ae.from,ae.to)};return Vl(ie,ge,ae.from.line,ae.to.line+1),cl(ie,function(fe){return Vl(fe,ge,ae.from.line,ae.to.line+1)},!0),ge}function Uo(ie){for(;ie.length;){var ae=St(ie);if(ae.ranges)ie.pop();else break}}function Ra(ie,ae){if(ae)return Uo(ie.done),St(ie.done);if(ie.done.length&&!St(ie.done).ranges)return St(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),St(ie.done)}function ss(ie,ae,ge,fe){var ye=ie.history;ye.undone.length=0;var Re=+new Date,Je,mt;if((ye.lastOp==fe||ye.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&ye.lastModTime>Re-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(Je=Ra(ye,ye.lastOp==fe)))mt=St(Je.changes),sn(ae.from,ae.to)==0&&sn(ae.from,mt.to)==0?mt.to=bs(ae):Je.changes.push(Ps(ie,ae));else{var gt=St(ye.done);for((!gt||!gt.ranges)&&bl(ie.sel,ye.done),Je={changes:[Ps(ie,ae)],generation:ye.generation},ye.done.push(Je);ye.done.length>ye.undoDepth;)ye.done.shift(),ye.done[0].ranges||ye.done.shift()}ye.done.push(ge),ye.generation=++ye.maxGeneration,ye.lastModTime=ye.lastSelTime=Re,ye.lastOp=ye.lastSelOp=fe,ye.lastOrigin=ye.lastSelOrigin=ae.origin,mt||mn(ie,"historyAdded")}function cs(ie,ae,ge,fe){var ye=ae.charAt(0);return ye=="*"||ye=="+"&&ge.ranges.length==fe.ranges.length&&ge.somethingSelected()==fe.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Al(ie,ae,ge,fe){var ye=ie.history,Re=fe&&fe.origin;ge==ye.lastSelOp||Re&&ye.lastSelOrigin==Re&&(ye.lastModTime==ye.lastSelTime&&ye.lastOrigin==Re||cs(ie,Re,St(ye.done),ae))?ye.done[ye.done.length-1]=ae:bl(ae,ye.done),ye.lastSelTime=+new Date,ye.lastSelOrigin=Re,ye.lastSelOp=ge,fe&&fe.clearRedo!==!1&&Uo(ye.undone)}function bl(ie,ae){var ge=St(ae);ge&&ge.ranges&&ge.equals(ie)||ae.push(ie)}function Vl(ie,ae,ge,fe){var ye=ae["spans_"+ie.id],Re=0;ie.iter(Math.max(ie.first,ge),Math.min(ie.first+ie.size,fe),function(Je){Je.markedSpans&&((ye||(ye=ae["spans_"+ie.id]={}))[Re]=Je.markedSpans),++Re})}function Fs(ie){if(!ie)return null;for(var ae,ge=0;ge<ie.length;++ge)ie[ge].marker.explicitlyCleared?ae||(ae=ie.slice(0,ge)):ae&&ae.push(ie[ge]);return ae?ae.length?ae:null:ie}function Zl(ie,ae){var ge=ae["spans_"+ie.id];if(!ge)return null;for(var fe=[],ye=0;ye<ae.text.length;++ye)fe.push(Fs(ge[ye]));return fe}function dl(ie,ae){var ge=Zl(ie,ae),fe=br(ie,ae);if(!ge)return fe;if(!fe)return ge;for(var ye=0;ye<ge.length;++ye){var Re=ge[ye],Je=fe[ye];if(Re&&Je)e:for(var mt=0;mt<Je.length;++mt){for(var gt=Je[mt],jt=0;jt<Re.length;++jt)if(Re[jt].marker==gt.marker)continue e;Re.push(gt)}else Je&&(ge[ye]=Je)}return ge}function Fl(ie,ae,ge){for(var fe=[],ye=0;ye<ie.length;++ye){var Re=ie[ye];if(Re.ranges){fe.push(ge?Pa.prototype.deepCopy.call(Re):Re);continue}var Je=Re.changes,mt=[];fe.push({changes:mt});for(var gt=0;gt<Je.length;++gt){var jt=Je[gt],Ln=void 0;if(mt.push({from:jt.from,to:jt.to,text:jt.text}),ae)for(var Vt in jt)(Ln=Vt.match(/^spans_(\d+)$/))&&_t(ae,Number(Ln[1]))>-1&&(St(mt)[Vt]=jt[Vt],delete jt[Vt])}}return fe}function _c(ie,ae,ge,fe){if(fe){var ye=ie.anchor;if(ge){var Re=sn(ae,ye)<0;Re!=sn(ge,ye)<0?(ye=ae,ae=ge):Re!=sn(ae,ge)<0&&(ae=ge)}return new ao(ye,ae)}else return new ao(ge||ae,ae)}function Bs(ie,ae,ge,fe,ye){ye==null&&(ye=ie.cm&&(ie.cm.display.shift||ie.extend)),js(ie,new Pa([_c(ie.sel.primary(),ae,ge,ye)],0),fe)}function Ts(ie,ae,ge){for(var fe=[],ye=ie.cm&&(ie.cm.display.shift||ie.extend),Re=0;Re<ie.sel.ranges.length;Re++)fe[Re]=_c(ie.sel.ranges[Re],ae[Re],null,ye);var Je=ka(ie.cm,fe,ie.sel.primIndex);js(ie,Je,ge)}function Ms(ie,ae,ge,fe){var ye=ie.sel.ranges.slice(0);ye[ae]=ge,js(ie,ka(ie.cm,ye,ie.sel.primIndex),fe)}function Gs(ie,ae,ge,fe){js(ie,Va(ae,ge),fe)}function pl(ie,ae,ge){var fe={ranges:ae.ranges,update:function(ye){this.ranges=[];for(var Re=0;Re<ye.length;Re++)this.ranges[Re]=new ao(Li(ie,ye[Re].anchor),Li(ie,ye[Re].head))},origin:ge&&ge.origin};return mn(ie,"beforeSelectionChange",ie,fe),ie.cm&&mn(ie.cm,"beforeSelectionChange",ie.cm,fe),fe.ranges!=ae.ranges?ka(ie.cm,fe.ranges,fe.ranges.length-1):ae}function is(ie,ae,ge){var fe=ie.history.done,ye=St(fe);ye&&ye.ranges?(fe[fe.length-1]=ae,Dl(ie,ae,ge)):js(ie,ae,ge)}function js(ie,ae,ge){Dl(ie,ae,ge),Al(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,ge)}function Dl(ie,ae,ge){(Hn(ie,"beforeSelectionChange")||ie.cm&&Hn(ie.cm,"beforeSelectionChange"))&&(ae=pl(ie,ae,ge));var fe=ge&&ge.bias||(sn(ae.primary().head,ie.sel.primary().head)<0?-1:1);Ul(ie,Du(ie,ae,fe,!0)),!(ge&&ge.scroll===!1)&&ie.cm&&oc(ie.cm)}function Ul(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,Pi(ie.cm)),hr(ie,"cursorActivity",ie))}function Gu(ie){Ul(ie,Du(ie,ie.sel,null,!1))}function Du(ie,ae,ge,fe){for(var ye,Re=0;Re<ae.ranges.length;Re++){var Je=ae.ranges[Re],mt=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Re],gt=Iu(ie,Je.anchor,mt&&mt.anchor,ge,fe),jt=Iu(ie,Je.head,mt&&mt.head,ge,fe);(ye||gt!=Je.anchor||jt!=Je.head)&&(ye||(ye=ae.ranges.slice(0,Re)),ye[Re]=new ao(gt,jt))}return ye?ka(ie.cm,ye,ae.primIndex):ae}function ml(ie,ae,ge,fe,ye){var Re=en(ie,ae.line);if(Re.markedSpans)for(var Je=0;Je<Re.markedSpans.length;++Je){var mt=Re.markedSpans[Je],gt=mt.marker,jt="selectLeft"in gt?!gt.selectLeft:gt.inclusiveLeft,Ln="selectRight"in gt?!gt.selectRight:gt.inclusiveRight;if((mt.from==null||(jt?mt.from<=ae.ch:mt.from<ae.ch))&&(mt.to==null||(Ln?mt.to>=ae.ch:mt.to>ae.ch))){if(ye&&(mn(gt,"beforeCursorEnter"),gt.explicitlyCleared))if(Re.markedSpans){--Je;continue}else break;if(!gt.atomic)continue;if(ge){var Vt=gt.find(fe<0?1:-1),si=void 0;if((fe<0?Ln:jt)&&(Vt=Ou(ie,Vt,-fe,Vt&&Vt.line==ae.line?Re:null)),Vt&&Vt.line==ae.line&&(si=sn(Vt,ge))&&(fe<0?si<0:si>0))return ml(ie,Vt,ae,fe,ye)}var ii=gt.find(fe<0?-1:1);return(fe<0?jt:Ln)&&(ii=Ou(ie,ii,fe,ii.line==ae.line?Re:null)),ii?ml(ie,ii,ae,fe,ye):null}}return ae}function Iu(ie,ae,ge,fe,ye){var Re=fe||1,Je=ml(ie,ae,ge,Re,ye)||!ye&&ml(ie,ae,ge,Re,!0)||ml(ie,ae,ge,-Re,ye)||!ye&&ml(ie,ae,ge,-Re,!0);return Je||(ie.cantEdit=!0,tn(ie.first,0))}function Ou(ie,ae,ge,fe){return ge<0&&ae.ch==0?ae.line>ie.first?Li(ie,tn(ae.line-1)):null:ge>0&&ae.ch==(fe||en(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?tn(ae.line+1,0):null:new tn(ae.line,ae.ch+ge)}function Ns(ie){ie.setSelection(tn(ie.firstLine(),0),tn(ie.lastLine()),zt)}function Hl(ie,ae,ge){var fe={canceled:!1,from:ae.from,to:ae.to,text:ae.text,origin:ae.origin,cancel:function(){return fe.canceled=!0}};return ge&&(fe.update=function(ye,Re,Je,mt){ye&&(fe.from=Li(ie,ye)),Re&&(fe.to=Li(ie,Re)),Je&&(fe.text=Je),mt!==void 0&&(fe.origin=mt)}),mn(ie,"beforeChange",ie,fe),ie.cm&&mn(ie.cm,"beforeChange",ie.cm,fe),fe.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:fe.from,to:fe.to,text:fe.text,origin:fe.origin}}function $s(ie,ae,ge){if(ie.cm){if(!ie.cm.curOp)return Vn(ie.cm,$s)(ie,ae,ge);if(ie.cm.state.suppressEdits)return}if(!((Hn(ie,"beforeChange")||ie.cm&&Hn(ie.cm,"beforeChange"))&&(ae=Hl(ie,ae,!0),!ae))){var fe=Yr&&!ge&&Yo(ie,ae.from,ae.to);if(fe)for(var ye=fe.length-1;ye>=0;--ye)zs(ie,{from:fe[ye].from,to:fe[ye].to,text:ye?[""]:ae.text,origin:ae.origin});else zs(ie,ae)}}function zs(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&sn(ae.from,ae.to)==0)){var ge=qs(ie,ae);ss(ie,ae,ge,ie.cm?ie.cm.curOp.id:NaN),sc(ie,ae,ge,br(ie,ae));var fe=[];cl(ie,function(ye,Re){!Re&&_t(fe,ye.history)==-1&&(Ys(ye.history,ae),fe.push(ye.history)),sc(ye,ae,null,br(ye,ae))})}}function $u(ie,ae,ge){var fe=ie.cm&&ie.cm.state.suppressEdits;if(!(fe&&!ge)){for(var ye=ie.history,Re,Je=ie.sel,mt=ae=="undo"?ye.done:ye.undone,gt=ae=="undo"?ye.undone:ye.done,jt=0;jt<mt.length&&(Re=mt[jt],!(ge?Re.ranges&&!Re.equals(ie.sel):!Re.ranges));jt++);if(jt!=mt.length){for(ye.lastOrigin=ye.lastSelOrigin=null;;)if(Re=mt.pop(),Re.ranges){if(bl(Re,gt),ge&&!Re.equals(ie.sel)){js(ie,Re,{clearRedo:!1});return}Je=Re}else if(fe){mt.push(Re);return}else break;var Ln=[];bl(Je,gt),gt.push({changes:Ln,generation:ye.generation}),ye.generation=Re.generation||++ye.maxGeneration;for(var Vt=Hn(ie,"beforeChange")||ie.cm&&Hn(ie.cm,"beforeChange"),si=function(dr){var Mr=Re.changes[dr];if(Mr.origin=ae,Vt&&!Hl(ie,Mr,!1))return mt.length=0,{};Ln.push(Ps(ie,Mr));var so=dr?qs(ie,Mr):St(mt);sc(ie,Mr,so,dl(ie,Mr)),!dr&&ie.cm&&ie.cm.scrollIntoView({from:Mr.from,to:bs(Mr)});var Zo=[];cl(ie,function(Bo,ea){!ea&&_t(Zo,Bo.history)==-1&&(Ys(Bo.history,Mr),Zo.push(Bo.history)),sc(Bo,Mr,null,dl(Bo,Mr))})},ii=Re.changes.length-1;ii>=0;--ii){var tr=si(ii);if(tr)return tr.v}}}}function Vc(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new Pa(Zn(ie.sel.ranges,function(ye){return new ao(tn(ye.anchor.line+ae,ye.anchor.ch),tn(ye.head.line+ae,ye.head.ch))}),ie.sel.primIndex),ie.cm)){ji(ie.cm,ie.first,ie.first-ae,ae);for(var ge=ie.cm.display,fe=ge.viewFrom;fe<ge.viewTo;fe++)Ai(ie.cm,fe,"gutter")}}function sc(ie,ae,ge,fe){if(ie.cm&&!ie.cm.curOp)return Vn(ie.cm,sc)(ie,ae,ge,fe);if(ae.to.line<ie.first){Vc(ie,ae.text.length-1-(ae.to.line-ae.from.line));return}if(!(ae.from.line>ie.lastLine())){if(ae.from.line<ie.first){var ye=ae.text.length-1-(ie.first-ae.from.line);Vc(ie,ye),ae={from:tn(ie.first,0),to:tn(ae.to.line+ye,ae.to.ch),text:[St(ae.text)],origin:ae.origin}}var Re=ie.lastLine();ae.to.line>Re&&(ae={from:ae.from,to:tn(Re,en(ie,Re).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=fn(ie,ae.from,ae.to),ge||(ge=qs(ie,ae)),ie.cm?lc(ie.cm,ae,fe):Ws(ie,ae,fe),Dl(ie,ge,zt),ie.cantEdit&&Iu(ie,tn(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function lc(ie,ae,ge){var fe=ie.doc,ye=ie.display,Re=ae.from,Je=ae.to,mt=!1,gt=Re.line;ie.options.lineWrapping||(gt=Et(Eo(en(fe,Re.line))),fe.iter(gt,Je.line+1,function(ii){if(ii==ye.maxLine)return mt=!0,!0})),fe.sel.contains(ae.from,ae.to)>-1&&Pi(ie),Ws(fe,ae,ge,So(ie)),ie.options.lineWrapping||(fe.iter(gt,Re.line+ae.text.length,function(ii){var tr=Ja(ii);tr>ye.maxLineLength&&(ye.maxLine=ii,ye.maxLineLength=tr,ye.maxLineChanged=!0,mt=!1)}),mt&&(ie.curOp.updateMaxLine=!0)),Tr(fe,Re.line),yi(ie,400);var jt=ae.text.length-(Je.line-Re.line)-1;ae.full?ji(ie):Re.line==Je.line&&ae.text.length==1&&!el(ie.doc,ae)?Ai(ie,Re.line,"text"):ji(ie,Re.line,Je.line+1,jt);var Ln=Hn(ie,"changes"),Vt=Hn(ie,"change");if(Vt||Ln){var si={from:Re,to:Je,text:ae.text,removed:ae.removed,origin:ae.origin};Vt&&hr(ie,"change",ie,si),Ln&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(si)}ie.display.selForContextMenu=null}function Ku(ie,ae,ge,fe,ye){var Re;fe||(fe=ge),sn(fe,ge)<0&&(Re=[fe,ge],ge=Re[0],fe=Re[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),$s(ie,{from:ge,to:fe,text:ae,origin:ye})}function Tu(ie,ae,ge,fe){ge<ie.line?ie.line+=fe:ae<ie.line&&(ie.line=ae,ie.ch=0)}function ws(ie,ae,ge,fe){for(var ye=0;ye<ie.length;++ye){var Re=ie[ye],Je=!0;if(Re.ranges){Re.copied||(Re=ie[ye]=Re.deepCopy(),Re.copied=!0);for(var mt=0;mt<Re.ranges.length;mt++)Tu(Re.ranges[mt].anchor,ae,ge,fe),Tu(Re.ranges[mt].head,ae,ge,fe);continue}for(var gt=0;gt<Re.changes.length;++gt){var jt=Re.changes[gt];if(ge<jt.from.line)jt.from=tn(jt.from.line+fe,jt.from.ch),jt.to=tn(jt.to.line+fe,jt.to.ch);else if(ae<=jt.to.line){Je=!1;break}}Je||(ie.splice(0,ye+1),ye=0)}}function Ys(ie,ae){var ge=ae.from.line,fe=ae.to.line,ye=ae.text.length-(fe-ge)-1;ws(ie.done,ge,fe,ye),ws(ie.undone,ge,fe,ye)}function vl(ie,ae,ge,fe){var ye=ae,Re=ae;return typeof ae=="number"?Re=en(ie,Ti(ie,ae)):ye=Et(ae),ye==null?null:(fe(Re,ye)&&ie.cm&&Ai(ie.cm,ye,ge),Re)}function Xs(ie){this.lines=ie,this.parent=null;for(var ae=0,ge=0;ge<ie.length;++ge)ie[ge].parent=this,ae+=ie[ge].height;this.height=ae}Xs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var ge=ie,fe=ie+ae;ge<fe;++ge){var ye=this.lines[ge];this.height-=ye.height,Qa(ye),hr(ye,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,ge){this.height+=ge,this.lines=this.lines.slice(0,ie).concat(ae).concat(this.lines.slice(ie));for(var fe=0;fe<ae.length;++fe)ae[fe].parent=this},iterN:function(ie,ae,ge){for(var fe=ie+ae;ie<fe;++ie)if(ge(this.lines[ie]))return!0}};function ms(ie){this.children=ie;for(var ae=0,ge=0,fe=0;fe<ie.length;++fe){var ye=ie[fe];ae+=ye.chunkSize(),ge+=ye.height,ye.parent=this}this.size=ae,this.height=ge,this.parent=null}ms.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var ge=0;ge<this.children.length;++ge){var fe=this.children[ge],ye=fe.chunkSize();if(ie<ye){var Re=Math.min(ae,ye-ie),Je=fe.height;if(fe.removeInner(ie,Re),this.height-=Je-fe.height,ye==Re&&(this.children.splice(ge--,1),fe.parent=null),(ae-=Re)==0)break;ie=0}else ie-=ye}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof Xs))){var mt=[];this.collapse(mt),this.children=[new Xs(mt)],this.children[0].parent=this}},collapse:function(ie){for(var ae=0;ae<this.children.length;++ae)this.children[ae].collapse(ie)},insertInner:function(ie,ae,ge){this.size+=ae.length,this.height+=ge;for(var fe=0;fe<this.children.length;++fe){var ye=this.children[fe],Re=ye.chunkSize();if(ie<=Re){if(ye.insertInner(ie,ae,ge),ye.lines&&ye.lines.length>50){for(var Je=ye.lines.length%25+25,mt=Je;mt<ye.lines.length;){var gt=new Xs(ye.lines.slice(mt,mt+=25));ye.height-=gt.height,this.children.splice(++fe,0,gt),gt.parent=this}ye.lines=ye.lines.slice(0,Je),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),ge=new ms(ae);if(ie.parent){ie.size-=ge.size,ie.height-=ge.height;var ye=_t(ie.parent.children,ie);ie.parent.children.splice(ye+1,0,ge)}else{var fe=new ms(ie.children);fe.parent=ie,ie.children=[fe,ge],ie=fe}ge.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,ge){for(var fe=0;fe<this.children.length;++fe){var ye=this.children[fe],Re=ye.chunkSize();if(ie<Re){var Je=Math.min(ae,Re-ie);if(ye.iterN(ie,Je,ge))return!0;if((ae-=Je)==0)break;ie=0}else ie-=Re}}};var yl=function(ie,ae,ge){if(ge)for(var fe in ge)ge.hasOwnProperty(fe)&&(this[fe]=ge[fe]);this.doc=ie,this.node=ae};yl.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,ge=this.line,fe=Et(ge);if(!(fe==null||!ae)){for(var ye=0;ye<ae.length;++ye)ae[ye]==this&&ae.splice(ye--,1);ae.length||(ge.widgets=null);var Re=zl(this);Qn(ge,Math.max(0,ge.height-Re)),ie&&(nn(ie,function(){Su(ie,ge,-Re),Ai(ie,fe,"widget")}),hr(ie,"lineWidgetCleared",ie,this,fe))}},yl.prototype.changed=function(){var ie=this,ae=this.height,ge=this.doc.cm,fe=this.line;this.height=null;var ye=zl(this)-ae;ye&&(pi(this.doc,fe)||Qn(fe,fe.height+ye),ge&&nn(ge,function(){ge.curOp.forceUpdate=!0,Su(ge,fe,ye),hr(ge,"lineWidgetChanged",ge,ie,Et(fe))}))},bn(yl);function Su(ie,ae,ge){ro(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&kc(ie,ge)}function xc(ie,ae,ge,fe){var ye=new yl(ie,ge,fe),Re=ie.cm;return Re&&ye.noHScroll&&(Re.display.alignWidgets=!0),vl(ie,ae,"widget",function(Je){var mt=Je.widgets||(Je.widgets=[]);if(ye.insertAt==null?mt.push(ye):mt.splice(Math.min(mt.length-1,Math.max(0,ye.insertAt)),0,ye),ye.line=Je,Re&&!pi(ie,Je)){var gt=ro(Je)<ie.scrollTop;Qn(Je,Je.height+zl(ye)),gt&&kc(Re,ye.height),Re.curOp.forceUpdate=!0}return!0}),Re&&hr(Re,"lineWidgetAdded",Re,ye,typeof ae=="number"?ae:Et(ae)),ye}var jd=0,dn=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++jd};dn.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&li(ie),Hn(this,"clear")){var ge=this.find();ge&&hr(this,"clear",ge.from,ge.to)}for(var fe=null,ye=null,Re=0;Re<this.lines.length;++Re){var Je=this.lines[Re],mt=Qo(Je.markedSpans,this);ie&&!this.collapsed?Ai(ie,Et(Je),"text"):ie&&(mt.to!=null&&(ye=Et(Je)),mt.from!=null&&(fe=Et(Je))),Je.markedSpans=nr(Je.markedSpans,mt),mt.from==null&&this.collapsed&&!pi(this.doc,Je)&&ie&&Qn(Je,ur(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var gt=0;gt<this.lines.length;++gt){var jt=Eo(this.lines[gt]),Ln=Ja(jt);Ln>ie.display.maxLineLength&&(ie.display.maxLine=jt,ie.display.maxLineLength=Ln,ie.display.maxLineChanged=!0)}fe!=null&&ie&&this.collapsed&&ji(ie,fe,ye+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&Gu(ie.doc)),ie&&hr(ie,"markerCleared",ie,this,fe,ye),ae&&fo(ie),this.parent&&this.parent.clear()}},dn.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var ge,fe,ye=0;ye<this.lines.length;++ye){var Re=this.lines[ye],Je=Qo(Re.markedSpans,this);if(Je.from!=null&&(ge=tn(ae?Re:Et(Re),Je.from),ie==-1))return ge;if(Je.to!=null&&(fe=tn(ae?Re:Et(Re),Je.to),ie==1))return fe}return ge&&{from:ge,to:fe}},dn.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),ge=this,fe=this.doc.cm;!ae||!fe||nn(fe,function(){var ye=ae.line,Re=Et(ae.line),Je=ga(fe,Re);if(Je&&(Ko(Je),fe.curOp.selectionChanged=fe.curOp.forceUpdate=!0),fe.curOp.updateMaxLine=!0,!pi(ge.doc,ye)&&ge.height!=null){var mt=ge.height;ge.height=null;var gt=zl(ge)-mt;gt&&Qn(ye,ye.height+gt)}hr(fe,"markerChanged",fe,ie)})},dn.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||_t(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},dn.prototype.detachLine=function(ie){if(this.lines.splice(_t(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},bn(dn);function sd(ie,ae,ge,fe,ye){if(fe&&fe.shared)return df(ie,ae,ge,fe,ye);if(ie.cm&&!ie.cm.curOp)return Vn(ie.cm,sd)(ie,ae,ge,fe,ye);var Re=new dn(ie,ye),Je=sn(ae,ge);if(fe&&Dt(fe,Re,!1),Je>0||Je==0&&Re.clearWhenEmpty!==!1)return Re;if(Re.replacedWith&&(Re.collapsed=!0,Re.widgetNode=dt("span",[Re.replacedWith],"CodeMirror-widget"),fe.handleMouseEvents||Re.widgetNode.setAttribute("cm-ignore-events","true"),fe.insertLeft&&(Re.widgetNode.insertLeft=!0)),Re.collapsed){if(la(ie,ae.line,ae,ge,Re)||ae.line!=ge.line&&la(ie,ge.line,ae,ge,Re))throw new Error("Inserting collapsed marker partially overlapping an existing one");Yn()}Re.addToHistory&&ss(ie,{from:ae,to:ge,origin:"markText"},ie.sel,NaN);var mt=ae.line,gt=ie.cm,jt;if(ie.iter(mt,ge.line+1,function(Vt){gt&&Re.collapsed&&!gt.options.lineWrapping&&Eo(Vt)==gt.display.maxLine&&(jt=!0),Re.collapsed&&mt!=ae.line&&Qn(Vt,0),qo(Vt,new Ao(Re,mt==ae.line?ae.ch:null,mt==ge.line?ge.ch:null)),++mt}),Re.collapsed&&ie.iter(ae.line,ge.line+1,function(Vt){pi(ie,Vt)&&Qn(Vt,0)}),Re.clearOnEnter&&rn(Re,"beforeCursorEnter",function(){return Re.clear()}),Re.readOnly&&(Ho(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Re.collapsed&&(Re.id=++jd,Re.atomic=!0),gt){if(jt&&(gt.curOp.updateMaxLine=!0),Re.collapsed)ji(gt,ae.line,ge.line+1);else if(Re.className||Re.startStyle||Re.endStyle||Re.css||Re.attributes||Re.title)for(var Ln=ae.line;Ln<=ge.line;Ln++)Ai(gt,Ln,"text");Re.atomic&&Gu(gt.doc),hr(gt,"markerAdded",gt,Re)}return Re}var Bc=function(ie,ae){this.markers=ie,this.primary=ae;for(var ge=0;ge<ie.length;++ge)ie[ge].parent=this};Bc.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();hr(this,"clear")}},Bc.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},bn(Bc);function df(ie,ae,ge,fe,ye){fe=Dt(fe),fe.shared=!1;var Re=[sd(ie,ae,ge,fe,ye)],Je=Re[0],mt=fe.widgetNode;return cl(ie,function(gt){mt&&(fe.widgetNode=mt.cloneNode(!0)),Re.push(sd(gt,Li(gt,ae),Li(gt,ge),fe,ye));for(var jt=0;jt<gt.linked.length;++jt)if(gt.linked[jt].isParent)return;Je=St(Re)}),new Bc(Re,Je)}function zd(ie){return ie.findMarks(tn(ie.first,0),ie.clipPos(tn(ie.lastLine())),function(ae){return ae.parent})}function Zd(ie,ae){for(var ge=0;ge<ae.length;ge++){var fe=ae[ge],ye=fe.find(),Re=ie.clipPos(ye.from),Je=ie.clipPos(ye.to);if(sn(Re,Je)){var mt=sd(ie,Re,Je,fe.primary,fe.primary.type);fe.markers.push(mt),mt.parent=fe}}}function Rh(ie){for(var ae=function(fe){var ye=ie[fe],Re=[ye.primary.doc];cl(ye.primary.doc,function(gt){return Re.push(gt)});for(var Je=0;Je<ye.markers.length;Je++){var mt=ye.markers[Je];_t(Re,mt.doc)==-1&&(mt.parent=null,ye.markers.splice(Je--,1))}},ge=0;ge<ie.length;ge++)ae(ge)}var Qg=0,Bl=function(ie,ae,ge,fe,ye){if(!(this instanceof Bl))return new Bl(ie,ae,ge,fe,ye);ge==null&&(ge=0),ms.call(this,[new Xs([new fa("",null)])]),this.first=ge,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ge;var Re=tn(ge,0);this.sel=Va(Re),this.history=new Xo(null),this.id=++Qg,this.modeOption=ae,this.lineSep=fe,this.direction=ye=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Ws(this,{from:Re,to:Re,text:ie}),js(this,Va(Re),zt)};Bl.prototype=be(ms.prototype,{constructor:Bl,iter:function(ie,ae,ge){ge?this.iterN(ie-this.first,ae-ie,ge):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ae){for(var ge=0,fe=0;fe<ae.length;++fe)ge+=ae[fe].height;this.insertInner(ie-this.first,ae,ge)},remove:function(ie,ae){this.removeInner(ie-this.first,ae)},getValue:function(ie){var ae=Rn(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:Xn(function(ie){var ae=tn(this.first,0),ge=this.first+this.size-1;$s(this,{from:ae,to:tn(ge,en(this,ge).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&vc(this.cm,0,0),js(this,Va(ae),zt)}),replaceRange:function(ie,ae,ge,fe){ae=Li(this,ae),ge=ge?Li(this,ge):ae,Ku(this,ie,ae,ge,fe)},getRange:function(ie,ae,ge){var fe=fn(this,Li(this,ie),Li(this,ae));return ge===!1?fe:fe.join(ge||this.lineSeparator())},getLine:function(ie){var ae=this.getLineHandle(ie);return ae&&ae.text},getLineHandle:function(ie){if(Kn(this,ie))return en(this,ie)},getLineNumber:function(ie){return Et(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=en(this,ie)),Eo(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return Li(this,ie)},getCursor:function(ie){var ae=this.sel.primary(),ge;return ie==null||ie=="head"?ge=ae.head:ie=="anchor"?ge=ae.anchor:ie=="end"||ie=="to"||ie===!1?ge=ae.to():ge=ae.from(),ge},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Xn(function(ie,ae,ge){Gs(this,Li(this,typeof ie=="number"?tn(ie,ae||0):ie),null,ge)}),setSelection:Xn(function(ie,ae,ge){Gs(this,Li(this,ie),Li(this,ae||ie),ge)}),extendSelection:Xn(function(ie,ae,ge){Bs(this,Li(this,ie),ae&&Li(this,ae),ge)}),extendSelections:Xn(function(ie,ae){Ts(this,Zr(this,ie),ae)}),extendSelectionsBy:Xn(function(ie,ae){var ge=Zn(this.sel.ranges,ie);Ts(this,Zr(this,ge),ae)}),setSelections:Xn(function(ie,ae,ge){if(ie.length){for(var fe=[],ye=0;ye<ie.length;ye++)fe[ye]=new ao(Li(this,ie[ye].anchor),Li(this,ie[ye].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),js(this,ka(this.cm,fe,ae),ge)}}),addSelection:Xn(function(ie,ae,ge){var fe=this.sel.ranges.slice(0);fe.push(new ao(Li(this,ie),Li(this,ae||ie))),js(this,ka(this.cm,fe,fe.length-1),ge)}),getSelection:function(ie){for(var ae=this.sel.ranges,ge,fe=0;fe<ae.length;fe++){var ye=fn(this,ae[fe].from(),ae[fe].to());ge=ge?ge.concat(ye):ye}return ie===!1?ge:ge.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],ge=this.sel.ranges,fe=0;fe<ge.length;fe++){var ye=fn(this,ge[fe].from(),ge[fe].to());ie!==!1&&(ye=ye.join(ie||this.lineSeparator())),ae[fe]=ye}return ae},replaceSelection:function(ie,ae,ge){for(var fe=[],ye=0;ye<this.sel.ranges.length;ye++)fe[ye]=ie;this.replaceSelections(fe,ae,ge||"+input")},replaceSelections:Xn(function(ie,ae,ge){for(var fe=[],ye=this.sel,Re=0;Re<ye.ranges.length;Re++){var Je=ye.ranges[Re];fe[Re]={from:Je.from(),to:Je.to(),text:this.splitLines(ie[Re]),origin:ge}}for(var mt=ae&&ae!="end"&&Za(this,fe,ae),gt=fe.length-1;gt>=0;gt--)$s(this,fe[gt]);mt?is(this,mt):this.cm&&oc(this.cm)}),undo:Xn(function(){$u(this,"undo")}),redo:Xn(function(){$u(this,"redo")}),undoSelection:Xn(function(){$u(this,"undo",!0)}),redoSelection:Xn(function(){$u(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ae=0,ge=0,fe=0;fe<ie.done.length;fe++)ie.done[fe].ranges||++ae;for(var ye=0;ye<ie.undone.length;ye++)ie.undone[ye].ranges||++ge;return{undo:ae,redo:ge}},clearHistory:function(){var ie=this;this.history=new Xo(this.history.maxGeneration),cl(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:Fl(this.history.done),undone:Fl(this.history.undone)}},setHistory:function(ie){var ae=this.history=new Xo(this.history.maxGeneration);ae.done=Fl(ie.done.slice(0),null,!0),ae.undone=Fl(ie.undone.slice(0),null,!0)},setGutterMarker:Xn(function(ie,ae,ge){return vl(this,ie,"gutter",function(fe){var ye=fe.gutterMarkers||(fe.gutterMarkers={});return ye[ae]=ge,!ge&&xe(ye)&&(fe.gutterMarkers=null),!0})}),clearGutter:Xn(function(ie){var ae=this;this.iter(function(ge){ge.gutterMarkers&&ge.gutterMarkers[ie]&&vl(ae,ge,"gutter",function(){return ge.gutterMarkers[ie]=null,xe(ge.gutterMarkers)&&(ge.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!Kn(this,ie)||(ae=ie,ie=en(this,ie),!ie))return null}else if(ae=Et(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:Xn(function(ie,ae,ge){return vl(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!fe[ye])fe[ye]=ge;else{if(Le(ge).test(fe[ye]))return!1;fe[ye]+=" "+ge}return!0})}),removeLineClass:Xn(function(ie,ae,ge){return vl(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Re=fe[ye];if(Re)if(ge==null)fe[ye]=null;else{var Je=Re.match(Le(ge));if(!Je)return!1;var mt=Je.index+Je[0].length;fe[ye]=Re.slice(0,Je.index)+(!Je.index||mt==Re.length?"":" ")+Re.slice(mt)||null}else return!1;return!0})}),addLineWidget:Xn(function(ie,ae,ge){return xc(this,ie,ae,ge)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,ge){return sd(this,Li(this,ie),Li(this,ae),ge,ge&&ge.type||"range")},setBookmark:function(ie,ae){var ge={replacedWith:ae&&(ae.nodeType==null?ae.widget:ae),insertLeft:ae&&ae.insertLeft,clearWhenEmpty:!1,shared:ae&&ae.shared,handleMouseEvents:ae&&ae.handleMouseEvents};return ie=Li(this,ie),sd(this,ie,ie,ge,"bookmark")},findMarksAt:function(ie){ie=Li(this,ie);var ae=[],ge=en(this,ie.line).markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe){var ye=ge[fe];(ye.from==null||ye.from<=ie.ch)&&(ye.to==null||ye.to>=ie.ch)&&ae.push(ye.marker.parent||ye.marker)}return ae},findMarks:function(ie,ae,ge){ie=Li(this,ie),ae=Li(this,ae);var fe=[],ye=ie.line;return this.iter(ie.line,ae.line+1,function(Re){var Je=Re.markedSpans;if(Je)for(var mt=0;mt<Je.length;mt++){var gt=Je[mt];!(gt.to!=null&&ye==ie.line&&ie.ch>=gt.to||gt.from==null&&ye!=ie.line||gt.from!=null&&ye==ae.line&&gt.from>=ae.ch)&&(!ge||ge(gt.marker))&&fe.push(gt.marker.parent||gt.marker)}++ye}),fe},getAllMarks:function(){var ie=[];return this.iter(function(ae){var ge=ae.markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe)ge[fe].from!=null&&ie.push(ge[fe].marker)}),ie},posFromIndex:function(ie){var ae,ge=this.first,fe=this.lineSeparator().length;return this.iter(function(ye){var Re=ye.text.length+fe;if(Re>ie)return ae=ie,!0;ie-=Re,++ge}),Li(this,tn(ge,ae))},indexFromPos:function(ie){ie=Li(this,ie);var ae=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var ge=this.lineSeparator().length;return this.iter(this.first,ie.line,function(fe){ae+=fe.text.length+ge}),ae},copy:function(ie){var ae=new Bl(Rn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ae.scrollTop=this.scrollTop,ae.scrollLeft=this.scrollLeft,ae.sel=this.sel,ae.extend=!1,ie&&(ae.history.undoDepth=this.history.undoDepth,ae.setHistory(this.getHistory())),ae},linkedDoc:function(ie){ie||(ie={});var ae=this.first,ge=this.first+this.size;ie.from!=null&&ie.from>ae&&(ae=ie.from),ie.to!=null&&ie.to<ge&&(ge=ie.to);var fe=new Bl(Rn(this,ae,ge),ie.mode||this.modeOption,ae,this.lineSep,this.direction);return ie.sharedHist&&(fe.history=this.history),(this.linked||(this.linked=[])).push({doc:fe,sharedHist:ie.sharedHist}),fe.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],Zd(fe,zd(this)),fe},unlinkDoc:function(ie){if(ie instanceof As&&(ie=ie.doc),this.linked)for(var ae=0;ae<this.linked.length;++ae){var ge=this.linked[ae];if(ge.doc==ie){this.linked.splice(ae,1),ie.unlinkDoc(this),Rh(zd(this));break}}if(ie.history==this.history){var fe=[ie.id];cl(ie,function(ye){return fe.push(ye.id)},!0),ie.history=new Xo(null),ie.history.done=Fl(this.history.done,fe),ie.history.undone=Fl(this.history.undone,fe)}},iterLinkedDocs:function(ie){cl(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):Sr(ie)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Xn(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&wa(this.cm))})}),Bl.prototype.eachLine=Bl.prototype.iter;var dh=0;function Hd(ie){var ae=this;if(Hf(ae),!(ei(ae,ie)||En(ae.display,ie))){wi(ie),Ge&&(dh=+new Date);var ge=pr(ae,ie,!0),fe=ie.dataTransfer.files;if(!(!ge||ae.isReadOnly()))if(fe&&fe.length&&window.FileReader&&window.File)for(var ye=fe.length,Re=Array(ye),Je=0,mt=function(){++Je==ye&&Vn(ae,function(){ge=Li(ae.doc,ge);var ii={from:ge,to:ge,text:ae.doc.splitLines(Re.filter(function(tr){return tr!=null}).join(ae.doc.lineSeparator())),origin:"paste"};$s(ae.doc,ii),is(ae.doc,Va(Li(ae.doc,ge),Li(ae.doc,bs(ii))))})()},gt=function(ii,tr){if(ae.options.allowDropFileTypes&&_t(ae.options.allowDropFileTypes,ii.type)==-1){mt();return}var dr=new FileReader;dr.onerror=function(){return mt()},dr.onload=function(){var Mr=dr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Mr)){mt();return}Re[tr]=Mr,mt()},dr.readAsText(ii)},jt=0;jt<fe.length;jt++)gt(fe[jt],jt);else{if(ae.state.draggingText&&ae.doc.sel.contains(ge)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var Ln=ie.dataTransfer.getData("Text");if(Ln){var Vt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Vt=ae.listSelections()),Dl(ae.doc,Va(ge,ge)),Vt)for(var si=0;si<Vt.length;++si)Ku(ae.doc,"",Vt[si].anchor,Vt[si].head,"drag");ae.replaceSelection(Ln,"around","paste"),ae.display.input.focus()}}catch(ii){}}}}function hh(ie,ae){if(Ge&&(!ie.state.draggingText||+new Date-dh<100)){rr(ae);return}if(!(ei(ie,ae)||En(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!Ft)){var ge=Ye("img",null,null,"position: fixed; left: 0; top: 0;");ge.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",$e&&(ge.width=ge.height=1,ie.display.wrapper.appendChild(ge),ge._top=ge.offsetTop),ae.dataTransfer.setDragImage(ge,0,0),$e&&ge.parentNode.removeChild(ge)}}function hf(ie,ae){var ge=pr(ie,ae);if(ge){var fe=document.createDocumentFragment();gr(ie,ge,fe),ie.display.dragCursor||(ie.display.dragCursor=Ye("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),Xe(ie.display.dragCursor,fe)}}function Hf(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function fh(ie){if(document.getElementsByClassName){for(var ae=document.getElementsByClassName("CodeMirror"),ge=[],fe=0;fe<ae.length;fe++){var ye=ae[fe].CodeMirror;ye&&ge.push(ye)}ge.length&&ge[0].operation(function(){for(var Re=0;Re<ge.length;Re++)ie(ge[Re])})}}var gh=!1;function Vu(){gh||(Wd(),gh=!0)}function Wd(){var ie;rn(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,fh(ff)},100))}),rn(window,"blur",function(){return fh(El)})}function ff(ie){var ae=ie.display;ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.scrollbarsClipped=!1,ie.setSize()}for(var Mc={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"},ld=0;ld<10;ld++)Mc[ld+48]=Mc[ld+96]=String(ld);for(var Gd=65;Gd<=90;Gd++)Mc[Gd]=String.fromCharCode(Gd);for(var Bd=1;Bd<=12;Bd++)Mc[Bd+111]=Mc[Bd+63235]="F"+Bd;var Pu={};Pu.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"},Pu.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"},Pu.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"},Pu.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"]},Pu.default=de?Pu.macDefault:Pu.pcDefault;function Md(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var ge,fe,ye,Re,Je=0;Je<ae.length-1;Je++){var mt=ae[Je];if(/^(cmd|meta|m)$/i.test(mt))Re=!0;else if(/^a(lt)?$/i.test(mt))ge=!0;else if(/^(c|ctrl|control)$/i.test(mt))fe=!0;else if(/^s(hift)?$/i.test(mt))ye=!0;else throw new Error("Unrecognized modifier name: "+mt)}return ge&&(ie="Alt-"+ie),fe&&(ie="Ctrl-"+ie),Re&&(ie="Cmd-"+ie),ye&&(ie="Shift-"+ie),ie}function _h(ie){var ae={};for(var ge in ie)if(ie.hasOwnProperty(ge)){var fe=ie[ge];if(/^(name|fallthrough|(de|at)tach)$/.test(ge))continue;if(fe=="..."){delete ie[ge];continue}for(var ye=Zn(ge.split(" "),Md),Re=0;Re<ye.length;Re++){var Je=void 0,mt=void 0;Re==ye.length-1?(mt=ye.join(" "),Je=fe):(mt=ye.slice(0,Re+1).join(" "),Je="...");var gt=ae[mt];if(!gt)ae[mt]=Je;else if(gt!=Je)throw new Error("Inconsistent bindings for "+mt)}delete ie[ge]}for(var jt in ae)ie[jt]=ae[jt];return ie}function ku(ie,ae,ge,fe){ae=ud(ae);var ye=ae.call?ae.call(ie,fe):ae[ie];if(ye===!1)return"nothing";if(ye==="...")return"multi";if(ye!=null&&ge(ye))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return ku(ie,ae.fallthrough,ge,fe);for(var Re=0;Re<ae.fallthrough.length;Re++){var Je=ku(ie,ae.fallthrough[Re],ge,fe);if(Je)return Je}}}function Uc(ie){var ae=typeof ie=="string"?ie:Mc[ie.keyCode];return ae=="Ctrl"||ae=="Alt"||ae=="Shift"||ae=="Mod"}function ph(ie,ae,ge){var fe=ie;return ae.altKey&&fe!="Alt"&&(ie="Alt-"+ie),(Ee?ae.metaKey:ae.ctrlKey)&&fe!="Ctrl"&&(ie="Ctrl-"+ie),(Ee?ae.ctrlKey:ae.metaKey)&&fe!="Mod"&&(ie="Cmd-"+ie),!ge&&ae.shiftKey&&fe!="Shift"&&(ie="Shift-"+ie),ie}function mh(ie,ae){if($e&&ie.keyCode==34&&ie.char)return!1;var ge=Mc[ie.keyCode];return ge==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(ge=ie.code),ph(ge,ie,ae))}function ud(ie){return typeof ie=="string"?Pu[ie]:ie}function lu(ie,ae){for(var ge=ie.doc.sel.ranges,fe=[],ye=0;ye<ge.length;ye++){for(var Re=ae(ge[ye]);fe.length&&sn(Re.from,St(fe).to)<=0;){var Je=fe.pop();if(sn(Je.from,Re.from)<0){Re.from=Je.from;break}}fe.push(Re)}nn(ie,function(){for(var mt=fe.length-1;mt>=0;mt--)Ku(ie.doc,"",fe[mt].from,fe[mt].to,"+delete");oc(ie)})}function jh(ie,ae,ge){var fe=at(ie.text,ae+ge,ge);return fe<0||fe>ie.text.length?null:fe}function Ml(ie,ae,ge){var fe=jh(ie,ae.ch,ge);return fe==null?null:new tn(ae.line,fe,ge<0?"after":"before")}function gs(ie,ae,ge,fe,ye){if(ie){ae.doc.direction=="rtl"&&(ye=-ye);var Re=Sn(ge,ae.doc.direction);if(Re){var Je=ye<0?St(Re):Re[0],mt=ye<0==(Je.level==1),gt=mt?"after":"before",jt;if(Je.level>0||ae.doc.direction=="rtl"){var Ln=$o(ae,ge);jt=ye<0?ge.text.length-1:0;var Vt=Ua(ae,Ln,jt).top;jt=qe(function(si){return Ua(ae,Ln,si).top==Vt},ye<0==(Je.level==1)?Je.from:Je.to-1,jt),gt=="before"&&(jt=jh(ge,jt,1))}else jt=ye<0?Je.to:Je.from;return new tn(fe,jt,gt)}}return new tn(fe,ye<0?ge.text.length:0,ye<0?"before":"after")}function Js(ie,ae,ge,fe){var ye=Sn(ae,ie.doc.direction);if(!ye)return Ml(ae,ge,fe);ge.ch>=ae.text.length?(ge.ch=ae.text.length,ge.sticky="before"):ge.ch<=0&&(ge.ch=0,ge.sticky="after");var Re=ft(ye,ge.ch,ge.sticky),Je=ye[Re];if(ie.doc.direction=="ltr"&&Je.level%2==0&&(fe>0?Je.to>ge.ch:Je.from<ge.ch))return Ml(ae,ge,fe);var mt=function(so,Zo){return jh(ae,so instanceof tn?so.ch:so,Zo)},gt,jt=function(so){return ie.options.lineWrapping?(gt=gt||$o(ie,ae),Dn(ie,ae,gt,so)):{begin:0,end:ae.text.length}},Ln=jt(ge.sticky=="before"?mt(ge,-1):ge.ch);if(ie.doc.direction=="rtl"||Je.level==1){var Vt=Je.level==1==fe<0,si=mt(ge,Vt?1:-1);if(si!=null&&(Vt?si<=Je.to&&si<=Ln.end:si>=Je.from&&si>=Ln.begin)){var ii=Vt?"before":"after";return new tn(ge.line,si,ii)}}var tr=function(so,Zo,Bo){for(var ea=function(rl,ru){return ru?new tn(ge.line,mt(rl,1),"before"):new tn(ge.line,rl,"after")};so>=0&&so<ye.length;so+=Zo){var _a=ye[so],Mo=Zo>0==(_a.level!=1),rs=Mo?Bo.begin:mt(Bo.end,-1);if(_a.from<=rs&&rs<_a.to||(rs=Mo?_a.from:mt(_a.to,-1),Bo.begin<=rs&&rs<Bo.end))return ea(rs,Mo)}},dr=tr(Re+fe,fe,Ln);if(dr)return dr;var Mr=fe>0?Ln.end:mt(Ln.begin,-1);return Mr!=null&&!(fe>0&&Mr==ae.text.length)&&(dr=tr(fe>0?0:ye.length-1,fe,jt(Mr)),dr)?dr:null}var nu={selectAll:Ns,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),zt)},killLine:function(ie){return lu(ie,function(ae){if(ae.empty()){var ge=en(ie.doc,ae.head.line).text.length;return ae.head.ch==ge&&ae.head.line<ie.lastLine()?{from:ae.head,to:tn(ae.head.line+1,0)}:{from:ae.head,to:tn(ae.head.line,ge)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return lu(ie,function(ae){return{from:tn(ae.from().line,0),to:Li(ie.doc,tn(ae.to().line+1,0))}})},delLineLeft:function(ie){return lu(ie,function(ae){return{from:tn(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return lu(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return{from:fe,to:ae.from()}})},delWrappedLineRight:function(ie){return lu(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div");return{from:ae.from(),to:fe}})},undo:function(ie){return ie.undo()},redo:function(ie){return ie.redo()},undoSelection:function(ie){return ie.undoSelection()},redoSelection:function(ie){return ie.redoSelection()},goDocStart:function(ie){return ie.extendSelection(tn(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(tn(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return uc(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return $d(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return cc(ie,ae.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div")},ln)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:ge},"div")},ln)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return fe.ch<ie.getLine(fe.line).search(/\S/)?$d(ie,ae.head):fe},ln)},goLineUp:function(ie){return ie.moveV(-1,"line")},goLineDown:function(ie){return ie.moveV(1,"line")},goPageUp:function(ie){return ie.moveV(-1,"page")},goPageDown:function(ie){return ie.moveV(1,"page")},goCharLeft:function(ie){return ie.moveH(-1,"char")},goCharRight:function(ie){return ie.moveH(1,"char")},goColumnLeft:function(ie){return ie.moveH(-1,"column")},goColumnRight:function(ie){return ie.moveH(1,"column")},goWordLeft:function(ie){return ie.moveH(-1,"word")},goGroupRight:function(ie){return ie.moveH(1,"group")},goGroupLeft:function(ie){return ie.moveH(-1,"group")},goWordRight:function(ie){return ie.moveH(1,"word")},delCharBefore:function(ie){return ie.deleteH(-1,"codepoint")},delCharAfter:function(ie){return ie.deleteH(1,"char")},delWordBefore:function(ie){return ie.deleteH(-1,"word")},delWordAfter:function(ie){return ie.deleteH(1,"word")},delGroupBefore:function(ie){return ie.deleteH(-1,"group")},delGroupAfter:function(ie){return ie.deleteH(1,"group")},indentAuto:function(ie){return ie.indentSelection("smart")},indentMore:function(ie){return ie.indentSelection("add")},indentLess:function(ie){return ie.indentSelection("subtract")},insertTab:function(ie){return ie.replaceSelection(" ")},insertSoftTab:function(ie){for(var ae=[],ge=ie.listSelections(),fe=ie.options.tabSize,ye=0;ye<ge.length;ye++){var Re=ge[ye].from(),Je=tt(ie.getLine(Re.line),Re.ch,fe);ae.push(_n(fe-Je%fe))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return nn(ie,function(){for(var ae=ie.listSelections(),ge=[],fe=0;fe<ae.length;fe++)if(ae[fe].empty()){var ye=ae[fe].head,Re=en(ie.doc,ye.line).text;if(Re){if(ye.ch==Re.length&&(ye=new tn(ye.line,ye.ch-1)),ye.ch>0)ye=new tn(ye.line,ye.ch+1),ie.replaceRange(Re.charAt(ye.ch-1)+Re.charAt(ye.ch-2),tn(ye.line,ye.ch-2),ye,"+transpose");else if(ye.line>ie.doc.first){var Je=en(ie.doc,ye.line-1).text;Je&&(ye=new tn(ye.line,1),ie.replaceRange(Re.charAt(0)+ie.doc.lineSeparator()+Je.charAt(Je.length-1),tn(ye.line-1,Je.length-1),ye,"+transpose"))}}ge.push(new ao(ye,ye))}ie.setSelections(ge)})},newlineAndIndent:function(ie){return nn(ie,function(){for(var ae=ie.listSelections(),ge=ae.length-1;ge>=0;ge--)ie.replaceRange(ie.doc.lineSeparator(),ae[ge].anchor,ae[ge].head,"+input");ae=ie.listSelections();for(var fe=0;fe<ae.length;fe++)ie.indentLine(ae[fe].from().line,null,!0);oc(ie)})},openLine:function(ie){return ie.replaceSelection(`
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function uc(ie,ae){var ge=en(ie.doc,ae),fe=Eo(ge);return fe!=ge&&(ae=Et(fe)),gs(!0,ie,fe,ae,1)}function cc(ie,ae){var ge=en(ie.doc,ae),fe=Na(ge);return fe!=ge&&(ae=Et(fe)),gs(!0,ie,ge,ae,-1)}function $d(ie,ae){var ge=uc(ie,ae.line),fe=en(ie.doc,ge.line),ye=Sn(fe,ie.doc.direction);if(!ye||ye[0].level==0){var Re=Math.max(ge.ch,fe.text.search(/\S/)),Je=ae.line==ge.line&&ae.ch<=Re&&ae.ch;return tn(ge.line,Je?0:Re,ge.sticky)}return ge}function cd(ie,ae,ge){if(typeof ae=="string"&&(ae=nu[ae],!ae))return!1;ie.display.input.ensurePolled();var fe=ie.display.shift,ye=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ge&&(ie.display.shift=!1),ye=ae(ie)!=yn}finally{ie.display.shift=fe,ie.state.suppressEdits=!1}return ye}function vh(ie,ae,ge){for(var fe=0;fe<ie.state.keyMaps.length;fe++){var ye=ku(ae,ie.state.keyMaps[fe],ge,ie);if(ye)return ye}return ie.options.extraKeys&&ku(ae,ie.options.extraKeys,ge,ie)||ku(ae,ie.options.keyMap,ge,ie)}var Sc=new Ve;function Yc(ie,ae,ge,fe){var ye=ie.state.keySeq;if(ye){if(Uc(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Sc.set(50,function(){ie.state.keySeq==ye&&(ie.state.keySeq=null,ie.display.input.reset())}),Wf(ie,ye+" "+ae,ge,fe))return!0}return Wf(ie,ae,ge,fe)}function Wf(ie,ae,ge,fe){var ye=vh(ie,ae,fe);return ye=="multi"&&(ie.state.keySeq=ae),ye=="handled"&&hr(ie,"keyHandled",ie,ae,ge),(ye=="handled"||ye=="multi")&&(wi(ge),xa(ie)),!!ye}function Gf(ie,ae){var ge=mh(ae,!0);return ge?ae.shiftKey&&!ie.state.keySeq?Yc(ie,"Shift-"+ge,ae,function(fe){return cd(ie,fe,!0)})||Yc(ie,ge,ae,function(fe){if(typeof fe=="string"?/^go[A-Z]/.test(fe):fe.motion)return cd(ie,fe)}):Yc(ie,ge,ae,function(fe){return cd(ie,fe)}):!1}function $f(ie,ae,ge){return Yc(ie,"'"+ge+"'",ae,function(fe){return cd(ie,fe,!0)})}var Kd=null;function hg(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=ot(),!ei(ae,ie))){Ge&&Ue<11&&ie.keyCode==27&&(ie.returnValue=!1);var ge=ie.keyCode;ae.display.shift=ge==16||ie.shiftKey;var fe=Gf(ae,ie);$e&&(Kd=fe?ge:null,!fe&&ge==88&&!Ci&&(de?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),le&&!de&&!fe&&ge==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),ge==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&fg(ae)}}function fg(ie){var ae=ie.display.lineDiv;Tt(ae,"CodeMirror-crosshair");function ge(fe){(fe.keyCode==18||!fe.altKey)&&(ze(ae,"CodeMirror-crosshair"),kn(document,"keyup",ge),kn(document,"mouseover",ge))}rn(document,"keyup",ge),rn(document,"mouseover",ge)}function gg(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),ei(this,ie)}function Xc(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(En(ae.display,ie)||ei(ae,ie)||ie.ctrlKey&&!ie.altKey||de&&ie.metaKey)){var ge=ie.keyCode,fe=ie.charCode;if($e&&ge==Kd){Kd=null,wi(ie);return}if(!($e&&(!ie.which||ie.which<10)&&Gf(ae,ie))){var ye=String.fromCharCode(fe==null?ge:fe);ye!="\b"&&($f(ae,ie,ye)||ae.display.input.onKeyPress(ie))}}}var pg=400,mg=function(ie,ae,ge){this.time=ie,this.pos=ae,this.button=ge};mg.prototype.compare=function(ie,ae,ge){return this.time+pg>ie&&sn(ae,this.pos)==0&&ge==this.button};var zh,yh;function vg(ie,ae){var ge=+new Date;return yh&&yh.compare(ge,ie,ae)?(zh=yh=null,"triple"):zh&&zh.compare(ge,ie,ae)?(yh=new mg(ge,ie,ae),zh=null,"double"):(zh=new mg(ge,ie,ae),yh=null,"single")}function Jc(ie){var ae=this,ge=ae.display;if(!(ei(ae,ie)||ge.activeTouch&&ge.input.supportsTouch())){if(ge.input.ensurePolled(),ge.shift=ie.shiftKey,En(ge,ie)){Me||(ge.scroller.draggable=!1,setTimeout(function(){return ge.scroller.draggable=!0},100));return}if(!Kf(ae,ie)){var fe=pr(ae,ie),ye=gi(ie),Re=fe?vg(fe,ye):"single";window.focus(),ye==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(fe&&yg(ae,ye,fe,Re,ie))&&(ye==1?fe?xg(ae,fe,Re,ie):_r(ie)==ge.scroller&&wi(ie):ye==2?(fe&&Bs(ae.doc,fe),setTimeout(function(){return ge.input.focus()},20)):ye==3&&(Be?ae.display.input.onContextMenu(ie):wo(ae)))}}}function yg(ie,ae,ge,fe,ye){var Re="Click";return fe=="double"?Re="Double"+Re:fe=="triple"&&(Re="Triple"+Re),Re=(ae==1?"Left":ae==2?"Middle":"Right")+Re,Yc(ie,ph(Re,ye),ye,function(Je){if(typeof Je=="string"&&(Je=nu[Je]),!Je)return!1;var mt=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),mt=Je(ie,ge)!=yn}finally{ie.state.suppressEdits=!1}return mt})}function xh(ie,ae,ge){var fe=ie.getOption("configureMouse"),ye=fe?fe(ie,ae,ge):{};if(ye.unit==null){var Re=se?ge.shiftKey&&ge.metaKey:ge.altKey;ye.unit=Re?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(ye.extend==null||ie.doc.extend)&&(ye.extend=ie.doc.extend||ge.shiftKey),ye.addNew==null&&(ye.addNew=de?ge.metaKey:ge.ctrlKey),ye.moveOnDrag==null&&(ye.moveOnDrag=!(de?ge.altKey:ge.ctrlKey)),ye}function xg(ie,ae,ge,fe){Ge?setTimeout(Wt(Wa,ie),0):ie.curOp.focus=ot();var ye=xh(ie,ge,fe),Re=ie.doc.sel,Je;ie.options.dragDrop&&di&&!ie.isReadOnly()&&ge=="single"&&(Je=Re.contains(ae))>-1&&(sn((Je=Re.ranges[Je]).from(),ae)<0||ae.xRel>0)&&(sn(Je.to(),ae)>0||ae.xRel<0)?Sg(ie,fe,ae,ye):Hp(ie,fe,ae,ye)}function Sg(ie,ae,ge,fe){var ye=ie.display,Re=!1,Je=Vn(ie,function(jt){Me&&(ye.scroller.draggable=!1),ie.state.draggingText=!1,kn(ye.wrapper.ownerDocument,"mouseup",Je),kn(ye.wrapper.ownerDocument,"mousemove",mt),kn(ye.scroller,"dragstart",gt),kn(ye.scroller,"drop",Je),Re||(wi(jt),fe.addNew||Bs(ie.doc,ge,null,null,fe.extend),Me&&!Ft||Ge&&Ue==9?setTimeout(function(){ye.wrapper.ownerDocument.body.focus({preventScroll:!0}),ye.input.focus()},20):ye.input.focus())}),mt=function(jt){Re=Re||Math.abs(ae.clientX-jt.clientX)+Math.abs(ae.clientY-jt.clientY)>=10},gt=function(){return Re=!0};Me&&(ye.scroller.draggable=!0),ie.state.draggingText=Je,Je.copy=!fe.moveOnDrag,ye.scroller.dragDrop&&ye.scroller.dragDrop(),rn(ye.wrapper.ownerDocument,"mouseup",Je),rn(ye.wrapper.ownerDocument,"mousemove",mt),rn(ye.scroller,"dragstart",gt),rn(ye.scroller,"drop",Je),wo(ie),setTimeout(function(){return ye.input.focus()},20)}function Pg(ie,ae,ge){if(ge=="char")return new ao(ae,ae);if(ge=="word")return ie.findWordAt(ae);if(ge=="line")return new ao(tn(ae.line,0),Li(ie.doc,tn(ae.line+1,0)));var fe=ge(ie,ae);return new ao(fe.from,fe.to)}function Hp(ie,ae,ge,fe){var ye=ie.display,Re=ie.doc;wi(ae);var Je,mt,gt=Re.sel,jt=gt.ranges;if(fe.addNew&&!fe.extend?(mt=Re.sel.contains(ge),mt>-1?Je=jt[mt]:Je=new ao(ge,ge)):(Je=Re.sel.primary(),mt=Re.sel.primIndex),fe.unit=="rectangle")fe.addNew||(Je=new ao(ge,ge)),ge=pr(ie,ae,!0,!0),mt=-1;else{var Ln=Pg(ie,ge,fe.unit);fe.extend?Je=_c(Je,Ln.anchor,Ln.head,fe.extend):Je=Ln}fe.addNew?mt==-1?(mt=jt.length,js(Re,ka(ie,jt.concat([Je]),mt),{scroll:!1,origin:"*mouse"})):jt.length>1&&jt[mt].empty()&&fe.unit=="char"&&!fe.extend?(js(Re,ka(ie,jt.slice(0,mt).concat(jt.slice(mt+1)),0),{scroll:!1,origin:"*mouse"}),gt=Re.sel):Ms(Re,mt,Je,qt):(mt=0,js(Re,new Pa([Je],0),qt),gt=Re.sel);var Vt=ge;function si(Bo){if(sn(Vt,Bo)!=0)if(Vt=Bo,fe.unit=="rectangle"){for(var ea=[],_a=ie.options.tabSize,Mo=tt(en(Re,ge.line).text,ge.ch,_a),rs=tt(en(Re,Bo.line).text,Bo.ch,_a),rl=Math.min(Mo,rs),ru=Math.max(Mo,rs),xl=Math.min(ge.line,Bo.line),Uu=Math.min(ie.lastLine(),Math.max(ge.line,Bo.line));xl<=Uu;xl++){var wu=en(Re,xl).text,Xl=Gn(wu,rl,_a);rl==ru?ea.push(new ao(tn(xl,Xl),tn(xl,Xl))):wu.length>Xl&&ea.push(new ao(tn(xl,Xl),tn(xl,Gn(wu,ru,_a))))}ea.length||ea.push(new ao(ge,ge)),js(Re,ka(ie,gt.ranges.slice(0,mt).concat(ea),mt),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(Bo)}else{var Yu=Je,hu=Pg(ie,Bo,fe.unit),Jl=Yu.anchor,Ds;sn(hu.anchor,Jl)>0?(Ds=hu.head,Jl=vi(Yu.from(),hu.anchor)):(Ds=hu.anchor,Jl=Di(Yu.to(),hu.head));var Sl=gt.ranges.slice(0);Sl[mt]=qg(ie,new ao(Li(Re,Jl),Ds)),js(Re,ka(ie,Sl,mt),qt)}}var ii=ye.wrapper.getBoundingClientRect(),tr=0;function dr(Bo){var ea=++tr,_a=pr(ie,Bo,!0,fe.unit=="rectangle");if(_a)if(sn(_a,Vt)!=0){ie.curOp.focus=ot(),si(_a);var Mo=jo(ye,Re);(_a.line>=Mo.to||_a.line<Mo.from)&&setTimeout(Vn(ie,function(){tr==ea&&dr(Bo)}),150)}else{var rs=Bo.clientY<ii.top?-20:Bo.clientY>ii.bottom?20:0;rs&&setTimeout(Vn(ie,function(){tr==ea&&(ye.scroller.scrollTop+=rs,dr(Bo))}),50)}}function Mr(Bo){ie.state.selectingText=!1,tr=1/0,Bo&&(wi(Bo),ye.input.focus()),kn(ye.wrapper.ownerDocument,"mousemove",so),kn(ye.wrapper.ownerDocument,"mouseup",Zo),Re.history.lastSelOrigin=null}var so=Vn(ie,function(Bo){Bo.buttons===0||!gi(Bo)?Mr(Bo):dr(Bo)}),Zo=Vn(ie,Mr);ie.state.selectingText=Zo,rn(ye.wrapper.ownerDocument,"mousemove",so),rn(ye.wrapper.ownerDocument,"mouseup",Zo)}function qg(ie,ae){var ge=ae.anchor,fe=ae.head,ye=en(ie.doc,ge.line);if(sn(ge,fe)==0&&ge.sticky==fe.sticky)return ae;var Re=Sn(ye);if(!Re)return ae;var Je=ft(Re,ge.ch,ge.sticky),mt=Re[Je];if(mt.from!=ge.ch&&mt.to!=ge.ch)return ae;var gt=Je+(mt.from==ge.ch==(mt.level!=1)?0:1);if(gt==0||gt==Re.length)return ae;var jt;if(fe.line!=ge.line)jt=(fe.line-ge.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var Ln=ft(Re,fe.ch,fe.sticky),Vt=Ln-Je||(fe.ch-ge.ch)*(mt.level==1?-1:1);Ln==gt-1||Ln==gt?jt=Vt<0:jt=Vt>0}var si=Re[gt+(jt?-1:0)],ii=jt==(si.level==1),tr=ii?si.from:si.to,dr=ii?"after":"before";return ge.ch==tr&&ge.sticky==dr?ae:new ao(new tn(ge.line,tr,dr),fe)}function Vd(ie,ae,ge,fe){var ye,Re;if(ae.touches)ye=ae.touches[0].clientX,Re=ae.touches[0].clientY;else try{ye=ae.clientX,Re=ae.clientY}catch(si){return!1}if(ye>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;fe&&wi(ae);var Je=ie.display,mt=Je.lineDiv.getBoundingClientRect();if(Re>mt.bottom||!Hn(ie,ge))return Hi(ae);Re-=mt.top-Je.viewOffset;for(var gt=0;gt<ie.display.gutterSpecs.length;++gt){var jt=Je.gutters.childNodes[gt];if(jt&&jt.getBoundingClientRect().right>=ye){var Ln=wn(ie.doc,Re),Vt=ie.display.gutterSpecs[gt];return mn(ie,ge,ie,Ln,Vt.className,ae),Hi(ae)}}}function Kf(ie,ae){return Vd(ie,ae,"gutterClick",!0)}function gf(ie,ae){En(ie.display,ae)||ep(ie,ae)||ei(ie,ae,"contextmenu")||Be||ie.display.input.onContextMenu(ae)}function ep(ie,ae){return Hn(ie,"gutterContextMenu")?Vd(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-"),ya(ie)}var Sh={toString:function(){return"CodeMirror.Init"}},wg={},Ph={};function tp(ie){var ae=ie.optionHandlers;function ge(fe,ye,Re,Je){ie.defaults[fe]=ye,Re&&(ae[fe]=Je?function(mt,gt,jt){jt!=Sh&&Re(mt,gt,jt)}:Re)}ie.defineOption=ge,ie.Init=Sh,ge("value","",function(fe,ye){return fe.setValue(ye)},!0),ge("mode",null,function(fe,ye){fe.doc.modeOption=ye,aa(fe)},!0),ge("indentUnit",2,aa,!0),ge("indentWithTabs",!1),ge("smartIndent",!0),ge("tabSize",4,function(fe){fs(fe),ya(fe),ji(fe)},!0),ge("lineSeparator",null,function(fe,ye){if(fe.doc.lineSep=ye,!!ye){var Re=[],Je=fe.doc.first;fe.doc.iter(function(gt){for(var jt=0;;){var Ln=gt.text.indexOf(ye,jt);if(Ln==-1)break;jt=Ln+ye.length,Re.push(tn(Je,Ln))}Je++});for(var mt=Re.length-1;mt>=0;mt--)Ku(fe.doc,ye,Re[mt],tn(Re[mt].line,Re[mt].ch+ye.length))}}),ge("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(fe,ye,Re){fe.state.specialChars=new RegExp(ye.source+(ye.test(" ")?"":"| "),"g"),Re!=Sh&&fe.refresh()}),ge("specialCharPlaceholder",Ss,function(fe){return fe.refresh()},!0),ge("electricChars",!0),ge("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ge("spellcheck",!1,function(fe,ye){return fe.getInputField().spellcheck=ye},!0),ge("autocorrect",!1,function(fe,ye){return fe.getInputField().autocorrect=ye},!0),ge("autocapitalize",!1,function(fe,ye){return fe.getInputField().autocapitalize=ye},!0),ge("rtlMoveVisually",!he),ge("wholeLineUpdateBefore",!0),ge("theme","default",function(fe){Vf(fe),uo(fe)},!0),ge("keyMap","default",function(fe,ye,Re){var Je=ud(ye),mt=Re!=Sh&&ud(Re);mt&&mt.detach&&mt.detach(fe,Je),Je.attach&&Je.attach(fe,mt||null)}),ge("extraKeys",null),ge("configureMouse",null),ge("lineWrapping",!1,np,!0),ge("gutters",[],function(fe,ye){fe.display.gutterSpecs=Wo(ye,fe.options.lineNumbers),uo(fe)},!0),ge("fixedGutter",!0,function(fe,ye){fe.display.gutters.style.left=ye?to(fe.display)+"px":"0",fe.refresh()},!0),ge("coverGutterNextToScrollbar",!1,function(fe){return yc(fe)},!0),ge("scrollbarStyle","native",function(fe){Fd(fe),yc(fe),fe.display.scrollbars.setScrollTop(fe.doc.scrollTop),fe.display.scrollbars.setScrollLeft(fe.doc.scrollLeft)},!0),ge("lineNumbers",!1,function(fe,ye){fe.display.gutterSpecs=Wo(fe.options.gutters,ye),uo(fe)},!0),ge("firstLineNumber",1,uo,!0),ge("lineNumberFormatter",function(fe){return fe},uo,!0),ge("showCursorWhenSelecting",!1,Or,!0),ge("resetSelectionOnContextMenu",!0),ge("lineWiseCopyCut",!0),ge("pasteLinesPerSelection",!0),ge("selectionsMayTouch",!1),ge("readOnly",!1,function(fe,ye){ye=="nocursor"&&(El(fe),fe.display.input.blur()),fe.display.input.readOnlyChanged(ye)}),ge("screenReaderLabel",null,function(fe,ye){ye=ye===""?null:ye,fe.display.input.screenReaderLabelChanged(ye)}),ge("disableInput",!1,function(fe,ye){ye||fe.display.input.reset()},!0),ge("dragDrop",!0,Uf),ge("allowDropFileTypes",null),ge("cursorBlinkRate",530),ge("cursorScrollMargin",0),ge("cursorHeight",1,Or,!0),ge("singleCursorHeightPerLine",!0,Or,!0),ge("workTime",100),ge("workDelay",100),ge("flattenSpans",!0,fs,!0),ge("addModeClass",!1,fs,!0),ge("pollInterval",100),ge("undoDepth",200,function(fe,ye){return fe.doc.history.undoDepth=ye}),ge("historyEventDelay",1250),ge("viewportMargin",10,function(fe){return fe.refresh()},!0),ge("maxHighlightLength",1e4,fs,!0),ge("moveInputWithCursor",!0,function(fe,ye){ye||fe.display.input.resetPosition()}),ge("tabindex",null,function(fe,ye){return fe.display.input.getField().tabIndex=ye||""}),ge("autofocus",null),ge("direction","ltr",function(fe,ye){return fe.doc.setDirection(ye)},!0),ge("phrases",null)}function Uf(ie,ae,ge){var fe=ge&&ge!=Sh;if(!ae!=!fe){var ye=ie.display.dragFunctions,Re=ae?rn:kn;Re(ie.display.scroller,"dragstart",ye.start),Re(ie.display.scroller,"dragenter",ye.enter),Re(ie.display.scroller,"dragover",ye.over),Re(ie.display.scroller,"dragleave",ye.leave),Re(ie.display.scroller,"drop",ye.drop)}}function np(ie){ie.options.lineWrapping?(Tt(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(ze(ie.display.wrapper,"CodeMirror-wrap"),Ca(ie)),fr(ie),ji(ie),ya(ie),setTimeout(function(){return yc(ie)},100)}function As(ie,ae){var ge=this;if(!(this instanceof As))return new As(ie,ae);this.options=ae=ae?Dt(ae):{},Dt(wg,ae,!1);var fe=ae.value;typeof fe=="string"?fe=new Bl(fe,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(fe.modeOption=ae.mode),this.doc=fe;var ye=new As.inputStyles[ae.inputStyle](this),Re=this.display=new To(ie,fe,ye,ae);Re.wrapper.CodeMirror=this,Vf(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fd(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&&Ue<11&&setTimeout(function(){return ge.display.input.reset(!0)},20),Zh(this),Vu(),li(this),this.curOp.forceUpdate=!0,ba(this,fe),ae.autofocus&&!ee||this.hasFocus()?setTimeout(function(){ge.hasFocus()&&!ge.state.focused&&Oa(ge)},20):El(this);for(var Je in Ph)Ph.hasOwnProperty(Je)&&Ph[Je](this,ae[Je],Sh);oo(this),ae.finishInit&&ae.finishInit(this);for(var mt=0;mt<Ud.length;++mt)Ud[mt](this);fo(this),Me&&ae.lineWrapping&&getComputedStyle(Re.lineDiv).textRendering=="optimizelegibility"&&(Re.lineDiv.style.textRendering="auto")}As.defaults=wg,As.optionHandlers=Ph;function Zh(ie){var ae=ie.display;rn(ae.scroller,"mousedown",Vn(ie,Jc)),Ge&&Ue<11?rn(ae.scroller,"dblclick",Vn(ie,function(gt){if(!ei(ie,gt)){var jt=pr(ie,gt);if(!(!jt||Kf(ie,gt)||En(ie.display,gt))){wi(gt);var Ln=ie.findWordAt(jt);Bs(ie.doc,Ln.anchor,Ln.head)}}})):rn(ae.scroller,"dblclick",function(gt){return ei(ie,gt)||wi(gt)}),rn(ae.scroller,"contextmenu",function(gt){return gf(ie,gt)}),rn(ae.input.getField(),"contextmenu",function(gt){ae.scroller.contains(gt.target)||gf(ie,gt)});var ge,fe={end:0};function ye(){ae.activeTouch&&(ge=setTimeout(function(){return ae.activeTouch=null},1e3),fe=ae.activeTouch,fe.end=+new Date)}function Re(gt){if(gt.touches.length!=1)return!1;var jt=gt.touches[0];return jt.radiusX<=1&&jt.radiusY<=1}function Je(gt,jt){if(jt.left==null)return!0;var Ln=jt.left-gt.left,Vt=jt.top-gt.top;return Ln*Ln+Vt*Vt>20*20}rn(ae.scroller,"touchstart",function(gt){if(!ei(ie,gt)&&!Re(gt)&&!Kf(ie,gt)){ae.input.ensurePolled(),clearTimeout(ge);var jt=+new Date;ae.activeTouch={start:jt,moved:!1,prev:jt-fe.end<=300?fe:null},gt.touches.length==1&&(ae.activeTouch.left=gt.touches[0].pageX,ae.activeTouch.top=gt.touches[0].pageY)}}),rn(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),rn(ae.scroller,"touchend",function(gt){var jt=ae.activeTouch;if(jt&&!En(ae,gt)&&jt.left!=null&&!jt.moved&&new Date-jt.start<300){var Ln=ie.coordsChar(ae.activeTouch,"page"),Vt;!jt.prev||Je(jt,jt.prev)?Vt=new ao(Ln,Ln):!jt.prev.prev||Je(jt,jt.prev.prev)?Vt=ie.findWordAt(Ln):Vt=new ao(tn(Ln.line,0),Li(ie.doc,tn(Ln.line+1,0))),ie.setSelection(Vt.anchor,Vt.head),ie.focus(),wi(gt)}ye()}),rn(ae.scroller,"touchcancel",ye),rn(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(ac(ie,ae.scroller.scrollTop),au(ie,ae.scroller.scrollLeft,!0),mn(ie,"scroll",ie))}),rn(ae.scroller,"mousewheel",function(gt){return Sa(ie,gt)}),rn(ae.scroller,"DOMMouseScroll",function(gt){return Sa(ie,gt)}),rn(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(gt){ei(ie,gt)||rr(gt)},over:function(gt){ei(ie,gt)||(hf(ie,gt),rr(gt))},start:function(gt){return hh(ie,gt)},drop:Vn(ie,Hd),leave:function(gt){ei(ie,gt)||Hf(ie)}};var mt=ae.input.getField();rn(mt,"keyup",function(gt){return gg.call(ie,gt)}),rn(mt,"keydown",Vn(ie,hg)),rn(mt,"keypress",Vn(ie,Xc)),rn(mt,"focus",function(gt){return Oa(ie,gt)}),rn(mt,"blur",function(gt){return El(ie,gt)})}var Ud=[];As.defineInitHook=function(ie){return Ud.push(ie)};function iu(ie,ae,ge,fe){var ye=ie.doc,Re;ge==null&&(ge="add"),ge=="smart"&&(ye.mode.indent?Re=Cr(ie,ae).state:ge="prev");var Je=ie.options.tabSize,mt=en(ye,ae),gt=tt(mt.text,null,Je);mt.stateAfter&&(mt.stateAfter=null);var jt=mt.text.match(/^\s*/)[0],Ln;if(!fe&&!/\S/.test(mt.text))Ln=0,ge="not";else if(ge=="smart"&&(Ln=ye.mode.indent(Re,mt.text.slice(jt.length),mt.text),Ln==yn||Ln>150)){if(!fe)return;ge="prev"}ge=="prev"?ae>ye.first?Ln=tt(en(ye,ae-1).text,null,Je):Ln=0:ge=="add"?Ln=gt+ie.options.indentUnit:ge=="subtract"?Ln=gt-ie.options.indentUnit:typeof ge=="number"&&(Ln=gt+ge),Ln=Math.max(0,Ln);var Vt="",si=0;if(ie.options.indentWithTabs)for(var ii=Math.floor(Ln/Je);ii;--ii)si+=Je,Vt+=" ";if(si<Ln&&(Vt+=_n(Ln-si)),Vt!=jt)return Ku(ye,Vt,tn(ae,0),tn(ae,jt.length),"+input"),mt.stateAfter=null,!0;for(var tr=0;tr<ye.sel.ranges.length;tr++){var dr=ye.sel.ranges[tr];if(dr.head.line==ae&&dr.head.ch<jt.length){var Mr=tn(ae,jt.length);Ms(ye,tr,new ao(Mr,Mr));break}}}var Ru=null;function Hh(ie){Ru=ie}function wh(ie,ae,ge,fe,ye){var Re=ie.doc;ie.display.shift=!1,fe||(fe=Re.sel);var Je=+new Date-200,mt=ye=="paste"||ie.state.pasteIncoming>Je,gt=Sr(ae),jt=null;if(mt&&fe.ranges.length>1)if(Ru&&Ru.text.join(`
`)==ae){if(fe.ranges.length%Ru.text.length==0){jt=[];for(var Ln=0;Ln<Ru.text.length;Ln++)jt.push(Re.splitLines(Ru.text[Ln]))}}else gt.length==fe.ranges.length&&ie.options.pasteLinesPerSelection&&(jt=Zn(gt,function(so){return[so]}));for(var Vt=ie.curOp.updateInput,si=fe.ranges.length-1;si>=0;si--){var ii=fe.ranges[si],tr=ii.from(),dr=ii.to();ii.empty()&&(ge&&ge>0?tr=tn(tr.line,tr.ch-ge):ie.state.overwrite&&!mt?dr=tn(dr.line,Math.min(en(Re,dr.line).text.length,dr.ch+St(gt).length)):mt&&Ru&&Ru.lineWise&&Ru.text.join(`
`)==gt.join(`
`)&&(tr=dr=tn(tr.line,0)));var Mr={from:tr,to:dr,text:jt?jt[si%jt.length]:gt,origin:ye||(mt?"paste":ie.state.cutIncoming>Je?"cut":"+input")};$s(ie.doc,Mr),hr(ie,"inputRead",ie,Mr)}ae&&!mt&&Eg(ie,ae),oc(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Vt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function Cg(ie,ae){var ge=ie.clipboardData&&ie.clipboardData.getData("Text");if(ge)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&nn(ae,function(){return wh(ae,ge,0,null,"paste")}),!0}function Eg(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var ge=ie.doc.sel,fe=ge.ranges.length-1;fe>=0;fe--){var ye=ge.ranges[fe];if(!(ye.head.ch>100||fe&&ge.ranges[fe-1].head.line==ye.head.line)){var Re=ie.getModeAt(ye.head),Je=!1;if(Re.electricChars){for(var mt=0;mt<Re.electricChars.length;mt++)if(ae.indexOf(Re.electricChars.charAt(mt))>-1){Je=iu(ie,ye.head.line,"smart");break}}else Re.electricInput&&Re.electricInput.test(en(ie.doc,ye.head.line).text.slice(0,ye.head.ch))&&(Je=iu(ie,ye.head.line,"smart"));Je&&hr(ie,"electricInput",ie,ye.head.line)}}}function bg(ie){for(var ae=[],ge=[],fe=0;fe<ie.doc.sel.ranges.length;fe++){var ye=ie.doc.sel.ranges[fe].head.line,Re={anchor:tn(ye,0),head:tn(ye+1,0)};ge.push(Re),ae.push(ie.getRange(Re.anchor,Re.head))}return{text:ae,ranges:ge}}function Fg(ie,ae,ge,fe){ie.setAttribute("autocorrect",ge?"":"off"),ie.setAttribute("autocapitalize",fe?"":"off"),ie.setAttribute("spellcheck",!!ae)}function Bg(){var ie=Ye("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=Ye("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Me?ie.style.width="1000px":ie.setAttribute("wrap","off"),Ie&&(ie.style.border="1px solid black"),Fg(ie),ae}function Yd(ie){var ae=ie.optionHandlers,ge=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(fe,ye){var Re=this.options,Je=Re[fe];Re[fe]==ye&&fe!="mode"||(Re[fe]=ye,ae.hasOwnProperty(fe)&&Vn(this,ae[fe])(this,ye,Je),mn(this,"optionChange",this,fe))},getOption:function(fe){return this.options[fe]},getDoc:function(){return this.doc},addKeyMap:function(fe,ye){this.state.keyMaps[ye?"push":"unshift"](ud(fe))},removeKeyMap:function(fe){for(var ye=this.state.keyMaps,Re=0;Re<ye.length;++Re)if(ye[Re]==fe||ye[Re].name==fe)return ye.splice(Re,1),!0},addOverlay:jn(function(fe,ye){var Re=fe.token?fe:ie.getMode(this.options,fe);if(Re.startState)throw new Error("Overlays may not be stateful.");ci(this.state.overlays,{mode:Re,modeSpec:fe,opaque:ye&&ye.opaque,priority:ye&&ye.priority||0},function(Je){return Je.priority}),this.state.modeGen++,ji(this)}),removeOverlay:jn(function(fe){for(var ye=this.state.overlays,Re=0;Re<ye.length;++Re){var Je=ye[Re].modeSpec;if(Je==fe||typeof fe=="string"&&Je.name==fe){ye.splice(Re,1),this.state.modeGen++,ji(this);return}}}),indentLine:jn(function(fe,ye,Re){typeof ye!="string"&&typeof ye!="number"&&(ye==null?ye=this.options.smartIndent?"smart":"prev":ye=ye?"add":"subtract"),Kn(this.doc,fe)&&iu(this,fe,ye,Re)}),indentSelection:jn(function(fe){for(var ye=this.doc.sel.ranges,Re=-1,Je=0;Je<ye.length;Je++){var mt=ye[Je];if(mt.empty())mt.head.line>Re&&(iu(this,mt.head.line,fe,!0),Re=mt.head.line,Je==this.doc.sel.primIndex&&oc(this));else{var gt=mt.from(),jt=mt.to(),Ln=Math.max(Re,gt.line);Re=Math.min(this.lastLine(),jt.line-(jt.ch?0:1))+1;for(var Vt=Ln;Vt<Re;++Vt)iu(this,Vt,fe);var si=this.doc.sel.ranges;gt.ch==0&&ye.length==si.length&&si[Je].from().ch>0&&Ms(this.doc,Je,new ao(gt,si[Je].to()),zt)}}}),getTokenAt:function(fe,ye){return er(this,fe,ye)},getLineTokens:function(fe,ye){return er(this,tn(fe),ye,!0)},getTokenTypeAt:function(fe){fe=Li(this.doc,fe);var ye=Xr(this,en(this.doc,fe.line)),Re=0,Je=(ye.length-1)/2,mt=fe.ch,gt;if(mt==0)gt=ye[2];else for(;;){var jt=Re+Je>>1;if((jt?ye[jt*2-1]:0)>=mt)Je=jt;else if(ye[jt*2+1]<mt)Re=jt+1;else{gt=ye[jt*2+2];break}}var Ln=gt?gt.indexOf("overlay "):-1;return Ln<0?gt:Ln==0?null:gt.slice(0,Ln-1)},getModeAt:function(fe){var ye=this.doc.mode;return ye.innerMode?ie.innerMode(ye,this.getTokenAt(fe).state).mode:ye},getHelper:function(fe,ye){return this.getHelpers(fe,ye)[0]},getHelpers:function(fe,ye){var Re=[];if(!ge.hasOwnProperty(ye))return Re;var Je=ge[ye],mt=this.getModeAt(fe);if(typeof mt[ye]=="string")Je[mt[ye]]&&Re.push(Je[mt[ye]]);else if(mt[ye])for(var gt=0;gt<mt[ye].length;gt++){var jt=Je[mt[ye][gt]];jt&&Re.push(jt)}else mt.helperType&&Je[mt.helperType]?Re.push(Je[mt.helperType]):Je[mt.name]&&Re.push(Je[mt.name]);for(var Ln=0;Ln<Je._global.length;Ln++){var Vt=Je._global[Ln];Vt.pred(mt,this)&&_t(Re,Vt.val)==-1&&Re.push(Vt.val)}return Re},getStateAfter:function(fe,ye){var Re=this.doc;return fe=Ti(Re,fe==null?Re.first+Re.size-1:fe),Cr(this,fe+1,ye).state},cursorCoords:function(fe,ye){var Re,Je=this.doc.sel.primary();return fe==null?Re=Je.head:typeof fe=="object"?Re=Li(this.doc,fe):Re=fe?Je.from():Je.to(),La(this,Re,ye||"page")},charCoords:function(fe,ye){return Ha(this,Li(this.doc,fe),ye||"page")},coordsChar:function(fe,ye){return fe=Da(this,fe,ye||"page"),Jt(this,fe.left,fe.top)},lineAtHeight:function(fe,ye){return fe=Da(this,{top:fe,left:0},ye||"page").top,wn(this.doc,fe+this.display.viewOffset)},heightAtLine:function(fe,ye,Re){var Je=!1,mt;if(typeof fe=="number"){var gt=this.doc.first+this.doc.size-1;fe<this.doc.first?fe=this.doc.first:fe>gt&&(fe=gt,Je=!0),mt=en(this.doc,fe)}else mt=fe;return Dr(this,mt,{top:0,left:0},ye||"page",Re||Je).top+(Je?this.doc.height-ro(mt):0)},defaultTextHeight:function(){return ur(this.display)},defaultCharWidth:function(){return Bi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fe,ye,Re,Je,mt){var gt=this.display;fe=La(this,Li(this.doc,fe));var jt=fe.bottom,Ln=fe.left;if(ye.style.position="absolute",ye.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ye),gt.sizer.appendChild(ye),Je=="over")jt=fe.top;else if(Je=="above"||Je=="near"){var Vt=Math.max(gt.wrapper.clientHeight,this.doc.height),si=Math.max(gt.sizer.clientWidth,gt.lineSpace.clientWidth);(Je=="above"||fe.bottom+ye.offsetHeight>Vt)&&fe.top>ye.offsetHeight?jt=fe.top-ye.offsetHeight:fe.bottom+ye.offsetHeight<=Vt&&(jt=fe.bottom),Ln+ye.offsetWidth>si&&(Ln=si-ye.offsetWidth)}ye.style.top=jt+"px",ye.style.left=ye.style.right="",mt=="right"?(Ln=gt.sizer.clientWidth-ye.offsetWidth,ye.style.right="0px"):(mt=="left"?Ln=0:mt=="middle"&&(Ln=(gt.sizer.clientWidth-ye.offsetWidth)/2),ye.style.left=Ln+"px"),Re&&rc(this,{left:Ln,top:jt,right:Ln+ye.offsetWidth,bottom:jt+ye.offsetHeight})},triggerOnKeyDown:jn(hg),triggerOnKeyPress:jn(Xc),triggerOnKeyUp:gg,triggerOnMouseDown:jn(Jc),execCommand:function(fe){if(nu.hasOwnProperty(fe))return nu[fe].call(null,this)},triggerElectric:jn(function(fe){Eg(this,fe)}),findPosH:function(fe,ye,Re,Je){var mt=1;ye<0&&(mt=-1,ye=-ye);for(var gt=Li(this.doc,fe),jt=0;jt<ye&&(gt=pf(this.doc,gt,mt,Re,Je),!gt.hitSide);++jt);return gt},moveH:jn(function(fe,ye){var Re=this;this.extendSelectionsBy(function(Je){return Re.display.shift||Re.doc.extend||Je.empty()?pf(Re.doc,Je.head,fe,ye,Re.options.rtlMoveVisually):fe<0?Je.from():Je.to()},ln)}),deleteH:jn(function(fe,ye){var Re=this.doc.sel,Je=this.doc;Re.somethingSelected()?Je.replaceSelection("",null,"+delete"):lu(this,function(mt){var gt=pf(Je,mt.head,fe,ye,!1);return fe<0?{from:gt,to:mt.head}:{from:mt.head,to:gt}})}),findPosV:function(fe,ye,Re,Je){var mt=1,gt=Je;ye<0&&(mt=-1,ye=-ye);for(var jt=Li(this.doc,fe),Ln=0;Ln<ye;++Ln){var Vt=La(this,jt,"div");if(gt==null?gt=Vt.left:Vt.left=gt,jt=Ld(this,Vt,mt,Re),jt.hitSide)break}return jt},moveV:jn(function(fe,ye){var Re=this,Je=this.doc,mt=[],gt=!this.display.shift&&!Je.extend&&Je.sel.somethingSelected();if(Je.extendSelectionsBy(function(Ln){if(gt)return fe<0?Ln.from():Ln.to();var Vt=La(Re,Ln.head,"div");Ln.goalColumn!=null&&(Vt.left=Ln.goalColumn),mt.push(Vt.left);var si=Ld(Re,Vt,fe,ye);return ye=="page"&&Ln==Je.sel.primary()&&kc(Re,Ha(Re,si,"div").top-Vt.top),si},ln),mt.length)for(var jt=0;jt<Je.sel.ranges.length;jt++)Je.sel.ranges[jt].goalColumn=mt[jt]}),findWordAt:function(fe){var ye=this.doc,Re=en(ye,fe.line).text,Je=fe.ch,mt=fe.ch;if(Re){var gt=this.getHelper(fe,"wordChars");(fe.sticky=="before"||mt==Re.length)&&Je?--Je:++mt;for(var jt=Re.charAt(Je),Ln=Oe(jt,gt)?function(Vt){return Oe(Vt,gt)}:/\s/.test(jt)?function(Vt){return/\s/.test(Vt)}:function(Vt){return!/\s/.test(Vt)&&!Oe(Vt)};Je>0&&Ln(Re.charAt(Je-1));)--Je;for(;mt<Re.length&&Ln(Re.charAt(mt));)++mt}return new ao(tn(fe.line,Je),tn(fe.line,mt))},toggleOverwrite:function(fe){fe!=null&&fe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Tt(this.display.cursorDiv,"CodeMirror-overwrite"):ze(this.display.cursorDiv,"CodeMirror-overwrite"),mn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ot()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:jn(function(fe,ye){vc(this,fe,ye)}),getScrollInfo:function(){var fe=this.display.scroller;return{left:fe.scrollLeft,top:fe.scrollTop,height:fe.scrollHeight-Gi(this)-this.display.barHeight,width:fe.scrollWidth-Gi(this)-this.display.barWidth,clientHeight:_i(this),clientWidth:ki(this)}},scrollIntoView:jn(function(fe,ye){fe==null?(fe={from:this.doc.sel.primary().head,to:null},ye==null&&(ye=this.options.cursorScrollMargin)):typeof fe=="number"?fe={from:tn(fe,0),to:null}:fe.from==null&&(fe={from:fe,to:null}),fe.to||(fe.to=fe.from),fe.margin=ye||0,fe.from.line!=null?as(this,fe):Rc(this,fe.from,fe.to,fe.margin)}),setSize:jn(function(fe,ye){var Re=this,Je=function(gt){return typeof gt=="number"||/^\d+$/.test(String(gt))?gt+"px":gt};fe!=null&&(this.display.wrapper.style.width=Je(fe)),ye!=null&&(this.display.wrapper.style.height=Je(ye)),this.options.lineWrapping&&ma(this);var mt=this.display.viewFrom;this.doc.iter(mt,this.display.viewTo,function(gt){if(gt.widgets){for(var jt=0;jt<gt.widgets.length;jt++)if(gt.widgets[jt].noHScroll){Ai(Re,mt,"widget");break}}++mt}),this.curOp.forceUpdate=!0,mn(this,"refresh",this)}),operation:function(fe){return nn(this,fe)},startOperation:function(){return li(this)},endOperation:function(){return fo(this)},refresh:jn(function(){var fe=this.display.cachedTextHeight;ji(this),this.curOp.forceUpdate=!0,ya(this),vc(this,this.doc.scrollLeft,this.doc.scrollTop),vo(this.display),(fe==null||Math.abs(fe-ur(this.display))>.5||this.options.lineWrapping)&&fr(this),mn(this,"refresh",this)}),swapDoc:jn(function(fe){var ye=this.doc;return ye.cm=null,this.state.selectingText&&this.state.selectingText(),ba(this,fe),ya(this),this.display.input.reset(),vc(this,fe.scrollLeft,fe.scrollTop),this.curOp.forceScroll=!0,hr(this,"swapDoc",this,ye),ye}),phrase:function(fe){var ye=this.options.phrases;return ye&&Object.prototype.hasOwnProperty.call(ye,fe)?ye[fe]:fe},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},bn(ie),ie.registerHelper=function(fe,ye,Re){ge.hasOwnProperty(fe)||(ge[fe]=ie[fe]={_global:[]}),ge[fe][ye]=Re},ie.registerGlobalHelper=function(fe,ye,Re,Je){ie.registerHelper(fe,ye,Je),ge[fe]._global.push({pred:Re,val:Je})}}function pf(ie,ae,ge,fe,ye){var Re=ae,Je=ge,mt=en(ie,ae.line),gt=ye&&ie.direction=="rtl"?-ge:ge;function jt(){var Zo=ae.line+gt;return Zo<ie.first||Zo>=ie.first+ie.size?!1:(ae=new tn(Zo,ae.ch,ae.sticky),mt=en(ie,Zo))}function Ln(Zo){var Bo;if(fe=="codepoint"){var ea=mt.text.charCodeAt(ae.ch+(fe>0?0:-1));isNaN(ea)?Bo=null:Bo=new tn(ae.line,Math.max(0,Math.min(mt.text.length,ae.ch+ge*(ea>=55296&&ea<56320?2:1))),-ge)}else ye?Bo=Js(ie.cm,mt,ae,ge):Bo=Ml(mt,ae,ge);if(Bo==null)if(!Zo&&jt())ae=gs(ye,ie.cm,mt,ae.line,gt);else return!1;else ae=Bo;return!0}if(fe=="char"||fe=="codepoint")Ln();else if(fe=="column")Ln(!0);else if(fe=="word"||fe=="group")for(var Vt=null,si=fe=="group",ii=ie.cm&&ie.cm.getHelper(ae,"wordChars"),tr=!0;!(ge<0&&!Ln(!tr));tr=!1){var dr=mt.text.charAt(ae.ch)||`
`,Mr=Oe(dr,ii)?"w":si&&dr==`
`?"n":!si||/\s/.test(dr)?null:"p";if(si&&!tr&&!Mr&&(Mr="s"),Vt&&Vt!=Mr){ge<0&&(ge=1,Ln(),ae.sticky="after");break}if(Mr&&(Vt=Mr),ge>0&&!Ln(!tr))break}var so=Iu(ie,ae,Re,Je,!0);return In(Re,so)&&(so.hitSide=!0),so}function Ld(ie,ae,ge,fe){var ye=ie.doc,Re=ae.left,Je;if(fe=="page"){var mt=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),gt=Math.max(mt-.5*ur(ie.display),3);Je=(ge>0?ae.bottom:ae.top)+ge*gt}else fe=="line"&&(Je=ge>0?ae.bottom+3:ae.top-3);for(var jt;jt=Jt(ie,Re,Je),!!jt.outside;){if(ge<0?Je<=0:Je>=ye.height){jt.hitSide=!0;break}Je+=ge*5}return jt}var Ks=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};Ks.prototype.init=function(ie){var ae=this,ge=this,fe=ge.cm,ye=ge.div=ie.lineDiv;Fg(ye,fe.options.spellcheck,fe.options.autocorrect,fe.options.autocapitalize);function Re(mt){for(var gt=mt.target;gt;gt=gt.parentNode){if(gt==ye)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(gt.className))break}return!1}rn(ye,"paste",function(mt){!Re(mt)||ei(fe,mt)||Cg(mt,fe)||Ue<=11&&setTimeout(Vn(fe,function(){return ae.updateFromDOM()}),20)}),rn(ye,"compositionstart",function(mt){ae.composing={data:mt.data,done:!1}}),rn(ye,"compositionupdate",function(mt){ae.composing||(ae.composing={data:mt.data,done:!1})}),rn(ye,"compositionend",function(mt){ae.composing&&(mt.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),rn(ye,"touchstart",function(){return ge.forceCompositionEnd()}),rn(ye,"input",function(){ae.composing||ae.readFromDOMSoon()});function Je(mt){if(!(!Re(mt)||ei(fe,mt))){if(fe.somethingSelected())Hh({lineWise:!1,text:fe.getSelections()}),mt.type=="cut"&&fe.replaceSelection("",null,"cut");else if(fe.options.lineWiseCopyCut){var gt=bg(fe);Hh({lineWise:!0,text:gt.text}),mt.type=="cut"&&fe.operation(function(){fe.setSelections(gt.ranges,0,zt),fe.replaceSelection("",null,"cut")})}else return;if(mt.clipboardData){mt.clipboardData.clearData();var jt=Ru.text.join(`
`);if(mt.clipboardData.setData("Text",jt),mt.clipboardData.getData("Text")==jt){mt.preventDefault();return}}var Ln=Bg(),Vt=Ln.firstChild;fe.display.lineSpace.insertBefore(Ln,fe.display.lineSpace.firstChild),Vt.value=Ru.text.join(`
`);var si=document.activeElement;Ot(Vt),setTimeout(function(){fe.display.lineSpace.removeChild(Ln),si.focus(),si==ye&&ge.showPrimarySelection()},50)}}rn(ye,"copy",Je),rn(ye,"cut",Je)},Ks.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},Ks.prototype.prepareSelection=function(){var ie=kr(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},Ks.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},Ks.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ks.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,ge=ae.doc.sel.primary(),fe=ge.from(),ye=ge.to();if(ae.display.viewTo==ae.display.viewFrom||fe.line>=ae.display.viewTo||ye.line<ae.display.viewFrom){ie.removeAllRanges();return}var Re=mf(ae,ie.anchorNode,ie.anchorOffset),Je=mf(ae,ie.focusNode,ie.focusOffset);if(!(Re&&!Re.bad&&Je&&!Je.bad&&sn(vi(Re,Je),fe)==0&&sn(Di(Re,Je),ye)==0)){var mt=ae.display.view,gt=fe.line>=ae.display.viewFrom&&Ch(ae,fe)||{node:mt[0].measure.map[2],offset:0},jt=ye.line<ae.display.viewTo&&Ch(ae,ye);if(!jt){var Ln=mt[mt.length-1].measure,Vt=Ln.maps?Ln.maps[Ln.maps.length-1]:Ln.map;jt={node:Vt[Vt.length-1],offset:Vt[Vt.length-2]-Vt[Vt.length-3]}}if(!gt||!jt){ie.removeAllRanges();return}var si=ie.rangeCount&&ie.getRangeAt(0),ii;try{ii=He(gt.node,gt.offset,jt.offset,jt.node)}catch(tr){}ii&&(!le&&ae.state.focused?(ie.collapse(gt.node,gt.offset),ii.collapsed||(ie.removeAllRanges(),ie.addRange(ii))):(ie.removeAllRanges(),ie.addRange(ii)),si&&ie.anchorNode==null?ie.addRange(si):le&&this.startGracePeriod()),this.rememberSelection()}},Ks.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)},Ks.prototype.showMultipleSelections=function(ie){Xe(this.cm.display.cursorDiv,ie.cursors),Xe(this.cm.display.selectionDiv,ie.selection)},Ks.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},Ks.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return Nt(this.div,ae)},Ks.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ks.prototype.blur=function(){this.div.blur()},Ks.prototype.getField=function(){return this.div},Ks.prototype.supportsTouch=function(){return!0},Ks.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():nn(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)},Ks.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},Ks.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(te&&wt&&this.cm.display.gutterSpecs.length&&Mg(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ge=mf(ae,ie.anchorNode,ie.anchorOffset),fe=mf(ae,ie.focusNode,ie.focusOffset);ge&&fe&&nn(ae,function(){js(ae.doc,Va(ge,fe),zt),(ge.bad||fe.bad)&&(ae.curOp.selectionChanged=!0)})}}},Ks.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ae=ie.display,ge=ie.doc.sel.primary(),fe=ge.from(),ye=ge.to();if(fe.ch==0&&fe.line>ie.firstLine()&&(fe=tn(fe.line-1,en(ie.doc,fe.line-1).length)),ye.ch==en(ie.doc,ye.line).text.length&&ye.line<ie.lastLine()&&(ye=tn(ye.line+1,0)),fe.line<ae.viewFrom||ye.line>ae.viewTo-1)return!1;var Re,Je,mt;fe.line==ae.viewFrom||(Re=vr(ie,fe.line))==0?(Je=Et(ae.view[0].line),mt=ae.view[0].node):(Je=Et(ae.view[Re].line),mt=ae.view[Re-1].node.nextSibling);var gt=vr(ie,ye.line),jt,Ln;if(gt==ae.view.length-1?(jt=ae.viewTo-1,Ln=ae.lineDiv.lastChild):(jt=Et(ae.view[gt+1].line)-1,Ln=ae.view[gt+1].node.previousSibling),!mt)return!1;for(var Vt=ie.doc.splitLines(Eh(ie,mt,Ln,Je,jt)),si=fn(ie.doc,tn(Je,0),tn(jt,en(ie.doc,jt).text.length));Vt.length>1&&si.length>1;)if(St(Vt)==St(si))Vt.pop(),si.pop(),jt--;else if(Vt[0]==si[0])Vt.shift(),si.shift(),Je++;else break;for(var ii=0,tr=0,dr=Vt[0],Mr=si[0],so=Math.min(dr.length,Mr.length);ii<so&&dr.charCodeAt(ii)==Mr.charCodeAt(ii);)++ii;for(var Zo=St(Vt),Bo=St(si),ea=Math.min(Zo.length-(Vt.length==1?ii:0),Bo.length-(si.length==1?ii:0));tr<ea&&Zo.charCodeAt(Zo.length-tr-1)==Bo.charCodeAt(Bo.length-tr-1);)++tr;if(Vt.length==1&&si.length==1&&Je==fe.line)for(;ii&&ii>fe.ch&&Zo.charCodeAt(Zo.length-tr-1)==Bo.charCodeAt(Bo.length-tr-1);)ii--,tr++;Vt[Vt.length-1]=Zo.slice(0,Zo.length-tr).replace(/^\u200b+/,""),Vt[0]=Vt[0].slice(ii).replace(/\u200b+$/,"");var _a=tn(Je,ii),Mo=tn(jt,si.length?St(si).length-tr:0);if(Vt.length>1||Vt[0]||sn(_a,Mo))return Ku(ie.doc,Vt,_a,Mo,"+input"),!0},Ks.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ks.prototype.reset=function(){this.forceCompositionEnd()},Ks.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ks.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))},Ks.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&nn(this.cm,function(){return ji(ie.cm)})},Ks.prototype.setUneditable=function(ie){ie.contentEditable="false"},Ks.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||Vn(this.cm,wh)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},Ks.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},Ks.prototype.onContextMenu=function(){},Ks.prototype.resetPosition=function(){},Ks.prototype.needsContentAttribute=!0;function Ch(ie,ae){var ge=ga(ie,ae.line);if(!ge||ge.hidden)return null;var fe=en(ie.doc,ae.line),ye=Mi(ge,fe,ae.line),Re=Sn(fe,ie.doc.direction),Je="left";if(Re){var mt=ft(Re,ae.ch);Je=mt%2?"right":"left"}var gt=No(ye.map,ae.ch,Je);return gt.offset=gt.collapse=="right"?gt.end:gt.start,gt}function Mg(ie){for(var ae=ie;ae;ae=ae.parentNode)if(/CodeMirror-gutter-wrapper/.test(ae.className))return!0;return!1}function Xd(ie,ae){return ae&&(ie.bad=!0),ie}function Eh(ie,ae,ge,fe,ye){var Re="",Je=!1,mt=ie.doc.lineSeparator(),gt=!1;function jt(ii){return function(tr){return tr.id==ii}}function Ln(){Je&&(Re+=mt,gt&&(Re+=mt),Je=gt=!1)}function Vt(ii){ii&&(Ln(),Re+=ii)}function si(ii){if(ii.nodeType==1){var tr=ii.getAttribute("cm-text");if(tr){Vt(tr);return}var dr=ii.getAttribute("cm-marker"),Mr;if(dr){var so=ie.findMarks(tn(fe,0),tn(ye+1,0),jt(+dr));so.length&&(Mr=so[0].find(0))&&Vt(fn(ie.doc,Mr.from,Mr.to).join(mt));return}if(ii.getAttribute("contenteditable")=="false")return;var Zo=/^(pre|div|p|li|table|br)$/i.test(ii.nodeName);if(!/^br$/i.test(ii.nodeName)&&ii.textContent.length==0)return;Zo&&Ln();for(var Bo=0;Bo<ii.childNodes.length;Bo++)si(ii.childNodes[Bo]);/^(pre|p)$/i.test(ii.nodeName)&&(gt=!0),Zo&&(Je=!0)}else ii.nodeType==3&&Vt(ii.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;si(ae),ae!=ge;)ae=ae.nextSibling,gt=!1;return Re}function mf(ie,ae,ge){var fe;if(ae==ie.display.lineDiv){if(fe=ie.display.lineDiv.childNodes[ge],!fe)return Xd(ie.clipPos(tn(ie.display.viewTo-1)),!0);ae=null,ge=0}else for(fe=ae;;fe=fe.parentNode){if(!fe||fe==ie.display.lineDiv)return null;if(fe.parentNode&&fe.parentNode==ie.display.lineDiv)break}for(var ye=0;ye<ie.display.view.length;ye++){var Re=ie.display.view[ye];if(Re.node==fe)return ip(Re,ae,ge)}}function ip(ie,ae,ge){var fe=ie.text.firstChild,ye=!1;if(!ae||!Nt(fe,ae))return Xd(tn(Et(ie.line),0),!0);if(ae==fe&&(ye=!0,ae=fe.childNodes[ge],ge=0,!ae)){var Re=ie.rest?St(ie.rest):ie.line;return Xd(tn(Et(Re),Re.text.length),ye)}var Je=ae.nodeType==3?ae:null,mt=ae;for(!Je&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(Je=ae.firstChild,ge&&(ge=Je.nodeValue.length));mt.parentNode!=fe;)mt=mt.parentNode;var gt=ie.measure,jt=gt.maps;function Ln(Mr,so,Zo){for(var Bo=-1;Bo<(jt?jt.length:0);Bo++)for(var ea=Bo<0?gt.map:jt[Bo],_a=0;_a<ea.length;_a+=3){var Mo=ea[_a+2];if(Mo==Mr||Mo==so){var rs=Et(Bo<0?ie.line:ie.rest[Bo]),rl=ea[_a]+Zo;return(Zo<0||Mo!=Mr)&&(rl=ea[_a+(Zo?1:0)]),tn(rs,rl)}}}var Vt=Ln(Je,mt,ge);if(Vt)return Xd(Vt,ye);for(var si=mt.nextSibling,ii=Je?Je.nodeValue.length-ge:0;si;si=si.nextSibling){if(Vt=Ln(si,si.firstChild,0),Vt)return Xd(tn(Vt.line,Vt.ch-ii),ye);ii+=si.textContent.length}for(var tr=mt.previousSibling,dr=ge;tr;tr=tr.previousSibling){if(Vt=Ln(tr,tr.firstChild,-1),Vt)return Xd(tn(Vt.line,Vt.ch+dr),ye);dr+=tr.textContent.length}}var Yl=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ve,this.hasSelection=!1,this.composing=null};Yl.prototype.init=function(ie){var ae=this,ge=this,fe=this.cm;this.createField(ie);var ye=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),Ie&&(ye.style.width="0px"),rn(ye,"input",function(){Ge&&Ue>=9&&ae.hasSelection&&(ae.hasSelection=null),ge.poll()}),rn(ye,"paste",function(Je){ei(fe,Je)||Cg(Je,fe)||(fe.state.pasteIncoming=+new Date,ge.fastPoll())});function Re(Je){if(!ei(fe,Je)){if(fe.somethingSelected())Hh({lineWise:!1,text:fe.getSelections()});else if(fe.options.lineWiseCopyCut){var mt=bg(fe);Hh({lineWise:!0,text:mt.text}),Je.type=="cut"?fe.setSelections(mt.ranges,null,zt):(ge.prevInput="",ye.value=mt.text.join(`
`),Ot(ye))}else return;Je.type=="cut"&&(fe.state.cutIncoming=+new Date)}}rn(ye,"cut",Re),rn(ye,"copy",Re),rn(ie.scroller,"paste",function(Je){if(!(En(ie,Je)||ei(fe,Je))){if(!ye.dispatchEvent){fe.state.pasteIncoming=+new Date,ge.focus();return}var mt=new Event("paste");mt.clipboardData=Je.clipboardData,ye.dispatchEvent(mt)}}),rn(ie.lineSpace,"selectstart",function(Je){En(ie,Je)||wi(Je)}),rn(ye,"compositionstart",function(){var Je=fe.getCursor("from");ge.composing&&ge.composing.range.clear(),ge.composing={start:Je,range:fe.markText(Je,fe.getCursor("to"),{className:"CodeMirror-composing"})}}),rn(ye,"compositionend",function(){ge.composing&&(ge.poll(),ge.composing.range.clear(),ge.composing=null)})},Yl.prototype.createField=function(ie){this.wrapper=Bg(),this.textarea=this.wrapper.firstChild},Yl.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},Yl.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,ge=ie.doc,fe=kr(ie);if(ie.options.moveInputWithCursor){var ye=La(ie,ge.sel.primary().head,"div"),Re=ae.wrapper.getBoundingClientRect(),Je=ae.lineDiv.getBoundingClientRect();fe.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,ye.top+Je.top-Re.top)),fe.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,ye.left+Je.left-Re.left))}return fe},Yl.prototype.showSelection=function(ie){var ae=this.cm,ge=ae.display;Xe(ge.cursorDiv,ie.cursors),Xe(ge.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},Yl.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ae=this.cm;if(ae.somethingSelected()){this.prevInput="";var ge=ae.getSelection();this.textarea.value=ge,ae.state.focused&&Ot(this.textarea),Ge&&Ue>=9&&(this.hasSelection=ge)}else ie||(this.prevInput=this.textarea.value="",Ge&&Ue>=9&&(this.hasSelection=null))}},Yl.prototype.getField=function(){return this.textarea},Yl.prototype.supportsTouch=function(){return!1},Yl.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||ot()!=this.textarea))try{this.textarea.focus()}catch(ie){}},Yl.prototype.blur=function(){this.textarea.blur()},Yl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Yl.prototype.receivedFocus=function(){this.slowPoll()},Yl.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},Yl.prototype.fastPoll=function(){var ie=!1,ae=this;ae.pollingFast=!0;function ge(){var fe=ae.poll();!fe&&!ie?(ie=!0,ae.polling.set(60,ge)):(ae.pollingFast=!1,ae.slowPoll())}ae.polling.set(20,ge)},Yl.prototype.poll=function(){var ie=this,ae=this.cm,ge=this.textarea,fe=this.prevInput;if(this.contextMenuPending||!ae.state.focused||Ne(ge)&&!fe&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var ye=ge.value;if(ye==fe&&!ae.somethingSelected())return!1;if(Ge&&Ue>=9&&this.hasSelection===ye||de&&/[\uf700-\uf7ff]/.test(ye))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Re=ye.charCodeAt(0);if(Re==8203&&!fe&&(fe="\u200B"),Re==8666)return this.reset(),this.cm.execCommand("undo")}for(var Je=0,mt=Math.min(fe.length,ye.length);Je<mt&&fe.charCodeAt(Je)==ye.charCodeAt(Je);)++Je;return nn(ae,function(){wh(ae,ye.slice(Je),fe.length-Je,null,ie.composing?"*compose":null),ye.length>1e3||ye.indexOf(`
`)>-1?ge.value=ie.prevInput="":ie.prevInput=ye,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ae.markText(ie.composing.start,ae.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Yl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Yl.prototype.onKeyPress=function(){Ge&&Ue>=9&&(this.hasSelection=null),this.fastPoll()},Yl.prototype.onContextMenu=function(ie){var ae=this,ge=ae.cm,fe=ge.display,ye=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Re=pr(ge,ie),Je=fe.scroller.scrollTop;if(!Re||$e)return;var mt=ge.options.resetSelectionOnContextMenu;mt&&ge.doc.sel.contains(Re)==-1&&Vn(ge,js)(ge.doc,Va(Re),zt);var gt=ye.style.cssText,jt=ae.wrapper.style.cssText,Ln=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",ye.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(ie.clientY-Ln.top-5)+"px; left: "+(ie.clientX-Ln.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 Vt;Me&&(Vt=window.scrollY),fe.input.focus(),Me&&window.scrollTo(null,Vt),fe.input.reset(),ge.somethingSelected()||(ye.value=ae.prevInput=" "),ae.contextMenuPending=ii,fe.selForContextMenu=ge.doc.sel,clearTimeout(fe.detectingSelectAll);function si(){if(ye.selectionStart!=null){var dr=ge.somethingSelected(),Mr="\u200B"+(dr?ye.value:"");ye.value="\u21DA",ye.value=Mr,ae.prevInput=dr?"":"\u200B",ye.selectionStart=1,ye.selectionEnd=Mr.length,fe.selForContextMenu=ge.doc.sel}}function ii(){if(ae.contextMenuPending==ii&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=jt,ye.style.cssText=gt,Ge&&Ue<9&&fe.scrollbars.setScrollTop(fe.scroller.scrollTop=Je),ye.selectionStart!=null)){(!Ge||Ge&&Ue<9)&&si();var dr=0,Mr=function(){fe.selForContextMenu==ge.doc.sel&&ye.selectionStart==0&&ye.selectionEnd>0&&ae.prevInput=="\u200B"?Vn(ge,Ns)(ge):dr++<10?fe.detectingSelectAll=setTimeout(Mr,500):(fe.selForContextMenu=null,fe.input.reset())};fe.detectingSelectAll=setTimeout(Mr,200)}}if(Ge&&Ue>=9&&si(),Be){rr(ie);var tr=function(){kn(window,"mouseup",tr),setTimeout(ii,20)};rn(window,"mouseup",tr)}else setTimeout(ii,50)},Yl.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},Yl.prototype.setUneditable=function(){},Yl.prototype.needsContentAttribute=!1;function rp(ie,ae){if(ae=ae?Dt(ae):{},ae.value=ie.value,!ae.tabindex&&ie.tabIndex&&(ae.tabindex=ie.tabIndex),!ae.placeholder&&ie.placeholder&&(ae.placeholder=ie.placeholder),ae.autofocus==null){var ge=ot();ae.autofocus=ge==ie||ie.getAttribute("autofocus")!=null&&ge==document.body}function fe(){ie.value=mt.getValue()}var ye;if(ie.form&&(rn(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone)){var Re=ie.form;ye=Re.submit;try{var Je=Re.submit=function(){fe(),Re.submit=ye,Re.submit(),Re.submit=Je}}catch(gt){}}ae.finishInit=function(gt){gt.save=fe,gt.getTextArea=function(){return ie},gt.toTextArea=function(){gt.toTextArea=isNaN,fe(),ie.parentNode.removeChild(gt.getWrapperElement()),ie.style.display="",ie.form&&(kn(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=ye))}},ie.style.display="none";var mt=As(function(gt){return ie.parentNode.insertBefore(gt,ie.nextSibling)},ae);return mt}function Jd(ie){ie.off=kn,ie.on=rn,ie.wheelEventPixels=ta,ie.Doc=Bl,ie.splitLines=Sr,ie.countColumn=tt,ie.findColumn=Gn,ie.isWordChar=Ae,ie.Pass=yn,ie.signal=mn,ie.Line=fa,ie.changeEnd=bs,ie.scrollbarModel=_d,ie.Pos=tn,ie.cmpPos=sn,ie.modes=Si,ie.mimeModes=Wi,ie.resolveMode=qn,ie.getMode=Zt,ie.modeExtensions=$t,ie.extendMode=Qe,ie.copyState=on,ie.startState=At,ie.innerMode=cn,ie.commands=nu,ie.keyMap=Pu,ie.keyName=mh,ie.isModifierKey=Uc,ie.lookupKey=ku,ie.normalizeKeyMap=_h,ie.StringStream=ht,ie.SharedTextMarker=Bc,ie.TextMarker=dn,ie.LineWidget=yl,ie.e_preventDefault=wi,ie.e_stopPropagation=Zi,ie.e_stop=rr,ie.addClass=Tt,ie.contains=Nt,ie.rmClass=ze,ie.keyNames=Mc}tp(As),Yd(As);var dd="iter insert remove copy getEditor constructor".split(" ");for(var bh in Bl.prototype)Bl.prototype.hasOwnProperty(bh)&&_t(dd,bh)<0&&(As.prototype[bh]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Bl.prototype[bh]));return bn(Bl),As.inputStyles={textarea:Yl,contenteditable:Ks},As.defineMode=function(ie){!As.defaults.mode&&ie!="null"&&(As.defaults.mode=ie),qi.apply(this,arguments)},As.defineMIME=$n,As.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),As.defineMIME("text/plain","null"),As.defineExtension=function(ie,ae){As.prototype[ie]=ae},As.defineDocExtension=function(ie,ae){Bl.prototype[ie]=ae},As.fromTextArea=rp,Jd(As),As.version="5.58.2",As})},25419:function(On,pn,pe){(function(le){le(pe(89780),pe(15525),pe(98101))})(function(le){"use strict";le.defineMode("markdown",function(ke,We){var ut=le.getMode(ke,"text/html"),Ge=ut.name=="null";function Ue(tt){if(le.findModeByName){var Ve=le.findModeByName(tt);Ve&&(tt=Ve.mime||Ve.mimes[0])}var _t=le.getMode(ke,tt);return _t.name=="null"?null:_t}We.highlightFormatting===void 0&&(We.highlightFormatting=!1),We.maxBlockquoteDepth===void 0&&(We.maxBlockquoteDepth=0),We.taskLists===void 0&&(We.taskLists=!1),We.strikethrough===void 0&&(We.strikethrough=!1),We.emoji===void 0&&(We.emoji=!1),We.fencedCodeBlockHighlighting===void 0&&(We.fencedCodeBlockHighlighting=!0),We.fencedCodeBlockDefaultMode===void 0&&(We.fencedCodeBlockDefaultMode="text/plain"),We.xml===void 0&&(We.xml=!0),We.tokenTypeOverrides===void 0&&(We.tokenTypeOverrides={});var Me={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Ct in Me)Me.hasOwnProperty(Ct)&&We.tokenTypeOverrides[Ct]&&(Me[Ct]=We.tokenTypeOverrides[Ct]);var wt=/^([*\-_])(?:\s*\1){2,}\s*$/,$e=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ft=/^\[(x| )\](?=\s)/i,lt=We.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,vt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ie=/^[^#!\[\]*_\\<>` "'(~:]+/,te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,de=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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(tt,Ve,_t){return Ve.f=Ve.inline=_t,_t(tt,Ve)}function ve(tt,Ve,_t){return Ve.f=Ve.block=_t,_t(tt,Ve)}function Ee(tt){return!tt||!/\S/.test(tt.string)}function Be(tt){if(tt.linkTitle=!1,tt.linkHref=!1,tt.linkText=!1,tt.em=!1,tt.strong=!1,tt.strikethrough=!1,tt.quote=0,tt.indentedCode=!1,tt.f==ze){var Ve=Ge;if(!Ve){var _t=le.innerMode(ut,tt.htmlState);Ve=_t.mode.name=="xml"&&_t.state.tagStart===null&&!_t.state.context&&_t.state.tokenize.isInText}Ve&&(tt.f=dt,tt.block=Le,tt.htmlState=null)}return tt.trailingSpace=0,tt.trailingSpaceNewLine=!1,tt.prevLine=tt.thisLine,tt.thisLine={stream:null},null}function Le(tt,Ve){var _t=tt.column()===Ve.indentation,vn=Ee(Ve.prevLine.stream),yn=Ve.indentedCode,zt=Ve.prevLine.hr,qt=Ve.list!==!1,ln=(Ve.listStack[Ve.listStack.length-1]||0)+3;Ve.indentedCode=!1;var Gn=Ve.indentation;if(Ve.indentationDiff===null&&(Ve.indentationDiff=Ve.indentation,qt)){for(Ve.list=null;Gn<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=Gn-Ve.listStack[Ve.listStack.length-1])}var un=!vn&&!zt&&!Ve.prevLine.header&&(!qt||!yn)&&!Ve.prevLine.fencedCodeEnd,_n=(Ve.list===!1||zt||vn)&&Ve.indentation<=ln&&tt.match(wt),St=null;if(Ve.indentationDiff>=4&&(yn||Ve.prevLine.fencedCodeEnd||Ve.prevLine.header||vn))return tt.skipToEnd(),Ve.indentedCode=!0,Me.code;if(tt.eatSpace())return null;if(_t&&Ve.indentation<=ln&&(St=tt.match(lt))&&St[1].length<=6)return Ve.quote=0,Ve.header=St[1].length,Ve.thisLine.header=!0,We.highlightFormatting&&(Ve.formatting="header"),Ve.f=Ve.inline,Xe(Ve);if(Ve.indentation<=ln&&tt.eat(">"))return Ve.quote=_t?1:Ve.quote+1,We.highlightFormatting&&(Ve.formatting="quote"),tt.eatSpace(),Xe(Ve);if(!_n&&!Ve.setext&&_t&&Ve.indentation<=ln&&(St=tt.match($e))){var Zn=St[1]?"ol":"ul";return Ve.indentation=Gn+tt.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,We.taskLists&&tt.match(Ft,!1)&&(Ve.taskList=!0),Ve.f=Ve.inline,We.highlightFormatting&&(Ve.formatting=["list","list-"+Zn]),Xe(Ve)}else{if(_t&&Ve.indentation<=ln&&(St=tt.match(te,!0)))return Ve.quote=0,Ve.fencedEndRE=new RegExp(St[1]+"+ *$"),Ve.localMode=We.fencedCodeBlockHighlighting&&Ue(St[2]||We.fencedCodeBlockDefaultMode),Ve.localMode&&(Ve.localState=le.startState(Ve.localMode)),Ve.f=Ve.block=je,We.highlightFormatting&&(Ve.formatting="code-block"),Ve.code=-1,Xe(Ve);if(Ve.setext||(!un||!qt)&&!Ve.quote&&Ve.list===!1&&!Ve.code&&!_n&&!ee.test(tt.string)&&(St=tt.lookAhead(1))&&(St=St.match(vt)))return Ve.setext?(Ve.header=Ve.setext,Ve.setext=0,tt.skipToEnd(),We.highlightFormatting&&(Ve.formatting="header")):(Ve.header=St[0].charAt(0)=="="?1:2,Ve.setext=Ve.header),Ve.thisLine.header=!0,Ve.f=Ve.inline,Xe(Ve);if(_n)return tt.skipToEnd(),Ve.hr=!0,Ve.thisLine.hr=!0,Me.hr;if(tt.peek()==="[")return he(tt,Ve,xt)}return he(tt,Ve,Ve.inline)}function ze(tt,Ve){var _t=ut.token(tt,Ve.htmlState);if(!Ge){var vn=le.innerMode(ut,Ve.htmlState);(vn.mode.name=="xml"&&vn.state.tagStart===null&&!vn.state.context&&vn.state.tokenize.isInText||Ve.md_inside&&tt.current().indexOf(">")>-1)&&(Ve.f=dt,Ve.block=Le,Ve.htmlState=null)}return _t}function je(tt,Ve){var _t=Ve.listStack[Ve.listStack.length-1]||0,vn=Ve.indentation<_t,yn=_t+3;if(Ve.fencedEndRE&&Ve.indentation<=yn&&(vn||tt.match(Ve.fencedEndRE))){We.highlightFormatting&&(Ve.formatting="code-block");var zt;return vn||(zt=Xe(Ve)),Ve.localMode=Ve.localState=null,Ve.block=Le,Ve.f=dt,Ve.fencedEndRE=null,Ve.code=0,Ve.thisLine.fencedCodeEnd=!0,vn?ve(tt,Ve,Ve.block):zt}else return Ve.localMode?Ve.localMode.token(tt,Ve.localState):(tt.skipToEnd(),Me.code)}function Xe(tt){var Ve=[];if(tt.formatting){Ve.push(Me.formatting),typeof tt.formatting=="string"&&(tt.formatting=[tt.formatting]);for(var _t=0;_t<tt.formatting.length;_t++)Ve.push(Me.formatting+"-"+tt.formatting[_t]),tt.formatting[_t]==="header"&&Ve.push(Me.formatting+"-"+tt.formatting[_t]+"-"+tt.header),tt.formatting[_t]==="quote"&&(!We.maxBlockquoteDepth||We.maxBlockquoteDepth>=tt.quote?Ve.push(Me.formatting+"-"+tt.formatting[_t]+"-"+tt.quote):Ve.push("error"))}if(tt.taskOpen)return Ve.push("meta"),Ve.length?Ve.join(" "):null;if(tt.taskClosed)return Ve.push("property"),Ve.length?Ve.join(" "):null;if(tt.linkHref?Ve.push(Me.linkHref,"url"):(tt.strong&&Ve.push(Me.strong),tt.em&&Ve.push(Me.em),tt.strikethrough&&Ve.push(Me.strikethrough),tt.emoji&&Ve.push(Me.emoji),tt.linkText&&Ve.push(Me.linkText),tt.code&&Ve.push(Me.code),tt.image&&Ve.push(Me.image),tt.imageAltText&&Ve.push(Me.imageAltText,"link"),tt.imageMarker&&Ve.push(Me.imageMarker)),tt.header&&Ve.push(Me.header,Me.header+"-"+tt.header),tt.quote&&(Ve.push(Me.quote),!We.maxBlockquoteDepth||We.maxBlockquoteDepth>=tt.quote?Ve.push(Me.quote+"-"+tt.quote):Ve.push(Me.quote+"-"+We.maxBlockquoteDepth)),tt.list!==!1){var vn=(tt.listStack.length-1)%3;vn?vn===1?Ve.push(Me.list2):Ve.push(Me.list3):Ve.push(Me.list1)}return tt.trailingSpaceNewLine?Ve.push("trailing-space-new-line"):tt.trailingSpace&&Ve.push("trailing-space-"+(tt.trailingSpace%2?"a":"b")),Ve.length?Ve.join(" "):null}function Ye(tt,Ve){if(tt.match(Ie,!0))return Xe(Ve)}function dt(tt,Ve){var _t=Ve.text(tt,Ve);if(typeof _t!="undefined")return _t;if(Ve.list)return Ve.list=null,Xe(Ve);if(Ve.taskList){var vn=tt.match(Ft,!0)[1]===" ";return vn?Ve.taskOpen=!0:Ve.taskClosed=!0,We.highlightFormatting&&(Ve.formatting="task"),Ve.taskList=!1,Xe(Ve)}if(Ve.taskOpen=!1,Ve.taskClosed=!1,Ve.header&&tt.match(/^#+$/,!0))return We.highlightFormatting&&(Ve.formatting="header"),Xe(Ve);var yn=tt.next();if(Ve.linkTitle){Ve.linkTitle=!1;var zt=yn;yn==="("&&(zt=")"),zt=(zt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var qt="^\\s*(?:[^"+zt+"\\\\]+|\\\\\\\\|\\\\.)"+zt;if(tt.match(new RegExp(qt),!0))return Me.linkHref}if(yn==="`"){var ln=Ve.formatting;We.highlightFormatting&&(Ve.formatting="code"),tt.eatWhile("`");var Gn=tt.current().length;if(Ve.code==0&&(!Ve.quote||Gn==1))return Ve.code=Gn,Xe(Ve);if(Gn==Ve.code){var un=Xe(Ve);return Ve.code=0,un}else return Ve.formatting=ln,Xe(Ve)}else if(Ve.code)return Xe(Ve);if(yn==="\\"&&(tt.next(),We.highlightFormatting)){var _n=Xe(Ve),St=Me.formatting+"-escape";return _n?_n+" "+St:St}if(yn==="!"&&tt.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ve.imageMarker=!0,Ve.image=!0,We.highlightFormatting&&(Ve.formatting="image"),Xe(Ve);if(yn==="["&&Ve.imageMarker&&tt.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ve.imageMarker=!1,Ve.imageAltText=!0,We.highlightFormatting&&(Ve.formatting="image"),Xe(Ve);if(yn==="]"&&Ve.imageAltText){We.highlightFormatting&&(Ve.formatting="image");var _n=Xe(Ve);return Ve.imageAltText=!1,Ve.image=!1,Ve.inline=Ve.f=Nt,_n}if(yn==="["&&!Ve.image)return Ve.linkText&&tt.match(/^.*?\]/)||(Ve.linkText=!0,We.highlightFormatting&&(Ve.formatting="link")),Xe(Ve);if(yn==="]"&&Ve.linkText){We.highlightFormatting&&(Ve.formatting="link");var _n=Xe(Ve);return Ve.linkText=!1,Ve.inline=Ve.f=tt.match(/\(.*?\)| ?\[.*?\]/,!1)?Nt:dt,_n}if(yn==="<"&&tt.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ve.f=Ve.inline=He,We.highlightFormatting&&(Ve.formatting="link");var _n=Xe(Ve);return _n?_n+=" ":_n="",_n+Me.linkInline}if(yn==="<"&&tt.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ve.f=Ve.inline=He,We.highlightFormatting&&(Ve.formatting="link");var _n=Xe(Ve);return _n?_n+=" ":_n="",_n+Me.linkEmail}if(We.xml&&yn==="<"&&tt.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Zn=tt.string.indexOf(">",tt.pos);if(Zn!=-1){var ci=tt.string.substring(tt.start,Zn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ci)&&(Ve.md_inside=!0)}return tt.backUp(1),Ve.htmlState=le.startState(ut),ve(tt,Ve,ze)}if(We.xml&&yn==="<"&&tt.match(/^\/\w*?>/))return Ve.md_inside=!1,"tag";if(yn==="*"||yn==="_"){for(var Ze=1,be=tt.pos==1?" ":tt.string.charAt(tt.pos-2);Ze<3&&tt.eat(yn);)Ze++;var Pe=tt.peek()||" ",Ae=!/\s/.test(Pe)&&(!de.test(Pe)||/\s/.test(be)||de.test(be)),Oe=!/\s/.test(be)&&(!de.test(be)||/\s/.test(Pe)||de.test(Pe)),xe=null,ct=null;if(Ze%2&&(!Ve.em&&Ae&&(yn==="*"||!Oe||de.test(be))?xe=!0:Ve.em==yn&&Oe&&(yn==="*"||!Ae||de.test(Pe))&&(xe=!1)),Ze>1&&(!Ve.strong&&Ae&&(yn==="*"||!Oe||de.test(be))?ct=!0:Ve.strong==yn&&Oe&&(yn==="*"||!Ae||de.test(Pe))&&(ct=!1)),ct!=null||xe!=null){We.highlightFormatting&&(Ve.formatting=xe==null?"strong":ct==null?"em":"strong em"),xe===!0&&(Ve.em=yn),ct===!0&&(Ve.strong=yn);var un=Xe(Ve);return xe===!1&&(Ve.em=!1),ct===!1&&(Ve.strong=!1),un}}else if(yn===" "&&(tt.eat("*")||tt.eat("_"))){if(tt.peek()===" ")return Xe(Ve);tt.backUp(1)}if(We.strikethrough){if(yn==="~"&&tt.eatWhile(yn)){if(Ve.strikethrough){We.highlightFormatting&&(Ve.formatting="strikethrough");var un=Xe(Ve);return Ve.strikethrough=!1,un}else if(tt.match(/^[^\s]/,!1))return Ve.strikethrough=!0,We.highlightFormatting&&(Ve.formatting="strikethrough"),Xe(Ve)}else if(yn===" "&&tt.match(/^~~/,!0)){if(tt.peek()===" ")return Xe(Ve);tt.backUp(2)}}if(We.emoji&&yn===":"&&tt.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ve.emoji=!0,We.highlightFormatting&&(Ve.formatting="emoji");var Mt=Xe(Ve);return Ve.emoji=!1,Mt}return yn===" "&&(tt.match(/^ +$/,!1)?Ve.trailingSpace++:Ve.trailingSpace&&(Ve.trailingSpaceNewLine=!0)),Xe(Ve)}function He(tt,Ve){var _t=tt.next();if(_t===">"){Ve.f=Ve.inline=dt,We.highlightFormatting&&(Ve.formatting="link");var vn=Xe(Ve);return vn?vn+=" ":vn="",vn+Me.linkInline}return tt.match(/^[^>]+/,!0),Me.linkInline}function Nt(tt,Ve){if(tt.eatSpace())return null;var _t=tt.next();return _t==="("||_t==="["?(Ve.f=Ve.inline=Tt(_t==="("?")":"]"),We.highlightFormatting&&(Ve.formatting="link-string"),Ve.linkHref=!0,Xe(Ve)):"error"}var ot={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Tt(tt){return function(Ve,_t){var vn=Ve.next();if(vn===tt){_t.f=_t.inline=dt,We.highlightFormatting&&(_t.formatting="link-string");var yn=Xe(_t);return _t.linkHref=!1,yn}return Ve.match(ot[tt]),_t.linkHref=!0,Xe(_t)}}function xt(tt,Ve){return tt.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ve.f=Ot,tt.next(),We.highlightFormatting&&(Ve.formatting="link"),Ve.linkText=!0,Xe(Ve)):he(tt,Ve,dt)}function Ot(tt,Ve){if(tt.match(/^\]:/,!0)){Ve.f=Ve.inline=Wt,We.highlightFormatting&&(Ve.formatting="link");var _t=Xe(Ve);return Ve.linkText=!1,_t}return tt.match(/^([^\]\\]|\\.)+/,!0),Me.linkText}function Wt(tt,Ve){return tt.eatSpace()?null:(tt.match(/^[^\s]+/,!0),tt.peek()===void 0?Ve.linkTitle=!0:tt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ve.f=Ve.inline=dt,Me.linkHref+" url")}var Dt={startState:function(){return{f:Le,prevLine:{stream:null},thisLine:{stream:null},block:Le,htmlState:null,indentation:0,inline:dt,text:Ye,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(tt){return{f:tt.f,prevLine:tt.prevLine,thisLine:tt.thisLine,block:tt.block,htmlState:tt.htmlState&&le.copyState(ut,tt.htmlState),indentation:tt.indentation,localMode:tt.localMode,localState:tt.localMode?le.copyState(tt.localMode,tt.localState):null,inline:tt.inline,text:tt.text,formatting:!1,linkText:tt.linkText,linkTitle:tt.linkTitle,linkHref:tt.linkHref,code:tt.code,em:tt.em,strong:tt.strong,strikethrough:tt.strikethrough,emoji:tt.emoji,header:tt.header,setext:tt.setext,hr:tt.hr,taskList:tt.taskList,list:tt.list,listStack:tt.listStack.slice(0),quote:tt.quote,indentedCode:tt.indentedCode,trailingSpace:tt.trailingSpace,trailingSpaceNewLine:tt.trailingSpaceNewLine,md_inside:tt.md_inside,fencedEndRE:tt.fencedEndRE}},token:function(tt,Ve){if(Ve.formatting=!1,tt!=Ve.thisLine.stream){if(Ve.header=0,Ve.hr=!1,tt.match(/^\s*$/,!0))return Be(Ve),null;if(Ve.prevLine=Ve.thisLine,Ve.thisLine={stream:tt},Ve.taskList=!1,Ve.trailingSpace=0,Ve.trailingSpaceNewLine=!1,!Ve.localState&&(Ve.f=Ve.block,Ve.f!=ze)){var _t=tt.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ve.indentation=_t,Ve.indentationDiff=null,_t>0)return null}}return Ve.f(tt,Ve)},innerMode:function(tt){return tt.block==ze?{state:tt.htmlState,mode:ut}:tt.localState?{state:tt.localState,mode:tt.localMode}:{state:tt,mode:Dt}},indent:function(tt,Ve,_t){return tt.block==ze&&ut.indent?ut.indent(tt.htmlState,Ve,_t):tt.localState&&tt.localMode.indent?tt.localMode.indent(tt.localState,Ve,_t):le.Pass},blankLine:Be,getType:Xe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Dt},"xml"),le.defineMIME("text/markdown","markdown"),le.defineMIME("text/x-markdown","markdown")})},98101:function(On,pn,pe){(function(le){le(pe(89780))})(function(le){"use strict";le.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 ke=0;ke<le.modeInfo.length;ke++){var We=le.modeInfo[ke];We.mimes&&(We.mime=We.mimes[0])}le.findModeByMIME=function(ut){ut=ut.toLowerCase();for(var Ge=0;Ge<le.modeInfo.length;Ge++){var Ue=le.modeInfo[Ge];if(Ue.mime==ut)return Ue;if(Ue.mimes){for(var Me=0;Me<Ue.mimes.length;Me++)if(Ue.mimes[Me]==ut)return Ue}}if(/\+xml$/.test(ut))return le.findModeByMIME("application/xml");if(/\+json$/.test(ut))return le.findModeByMIME("application/json")},le.findModeByExtension=function(ut){ut=ut.toLowerCase();for(var Ge=0;Ge<le.modeInfo.length;Ge++){var Ue=le.modeInfo[Ge];if(Ue.ext){for(var Me=0;Me<Ue.ext.length;Me++)if(Ue.ext[Me]==ut)return Ue}}},le.findModeByFileName=function(ut){for(var Ge=0;Ge<le.modeInfo.length;Ge++){var Ue=le.modeInfo[Ge];if(Ue.file&&Ue.file.test(ut))return Ue}var Me=ut.lastIndexOf("."),Ct=Me>-1&&ut.substring(Me+1,ut.length);if(Ct)return le.findModeByExtension(Ct)},le.findModeByName=function(ut){ut=ut.toLowerCase();for(var Ge=0;Ge<le.modeInfo.length;Ge++){var Ue=le.modeInfo[Ge];if(Ue.name.toLowerCase()==ut)return Ue;if(Ue.alias){for(var Me=0;Me<Ue.alias.length;Me++)if(Ue.alias[Me].toLowerCase()==ut)return Ue}}}})},67549:function(On,pn,pe){(function(le){le(pe(89780))})(function(le){"use strict";le.defineMode("stex",function(ke,We){"use strict";function ut(Ie,te){Ie.cmdState.push(te)}function Ge(Ie){return Ie.cmdState.length>0?Ie.cmdState[Ie.cmdState.length-1]:null}function Ue(Ie){var te=Ie.cmdState.pop();te&&te.closeBracket()}function Me(Ie){for(var te=Ie.cmdState,ee=te.length-1;ee>=0;ee--){var de=te[ee];if(de.name!="DEFAULT")return de}return{styleIdentifier:function(){return null}}}function Ct(Ie,te,ee){return function(){this.name=Ie,this.bracketNo=0,this.style=te,this.styles=ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var wt={};wt.importmodule=Ct("importmodule","tag",["string","builtin"]),wt.documentclass=Ct("documentclass","tag",["","atom"]),wt.usepackage=Ct("usepackage","tag",["atom"]),wt.begin=Ct("begin","tag",["atom"]),wt.end=Ct("end","tag",["atom"]),wt.label=Ct("label","tag",["atom"]),wt.ref=Ct("ref","tag",["atom"]),wt.eqref=Ct("eqref","tag",["atom"]),wt.cite=Ct("cite","tag",["atom"]),wt.bibitem=Ct("bibitem","tag",["atom"]),wt.Bibitem=Ct("Bibitem","tag",["atom"]),wt.RBibitem=Ct("RBibitem","tag",["atom"]),wt.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function $e(Ie,te){Ie.f=te}function Ft(Ie,te){var ee;if(Ie.match(/^\\[a-zA-Z@]+/)){var de=Ie.current().slice(1);return ee=wt.hasOwnProperty(de)?wt[de]:wt.DEFAULT,ee=new ee,ut(te,ee),$e(te,vt),ee.style}if(Ie.match(/^\\[$&%#{}_]/)||Ie.match(/^\\[,;!\/\\]/))return"tag";if(Ie.match("\\["))return $e(te,function(he,ve){return lt(he,ve,"\\]")}),"keyword";if(Ie.match("\\("))return $e(te,function(he,ve){return lt(he,ve,"\\)")}),"keyword";if(Ie.match("$$"))return $e(te,function(he,ve){return lt(he,ve,"$$")}),"keyword";if(Ie.match("$"))return $e(te,function(he,ve){return lt(he,ve,"$")}),"keyword";var se=Ie.next();if(se=="%")return Ie.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=Ge(te),ee)ee.closeBracket(se),$e(te,vt);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=wt.DEFAULT,ee=new ee,ut(te,ee),"bracket"):/\d/.test(se)?(Ie.eatWhile(/[\w.%]/),"atom"):(Ie.eatWhile(/[\w\-_]/),ee=Me(te),ee.name=="begin"&&(ee.argument=Ie.current()),ee.styleIdentifier())}function lt(Ie,te,ee){if(Ie.eatSpace())return null;if(ee&&Ie.match(ee))return $e(te,Ft),"keyword";if(Ie.match(/^\\[a-zA-Z@]+/))return"tag";if(Ie.match(/^[a-zA-Z]+/))return"variable-2";if(Ie.match(/^\\[$&%#{}_]/)||Ie.match(/^\\[,;!\/]/)||Ie.match(/^[\^_&]/))return"tag";if(Ie.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ie.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var de=Ie.next();return de=="{"||de=="}"||de=="["||de=="]"||de=="("||de==")"?"bracket":de=="%"?(Ie.skipToEnd(),"comment"):"error"}function vt(Ie,te){var ee=Ie.peek(),de;return ee=="{"||ee=="["?(de=Ge(te),de.openBracket(ee),Ie.eat(ee),$e(te,Ft),"bracket"):/[ \t\r]/.test(ee)?(Ie.eat(ee),null):($e(te,Ft),Ue(te),Ft(Ie,te))}return{startState:function(){var Ie=We.inMathMode?function(te,ee){return lt(te,ee)}:Ft;return{cmdState:[],f:Ie}},copyState:function(Ie){return{cmdState:Ie.cmdState.slice(),f:Ie.f}},token:function(Ie,te){return te.f(Ie,te)},blankLine:function(Ie){Ie.f=Ft,Ie.cmdState.length=0},lineComment:"%"}}),le.defineMIME("text/x-stex","stex"),le.defineMIME("text/x-latex","stex")})},15525:function(On,pn,pe){(function(le){le(pe(89780))})(function(le){"use strict";var ke={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},We={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};le.defineMode("xml",function(ut,Ge){var Ue=ut.indentUnit,Me={},Ct=Ge.htmlMode?ke:We;for(var wt in Ct)Me[wt]=Ct[wt];for(var wt in Ge)Me[wt]=Ge[wt];var $e,Ft;function lt(He,Nt){function ot(Ot){return Nt.tokenize=Ot,Ot(He,Nt)}var Tt=He.next();if(Tt=="<")return He.eat("!")?He.eat("[")?He.match("CDATA[")?ot(te("atom","]]>")):null:He.match("--")?ot(te("comment","-->")):He.match("DOCTYPE",!0,!0)?(He.eatWhile(/[\w\._\-]/),ot(ee(1))):null:He.eat("?")?(He.eatWhile(/[\w\._\-]/),Nt.tokenize=te("meta","?>"),"meta"):($e=He.eat("/")?"closeTag":"openTag",Nt.tokenize=vt,"tag bracket");if(Tt=="&"){var xt;return He.eat("#")?He.eat("x")?xt=He.eatWhile(/[a-fA-F\d]/)&&He.eat(";"):xt=He.eatWhile(/[\d]/)&&He.eat(";"):xt=He.eatWhile(/[\w\.\-:]/)&&He.eat(";"),xt?"atom":"error"}else return He.eatWhile(/[^&<]/),null}lt.isInText=!0;function vt(He,Nt){var ot=He.next();if(ot==">"||ot=="/"&&He.eat(">"))return Nt.tokenize=lt,$e=ot==">"?"endTag":"selfcloseTag","tag bracket";if(ot=="=")return $e="equals",null;if(ot=="<"){Nt.tokenize=lt,Nt.state=ve,Nt.tagName=Nt.tagStart=null;var Tt=Nt.tokenize(He,Nt);return Tt?Tt+" tag error":"tag error"}else return/[\'\"]/.test(ot)?(Nt.tokenize=Ie(ot),Nt.stringStartCol=He.column(),Nt.tokenize(He,Nt)):(He.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ie(He){var Nt=function(ot,Tt){for(;!ot.eol();)if(ot.next()==He){Tt.tokenize=vt;break}return"string"};return Nt.isInAttribute=!0,Nt}function te(He,Nt){return function(ot,Tt){for(;!ot.eol();){if(ot.match(Nt)){Tt.tokenize=lt;break}ot.next()}return He}}function ee(He){return function(Nt,ot){for(var Tt;(Tt=Nt.next())!=null;){if(Tt=="<")return ot.tokenize=ee(He+1),ot.tokenize(Nt,ot);if(Tt==">")if(He==1){ot.tokenize=lt;break}else return ot.tokenize=ee(He-1),ot.tokenize(Nt,ot)}return"meta"}}function de(He,Nt,ot){this.prev=He.context,this.tagName=Nt,this.indent=He.indented,this.startOfLine=ot,(Me.doNotIndent.hasOwnProperty(Nt)||He.context&&He.context.noIndent)&&(this.noIndent=!0)}function se(He){He.context&&(He.context=He.context.prev)}function he(He,Nt){for(var ot;;){if(!He.context||(ot=He.context.tagName,!Me.contextGrabbers.hasOwnProperty(ot)||!Me.contextGrabbers[ot].hasOwnProperty(Nt)))return;se(He)}}function ve(He,Nt,ot){return He=="openTag"?(ot.tagStart=Nt.column(),Ee):He=="closeTag"?Be:ve}function Ee(He,Nt,ot){return He=="word"?(ot.tagName=Nt.current(),Ft="tag",je):Me.allowMissingTagName&&He=="endTag"?(Ft="tag bracket",je(He,Nt,ot)):(Ft="error",Ee)}function Be(He,Nt,ot){if(He=="word"){var Tt=Nt.current();return ot.context&&ot.context.tagName!=Tt&&Me.implicitlyClosed.hasOwnProperty(ot.context.tagName)&&se(ot),ot.context&&ot.context.tagName==Tt||Me.matchClosing===!1?(Ft="tag",Le):(Ft="tag error",ze)}else return Me.allowMissingTagName&&He=="endTag"?(Ft="tag bracket",Le(He,Nt,ot)):(Ft="error",ze)}function Le(He,Nt,ot){return He!="endTag"?(Ft="error",Le):(se(ot),ve)}function ze(He,Nt,ot){return Ft="error",Le(He,Nt,ot)}function je(He,Nt,ot){if(He=="word")return Ft="attribute",Xe;if(He=="endTag"||He=="selfcloseTag"){var Tt=ot.tagName,xt=ot.tagStart;return ot.tagName=ot.tagStart=null,He=="selfcloseTag"||Me.autoSelfClosers.hasOwnProperty(Tt)?he(ot,Tt):(he(ot,Tt),ot.context=new de(ot,Tt,xt==ot.indented)),ve}return Ft="error",je}function Xe(He,Nt,ot){return He=="equals"?Ye:(Me.allowMissing||(Ft="error"),je(He,Nt,ot))}function Ye(He,Nt,ot){return He=="string"?dt:He=="word"&&Me.allowUnquoted?(Ft="string",je):(Ft="error",je(He,Nt,ot))}function dt(He,Nt,ot){return He=="string"?dt:je(He,Nt,ot)}return{startState:function(He){var Nt={tokenize:lt,state:ve,indented:He||0,tagName:null,tagStart:null,context:null};return He!=null&&(Nt.baseIndent=He),Nt},token:function(He,Nt){if(!Nt.tagName&&He.sol()&&(Nt.indented=He.indentation()),He.eatSpace())return null;$e=null;var ot=Nt.tokenize(He,Nt);return(ot||$e)&&ot!="comment"&&(Ft=null,Nt.state=Nt.state($e||ot,He,Nt),Ft&&(ot=Ft=="error"?ot+" error":Ft)),ot},indent:function(He,Nt,ot){var Tt=He.context;if(He.tokenize.isInAttribute)return He.tagStart==He.indented?He.stringStartCol+1:He.indented+Ue;if(Tt&&Tt.noIndent)return le.Pass;if(He.tokenize!=vt&&He.tokenize!=lt)return ot?ot.match(/^(\s*)/)[0].length:0;if(He.tagName)return Me.multilineTagIndentPastTag!==!1?He.tagStart+He.tagName.length+2:He.tagStart+Ue*(Me.multilineTagIndentFactor||1);if(Me.alignCDATA&&/<!\[CDATA\[/.test(Nt))return 0;var xt=Nt&&/^<(\/)?([\w_:\.-]*)/.exec(Nt);if(xt&&xt[1])for(;Tt;)if(Tt.tagName==xt[2]){Tt=Tt.prev;break}else if(Me.implicitlyClosed.hasOwnProperty(Tt.tagName))Tt=Tt.prev;else break;else if(xt)for(;Tt;){var Ot=Me.contextGrabbers[Tt.tagName];if(Ot&&Ot.hasOwnProperty(xt[2]))Tt=Tt.prev;else break}for(;Tt&&Tt.prev&&!Tt.startOfLine;)Tt=Tt.prev;return Tt?Tt.indent+Ue:He.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Me.htmlMode?"html":"xml",helperType:Me.htmlMode?"html":"xml",skipAttribute:function(He){He.state==Ye&&(He.state=je)},xmlCurrentTag:function(He){return He.tagName?{name:He.tagName,close:He.type=="closeTag"}:null},xmlCurrentContext:function(He){for(var Nt=[],ot=He.context;ot;ot=ot.prev)ot.tagName&&Nt.push(ot.tagName);return Nt.reverse()}}}),le.defineMIME("text/xml","xml"),le.defineMIME("application/xml","xml"),le.mimeModes.hasOwnProperty("text/html")||le.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(On,pn,pe){"use strict";pe.d(pn,{$u:function(){return wt},BD:function(){return Ze},E9:function(){return Ct},FF:function(){return xi},FJ:function(){return ve},Hn:function(){return he},KX:function(){return Be},NB:function(){return Lt},S0:function(){return St},UL:function(){return $e},Vk:function(){return se},Vm:function(){return ft},YI:function(){return Zn},ZA:function(){return We},Zt:function(){return Ft},al:function(){return xe},bn:function(){return Oe},bx:function(){return be},g2:function(){return ci},h1:function(){return Ye},hD:function(){return bn},l4:function(){return Ue},rU:function(){return Bt},s_:function(){return Pe},uz:function(){return qe},z6:function(){return lt}}),On=pe.hmd(On),function(){var Ne;function Ci(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function wr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Ci(a)}}function Pn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Si=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Wi;if(typeof Object.setPrototypeOf=="function")Wi=Object.setPrototypeOf;else{var qi;e:{var $n={a:!0},qn={};try{qn.__proto__=$n,qi=qn.a;break e}catch(a){}qi=!1}Wi=qi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Zt=Wi;function $t(a,y){if(a.prototype=Si(y.prototype),a.prototype.constructor=a,Zt)Zt(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var Qe=typeof pe.g!="undefined"&&pe.g!=null?pe.g:self,on=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},cn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function At(a,y){if(y){var x=Qe;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&cn(x,a,{writable:!0,value:y})}}At("Object.assign",function(a){return a||on}),At("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x<E;x++)this[x]=y;return this}});var ht=typeof globalThis=="object"&&globalThis||typeof pe.g=="object"&&pe.g.global===pe.g&&pe.g||typeof self=="object"&&self.self===self&&self||{};ht.requestAnimationFrame===void 0&&(ht.setImmediate===void 0?ht.requestAnimationFrame=function(a){ht.setTimeout(a,0)}:ht.requestAnimationFrame=ht.setImmediate);function en(){}function fn(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&ht.clearTimeout(x),x=Rn(function(){x=-1,a.apply(E,b)},y)}}function Rn(a,y){return ht.setTimeout(a,y)}function Qn(a){return ht.document.createElement(a)}function Et(a){throw Error(a)}function wn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Et(a)}function Kn(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),Et(x+" is not in the range "+y+": "+a)}function Ei(a){ht.console&&ht.console.log(a)}function tn(a){return typeof a=="object"&&a!==null}function sn(a){return Array.isArray(a)||ht.NodeList&&a instanceof ht.NodeList||ht.HTMLCollection&&a instanceof ht.HTMLCollection}function In(a){return Array.prototype.slice.call(a)}function Oi(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Et("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Di(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Et("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function vi(){var a=Cr.pop();return a===void 0?[]:a}function Ti(a){a.length=0,Cr.push(a)}function Li(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(tn(a)&&a.constructor)return Li(a.constructor);return typeof a}function sr(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 Zr(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 Vr(a,y,x){Object.defineProperty(jo.prototype,a,{get:y,set:x})}function Tn(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",ne=0;ne<a.length;ne++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var Po=ht.navigator!==void 0&&0<ht.navigator.userAgent.indexOf("Trident/7"),Xr=ht.navigator!==void 0&&ht.navigator.platform!==void 0&&ht.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Cr=[];Object.freeze([]),en.className="Util",en.Dx="32ab5ff3b26f42dc0ed90f21472913b5",en.adym="gojs.net",en.vfo="28e645fdb266",en.className="Util";function Cn(a,y,x){Ao(this),this.j=a,this.xa=y,this.o=x}Cn.prototype.toString=function(){return"EnumValue."+this.xa};function ri(a,y){return y==null||y===""?null:a[y]}Qe.Object.defineProperties(Cn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Cn.className="EnumValue";function Yi(){this.ew=[]}Yi.prototype.toString=function(){return this.ew.join("")},Yi.prototype.add=function(a){a!==""&&this.ew.push(a)},Yi.className="StringBuilder";function yr(){}yr.className="PropertyCollection";var er={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){ht.console&&ht.console.log(a)},HA:function(a,y,x,E){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(ne,re){return function(){throw Error("Property "+ne.Zl[re.Tj]+" of "+ne.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function Fr(){}Fr.prototype.reset=function(){},Fr.prototype.next=function(){return!1},Fr.prototype.Ad=function(){return!1},Fr.prototype.first=function(){return null},Fr.prototype.any=function(){return!1},Fr.prototype.all=function(){return!0},Fr.prototype.each=function(){return this},Fr.prototype.map=function(){return this},Fr.prototype.filter=function(){return this},Fr.prototype.de=function(){},Fr.prototype.toString=function(){return"EmptyIterator"},Qe.Object.defineProperties(Fr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Fr.prototype.first=Fr.prototype.first,Fr.prototype.hasNext=Fr.prototype.Ad,Fr.prototype.next=Fr.prototype.next,Fr.prototype.reset=Fr.prototype.reset;var Ur=null;Fr.className="EmptyIterator",Ur=new Fr;function zr(a){this.key=-1,this.value=a}zr.prototype.reset=function(){this.key=-1},zr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},zr.prototype.Ad=function(){return this.next()},zr.prototype.first=function(){return this.key=0,this.value},zr.prototype.any=function(a){return this.key=-1,a(this.value)},zr.prototype.all=function(a){return this.key=-1,a(this.value)},zr.prototype.each=function(a){return this.key=-1,a(this.value),this},zr.prototype.map=function(a){return new zr(a(this.value))},zr.prototype.filter=function(a){return a(this.value)?new zr(this.value):Ur},zr.prototype.de=function(){this.value=null},zr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Qe.Object.defineProperties(zr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),zr.prototype.first=zr.prototype.first,zr.prototype.hasNext=zr.prototype.Ad,zr.prototype.next=zr.prototype.next,zr.prototype.reset=zr.prototype.reset,zr.className="SingletonIterator";function Tr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Tr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Tr.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},Tr.prototype.Ad=function(){return this.next()},Tr.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},Tr.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},Tr.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},Tr.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},Tr.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var ne=y[z];(b===null||b(ne))&&x.push(a(ne))}return a=new Un,a.s=x,a.xb(),a.iterator},Tr.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var ne=y[z];(b===null||b(ne))&&a(ne)&&x.push(ne)}return a=new Un,a.s=x,a.xb(),a.iterator},Tr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Tr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Qe.Object.defineProperties(Tr.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),Tr.prototype.first=Tr.prototype.first,Tr.prototype.hasNext=Tr.prototype.Ad,Tr.prototype.next=Tr.prototype.next,Tr.prototype.reset=Tr.prototype.reset,Tr.className="ListIterator";function Yr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Yr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Yr.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)},Yr.prototype.Ad=function(){return this.next()},Yr.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},Yr.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},Yr.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},Yr.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},Yr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new Un,a.s=x,a.xb(),a.iterator},Yr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new Un,a.s=x,a.xb(),a.iterator},Yr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Yr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Qe.Object.defineProperties(Yr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),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="ListIteratorBackwards";function Un(a){Ao(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Et("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ne=Un.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()#"+nr(this)},Ne.add=function(a){return a===null?this:(this._isFrozen&&wn(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&&wn(this);var y=this.s;if(sn(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Ne.clear=function(){this._isFrozen&&wn(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)&&Kn(a,"0 <= i < length",Un,"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)&&Kn(a,"0 <= i < length",Un,"setElt:i"),this._isFrozen&&wn(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&&wn(this);var a=this.s;return 0<a.length?a.pop():null},Un.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},Un.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},Un.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},Un.prototype.map=function(a){for(var y=new Un,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},Un.prototype.filter=function(a){for(var y=new Un,x=[],E=this.s,b=E.length,z=0;z<b;z++){var ne=E[z];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},Ne=Un.prototype,Ne.Gb=function(a,y){0>a&&Kn(a,">= 0",Un,"insertAt:i"),this._isFrozen&&wn(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&&wn(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)&&Kn(a,"0 <= i < length",Un,"removeAt:i"),this._isFrozen&&wn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Ne.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&wn(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},Un.prototype.copy=function(){var a=new Un,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Ne=Un.prototype,Ne.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Ne.Iv=function(){for(var a=new Yn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Ne.sort=function(a){return this._isFrozen&&wn(this),this.s.sort(a),this.xb(),this},Ne.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&wn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Kn(y,"0 <= from < length",Un,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Ne.reverse=function(){return this._isFrozen&&wn(this),this.s.reverse(),this.xb(),this},Qe.Object.defineProperties(Un.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 Ur;var a=this.Sa;return a!==null?(a.reset(),a):new Tr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Ur;var a=this.Hg;return a!==null?(a.reset(),a):new Yr(this)}}}),Un.prototype.reverse=Un.prototype.reverse,Un.prototype.sortRange=Un.prototype.zi,Un.prototype.sort=Un.prototype.sort,Un.prototype.toSet=Un.prototype.Iv,Un.prototype.toArray=Un.prototype.Fa,Un.prototype.removeRange=Un.prototype.removeRange,Un.prototype.removeAt=Un.prototype.mb,Un.prototype.delete=Un.prototype.delete,Un.prototype.remove=Un.prototype.remove,Un.prototype.insertAt=Un.prototype.Gb,Un.prototype.pop=Un.prototype.pop,Un.prototype.last=Un.prototype.jc,Un.prototype.first=Un.prototype.first,Un.prototype.set=Un.prototype.set,Un.prototype.setElt=Un.prototype.cd,Un.prototype.get=Un.prototype.get,Un.prototype.elt=Un.prototype.M,Un.prototype.indexOf=Un.prototype.indexOf,Un.prototype.has=Un.prototype.has,Un.prototype.contains=Un.prototype.contains,Un.prototype.clear=Un.prototype.clear,Un.prototype.addAll=Un.prototype.addAll,Un.prototype.push=Un.prototype.push,Un.prototype.add=Un.prototype.add,Un.prototype.thaw=Un.prototype.ka,Un.prototype.freeze=Un.prototype.freeze,Un.className="List";function Ho(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ho.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Ho.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)},Ho.prototype.Ad=function(){return this.next()},Ho.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},Ho.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},Ho.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},Ho.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},Ho.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Un;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ho.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Un;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Ho.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Ho.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Qe.Object.defineProperties(Ho.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Ho.prototype.first=Ho.prototype.first,Ho.prototype.hasNext=Ho.prototype.Ad,Ho.prototype.next=Ho.prototype.next,Ho.prototype.reset=Ho.prototype.reset,Ho.className="SetIterator";function Yn(a){Ao(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Et("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ne=Yn.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()#"+nr(this)},Ne.add=function(a){if(a===null)return this;this._isFrozen&&wn(this,a);var y=a;return tn(a)&&(y=Qo(a)),this.Tb[y]===void 0&&(this.Sb++,a=new mo(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&&wn(this),sn(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=nr(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},Yn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Yn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Yn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Yn.prototype.map=function(a){for(var y=new Yn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Yn.prototype.filter=function(a){for(var y=new Yn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Ne=Yn.prototype,Ne.remove=function(a){if(a===null)return!1;this._isFrozen&&wn(this,a);var y=a;if(tn(a)&&(y=nr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Ne.delete=function(a){return this.remove(a)},Ne.hp=function(a){if(a===null)return this;if(this._isFrozen&&wn(this),sn(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&&wn(this);var y=new Yn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Ne.clear=function(){this._isFrozen&&wn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Yn.prototype.copy=function(){var a=new Yn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Yn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},Yn.prototype.Hv=function(){var a=new Un,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Ao(a){a.__gohashid=qo++}function Qo(a){var y=a.__gohashid;return y===void 0&&(y=qo++,a.__gohashid=y),y}function nr(a){return a.__gohashid}Qe.Object.defineProperties(Yn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Ur;var a=this.Sa;return a!==null?(a.reset(),a):new Ho(this)}}}),Yn.prototype.toList=Yn.prototype.Hv,Yn.prototype.toArray=Yn.prototype.Fa,Yn.prototype.clear=Yn.prototype.clear,Yn.prototype.retainAll=Yn.prototype.pA,Yn.prototype.removeAll=Yn.prototype.hp,Yn.prototype.delete=Yn.prototype.delete,Yn.prototype.remove=Yn.prototype.remove,Yn.prototype.first=Yn.prototype.first,Yn.prototype.containsAny=Yn.prototype.Ty,Yn.prototype.containsAll=Yn.prototype.Sy,Yn.prototype.has=Yn.prototype.has,Yn.prototype.contains=Yn.prototype.contains,Yn.prototype.addAll=Yn.prototype.addAll,Yn.prototype.add=Yn.prototype.add,Yn.prototype.thaw=Yn.prototype.ka,Yn.prototype.freeze=Yn.prototype.freeze;var qo=1;Yn.className="Set",Yn.uniqueHash=Ao,Yn.hashIdUnique=Qo,Yn.hashId=nr;function Go(a){this.ma=a,this.qa=a.Ja,this.sa=null}Go.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Go.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)},Go.prototype.Ad=function(){return this.next()},Go.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},Go.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},Go.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},Go.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},Go.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Un;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Go.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Un;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},Go.prototype.de=function(){this.value=this.key=null,this.qa=-1},Go.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Qe.Object.defineProperties(Go.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Go.prototype.first=Go.prototype.first,Go.prototype.hasNext=Go.prototype.Ad,Go.prototype.next=Go.prototype.next,Go.prototype.reset=Go.prototype.reset,Go.className="MapKeySetIterator";function Lr(a){Yn.call(this),Ao(this),this._isFrozen=!0,this.ma=a}$t(Lr,Yn),Ne=Lr.prototype,Ne.freeze=function(){return this},Ne.ka=function(){return this},Ne.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Ne.add=function(){Et("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(){Et("This Set is read-only: "+this.toString())},Ne.delete=function(a){return this.remove(a)},Ne.clear=function(){Et("This Set is read-only: "+this.toString())},Ne.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Lr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Lr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Lr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Lr.prototype.map=function(a){for(var y=new Yn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Lr.prototype.filter=function(a){for(var y=new Yn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Lr.prototype.copy=function(){return new Lr(this.ma)},Lr.prototype.Iv=function(){var a=new Yn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Lr.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},Lr.prototype.Hv=function(){var a=new Un,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Qe.Object.defineProperties(Lr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Ur:new Go(this.ma)}}}),Lr.prototype.toList=Lr.prototype.Hv,Lr.prototype.toArray=Lr.prototype.Fa,Lr.prototype.toSet=Lr.prototype.Iv,Lr.prototype.first=Lr.prototype.first,Lr.prototype.clear=Lr.prototype.clear,Lr.prototype.delete=Lr.prototype.delete,Lr.prototype.remove=Lr.prototype.remove,Lr.prototype.has=Lr.prototype.has,Lr.prototype.contains=Lr.prototype.contains,Lr.prototype.add=Lr.prototype.add,Lr.prototype.thaw=Lr.prototype.ka,Lr.prototype.freeze=Lr.prototype.freeze,Lr.className="MapKeySet";function br(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}br.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},br.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)},br.prototype.Ad=function(){return this.next()},br.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},br.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},br.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},br.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},br.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Un;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},br.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Un;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},br.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},br.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Qe.Object.defineProperties(br.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),br.prototype.first=br.prototype.first,br.prototype.hasNext=br.prototype.Ad,br.prototype.next=br.prototype.next,br.prototype.reset=br.prototype.reset,br.className="MapValueSetIterator";function mo(a,y){this.key=a,this.value=y,this.ll=this.va=null}mo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},mo.className="KeyValuePair";function Yo(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Yo.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Yo.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)},Yo.prototype.Ad=function(){return this.next()},Yo.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},Yo.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},Yo.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},Yo.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},Yo.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Un;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Yo.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Un;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Yo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Yo.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Qe.Object.defineProperties(Yo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Yo.prototype.first=Yo.prototype.first,Yo.prototype.hasNext=Yo.prototype.Ad,Yo.prototype.next=Yo.prototype.next,Yo.prototype.reset=Yo.prototype.reset,Yo.className="MapIterator";function Ki(a){Ao(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"&&Et("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ne=Ki.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()#"+nr(this)},Ne.add=function(a,y){this._isFrozen&&wn(this,a);var x=a;tn(a)&&(x=Qo(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new mo(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Ne.set=function(a,y){return this.add(a,y)},Ne.addAll=function(a){if(a===null)return this;if(sn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof Ki)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},Ki.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Ki.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Ki.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Ki.prototype.map=function(a){for(var y=new Ki,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Ki.prototype.filter=function(a){for(var y=new Ki,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Ne=Ki.prototype,Ne.contains=function(a){var y=a;return tn(a)&&(y=nr(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=nr(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&&wn(this,a);var y=a;if(tn(a)&&(y=nr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Ne.delete=function(a){return this.remove(a)},Ne.clear=function(){this._isFrozen&&wn(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()},Ki.prototype.copy=function(){var a=new Ki,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},Ki.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new mo(b.key,b.value),x++}return y},Ki.prototype.Lf=function(){return new Lr(this)},Qe.Object.defineProperties(Ki.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Ur;var a=this.Sa;return a!==null?(a.reset(),a):new Yo(this)}},iteratorKeys:{get:function(){return 0>=this.count?Ur:new Go(this)}},iteratorValues:{get:function(){if(0>=this.count)return Ur;var a=this.jf;return a!==null?(a.reset(),a):new br(this)}}}),Ki.prototype.toKeySet=Ki.prototype.Lf,Ki.prototype.toArray=Ki.prototype.Fa,Ki.prototype.clear=Ki.prototype.clear,Ki.prototype.delete=Ki.prototype.delete,Ki.prototype.remove=Ki.prototype.remove,Ki.prototype.get=Ki.prototype.get,Ki.prototype.getValue=Ki.prototype.I,Ki.prototype.has=Ki.prototype.has,Ki.prototype.contains=Ki.prototype.contains,Ki.prototype.first=Ki.prototype.first,Ki.prototype.addAll=Ki.prototype.addAll,Ki.prototype.set=Ki.prototype.set,Ki.prototype.add=Ki.prototype.add,Ki.prototype.thaw=Ki.prototype.ka,Ki.prototype.freeze=Ki.prototype.freeze,Ki.className="Map";function st(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Et("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var sa,va,Ma,hs,Ga;st.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},st.prototype.h=function(a,y){return this.x=a,this.y=y,this},st.prototype.sg=function(a,y){return this.x=a,this.y=y,this},st.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},st.prototype.copy=function(){var a=new st;return a.x=this.x,a.y=this.y,a},Ne=st.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)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this};function Lo(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new st(x,b)}return new st}function po(a){return a.x.toString()+" "+a.y.toString()}Ne.toString=function(){return"Point("+this.x+","+this.y+")"},Ne.D=function(a){return a instanceof st?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 nt.B(this.x,a.x)&&nt.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},st.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Ne=st.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 la(a.x-this.x,a.y-this.y)},Ne.direction=function(a,y){return la(a-this.x,y-this.y)};function la(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 nt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Ne.fA=function(a,y,x,E){return nt.qh(a,y,x,E,this.x,this.y,this),this},Ne.gA=function(a,y){return nt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Ne.uA=function(a,y,x,E){return nt.No(this.x,this.y,a,y,x,E,this),this},Ne.vA=function(a,y){return nt.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,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Ne.transform=function(a){return a.Ga(this),this};function Eo(a,y){return y.Cd(a),a}function Na(a,y,x,E,b,z){var ne=b-x,re=z-E,oe=ne*ne+re*re;x-=a,E-=y;var ue=-x*ne-E*re;return 0>=ue||ue>=oe?(ne=b-a,re=z-y,Math.min(x*x+E*E,ne*ne+re*re)):(a=ne*E-re*x,a*a/oe)}function os(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function xo(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Ne.w=function(){return isFinite(this.x)&&isFinite(this.y)},st.alloc=function(){var a=Qr.pop();return a===void 0?new st:a},st.allocAt=function(a,y){var x=Qr.pop();return x===void 0?new st(a,y):(x.x=a,x.y=y,x)},st.free=function(a){Qr.push(a)},st.prototype.isReal=st.prototype.w,st.prototype.setSpot=st.prototype.yi,st.prototype.setRectSpot=st.prototype.xi,st.prototype.snapToGridPoint=st.prototype.vA,st.prototype.snapToGrid=st.prototype.uA,st.prototype.projectOntoLineSegmentPoint=st.prototype.gA,st.prototype.projectOntoLineSegment=st.prototype.fA,st.intersectingLineSegments=function(a,y,x,E,b,z,ne,re){return nt.Rl(a,y,x,E,b,z,ne,re)},st.prototype.compareWithLineSegmentPoint=st.prototype.Ry,st.compareWithLineSegment=function(a,y,x,E,b,z){return nt.Fl(a,y,x,E,b,z)},st.prototype.direction=st.prototype.direction,st.prototype.directionPoint=st.prototype.ab,st.prototype.normalize=st.prototype.normalize,st.prototype.distanceSquared=st.prototype.zd,st.prototype.distanceSquaredPoint=st.prototype.Bf,st.prototype.scale=st.prototype.scale,st.prototype.rotate=st.prototype.rotate,st.prototype.offset=st.prototype.offset,st.prototype.subtract=st.prototype.re,st.prototype.add=st.prototype.add,st.prototype.equalsApprox=st.prototype.Xa,st.prototype.equalTo=st.prototype.hi,st.prototype.equals=st.prototype.D,st.prototype.set=st.prototype.set,st.prototype.setTo=st.prototype.sg;var Qr=[];st.className="Point",st.parse=Lo,st.stringify=po,st.distanceLineSegmentSquared=Na,st.distanceSquared=os,st.direction=xo,st.Origin=sa=new st(0,0).ja(),st.InfiniteTopLeft=va=new st(-1/0,-1/0).ja(),st.InfiniteBottomRight=Ma=new st(1/0,1/0).ja(),st.SixPoint=hs=new st(6,6).ja(),st.NoPoint=Ga=new st(NaN,NaN).ja(),st.parse=Lo,st.stringify=po,st.distanceLineSegmentSquared=Na,st.distanceSquared=os,st.direction=xo;function pi(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):Et("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var io,ro,Ja,Ca,fa,$a,Qa;pi.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},pi.prototype.h=function(a,y){return this.width=a,this.height=y,this},pi.prototype.sg=function(a,y){return this.width=a,this.height=y,this},pi.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},pi.prototype.copy=function(){var a=new pi;return a.width=this.width,a.height=this.height,a},Ne=pi.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)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this};function Es(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new pi(x,b)}return new pi}function ys(a){return a.width.toString()+" "+a.height.toString()}Ne.toString=function(){return"Size("+this.width+","+this.height+")"},Ne.D=function(a){return a instanceof pi?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 nt.B(this.width,a.width)&&nt.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)},pi.alloc=function(){var a=Zs.pop();return a===void 0?new pi:a},pi.free=function(a){Zs.push(a)},pi.prototype.isReal=pi.prototype.w,pi.prototype.inflate=pi.prototype.Bc,pi.prototype.equalsApprox=pi.prototype.Xa,pi.prototype.equalTo=pi.prototype.hi,pi.prototype.equals=pi.prototype.D,pi.prototype.set=pi.prototype.set,pi.prototype.setTo=pi.prototype.sg;var Zs=[];pi.className="Size",pi.parse=Es,pi.stringify=ys,pi.ZeroSize=io=new pi(0,0).ja(),pi.OneSize=ro=new pi(1,1).ja(),pi.SixSize=Ja=new pi(6,6).ja(),pi.EightSize=Ca=new pi(8,8).ja(),pi.TenSize=fa=new pi(10,10).ja(),pi.InfiniteSize=$a=new pi(1/0,1/0).ja(),pi.NoSize=Qa=new pi(NaN,NaN).ja(),pi.parse=Es,pi.stringify=ys;function Mn(a,y,x,E){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof st?(x=a.x,a=a.y,y instanceof st?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof pi?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Et("Incorrect second argument supplied to Rect constructor "+y)):Et("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Ne=Mn.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,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Ss(a,y,x){a.width=y,a.height=x}Ne.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,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},Mn.prototype.copy=function(){var a=new Mn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Ne=Mn.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)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this};function ra(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var ne=0;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),new Mn(x,b,z,ne)}return new Mn}function hl(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 Mn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Ne.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Ne.Xa=function(a){return nt.B(this.x,a.x)&&nt.B(this.y,a.y)&&nt.B(this.width,a.width)&&nt.B(this.height,a.height)};function Ol(a,y){return nt.$(a.x,y.x)&&nt.$(a.y,y.y)&&nt.$(a.width,y.width)&&nt.$(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,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Ne.offset=function(a,y){return this.x+=a,this.y+=y,this},Ne.Bc=function(a,y){return ns(this,y,a,y,a)},Ne.Co=function(a){return ns(this,a.top,a.right,a.bottom,a.left)},Ne.Fv=function(a){return ns(this,-a.top,-a.right,-a.bottom,-a.left)},Ne.Hz=function(a,y,x,E){return ns(this,a,y,x,E)};function ns(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Ne.Ex=function(a){return yu(this,a.x,a.y,a.width,a.height)},Ne.Uu=function(a,y,x,E){return yu(this,a,y,x,E)};function yu(a,y,x,E,b){var z=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=ne,a.width=Math.max(0,y-z),a.height=Math.max(0,x-ne),a}Ne.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Ne.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function eu(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Ne.Ye=function(a){return ps(this,a.x,a.y,0,0)},Ne.ed=function(a){return ps(this,a.x,a.y,a.width,a.height)},Ne.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),ps(this,a,y,x,E)};function ps(a,y,x,E,b){var z=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=ne,a.width=y-z,a.height=x-ne,a}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 Ba(a,y,x,E,b,z,ne,re){return ne===void 0&&(ne=0),re===void 0&&(re=0),a<=b&&b+ne<=a+x&&y<=z&&z+re<=y+E}function tu(a,y,x,E,b,z,ne,re){return a>ne+b||b>x+a?!1:!(y>re+z||z>E+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},Mn.alloc=function(){var a=ca.pop();return a===void 0?new Mn:a},Mn.allocAt=function(a,y,x,E){var b=ca.pop();return b===void 0?new Mn(a,y,x,E):b.h(a,y,x,E)},Mn.free=function(a){ca.push(a)},Qe.Object.defineProperties(Mn.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 st(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new pi(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new st(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}}}),Mn.prototype.isEmpty=Mn.prototype.Mz,Mn.prototype.isReal=Mn.prototype.w,Mn.intersectsLineSegment=function(a,y,x,E,b,z,ne,re){return nt.Fx(a,y,x,E,b,z,ne,re)},Mn.prototype.setSpot=Mn.prototype.yi,Mn.prototype.union=Mn.prototype.Kv,Mn.prototype.unionRect=Mn.prototype.ed,Mn.prototype.unionPoint=Mn.prototype.Ye,Mn.prototype.intersects=Mn.prototype.Vu,Mn.prototype.intersectsRect=Mn.prototype.Yc,Mn.prototype.intersect=Mn.prototype.Uu,Mn.prototype.intersectRect=Mn.prototype.Ex,Mn.prototype.grow=Mn.prototype.Hz,Mn.prototype.subtractMargin=Mn.prototype.Fv,Mn.prototype.addMargin=Mn.prototype.Co,Mn.prototype.inflate=Mn.prototype.Bc,Mn.prototype.offset=Mn.prototype.offset,Mn.prototype.contains=Mn.prototype.contains,Mn.prototype.containsRect=Mn.prototype.Re,Mn.prototype.containsPoint=Mn.prototype.ca,Mn.prototype.equalsApprox=Mn.prototype.Xa,Mn.prototype.equalTo=Mn.prototype.hi,Mn.prototype.equals=Mn.prototype.D,Mn.prototype.setSize=Mn.prototype.tA,Mn.prototype.setPoint=Mn.prototype.dd,Mn.prototype.set=Mn.prototype.set,Mn.prototype.setTo=Mn.prototype.sg;var Do=null,Ea=null,ca=[];Mn.className="Rect",Mn.parse=ra,Mn.stringify=hl,Mn.contains=Ba,Mn.intersects=tu,Mn.ZeroRect=Do=new Mn(0,0,0,0).ja(),Mn.NoRect=Ea=new Mn(NaN,NaN,NaN,NaN).ja(),Mn.parse=ra,Mn.stringify=hl,Mn.contains=Ba,Mn.intersects=tu;function hr(a,y,x,E){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):Et("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}hr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},hr.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},hr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},hr.prototype.copy=function(){var a=new hr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Ne=hr.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)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this};function Rs(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new hr;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new hr(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new hr(x,b);for(var ne=NaN;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),isNaN(ne)?new hr(x,b):new hr(x,b,z,ne)}return new hr}function ls(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 hr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Ne.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Ne.Xa=function(a){return nt.B(this.top,a.top)&&nt.B(this.right,a.right)&&nt.B(this.bottom,a.bottom)&&nt.B(this.left,a.left)},Ne.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},hr.alloc=function(){var a=ou.pop();return a===void 0?new hr:a},hr.free=function(a){ou.push(a)},hr.prototype.isReal=hr.prototype.w,hr.prototype.equalsApprox=hr.prototype.Xa,hr.prototype.equalTo=hr.prototype.hi,hr.prototype.equals=hr.prototype.D,hr.prototype.set=hr.prototype.set,hr.prototype.setTo=hr.prototype.sg;var sl=null,jl=null,ou=[];hr.className="Margin",hr.parse=Rs,hr.stringify=ls,hr.ZeroMargin=sl=new hr(0,0,0,0).ja(),hr.TwoMargin=jl=new hr(2,2,2,2).ja(),hr.parse=Rs,hr.stringify=ls;function Ji(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var Cs,Us,$l,Tl,Kl,Oo,ic,zl,En,Nn,ai,Qi,Gi,ki,_i,oi,Mi,cr,Hr,ga,$o,Ua,Ka,No,qr,Fi,eo,Ko,ma,ya,bo,oa,Io,Dr,Da,Ha;Ji.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ji.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Ji.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ji.prototype.copy=function(){var a=new Ji;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Ne=Ji.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)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this};function La(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function fl(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Cs;if(a==="TopLeft")return Us;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return $l;if(a==="TopRight")return Tl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Kl;if(a==="Center")return Oo;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return ic;if(a==="BottomLeft")return zl;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return En;if(a==="BottomRight")return Nn;if(a==="TopSide")return ai;if(a==="LeftSide")return Qi;if(a==="RightSide")return Gi;if(a==="BottomSide")return ki;if(a==="TopBottomSides")return _i;if(a==="LeftRightSides")return oi;if(a==="TopLeftSides")return Mi;if(a==="TopRightSides")return cr;if(a==="BottomLeftSides")return Hr;if(a==="BottomRightSides")return ga;if(a==="NotTopSide")return $o;if(a==="NotLeftSide")return Ua;if(a==="NotRightSide")return Ka;if(a==="NotBottomSide")return No;if(a==="AllSides")return qr;if(a==="Default")return Fi;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var ne=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(ne=parseFloat(E)),new Ji(x,b,z,ne)}return new Ji}function xu(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(Cs)?"None":this.D(Us)?"TopLeft":this.D($l)?"Top":this.D(Tl)?"TopRight":this.D(Kl)?"Left":this.D(Oo)?"Center":this.D(ic)?"Right":this.D(zl)?"BottomLeft":this.D(En)?"Bottom":this.D(Nn)?"BottomRight":this.D(ai)?"TopSide":this.D(Qi)?"LeftSide":this.D(Gi)?"RightSide":this.D(ki)?"BottomSide":this.D(_i)?"TopBottomSides":this.D(oi)?"LeftRightSides":this.D(Mi)?"TopLeftSides":this.D(cr)?"TopRightSides":this.D(Hr)?"BottomLeftSides":this.D(ga)?"BottomRightSides":this.D($o)?"NotTopSide":this.D(Ua)?"NotLeftSide":this.D(Ka)?"NotRightSide":this.D(No)?"NotBottomSide":this.D(qr)?"AllSides":this.D(Fi)?"Default":"None"},Ne.D=function(a){return a instanceof Ji?(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 Ji(.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(eo))a=Qi;else if(a.D(Ko))a=Gi;else if(a.D(ma))a=ai;else if(a.D(ya))a=ki;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},Ji.alloc=function(){var a=Jt.pop();return a===void 0?new Ji:a},Ji.free=function(a){Jt.push(a)},Ji.prototype.isDefault=Ji.prototype.Xb,Ji.prototype.isNone=Ji.prototype.ys,Ji.prototype.isSide=Ji.prototype.$c,Ji.prototype.isNoSpot=Ji.prototype.Mc,Ji.prototype.isSpot=Ji.prototype.sb,Ji.prototype.includesSide=Ji.prototype.Hf,Ji.prototype.opposite=Ji.prototype.gv,Ji.prototype.equals=Ji.prototype.D,Ji.prototype.set=Ji.prototype.set,Ji.prototype.setTo=Ji.prototype.sg;var Jt=[];Ji.className="Spot",Ji.parse=fl,Ji.stringify=xu,Ji.None=Cs=La(new Ji(0,0,0,0),0).ja(),Ji.Default=Fi=La(new Ji(0,0,-1,0),-1).ja(),Ji.TopLeft=Us=new Ji(0,0,0,0).ja(),Ji.TopCenter=$l=new Ji(.5,0,0,0).ja(),Ji.TopRight=Tl=new Ji(1,0,0,0).ja(),Ji.LeftCenter=Kl=new Ji(0,.5,0,0).ja(),Ji.Center=Oo=new Ji(.5,.5,0,0).ja(),Ji.RightCenter=ic=new Ji(1,.5,0,0).ja(),Ji.BottomLeft=zl=new Ji(0,1,0,0).ja(),Ji.BottomCenter=En=new Ji(.5,1,0,0).ja(),Ji.BottomRight=Nn=new Ji(1,1,0,0).ja(),Ji.MiddleTop=bo=$l,Ji.MiddleLeft=oa=Kl,Ji.MiddleRight=Io=ic,Ji.MiddleBottom=Dr=En,Ji.Top=ma=$l,Ji.Left=eo=Kl,Ji.Right=Ko=ic,Ji.Bottom=ya=En,Ji.TopSide=ai=La(new Ji(0,0,1,1),1).ja(),Ji.LeftSide=Qi=La(new Ji(0,0,1,2),1).ja(),Ji.RightSide=Gi=La(new Ji(0,0,1,4),1).ja(),Ji.BottomSide=ki=La(new Ji(0,0,1,8),1).ja(),Ji.TopBottomSides=_i=La(new Ji(0,0,1,9),1).ja(),Ji.LeftRightSides=oi=La(new Ji(0,0,1,6),1).ja(),Ji.TopLeftSides=Mi=La(new Ji(0,0,1,3),1).ja(),Ji.TopRightSides=cr=La(new Ji(0,0,1,5),1).ja(),Ji.BottomLeftSides=Hr=La(new Ji(0,0,1,10),1).ja(),Ji.BottomRightSides=ga=La(new Ji(0,0,1,12),1).ja(),Ji.NotTopSide=$o=La(new Ji(0,0,1,14),1).ja(),Ji.NotLeftSide=Ua=La(new Ji(0,0,1,13),1).ja(),Ji.NotRightSide=Ka=La(new Ji(0,0,1,11),1).ja(),Ji.NotBottomSide=No=La(new Ji(0,0,1,7),1).ja(),Ji.AllSides=qr=La(new Ji(0,0,1,15),1).ja(),Da=new Ji(.156,.156).ja(),Ha=new Ji(.844,.844).ja(),Ji.parse=fl,Ji.stringify=xu;function Yt(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Yt.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},Yt.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Yt.prototype.copy=function(){var a=new Yt;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},Yt.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Yt.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},Yt.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Yt.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Yt.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Yt.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Yt.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Yt.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,ne=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=ne,this.translate(-y,-x),this},Ne=Yt.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,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ne.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ne.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,ne=this.m12,re=this.m21,oe=this.m22,ue=this.dx,ce=this.dy,me=y*z+x*re+ue,we=y*ne+x*oe+ce,Fe=E*z+x*re+ue,De=E*ne+x*oe+ce;return x=y*z+b*re+ue,y=y*ne+b*oe+ce,z=E*z+b*re+ue,E=E*ne+b*oe+ce,b=Math.min(me,Fe),me=Math.max(me,Fe),Fe=Math.min(we,De),we=Math.max(we,De),b=Math.min(b,x),me=Math.max(me,x),Fe=Math.min(Fe,y),we=Math.max(we,y),b=Math.min(b,z),me=Math.max(me,z),Fe=Math.min(Fe,E),we=Math.max(we,E),a.h(b,Fe,me-b,we-Fe),a},Yt.alloc=function(){var a=Dn.pop();return a===void 0?new Yt:a},Yt.free=function(a){Dn.push(a)},Yt.prototype.transformRect=Yt.prototype.pp,Yt.prototype.transformPoint=Yt.prototype.Ga,Yt.prototype.scale=Yt.prototype.scale,Yt.prototype.translate=Yt.prototype.translate,Yt.prototype.rotate=Yt.prototype.rotate,Yt.prototype.invert=Yt.prototype.Vj,Yt.prototype.multiplyInverted=Yt.prototype.bv,Yt.prototype.multiply=Yt.prototype.multiply,Yt.prototype.reset=Yt.prototype.reset,Yt.prototype.isIdentity=Yt.prototype.ws,Yt.prototype.equals=Yt.prototype.D,Yt.prototype.setTransform=Yt.prototype.setTransform,Yt.prototype.set=Yt.prototype.set;var Dn=[];Yt.className="Transform",Yt.xF="54a702f3e53909c447824c6706603faf4c";var nt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=nt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);nt.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,ne){if(0>=b&&(b=1e-6),a<x)var re=a,oe=x;else re=x,oe=a;if(y<E)var ue=y,ce=E;else ue=E,ce=y;if(a===x)return ue<=ne&&ne<=ce&&a-b<=z&&z<=a+b;if(y===E)return re<=z&&z<=oe&&y-b<=ne&&ne<=y+b;if(oe+=b,re-=b,re<=z&&z<=oe&&(ce+=b,ue-=b,ue<=ne&&ne<=ce))if(oe-re>ce-ue)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=ne&&ne<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(ne=(x-a)/(E-y)*(ne-y)+a,ne-b<=z&&z<=ne+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,ne,re,oe,ue,ce,me){if(nt.Yb(a,y,ne,re,me,x,E)&&nt.Yb(a,y,ne,re,me,b,z))return nt.Yb(a,y,ne,re,me,ue,ce);var we=(a+x)/2,Fe=(y+E)/2,De=(x+b)/2,_e=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(we+De)/2,x=(Fe+_e)/2,De=(De+b)/2,_e=(_e+z)/2;var pt=(E+De)/2,it=(x+_e)/2;return nt.cs(a,y,we,Fe,E,x,pt,it,oe,ue,ce,me)||nt.cs(pt,it,De,_e,b,z,ne,re,oe,ue,ce,me)},ax:function(a,y,x,E,b,z,ne,re,oe){var ue=(x+b)/2,ce=(E+z)/2;return oe.h((((a+x)/2+ue)/2+(ue+(b+ne)/2)/2)/2,(((y+E)/2+ce)/2+(ce+(z+re)/2)/2)/2),oe},My:function(a,y,x,E,b,z,ne,re){var oe=(x+b)/2,ue=(E+z)/2;return xo(((a+x)/2+oe)/2,((y+E)/2+ue)/2,(oe+(b+ne)/2)/2,(ue+(z+re)/2)/2)},Dl:function(a,y,x,E,b,z,ne,re,oe,ue){if(nt.Yb(a,y,ne,re,oe,x,E)&&nt.Yb(a,y,ne,re,oe,b,z))ps(ue,a,y,0,0),ps(ue,ne,re,0,0);else{var ce=(a+x)/2,me=(y+E)/2,we=(x+b)/2,Fe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ce+we)/2,x=(me+Fe)/2,we=(we+b)/2,Fe=(Fe+z)/2;var De=(E+we)/2,_e=(x+Fe)/2;nt.Dl(a,y,ce,me,E,x,De,_e,oe,ue),nt.Dl(De,_e,we,Fe,b,z,ne,re,oe,ue)}return ue},Qe:function(a,y,x,E,b,z,ne,re,oe,ue){if(nt.Yb(a,y,ne,re,oe,x,E)&&nt.Yb(a,y,ne,re,oe,b,z))ue.length===0&&(ue.push(a),ue.push(y)),ue.push(ne),ue.push(re);else{var ce=(a+x)/2,me=(y+E)/2,we=(x+b)/2,Fe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ce+we)/2,x=(me+Fe)/2,we=(we+b)/2,Fe=(Fe+z)/2;var De=(E+we)/2,_e=(x+Fe)/2;nt.Qe(a,y,ce,me,E,x,De,_e,oe,ue),nt.Qe(De,_e,we,Fe,b,z,ne,re,oe,ue)}return ue},jv:function(a,y,x,E,b,z,ne,re,oe,ue){if(nt.Yb(a,y,b,z,ue,x,E))return nt.Yb(a,y,b,z,ue,re,oe);var ce=(a+x)/2,me=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var we=(ce+x)/2,Fe=(me+E)/2;return nt.jv(a,y,ce,me,we,Fe,ne,re,oe,ue)||nt.jv(we,Fe,x,E,b,z,ne,re,oe,ue)},OA:function(a,y,x,E,b,z,ne){return ne.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),ne},iv:function(a,y,x,E,b,z,ne,re){if(nt.Yb(a,y,b,z,ne,x,E))ps(re,a,y,0,0),ps(re,b,z,0,0);else{var oe=(a+x)/2,ue=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ce=(oe+x)/2,me=(ue+E)/2;nt.iv(a,y,oe,ue,ce,me,ne,re),nt.iv(ce,me,x,E,b,z,ne,re)}return re},ep:function(a,y,x,E,b,z,ne,re){if(nt.Yb(a,y,b,z,ne,x,E))re.length===0&&(re.push(a),re.push(y)),re.push(b),re.push(z);else{var oe=(a+x)/2,ue=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ce=(oe+x)/2,me=(ue+E)/2;nt.ep(a,y,oe,ue,ce,me,ne,re),nt.ep(ce,me,x,E,b,z,ne,re)}return re},Eo:function(a,y,x,E,b,z,ne,re,oe,ue,ce,me,we,Fe){if(nt.Yb(a,y,ne,re,we,x,E)&&nt.Yb(a,y,ne,re,we,b,z))return!nt.Rl(a,y,ne,re,oe,ue,ce,me)||(we=(a-ne)*(ue-me)-(y-re)*(oe-ce),we===0)?!1:(Fe.h(((a*re-y*ne)*(oe-ce)-(a-ne)*(oe*me-ue*ce))/we,((a*re-y*ne)*(ue-me)-(y-re)*(oe*me-ue*ce))/we),!0);var De=(a+x)/2,_e=(y+E)/2,pt=(x+b)/2,it=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(De+pt)/2,x=(_e+it)/2,pt=(pt+b)/2,it=(it+z)/2;var bt=(E+pt)/2,It=(x+it)/2,Rt=1/0,Kt=!1,hn=0,bi=0;return nt.Eo(a,y,De,_e,E,x,bt,It,oe,ue,ce,me,we,Fe)&&(a=(Fe.x-oe)*(Fe.x-oe)+(Fe.y-ue)*(Fe.y-ue),a<Rt&&(Rt=a,Kt=!0,hn=Fe.x,bi=Fe.y)),nt.Eo(bt,It,pt,it,b,z,ne,re,oe,ue,ce,me,we,Fe)&&(Fe.x-oe)*(Fe.x-oe)+(Fe.y-ue)*(Fe.y-ue)<Rt&&(Kt=!0,hn=Fe.x,bi=Fe.y),Kt&&(Fe.x=hn,Fe.y=bi),Kt},Fo:function(a,y,x,E,b,z,ne,re,oe,ue,ce,me,we){var Fe=0;if(nt.Yb(a,y,ne,re,we,x,E)&&nt.Yb(a,y,ne,re,we,b,z)){if(we=(a-ne)*(ue-me)-(y-re)*(oe-ce),we===0)return Fe;var De=((a*re-y*ne)*(oe-ce)-(a-ne)*(oe*me-ue*ce))/we,_e=((a*re-y*ne)*(ue-me)-(y-re)*(oe*me-ue*ce))/we;if(De>=ce)return Fe;if((oe>ce?oe-ce:ce-oe)<(ue>me?ue-me:me-ue)){if(y<re?(oe=y,a=re):(oe=re,a=y),_e<oe||_e>a)return Fe}else if(a<ne?(oe=a,a=ne):oe=ne,De<oe||De>a)return Fe;0<we?Fe++:0>we&&Fe--}else{De=(a+x)/2,_e=(y+E)/2;var pt=(x+b)/2,it=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(De+pt)/2,x=(_e+it)/2,pt=(pt+b)/2,it=(it+z)/2;var bt=(E+pt)/2,It=(x+it)/2;Fe+=nt.Fo(a,y,De,_e,E,x,bt,It,oe,ue,ce,me,we),Fe+=nt.Fo(bt,It,pt,it,b,z,ne,re,oe,ue,ce,me,we)}return Fe},qh:function(a,y,x,E,b,z,ne){return nt.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(ne.h(a,x),!1):z>y?(ne.h(a,y),!1):(ne.h(a,z),!0)):nt.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(ne.h(E,y),!1):b>a?(ne.h(a,y),!1):(ne.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(ne.h(a,y),!1):1.000005<b?(ne.h(x,E),!1):(ne.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,ne,re,oe){return nt.B(a,x)&&nt.B(y,E)?(oe.h(a,y),!1):nt.$(b,ne)?nt.$(a,x)?(nt.qh(a,y,x,E,b,z,oe),!1):nt.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,oe):(re=(re-z)/(ne-b),nt.$(a,x)?(x=re*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(oe.h(a,b),!1):x>y?(oe.h(a,y),!1):(oe.h(a,x),!0)):(ne=(E-y)/(x-a),nt.$(re,ne)?(nt.qh(a,y,x,E,b,z,oe),!1):(b=(ne*a-re*b+z-y)/(ne-re),nt.$(ne,0)?(a<x?(E=a,a=x):E=x,b<E?(oe.h(E,y),!1):b>a?(oe.h(a,y),!1):(oe.h(b,y),!0)):nt.qh(a,y,x,E,b,ne*(b-a)+y,oe))))},MA:function(a,y,x,E,b){return nt.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,ne,re,oe,ue){function ce(pt,it){var bt=(pt-a)*(pt-a)+(it-y)*(it-y);bt<me&&(me=bt,oe.h(pt,it))}var me=1/0;ce(oe.x,oe.y);var we=0,Fe=0,De=0,_e=0;if(b<ne?(we=b,Fe=ne):(we=ne,Fe=b),z<re?(De=b,_e=ne):(De=ne,_e=b),we=(Fe-we)/2+ue,ue=(_e-De)/2+ue,b=(b+ne)/2,z=(z+re)/2,we===0||ue===0)return oe;if(.5>(x>a?x-a:a-x)){if(we=1-(x-b)*(x-b)/(we*we),0>we)return oe;we=Math.sqrt(we),E=-ue*we+z,ce(x,ue*we+z),ce(x,E)}else{if(x=(E-y)/(x-a),E=1/(we*we)+x*x/(ue*ue),re=2*x*(y-x*a)/(ue*ue)-2*x*z/(ue*ue)-2*b/(we*we),we=re*re-4*E*(2*x*a*z/(ue*ue)-2*y*z/(ue*ue)+z*z/(ue*ue)+b*b/(we*we)-1+(y-x*a)*(y-x*a)/(ue*ue)),0>we)return oe;we=Math.sqrt(we),ue=(-re+we)/(2*E),ce(ue,x*ue-x*a+y),we=(-re-we)/(2*E),ce(we,x*we-x*a+y)}return oe},Ff:function(a,y,x,E,b,z,ne,re,oe){var ue=1e21,ce=a,me=y;if(nt.Ve(a,y,a,E,b,z,ne,re,oe)){var we=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z);we<ue&&(ue=we,ce=oe.x,me=oe.y)}return nt.Ve(x,y,x,E,b,z,ne,re,oe)&&(we=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),we<ue&&(ue=we,ce=oe.x,me=oe.y)),nt.Ve(a,y,x,y,b,z,ne,re,oe)&&(y=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),y<ue&&(ue=y,ce=oe.x,me=oe.y)),nt.Ve(a,E,x,E,b,z,ne,re,oe)&&(a=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),a<ue&&(ue=a,ce=oe.x,me=oe.y)),oe.h(ce,me),1e21>ue},us:function(a,y,x){return nt.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,ne,re){var oe=a+x,ue=y+E;return b===ne?(z<re?(ne=z,z=re):ne=re,a<=b&&b<=oe&&ne<=ue&&z>=y):z===re?(b<ne?(re=b,b=ne):re=ne,y<=z&&z<=ue&&re<=oe&&b>=a):!!(Ba(a,y,x,E,b,z)||Ba(a,y,x,E,ne,re)||nt.Rl(a,y,oe,y,b,z,ne,re)||nt.Rl(oe,y,oe,ue,b,z,ne,re)||nt.Rl(oe,ue,a,ue,b,z,ne,re)||nt.Rl(a,ue,a,y,b,z,ne,re))},Rl:function(a,y,x,E,b,z,ne,re){return a===x&&y===E&&b===ne&&z===re?a===b&&y===z:0>=nt.Fl(a,y,x,E,b,z)*nt.Fl(a,y,x,E,ne,re)&&0>=nt.Fl(b,z,ne,re,a,y)*nt.Fl(b,z,ne,re,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var ne=Math.PI;z||(E*=ne/180,b*=ne/180);var re=E>b?-1:1;z=[];var oe=ne/2,ue=E;if(E=Math.min(2*ne,Math.abs(b-E)),1e-5>E)return oe=ue+re*Math.min(E,oe),re=a+x*Math.cos(ue),ue=y+x*Math.sin(ue),a+=x*Math.cos(oe),y+=x*Math.sin(oe),x=(re+a)/2,oe=(ue+y)/2,z.push([re,ue,x,oe,x,oe,a,y]),z;for(;1e-5<E;)b=ue+re*Math.min(E,oe),z.push(nt.Vy(x,ue,b,a,y)),E-=Math.abs(b-ue),ue=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,ne=a*Math.cos(z),re=a*Math.sin(z),oe=-re,ue=ne*ne+oe*oe,ce=ue+ne*ne+oe*re;return ue=4/3*(Math.sqrt(2*ue*ce)-ce)/(ne*re-oe*ne),re=ne-ue*oe,ne=oe+ue*ne,oe=-ne,ue=z+y,z=Math.cos(ue),ue=Math.sin(ue),[E+a*Math.cos(y),b+a*Math.sin(y),E+re*z-ne*ue,b+re*ue+ne*z,E+re*z-oe*ue,b+re*ue+oe*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,ne){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var re=x;return x+b-a<b/2&&(re=x+b),a=E,E+z-y<z/2&&(a=E+z),ne.h(re,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var ne=1,re=0;else ne=0,re=1;var oe=ne===0?a:y,ue=ne===0?x:E;return(ne===0?b:z)&&(ue=-ue),ne=re,x=ne===0?x:E,(ne===0?b:z)&&(x=-x),nt.az(oe,ne===0?a:y,ue,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var ne=y*E,re=-z+ne,oe=-z+Math.sqrt(a*a+ne*ne);y=re;for(var ue=0;9999999999>ue&&(y=.5*(re+oe),!(y===re||y===oe));++ue){var ce=a/(y+b),me=ne/(y+z);if(ce=ce*ce+me*me-1,0<ce)re=y;else if(0>ce)oe=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new yr,um:new yr,Mf:new yr,Nf:0,vm:100};nt.za=nt.AA;function Qt(a){Ao(this),this.l=2,a===void 0&&(a=Qt.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Qt.o?this.ee=new Un:(Qt.V===null&&(Qt.V=new Un().freeze()),this.ee=Qt.V),this.aq=this.ee.Ja,this.Ip=new Mn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Us,this.gg=Nn,this.Rk=this.Sk=NaN,this.Uf=si}Qt.prototype.copy=function(){var a=new Qt;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===Qt.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},Qt.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Qt.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Qt.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},Qt.prototype.ka=function(){if(Object.isFrozen(this)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Qt.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},Qt.prototype.Xa=function(a){if(!(a instanceof Qt))return!1;if(this.type!==a.type)return this.type===Qt.j&&a.type===Qt.o?lr(this,a):a.type===Qt.j&&this.type===Qt.o?lr(a,this):!1;if(this.type===Qt.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return nt.B(this.startX,a.startX)&&nt.B(this.startY,a.startY)&&nt.B(this.endX,a.endX)&&nt.B(this.endY,a.endY)};function lr(a,y){return a.type!==Qt.j||y.type!==Qt.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&nt.B(a.startX,y.startX)&&nt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Ai&&nt.B(a.endX,y.endX)&&nt.B(a.endY,y.endY))))}Qt.ia=function(a){return a.toString()},Qt.prototype.qb=function(a){a.classType===Qt&&(this.type=a)},Qt.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Qt.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 Qt.u:var y=new Mn(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 Qt.F:if(y=new Mn(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 Qt.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},Qt.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},Qt.parse=function(a,y){function x(){return _e>=Rt-1?!0:ue[_e+1].match(Kt)!==null}function E(){return _e++,ue[_e]}function b(lo){var $r=parseFloat(E()),Fa=parseFloat(E());pt===pt.toLowerCase()&&($r=It.x+$r,Fa=It.y+Fa),lo.h($r,Fa)}function z(){return b(It),It}function ne(){return b(bt),bt}function re(){var lo=it.toLowerCase();return lo!=="c"&&lo!=="s"&&lo!=="q"&&lo!=="t"?It:new st(2*It.x-bt.x,2*It.y-bt.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 ue=a.split(" ");for(a=0;a<ue.length;a++){var ce=ue[a];if(ce.match(/(\.[0-9]*)(\.)/gm)!==null){oe=vi();for(var me="",we=!1,Fe=0;Fe<ce.length;Fe++){var De=ce[Fe];De!=="."||we?De==="."?(oe.push(me),me="."):me+=De:(we=!0,me+=De)}for(oe.push(me),ue.splice(a,1),ce=0;ce<oe.length;ce++)ue.splice(a+ce,0,oe[ce]);a+=oe.length-1,Ti(oe)}}var _e=-1,pt="",it="";oe=new st(0,0);var bt=new st(0,0),It=new st(0,0),Rt=ue.length;a=A1(null),we=me=ce=!1,Fe=!0,De=null;for(var Kt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(_e>=Rt-1);)if(it=pt,pt=E(),pt!=="")switch(pt.toUpperCase()){case"X":Fe=!0,me=ce=!1;break;case"M":for(De=z(),a.mc===null||Fe===!0?(pp(a,De.x,De.y,ce,!me,we),Fe=!1):a.moveTo(De.x,De.y),oe.assign(It);!x();)De=z(),a.lineTo(De.x,De.y);break;case"L":for(;!x();)De=z(),a.lineTo(De.x,De.y);break;case"H":for(;!x();)It=new st((pt===pt.toLowerCase()?It.x:0)+parseFloat(E()),It.y),a.lineTo(It.x,It.y);break;case"V":for(;!x();)It=new st(It.x,(pt===pt.toLowerCase()?It.y:0)+parseFloat(E())),a.lineTo(It.x,It.y);break;case"C":for(;!x();){De=new st,b(De);var hn=ne(),bi=z();Kh(a,De.x,De.y,hn.x,hn.y,bi.x,bi.y)}break;case"S":for(;!x();)De=re(),hn=ne(),bi=z(),Kh(a,De.x,De.y,hn.x,hn.y,bi.x,bi.y);break;case"Q":for(;!x();)De=ne(),hn=z(),u0(a,De.x,De.y,hn.x,hn.y);break;case"T":for(;!x();)bt=De=re(),hn=z(),u0(a,De.x,De.y,hn.x,hn.y);break;case"B":for(;!x();){De=parseFloat(E()),hn=parseFloat(E()),bi=parseFloat(E());var Xi=parseFloat(E()),zi=parseFloat(E()),hi=zi,ti=!1;x()||(hi=parseFloat(E()),x()||(ti=parseFloat(E())!==0)),pt===pt.toLowerCase()&&(bi+=It.x,Xi+=It.y),a.arcTo(De,hn,bi,Xi,zi,hi,ti)}break;case"A":for(;!x();)De=Math.abs(parseFloat(E())),hn=Math.abs(parseFloat(E())),bi=parseFloat(E()),zi=Xi=!1,ti=hi=0,hi=E(),hi.length===1?(Xi=!!parseFloat(hi),zi=!!parseFloat(E()),hi=parseFloat(E())):hi.length===2?(Xi=!!parseFloat(hi[0]),zi=!!parseFloat(hi[1]),hi=parseFloat(E())):(Xi=!!parseFloat(hi[0]),zi=!!parseFloat(hi[1]),hi=parseFloat(hi.slice(2))),ti=parseFloat(E()),pt===pt.toLowerCase()&&(hi=It.x+hi,ti=It.y+ti),It.h(hi,ti),wS(a,De,hn,bi,Xi,zi,hi,ti);break;case"Z":PS(a),It.assign(oe);break;case"F":for(De="",hn=1;ue[_e+hn];)if(ue[_e+hn]==="0")we=!0,hn++;else if(ue[_e+hn].match(/[Uu]/)!==null)hn++;else if(ue[_e+hn].match(Kt)===null)hn++;else{De=ue[_e+hn];break}De.match(/[Mm]/)?ce=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(De="",hn=1;ue[_e+hn];)if(ue[_e+hn].match(/[Ff]/)!==null)hn++;else if(ue[_e+hn].match(Kt)===null)hn++;else{De=ue[_e+hn];break}De.match(/[Mm]/)?me=!0:a.mc.isShadowed=!1}if(oe=a.os,c0=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},Qt.Ha=function(a,y){for(var x=a.length,E=st.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}st.free(E)},Qt.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Qt.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},Qt.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Qt.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var ne=E[z];ne._isInvalidBounds=!1,ne.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Ir(this,a,!1),ps(a,0,0,0,0),a.freeze()},Qt.prototype.ix=function(){var a=new Mn;return Ir(this,a,!0),a};function Ir(a,y,x){switch(a.type){case Qt.j:case Qt.u:case Qt.F:x?y.h(a.od,a.pd,0,0):ps(y,a.od,a.pd,0,0),ps(y,a.Dc,a.Ec,0,0);break;case Qt.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):ps(y,z.startX,z.startY,0,0);for(var ne=z.segments.s,re=ne.length,oe=z.startX,ue=z.startY,ce=0;ce<re;ce++){var me=ne[ce];switch(me.type){case Ai:case ji:oe=me.endX,ue=me.endY,ps(y,oe,ue,0,0);break;case Wr:nt.Dl(oe,ue,me.point1X,me.point1Y,me.point2X,me.point2Y,me.endX,me.endY,.5,y),oe=me.endX,ue=me.endY;break;case zo:nt.iv(oe,ue,me.point1X,me.point1Y,me.endX,me.endY,.5,y),oe=me.endX,ue=me.endY;break;case Br:case Er:var we=me.type===Br?pr(me,z):vr(me,z,oe,ue),Fe=we.length;if(Fe===0){oe=me.type===Br?me.centerX:me.endX,ue=me.type===Br?me.centerY:me.endY,ps(y,oe,ue,0,0);break}me=null;for(var De=0;De<Fe;De++)me=we[De],nt.Dl(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],.5,y);me!==null&&(oe=me[6],ue=me[7]);break;default:Et("Unknown Segment type: "+me.type)}}}break;default:Et("Unknown Geometry type: "+a.type)}}Qt.prototype.normalize=function(){this._isFrozen&&wn(this);var a=this.ix();return this.offset(-a.x,-a.y),new st(-a.x,-a.y)},Qt.prototype.offset=function(a,y){return this._isFrozen&&wn(this),this.transform(1,0,0,1,a,y),this},Qt.prototype.scale=function(a,y){return this._isFrozen&&wn(this),this.transform(a,0,0,y,0,0),this},Qt.prototype.rotate=function(a,y,x){this._isFrozen&&wn(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Yt.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Yt.free(E),this},Ne=Qt.prototype,Ne.transform=function(a,y,x,E,b,z){switch(this.type){case Qt.j:case Qt.u:case Qt.F:var ne=this.od,re=this.pd;this.od=ne*a+re*x+b,this.pd=ne*y+re*E+z,ne=this.Dc,re=this.Ec,this.Dc=ne*a+re*x+b,this.Ec=ne*y+re*E+z;break;case Qt.o:for(var oe=this.figures.s,ue=oe.length,ce=0;ce<ue;ce++){var me=oe[ce];ne=me.startX,re=me.startY,me.startX=ne*a+re*x+b,me.startY=ne*y+re*E+z,me=me.segments.s;for(var we=me.length,Fe=0;Fe<we;Fe++){var De=me[Fe];switch(De.type){case Ai:case ji:ne=De.endX,re=De.endY,De.endX=ne*a+re*x+b,De.endY=ne*y+re*E+z;break;case Wr:ne=De.point1X,re=De.point1Y,De.point1X=ne*a+re*x+b,De.point1Y=ne*y+re*E+z,ne=De.point2X,re=De.point2Y,De.point2X=ne*a+re*x+b,De.point2Y=ne*y+re*E+z,ne=De.endX,re=De.endY,De.endX=ne*a+re*x+b,De.endY=ne*y+re*E+z;break;case zo:ne=De.point1X,re=De.point1Y,De.point1X=ne*a+re*x+b,De.point1Y=ne*y+re*E+z,ne=De.endX,re=De.endY,De.endX=ne*a+re*x+b,De.endY=ne*y+re*E+z;break;case Br:ne=De.centerX,re=De.centerY,De.centerX=ne*a+re*x+b,De.centerY=ne*y+re*E+z,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),De.startAngle+=ne),0>a&&(De.startAngle=180-De.startAngle,De.sweepAngle=-De.sweepAngle),0>E&&(De.startAngle=-De.startAngle,De.sweepAngle=-De.sweepAngle),De.radiusX*=Math.sqrt(a*a+x*x),De.radiusY!==void 0&&(De.radiusY*=Math.sqrt(y*y+E*E));break;case Er:if(ne=De.endX,re=De.endY,De.endX=ne*a+re*x+b,De.endY=ne*y+re*E+z,De.radiusX===0||De.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),De.xAxisRotation+=ne),0>a&&(De.xAxisRotation=180-De.xAxisRotation,De.isClockwiseArc=!De.isClockwiseArc),0>E&&(De.xAxisRotation=-De.xAxisRotation,De.isClockwiseArc=!De.isClockwiseArc),De.radiusX*=Math.sqrt(a*a+x*x),De.radiusY*=Math.sqrt(y*y+E*E);break;default:Et("Unknown Segment type: "+De.type)}}}}return this._isInvalidBounds=!0,this},Ne.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case Qt.j:return nt.Yb(x,E,b,z,y,a.x,a.y);case Qt.u:var ne=Mn.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=ne.ca(a),Mn.free(ne),a;case Qt.F:ne=Math.min(x,b)-y;var re=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),re=a.y-(re+y),1>=ne*ne/(x*x)+re*re/(y*y));case Qt.o:return mr(this,a,y,!0,!1);default:return!1}};function mr(a,y,x,E,b){var z=y.x;y=y.y;for(var ne=a.bounds.x-20,re=0,oe,ue,ce,me,we=a.figures.s,Fe=we.length,De=0;De<Fe;De++){var _e=we[De],pt=!_e.isEvenOdd;if(_e.isFilled){if(E&&_e.ca(z,y,x))return!0;var it=_e.segments;oe=_e.startX,ue=_e.startY;for(var bt=oe,It=ue,Rt=it.s,Kt=0;Kt<=it.length;Kt++){var hn=void 0;if(Kt!==it.length){hn=Rt[Kt];var bi=hn.type;a=hn.endX,me=hn.endY}else bi=Ai,a=bt,me=It;switch(bi){case ji:if(bt=ur(z,y,ne,y,oe,ue,bt,It),isNaN(bt))return!0;re+=bt,bt=a,It=me;break;case Ai:if(oe=ur(z,y,ne,y,oe,ue,a,me),isNaN(oe))return!0;re+=oe;break;case Wr:ce=nt.Fo(oe,ue,hn.point1X,hn.point1Y,hn.point2X,hn.point2Y,a,me,ne,y,z,y,.5),re+=ce;break;case zo:ce=nt.Fo(oe,ue,(oe+2*hn.point1X)/3,(ue+2*hn.point1Y)/3,(2*hn.point1X+a)/3,(2*hn.point1Y+me)/3,a,me,ne,y,z,y,.5),re+=ce;break;case Br:case Er:bi=hn.type===Br?pr(hn,_e):vr(hn,_e,oe,ue);var Xi=bi.length;if(Xi===0){if(oe=ur(z,y,ne,y,oe,ue,hn.type===Br?hn.centerX:hn.endX,hn.type===Br?hn.centerY:hn.endY),isNaN(oe))return!0;re+=oe;break}hn=null;for(var zi=0;zi<Xi;zi++){if(hn=bi[zi],zi===0){if(ce=ur(z,y,ne,y,oe,ue,hn[0],hn[1]),isNaN(ce))return!0;re+=ce}ce=nt.Fo(hn[0],hn[1],hn[2],hn[3],hn[4],hn[5],hn[6],hn[7],ne,y,z,y,.5),re+=ce}hn!==null&&(a=hn[6],me=hn[7]);break;default:Et("Unknown Segment type: "+hn.type)}oe=a,ue=me}if(pt){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(_e.ca(z,y,b?x:x+2))return!0}return!1}function ur(a,y,x,E,b,z,ne,re){if(nt.Yb(b,z,ne,re,.05,a,y))return NaN;var oe=(a-x)*(z-re);if(oe===0)return 0;var ue=((a*E-y*x)*(b-ne)-(a-x)*(b*re-z*ne))/oe;if(y=(a*E-y*x)*(z-re)/oe,ue>=a)return 0;if((b>ne?b-ne:ne-b)<(z>re?z-re:re-z)){if(z<re){if(y<z||y>re)return 0}else if(y<re||y>z)return 0}else if(b<ne){if(ue<b||ue>ne)return 0}else if(ue<ne||ue>b)return 0;return 0<oe?1:-1}function Bi(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))return!0;return!1}Ne.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new st),this.type===Qt.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,ne=0,re=0;re<b;re++){var oe=E[re],ue=oe.length;for(a=0;a<ue;a++){var ce=oe[a];if(ne+ce>=z)return E=z-ne,E=ce===0?0:E/ce,x=x[re],re=x[2*a],b=x[2*a+1],y.h(re+(x[2*a+2]-re)*E,b+(x[2*a+3]-b)*E),y;ne+=ce}}return y},Ne.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Qt.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,ne=0;ne<E;ne++){var re=x[ne],oe=re.length;for(a=0;a<oe;a++){var ue=re[a];if(z+ue>=b)return b=y[ne],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=ue}}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===Qt.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,ne=0,re=0;re<b;re++){var oe=E[re],ue=oe.length;for(a=0;a<ue;a++){var ce=oe[a];if(ne+ce>=z)return E=z-ne,E=ce===0?0:E/ce,ce=x[re],x=ce[2*a],re=ce[2*a+1],b=ce[2*a+2],a=ce[2*a+3],y[0]=x+(b-x)*E,y[1]=re+(a-re)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-re)?0:1>Math.abs(b-x)?0<=a-re?90:270:1>Math.abs(a-re)?0<=b-x?0:180:180*Math.atan2(a-re,b-x)/Math.PI,y;ne+=ce}}return y},Ne.xx=function(a){if(this.type===Qt.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var ne=x;E=b}else ne=b,E=x;return a<=ne?ne===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-ne)}if(x===b)return y<E?ne=y:(ne=E,E=y),z<=ne?ne===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-ne);ne=(E-y)*(E-y)+(b-x)*(b-x);var re=st.alloc();return nt.qh(y,x,E,b,z,a,re),a=re.x,z=re.y,st.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ne)}}else if(this.type===Qt.u){ne=this.startX,re=this.startY;var oe=this.endX;if(b=this.endY,ne!==oe||re!==b){y=oe-ne,x=b-re,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,ne),oe),a=Math.min(Math.max(a,re),b),ne=Math.abs(E-ne),oe=Math.abs(E-oe),re=Math.abs(a-re),b=Math.abs(a-b);var ue=Math.min(ne,oe,re,b);if(ue===re)return E/z;if(ue===oe)return(y+a)/z;if(ue===b)return(2*y+x-E)/z;if(ue===ne)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=st.alloc(),b=1/0,re=ne=0,oe=y.length;for(var ce=ue=0,me=0;me<oe;me++)for(var we=y[me],Fe=x[me],De=we.length,_e=0;_e<De;_e+=2){var pt=we[_e],it=we[_e+1];if(_e!==0){nt.qh(ue,ce,pt,it,a.x,a.y,E);var bt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);bt<b&&(b=bt,ne=re,ne+=Math.sqrt((E.x-ue)*(E.x-ue)+(E.y-ce)*(E.y-ce))),re+=Fe[(_e-2)/2]}ue=pt,ce=it}return st.free(E),a=ne/z,0>a?0:1<a?1:a}return 0};function Pr(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===Qt.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===Qt.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===Qt.F){var z=new So;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var ne=new fr(Br);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,z.add(ne),a=pr(ne,z),b=a.length,b===0)E.push(ne.centerX),E.push(ne.centerY);else{ne=z.startX,z=z.startY;for(var re=0;re<b;re++){var oe=a[re];nt.Qe(ne,z,oe[2],oe[3],oe[4],oe[5],oe[6],oe[7],.5,E),ne=oe[6],z=oe[7]}}y.push(E),x.push(to(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),ne=b.startX,z=b.startY,re=ne,oe=z;for(var ue=b.segments.s,ce=ue.length,me=0;me<ce;me++){var we=ue[me];switch(we.type){case ji:4<=E.length&&(y.push(E),x.push(to(E))),E=[],E.push(we.endX),E.push(we.endY),ne=we.endX,z=we.endY,re=ne,oe=z;break;case Ai:E.push(we.endX),E.push(we.endY),ne=we.endX,z=we.endY;break;case Wr:nt.Qe(ne,z,we.point1X,we.point1Y,we.point2X,we.point2Y,we.endX,we.endY,.5,E),ne=we.endX,z=we.endY;break;case zo:nt.ep(ne,z,we.point1X,we.point1Y,we.endX,we.endY,.5,E),ne=we.endX,z=we.endY;break;case Br:var Fe=pr(we,b),De=Fe.length;if(De===0){E.push(we.centerX),E.push(we.centerY),ne=we.centerX,z=we.centerY;break}for(var _e=0;_e<De;_e++){var pt=Fe[_e];nt.Qe(ne,z,pt[2],pt[3],pt[4],pt[5],pt[6],pt[7],.5,E),ne=pt[6],z=pt[7]}break;case Er:if(Fe=vr(we,b,ne,z),De=Fe.length,_e=we.endX,pt=we.endY,De===0){E.push(_e),E.push(pt),ne=_e,z=pt;break}for(_e=0;_e<De;_e++)pt=Fe[_e],nt.Qe(ne,z,pt[2],pt[3],pt[4],pt[5],pt[6],pt[7],.5,E),ne=pt[6],z=pt[7];break;default:Et("Segment not of valid type: "+we.type)}we.isClosed&&(E.push(re),E.push(oe))}4<=E.length&&(y.push(E),x.push(to(E)))}}}function to(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var ne=a[z],re=a[z+1];z!==0&&y.push(Math.sqrt(os(x,E,ne,re))),x=ne,E=re}return y}Ne.add=function(a){return this.ee.add(a),this},Ne.pm=function(a,y,x,E,b,z,ne,re){return this._isFrozen&&wn(this),this.fg=new Ji(a,y,b,z).freeze(),this.gg=new Ji(x,E,ne,re).freeze(),this},Qe.Object.defineProperties(Qt.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 Pr(this),this.tk}},flattenedLengths:{get:function(){return Pr(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Qt.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===Qt.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,E=a=0;E<x;E++)for(var b=y[E],z=b.length,ne=0;ne<z;ne++)a+=b[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&wn(this,a),this.na=a,a===Qt.o?this.ee=new Un:(Qt.V===null&&(Qt.V=new Un().freeze()),this.ee=Qt.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&wn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&wn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&wn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&wn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&wn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&wn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&wn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&wn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Qt.prototype.setSpots=Qt.prototype.pm,Qt.prototype.add=Qt.prototype.add,Qt.prototype.getFractionForPoint=Qt.prototype.xx,Qt.prototype.getPointAndAngleAlongPath=Qt.prototype.Qu,Qt.prototype.getAngleAlongPath=Qt.prototype.wx,Qt.prototype.getPointAlongPath=Qt.prototype.Pu,Qt.prototype.containsPoint=Qt.prototype.ca,Qt.prototype.transform=Qt.prototype.transform,Qt.prototype.rotate=Qt.prototype.rotate,Qt.prototype.scale=Qt.prototype.scale,Qt.prototype.offset=Qt.prototype.offset,Qt.prototype.normalize=Qt.prototype.normalize,Qt.prototype.computeBoundsWithoutOrigin=Qt.prototype.ix,Qt.prototype.equalsApprox=Qt.prototype.Xa,Qt.className="Geometry",Qt.j=new Cn(Qt,"Line",0),Qt.u=new Cn(Qt,"Rectangle",1),Qt.F=new Cn(Qt,"Ellipse",2),Qt.o=new Cn(Qt,"Path",3),Qt.V=null,Qt.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Qt.className="Geometry",Qt.stringify=Qt.ia,Qt.fillPath=Qt.nb,Qt.parse=Qt.parse,Qt.Line=Qt.j,Qt.Rectangle=Qt.u,Qt.Ellipse=Qt.F,Qt.Path=Qt.o;function So(a,y,x,E,b){Ao(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Un,this.sr=this.pl.Ja,this.fw=null}So.prototype.copy=function(){var a=new So;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Ne=So.prototype,Ne.Xa=function(a){if(!(a instanceof So&&nt.B(this.startX,a.startX)&&nt.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},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,E=x.length,b=0;b<E;b++)y+=" "+x[b].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 E=this.startX,b=this.startY,z=E,ne=b,re=this.segments.s,oe=re.length,ue=0;ue<oe;ue++){var ce=re[ue];switch(ce.type){case ji:z=ce.endX,ne=ce.endY,E=ce.endX,b=ce.endY;break;case Ai:if(nt.Yb(E,b,ce.endX,ce.endY,x,a,y))return!0;E=ce.endX,b=ce.endY;break;case Wr:if(nt.cs(E,b,ce.point1X,ce.point1Y,ce.point2X,ce.point2Y,ce.endX,ce.endY,.5,a,y,x))return!0;E=ce.endX,b=ce.endY;break;case zo:if(nt.jv(E,b,ce.point1X,ce.point1Y,ce.endX,ce.endY,.5,a,y,x))return!0;E=ce.endX,b=ce.endY;break;case Br:case Er:var me=ce.type===Br?pr(ce,this):vr(ce,this,E,b),we=me.length,Fe=ce.type===Br?ce.centerX:ce.endX,De=ce.type===Br?ce.centerY:ce.endY;if(we===0){if(nt.Yb(E,b,Fe,De,x,a,y))return!0;E=Fe,b=De;break}for(Fe=null,De=0;De<we;De++)if(Fe=me[De],De===0&&nt.Yb(E,b,Fe[0],Fe[1],x,a,y)||nt.cs(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5],Fe[6],Fe[7],.5,a,y,x))return!0;Fe!==null&&(E=Fe[6],b=Fe[7]);break;default:Et("Unknown Segment type: "+ce.type)}if(ce.isClosed&&(E!==z||b!==ne)&&nt.Yb(E,b,z,ne,x,a,y))return!0}return!1},Qe.Object.defineProperties(So.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&&wn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&wn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&wn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&wn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&wn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&wn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),So.prototype.add=So.prototype.add,So.prototype.equalsApprox=So.prototype.Xa,So.className="PathFigure";function fr(a,y,x,E,b,z,ne,re){Ao(this),a===void 0&&(a=Ai),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),ne===void 0&&(ne=0),a===Er?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),re&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===Br&&(z=Math.max(z,0)),this.Wh=z,typeof ne=="number"?(a===Br&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}fr.prototype.copy=function(){var a=new fr;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=fr.prototype,Ne.Xa=function(a){if(!(a instanceof fr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ji:case Ai:return nt.B(this.endX,a.endX)&&nt.B(this.endY,a.endY);case Wr:return nt.B(this.endX,a.endX)&&nt.B(this.endY,a.endY)&&nt.B(this.point1X,a.point1X)&&nt.B(this.point1Y,a.point1Y)&&nt.B(this.point2X,a.point2X)&&nt.B(this.point2Y,a.point2Y);case zo:return nt.B(this.endX,a.endX)&&nt.B(this.endY,a.endY)&&nt.B(this.point1X,a.point1X)&&nt.B(this.point1Y,a.point1Y);case Br:return nt.B(this.startAngle,a.startAngle)&&nt.B(this.sweepAngle,a.sweepAngle)&&nt.B(this.centerX,a.centerX)&&nt.B(this.centerY,a.centerY)&&nt.B(this.radiusX,a.radiusX)&&nt.B(this.radiusY,a.radiusY);case Er:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&nt.B(this.xAxisRotation,a.xAxisRotation)&&nt.B(this.endX,a.endX)&&nt.B(this.endY,a.endY)&&nt.B(this.radiusX,a.radiusX)&&nt.B(this.radiusY,a.radiusY);default:return!1}},Ne.qb=function(a){a.classType===fr&&(this.type=a)},Ne.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ji:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ai:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Wr: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 zo: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 Br: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 Er: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 pr(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=nt.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var ne=Yt.alloc();ne.reset(),x<E?ne.scale(1,E/x):ne.scale(x/E,1),Qt.Ha(z,ne),Yt.free(ne)}for(x=z.length,E=0;E<x;E++)ne=z[E],ne[0]+=y,ne[1]+=b,ne[2]+=y,ne[3]+=b,ne[4]+=y,ne[5]+=b,ne[6]+=y,ne[7]+=b;return a.ae=z,a.ae}function vr(a,y,x,E){function b(_e,pt,it,bt){return(_e*bt<pt*it?-1:1)*Math.acos((_e*it+pt*bt)/(Math.sqrt(_e*_e+pt*pt)*Math.sqrt(it*it+bt*bt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var ne=Math.PI/180*a.Ne,re=a.isLargeArc,oe=a.isClockwiseArc,ue=a.Dc,ce=a.Ec,me=Math.cos(ne),we=Math.sin(ne),Fe=me*(x-ue)/2+we*(E-ce)/2;ne=-we*(x-ue)/2+me*(E-ce)/2;var De=Fe*Fe/(y*y)+ne*ne/(z*z);return 1<De&&(y*=Math.sqrt(De),z*=Math.sqrt(De)),De=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*ne*ne-z*z*Fe*Fe)/(y*y*ne*ne+z*z*Fe*Fe)),isNaN(De)&&(De=0),re=De*y*ne/z,De=De*-z*Fe/y,isNaN(re)&&(re=0),isNaN(De)&&(De=0),x=(x+ue)/2+me*re-we*De,E=(E+ce)/2+we*re+me*De,ce=b(1,0,(Fe-re)/y,(ne-De)/z),me=(Fe-re)/y,ue=(ne-De)/z,Fe=(-Fe-re)/y,re=(-ne-De)/z,ne=b(me,ue,Fe,re),Fe=(me*Fe+ue*re)/(Math.sqrt(me*me+ue*ue)*Math.sqrt(Fe*Fe+re*re)),-1>=Fe?ne=Math.PI:1<=Fe&&(ne=0),!oe&&0<ne&&(ne-=2*Math.PI),oe&&0>ne&&(ne+=2*Math.PI),oe=y>z?1:y/z,Fe=y>z?z/y:1,y=nt.jx(0,0,y>z?y:z,ce,ce+ne,!0),z=Yt.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(oe,Fe),Qt.Ha(y,z),Yt.free(z),a.ae=y,a.ae}Qe.Object.defineProperties(fr.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&&wn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&wn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&wn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&wn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&wn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&wn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&wn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&wn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&wn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Kn(a,">= zero",fr,"radiusX"),this._isFrozen&&wn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Kn(a,">= zero",fr,"radiusY"),this._isFrozen&&wn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&wn(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&&wn(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&&wn(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&&wn(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&&wn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),fr.prototype.equalsApprox=fr.prototype.Xa;var ji=new Cn(fr,"Move",0),Ai=new Cn(fr,"Line",1),Wr=new Cn(fr,"Bezier",2),zo=new Cn(fr,"QuadraticBezier",3),Br=new Cn(fr,"Arc",4),Er=new Cn(fr,"SvgArc",4);fr.className="PathSegment",fr.Move=ji,fr.Line=Ai,fr.Bezier=Wr,fr.QuadraticBezier=zo,fr.Arc=Br,fr.SvgArc=Er;function Or(){this.H=null,this.xu=new st(0,0).freeze(),this.mt=new st(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}Or.prototype.copy=function(){var a=new Or;return this.clone(a)},Or.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},Or.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},Or.prototype.So=function(a,y){var x=this.diagram;return x===null||ph(x,a,y),y},Or.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(ph(x,a,y),y.assign(x.Ps(y))),y},Qe.Object.defineProperties(Or.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}}}),Or.prototype.getMultiTouchDocumentPoint=Or.prototype.Bz,Or.prototype.getMultiTouchViewPoint=Or.prototype.So,Or.className="InputEvent";function kr(){this.H=null,this.xa="",this.ar=this.Lr=null}kr.prototype.copy=function(){var a=new kr;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},kr.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Qe.Object.defineProperties(kr.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}}}),kr.className="DiagramEvent";function gr(){this.Fm=_o,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}gr.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},gr.prototype.copy=function(){var a=new gr;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},gr.prototype.qb=function(a){a.classType===gr&&(this.change=a)},gr.prototype.toString=function(){var a="";return a=this.change===Aa?a+"* ":this.change===_o?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===Aa?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=sr(this.object)),this.oldValue!==null&&(a+=" old: "+sr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+sr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},gr.prototype.I=function(a){return a?this.oldValue:this.newValue},gr.prototype.Dz=function(a){return a?this.oldParam:this.newParam},gr.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},gr.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},gr.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},gr.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Qe.Object.defineProperties(gr.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===Aa&&(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}}}),gr.prototype.redo=gr.prototype.redo,gr.prototype.canRedo=gr.prototype.canRedo,gr.prototype.undo=gr.prototype.undo,gr.prototype.canUndo=gr.prototype.canUndo,gr.prototype.getParam=gr.prototype.Dz,gr.prototype.getValue=gr.prototype.I,gr.prototype.clear=gr.prototype.clear;var Aa=new Cn(gr,"Transaction",-1),_o=new Cn(gr,"Property",0),xa=new Cn(gr,"Insert",1),Wa=new Cn(gr,"Remove",2);gr.className="ChangedEvent",gr.Transaction=Aa,gr.Property=_o,gr.Insert=xa,gr.Remove=Wa;function wo(){this.o=new Un().freeze(),this.xa="",this.j=!1}wo.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var E=this.changes.M(x);E!==null&&(y+=`
`+E.toString())}}return y},wo.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()},wo.prototype.canUndo=function(){return this.isComplete},wo.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()}},wo.prototype.canRedo=function(){return this.isComplete},wo.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()}},wo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Ki,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===_o&&E.object){var b=y.get(E.object);b||(b=new Ki,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},Qe.Object.defineProperties(wo.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}}}),wo.prototype.optimize=wo.prototype.ak,wo.prototype.redo=wo.prototype.redo,wo.prototype.canRedo=wo.prototype.canRedo,wo.prototype.undo=wo.prototype.undo,wo.prototype.canUndo=wo.prototype.canUndo,wo.prototype.clear=wo.prototype.clear,wo.className="Transaction";function Oa(){this.Pt=new Yn,this.Jd=!1,this.u=new Un().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Un().freeze(),this.hl=new Un,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Oa.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
`+this.history.M(E).toString(a-1);return y},Oa.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},Oa.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Ne=Oa.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=""),El(this,!0,a)},Ne.Kf=function(){return El(this,!1,"")};function El(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Ei("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(z=a.hl.M(ne-1),a.hl.mb(ne-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}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()}},Oa.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Oa.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){Ei("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Oa.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Oa.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){Ei("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Oa.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new gr;for(E.change=Aa,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Oa.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new wo);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||Ei("Change not within a transaction: "+x.toString()))}},Oa.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},Qe.Object.defineProperties(Oa.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}}}),Oa.prototype.handleChanged=Oa.prototype.Tu,Oa.prototype.redo=Oa.prototype.redo,Oa.prototype.undo=Oa.prototype.undo,Oa.prototype.canUndo=Oa.prototype.canUndo,Oa.prototype.discardHistoryAfterIndex=Oa.prototype.lx,Oa.prototype.rollbackTransaction=Oa.prototype.Kf,Oa.prototype.commitTransaction=Oa.prototype.eb,Oa.prototype.startTransaction=Oa.prototype.Ea,Oa.prototype.removeModel=Oa.prototype.Rx,Oa.prototype.addModel=Oa.prototype.Xw,Oa.prototype.clear=Oa.prototype.clear,Oa.className="UndoManager";function Nr(){Ao(this),this.H=Bc,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Or,this.Zr=-1}Nr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Li(this.constructor)},Nr.prototype.updateAdornments=function(){},Nr.prototype.canStart=function(){return this.isEnabled},Nr.prototype.doStart=function(){},Nr.prototype.doActivate=function(){this.isActive=!0},Nr.prototype.doDeactivate=function(){this.isActive=!1},Nr.prototype.doStop=function(){},Nr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Nr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Nr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Nr.prototype.doMouseMove=function(){},Nr.prototype.doMouseUp=function(){this.stopTool()},Nr.prototype.doMouseWheel=function(){},Nr.prototype.canStartMultiTouch=function(){return!0},Nr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,st.allocAt(NaN,NaN)),E=y.So(1,st.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}st.free(x),st.free(E)},Nr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,st.allocAt(NaN,NaN)),E=y.So(1,st.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new st((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var ne=a.commandHandler;if(z!==a.scale&&ne.canResetZoom(z)){var re=a.zoomPoint;a.zoomPoint=b,ne.resetZoom(z),a.zoomPoint=re}y.bubbles=!1}st.free(x),st.free(E)},Nr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Nr.prototype.doKeyUp=function(){},Nr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Nr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Nr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Xr?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||(Xr?y.meta:y.control)||y.shift||a.clearSelection()}},Nr.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,_s(a,E,x),E.handled};function _s(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,E){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}Nr.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,ne=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var re=z.mouseLeave;if(re!==null&&(E===z||E!==null&&E.rg(z)||(re(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=ne,y.handled=!1;E!==null&&(ne=E.mouseEnter,!(ne!==null&&(z===E||z!==null&&z.rg(E)||(ne(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,ne="";z!==null&&(ne=z.cursor,ne==="");)z=z.panel;for(a.currentCursor=ne,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},Nr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Nr.prototype.doCurrentObjectChanged=function(){},Nr.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===rc&&!y.shift||b===gl&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===rc&&y.shift||b===gl&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var ne=z.deltaX;z=z.deltaY;var re="pixel";if(ne===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(re,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(re,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:re="pixel";break;case 1:re="line";break;case 2:re="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(re,0<ne?"right":"left",Math.abs(ne))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(re,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},Nr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Nr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=Rn(function(){x.doWaitAfter(E)},a)},Nr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&ht.clearTimeout(this.Zr),this.Zr=-1},Nr.prototype.doWaitAfter=function(){},Nr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof pa);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Nr.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},Qe.Object.defineProperties(Nr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof dn&&(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}}}),Nr.prototype.startTransaction=Nr.prototype.Ea,Nr.className="Tool";function jo(){Nr.call(this),this.name="ToolManager",this.hb=new Un,this.ob=new Un,this.Hb=new Un,this.F=this.V=850,this.o=new pi(2,2).ja(),this.Ha=5e3,this.ia=gl,this.u=kc,this.Mp=this.j=null,this.zj=-1}$t(jo,Nr),jo.prototype.initializeStandardTools=function(){},jo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof pa&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},jo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===oc&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===vc){y.bubbles=!0;return}if(this.gestureBehavior===oc)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===gl?this.mouseWheelBehavior=rc:this.mouseWheelBehavior===rc&&(this.mouseWheelBehavior=gl)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},jo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===vc){y.bubbles=!0;return}if(this.gestureBehavior===oc)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}Hs(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Hs(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}jo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof pa&&(y===a||y.rg(a))||this.hideToolTip()},jo.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()))},jo.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)},jo.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 pa)||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()},jo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof pa){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Fo&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(ht.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=Rn(function(){b.hideToolTip()},a)}},jo.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},jo.prototype.hideToolTip=function(){this.zj!==-1&&(ht.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof pa?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Fo&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},jo.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},jo.prototype.doMouseWheel=function(){this.standardMouseWheel()},jo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},jo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},jo.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},jo.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},jo.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)},Qe.Object.defineProperties(jo.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 pa?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}}}),jo.prototype.replaceStandardTool=jo.prototype.gb;var gl=new Cn(jo,"WheelScroll",0),rc=new Cn(jo,"WheelZoom",1),ad=new Cn(jo,"WheelNone",2),kc=new Cn(jo,"GestureZoom",3),oc=new Cn(jo,"GestureCancel",4),vc=new Cn(jo,"GestureNone",5);jo.className="ToolManager",jo.WheelScroll=gl,jo.WheelZoom=rc,jo.WheelNone=ad,jo.GestureZoom=kc,jo.GestureCancel=oc,jo.GestureNone=vc;function as(){Nr.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 st(NaN,NaN),this.Fr=new st,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Yn().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var du;$t(as,Nr),as.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},as.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},as.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,(Xr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},as.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),Xt=null,this.isActive=!0,this.tl.set(a.position),Rc(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&&Bl(a),$f(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Xt=this,gn=this.diagram,this.doSimulatedDragOut()))};function Rc(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof fi?(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 Ui,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}as.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},as.prototype.Pd=function(a){return a===void 0?new dd(sa):this.isGridSnapEnabled?new dd(new st(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new dd(a.copy())},as.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),ac(this),Kd(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<du.count){for(var y=du,x=y.length,E=0;E<x;E++){var b=y.M(E);Wu(b),su(b),ac(b),b.diagram.ug()}y.clear()}Wu(this),this.tl.h(NaN,NaN),gn!==null&&(gn.currentCursor=""),Xt=gn=null,su(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),dh(a,!0)},as.prototype.stopTransaction=function(){var a=this.diagram,y=Nr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function ac(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,_d(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Rd(){var a=Xt;su(a),yc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}as.prototype.doCancel=function(){su(this),yc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},as.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},as.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function au(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):yc(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 Ki,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof fi&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,Rc(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Yh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function su(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 fi&&(x.value.point=new st(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Wu(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 Au(a,y,x){var E=a.diagram,b=a.startPoint,z=st.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),st.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Bl(E),E.hk())}as.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&Yc(E,a,y,this.dragOptions,x)};function yc(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof fi&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Yh(E,-b.x,-b.y)}y.bd()}}function bd(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),li(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=_d(a,b,E),!a.isActive&&Xt===null)return;var re=E!==null?E.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof ho)){var oe=x.mouseDragOver;oe!==null&&(oe(b),ne=!0)}if(!a.isActive&&Xt===null||(a.doDragOver(y,E),!a.isActive&&Xt===null))return}finally{x.skipsUndoManager=z,ne&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}as.prototype.findDragOverObject=function(a){var y=this;return Mc(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof pa||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},as.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 _d(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var ne=0;ne<b;ne++){var re=a.Cg[ne],oe=re.mouseDragLeave;if(oe!==null&&(oe(y,re,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Xt===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=Fd(b);for(b=a.Cg.length,x=0;x<b&&(ne=a.Cg[x],re=ne.mouseDragEnter,re===null||(re(y,ne,z),E=!0,!y.handled));x++);return E}function Fd(a){var y=a.panel;return y!==null?y:a instanceof xr&&!(a instanceof ho)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function ch(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(ue){return E.findValidLinkablePort(ue,x)});a=st.alloc();var z=1/0,ne=null;for(b=b.iterator;b.next();){var re=b.value;if(re.part!==null){var oe=re.ga(Oo,a);oe=y.Bf(oe),oe<z&&(ne=re,z=oe)}}return st.free(a),ne}function li(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,ne=null;x.fromNode===null&&(z=ch(a,x.i(0),!1),z!==null&&(ne=z.part));var re=null,oe=null;x.toNode===null&&(re=ch(a,x.i(x.pointsCount-1),!0),re!==null&&(oe=re.part)),b.isValidLink(ne,z,oe,re)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,z!==null&&(x.fromPortId=z.portId),x.toNode=oe,re!==null&&(x.toPortId=re.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):Jr(b,ne,z,oe,re):Jr(b,null,null,null,null)}}}}as.prototype.doDragOver=function(){};function fo(a,y){var x=a.diagram;a.dragsLink&&li(a,!0),ac(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var ne=z.mouseDrop;if(ne!==null&&(ne(b,z),b.handled))break;Xa(a,b,z),z=Fd(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Xt!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Ni&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Xt!==null){for(a=Mn.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Ni&&rt(x,E,a);Mn.free(a)}}}function Xa(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof ho||(x=a.mouseDrop,x!==null&&x(y))}function rt(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof fi},!0,function(b){return b instanceof fi},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}as.prototype.doDropOnto=function(){},as.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()?(au(this,!1),$f(a,this.copiedParts),Au(this,this.copiedParts,!1),Kd(a,this.copiedParts)):this.mayMove()?(su(this),Au(this,this.draggedParts,!0)):this.mayDragOut()?(au(this,!1),Au(this,this.copiedParts,!1)):su(this),bd(this,a.lastInput.documentPoint))}},as.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?(su(this),au(this,!0),$f(a,this.copiedParts),Au(this,this.copiedParts,!1),Kd(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,su(this),this.mayMove()&&(Au(this,this.draggedParts,!0),bd(this,a.lastInput.documentPoint))),this.Ym=!0,fo(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&et(this),a.Ya(),Kd(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},as.prototype.simulatedMouseMove=function(a,y,x){if(Xt===null)return!1;var E=Xt.diagram;x instanceof dn||(x=null);var b=gn;return x!==b&&(b!==null&&b!==E&&(b.ug(),Xt.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),gn=x,x!==null&&x!==E&&(Rd(),b=x.toolManager.findTool("Dragging"),b!==null&&(du.contains(b)||du.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,E.doSimulatedDragOver()),!0)},as.prototype.simulatedMouseUp=function(a,y,x){if(Xt===null)return!1;var E=gn,b=Xt.diagram;if(x===null)return Xt.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Xt.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;gn=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Rd(),du.contains(E)||du.add(E),E.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new st),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=Xt,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function et(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Ni&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}as.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Xr?!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())},as.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())},as.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())},as.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},as.prototype.Az=function(){return Xt},as.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Xt;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},as.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),lu(a),a.animationManager.Cc(),a=Xt,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},as.prototype.doSimulatedDragLeave=function(){var a=Xt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},as.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Xt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Ut(this,y.draggedParts.Lf(),!1,a.firstInput),Au(this,this.copiedParts,!1),bd(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},as.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Xt;if(y!==null){var x=y.diagram;if(y.Ym=!0,su(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Ut(this,y.draggedParts.Lf(),!0,a.lastInput),Au(this,this.copiedParts,!1);var E=new Yn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),fo(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Ut(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=Mn.alloc();b=E=1/0;for(var ne=-1/0,re=-1/0,oe=y.iterator;oe.next();){var ue=oe.value;if(ue.isVisible()){var ce=ue.location;ue=ce.x,ce=ce.y,isNaN(ue)||isNaN(ce)||(ue<E&&(E=ue),ce<b&&(b=ce),ue>ne&&(ne=ue),ce>re&&(re=ce))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,ne-E,re-b),E=z.x+z.width/2,b=z.y+z.height/2,Mn.free(z),z=a.Fr,ne=new Ki,re=st.alloc(),oe=y.iterator;oe.next();)ue=oe.value,ue instanceof fi&&ue.canCopy()&&(ce=x.I(ue),ce!==null&&(ce.points=ue.points,Yh(ce,z.x-E,z.y-b),ce.suspendsRouting=!0,ne.add(ce,a.Pd())));for(y=y.iterator;y.next();)ue=y.value,ue.Zc()&&ue.canCopy()&&(oe=x.I(ue),oe!==null&&(ue=ue.location,re.h(z.x-(E-ue.x),z.y-(b-ue.y)),oe.location=re,oe.Va(),ne.add(oe,a.Pd(re))));st.free(re),a.copiedParts=ne,Rc(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Yh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}as.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},as.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new st},Qe.Object.defineProperties(as.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}}}),as.prototype.getDraggingSource=as.prototype.Az;var Xt=null,gn=null;as.className="DraggingTool",du=new Un,Vr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),jo.prototype.doCancel=function(){Xt!==null&&Xt.doCancel(),Nr.prototype.doCancel.call(this)};function nn(){Nr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new fi,y=new Co;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Co,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Ni,y=new Co,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=ro,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Ni,y=new Co,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=ro,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 Ki,this.Of=this.gj=this.Pf=null}$t(nn,Nr),nn.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},nn.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),ne=pi.alloc();ne.width=y.naturalBounds.width*z,ne.height=y.naturalBounds.height*z,E.desiredSize=ne,pi.free(ne),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Oo,z=st.alloc(),x.location=y.ga(Oo,z),st.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},nn.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=ro,y.fromSpot=Cs,y.toSpot=Cs),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},nn.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},nn.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Ni){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)}},nn.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Ni))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Ni)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},nn.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(me){return b.findValidLinkablePort(me,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var ne=z.value,re=ne.part;if(re instanceof Ni){var oe=ne.ga(Oo,st.alloc()),ue=x.x-oe.x,ce=x.y-oe.y;st.free(oe),oe=ue*ue+ce*ce,oe<E&&(ue=this.validPortsCache.I(ne),ue!==null?ue&&(y=ne,E=oe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,re,ne)||!a&&this.isValidLink(re,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,E=oe):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof Ni&&(x.layer===null||x.layer.allowLink))?y:null},nn.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},nn.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},nn.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},nn.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Ni))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Ni))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},nn.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},nn.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var E=new Yn;return E.add(a),Vn(this,x,y,E)};function Vn(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Vn(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Vn(a,y.labeledLink,x,E))))}nn.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==wh){if(E===Fg){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!jn(this,a,y,x,!0)}if(E===Bg){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!jn(this,a,y,x,!0)}if(E===Cg)return a===y?a=!0:(E=new Yn,E.add(y),a=Xn(this,E,a,y,x)),!a;if(E===Eg)return!jn(this,a,y,x,!1);if(E===bg)return a===y?a=!0:(E=new Yn,E.add(y),a=yi(this,E,a,y,x)),!a}return!0};function jn(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var ne=z.value;if(ne!==E&&(!b||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&jn(a,ne,x,E,b)))return!0}return!1}function Xn(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var ne=z.value;if(ne!==b&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&Xn(a,y,ne,E,b)))return!0}return!1}function yi(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var ne=z.value;if(ne!==b){var re=ne.fromNode;if(ne=ne.toNode,re=re===x?ne:re,re!==x&&yi(a,y,re,E,b))return!0}}return!1}Qe.Object.defineProperties(nn.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}}}),nn.className="LinkingBaseTool";function Jn(){nn.call(this),this.name="Linking",this.V={},this.F=null,this.K=mi,this.Xd=null}$t(Jn,nn),Jn.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},Jn.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 Ni)))return null;var x=this.direction;if(x===mi||x===or){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===mi||x===Vi)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Jn.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 Ni&&(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 Ni&&(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)},Jn.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()},Jn.prototype.doStop=function(){nn.prototype.doStop.call(this),this.startObject=null},Jn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var re=ne.part;re instanceof Ni&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=re,b=ne):(y=re,x=ne,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(ne===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Jn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof fi)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)},Jn.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Jn.prototype.doNoLink=function(){},Qe.Object.defineProperties(Jn.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 mi=new Cn(Jn,"Either",0),or=new Cn(Jn,"ForwardsOnly",0),Vi=new Cn(Jn,"BackwardsOnly",0);Jn.className="LinkingTool",Jn.Either=mi,Jn.ForwardsOnly=or,Jn.BackwardsOnly=Vi;function Ui(){nn.call(this),this.name="Relinking";var a=new Co;a.figure="Diamond",a.desiredSize=Ca,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Co,a.figure="Diamond",a.desiredSize=Ca,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Mn}$t(Ui,nn),Ui.prototype.updateAdornments=function(a){if(a!==null&&a instanceof fi){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Ui.prototype.makeAdornment=function(a,y){var x=new pa;return x.type=ui.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Ui.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},Ui.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 pa&&x.adornedPart instanceof fi))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=io),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=io),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},Ui.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===Xh)&&(x=Eu),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}},Ui.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()},Ui.prototype.doStop=function(){nn.prototype.doStop.call(this),this.handle=null},Ui.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof Ni&&(this.isForwards?(E=ne,b=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Ui.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Ui.prototype.doNoRelink=function(){};function Jr(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Qe.Object.defineProperties(Ui.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 pa))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Ui.className="RelinkingTool",Vr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Vr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ir(){Nr.call(this),this.name="LinkReshaping";var a=new Co;a.figure="Rectangle",a.desiredSize=Ja,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Co,a.figure="Diamond",a.desiredSize=Ca,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new st,this.Yq=new Un}$t(ir,Nr),ir.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:jr},ir.prototype.om=function(a,y){a.reshapingBehavior=y},ir.prototype.updateAdornments=function(a){if(a!==null&&a instanceof fi){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)}},ir.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new pa,b.type=ui.Link,x=y.firstPickIndex;var z=y.lastPickIndex,ne=E?1:0;if(y.resegmentable&&y.computeCurve()!==Ec)for(var re=x+ne;re<z-ne;re++){var oe=this.makeResegmentHandle(a,re);oe!==null&&(oe.segmentIndex=re,oe.segmentFraction=.5,oe.fromMaxLinks=999,b.add(oe))}for(ne=x+1;ne<z;ne++)if(re=this.makeHandle(a,ne),re!==null){if(re.segmentIndex=ne,ne!==x)if(ne===x+1&&E){oe=y.i(x);var ue=y.i(x+1);nt.B(oe.x,ue.x)&&nt.B(oe.y,ue.y)&&(ue=y.i(x-1)),nt.B(oe.x,ue.x)?(this.om(re,Vo),re.cursor="n-resize"):nt.B(oe.y,ue.y)&&(this.om(re,vo),re.cursor="w-resize")}else ne===z-1&&E?(oe=y.i(z-1),ue=y.i(z),nt.B(oe.x,ue.x)&&nt.B(oe.y,ue.y)&&(oe=y.i(z+1)),nt.B(oe.x,ue.x)?(this.om(re,Vo),re.cursor="n-resize"):nt.B(oe.y,ue.y)&&(this.om(re,vo),re.cursor="w-resize")):ne!==z&&(this.om(re,ua),re.cursor="move");b.add(re)}b.adornedObject=a}return b},ir.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},ir.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},ir.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},ir.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 fi){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},ir.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},ir.prototype.stopTransaction=function(){var a=this.diagram,y=Nr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ir.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},ir.prototype.getResegmentingPoint=function(){return this.handle.ga(Oo)},ir.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},ir.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(Rr(this,ne,E,b,z,!0)||Rr(this,ne,E,b,z,!1))){var re=y.points.copy();Rr(this,ne,E,b,z,!0)?(re.cd(x-2,new st(ne.x,(z.y+ne.y)/2)),re.cd(x+1,new st(z.x,(z.y+ne.y)/2))):(re.cd(x-2,new st((z.x+ne.x)/2,ne.y)),re.cd(x+1,new st((z.x+ne.x)/2,z.y))),re.mb(x),re.mb(x-1),y.points=re,y.Wb()}else ne=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(Rr(this,E,b,z,ne,!0)||Rr(this,E,b,z,ne,!1))&&(re=y.points.copy(),Rr(this,E,b,z,ne,!0)?(re.cd(x-1,new st(E.x,(E.y+ne.y)/2)),re.cd(x+2,new st(ne.x,(E.y+ne.y)/2))):(re.cd(x-1,new st((E.x+ne.x)/2,E.y)),re.cd(x+2,new st((E.x+ne.x)/2,ne.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else ne=st.alloc(),nt.qh(E.x,E.y,z.x,z.y,b.x,b.y,ne)&&ne.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),st.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Rr(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}ir.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===Vo?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===vo&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,E===Vo?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===vo&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),ne=y.i(E+1);nt.B(z.x,b.x)&&nt.B(b.y,ne.y)?(nt.B(z.x,y.i(E-2).x)&&!nt.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),nt.B(ne.y,y.i(E+2).y)&&!nt.B(ne.x,y.i(E+2).x)?y.m(E+1,ne.x,a.y):y.L(E+1,ne.x,a.y)):nt.B(z.y,b.y)&&nt.B(b.x,ne.x)?(nt.B(z.y,y.i(E-2).y)&&!nt.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),nt.B(ne.x,y.i(E+2).x)&&!nt.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):nt.B(z.x,b.x)&&nt.B(b.x,ne.x)?(nt.B(z.x,y.i(E-2).x)&&!nt.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),nt.B(ne.x,y.i(E+2).x)&&!nt.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):nt.B(z.y,b.y)&&nt.B(b.y,ne.y)&&(nt.B(z.y,y.i(E-2).y)&&!nt.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),nt.B(ne.y,y.i(E+2).y)&&!nt.B(ne.x,y.i(E+2).x)?y.m(E+1,ne.x,a.y):y.L(E+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(Oo,st.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,st.alloc()),y.L(0,E.x,E.y),st.free(z),st.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(Oo,st.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,st.alloc()),y.L(y.pointsCount-1,a.x,a.y),st.free(x),st.free(a));y.zf()},ir.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case ua:return a;case Vo:return new st(y.i(x).x,a.y);case vo:return new st(a.x,y.i(x).y);default:case jr:return y.i(x)}},Qe.Object.defineProperties(ir.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 pa))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}}}),ir.prototype.setReshapingBehavior=ir.prototype.om,ir.prototype.getReshapingBehavior=ir.prototype.Ru;var jr=new Cn(ir,"None",0),vo=new Cn(ir,"Horizontal",1),Vo=new Cn(ir,"Vertical",2),ua=new Cn(ir,"All",3);ir.className="LinkReshapingTool",ir.None=jr,ir.Horizontal=vo,ir.Vertical=Vo,ir.All=ua,Vr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function oo(){Nr.call(this),this.name="Resizing",this.o=new pi(1,1).freeze(),this.j=new pi(9999,9999).freeze(),this.yg=new pi(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Co;a.alignmentFocus=Oo,a.figure="Rectangle",a.desiredSize=Ja,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new st,this.Dw=new pi,this.Tn=new st,this.rt=new pi(0,0),this.qt=new pi(1/0,1/0),this.pt=new pi(1,1)}$t(oo,Nr),oo.prototype.updateAdornments=function(a){if(!(a===null||a instanceof fi)){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(),wf(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},oo.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new pa,y.type=ui.Spot,y.locationSpot=Oo;var x=new Cu;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Us)),y.add(this.makeHandle(a,Tl)),y.add(this.makeHandle(a,Nn)),y.add(this.makeHandle(a,zl)),y.add(this.makeHandle(a,bo)),y.add(this.makeHandle(a,Io)),y.add(this.makeHandle(a,Dr)),y.add(this.makeHandle(a,oa))}else if(Zc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},oo.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},oo.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=Oo),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 ui)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},oo.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},oo.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))},oo.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},oo.prototype.stopTransaction=function(){var a=this.diagram,y=Nr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},oo.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},oo.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,st.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),st.free(b)}},oo.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,st.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),st.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},oo.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 ho){var E=new Un;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new ae;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},oo.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Oo);var ne=this.adornedObject.naturalBounds,re=ne.x,oe=ne.y,ue=ne.x+ne.width,ce=ne.y+ne.height,me=1;if(!z){me=ne.width;var we=ne.height;0>=me&&(me=1),0>=we&&(we=1),me=we/me}return we=st.alloc(),nt.No(a.x,a.y,re,oe,b.width,b.height,we),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(we.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=Math.max(ue-a.x,x.width),a.y=Math.max(we.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=Math.max(ce-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*a.width),a.x=ue-a.width,a.y=ce-a.height)):1<=y.y?(a.x=Math.max(we.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=Math.max(ue-a.x,x.width),a.height=Math.max(Math.min(we.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*a.width),a.x=ue-a.width)):(a.x=Math.max(we.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=ue-a.x,z||(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me,a.y=oe+.5*(ce-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(we.x-re,E.width),x.width),a.y=Math.max(we.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=Math.max(ce-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*a.width),a.y=ce-a.height)):1<=y.y?(a.width=Math.max(Math.min(we.x-re,E.width),x.width),a.height=Math.max(Math.min(we.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*a.width))):(a.width=Math.max(Math.min(we.x-re,E.width),x.width),z||(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me,a.y=oe+.5*(ce-oe-a.height))):0>=y.y?(a.y=Math.max(we.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=ce-a.y,z||(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*a.width,a.x=re+.5*(ue-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(we.y-oe,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*a.width,a.x=re+.5*(ue-re-a.width))),st.free(we),a},oo.prototype.computeReshape=function(){var a=ii;return this.adornedObject instanceof Co&&(a=Ov(this.adornedObject)),!(a===tr||this.diagram.lastInput.shift)},oo.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},oo.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},oo.prototype.computeCellSize=function(){var a=new pi(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},Qe.Object.defineProperties(oo.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 pa))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 pa)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}}}),oo.className="ResizingTool",Vr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Wo(){Nr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new st,this.ue=null;var a=new Co;a.figure="Ellipse",a.desiredSize=Ca,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new st(NaN,NaN),this.u=0,this.F=50}$t(Wo,Nr),Wo.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)}},Wo.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new pa,y.type=ui.Position,y.locationSpot=Oo;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Zc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Wo.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},Wo.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)},Wo.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(Oo)},Wo.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},Wo.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new st(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Wo.prototype.stopTransaction=function(){var a=this.diagram,y=Nr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Wo.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Wo.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Wo.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()},Wo.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Wo.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},Qe.Object.defineProperties(Wo.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 pa))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 pa)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}}}),Wo.className="RotatingTool",Vr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Ta(){Nr.call(this),this.name="ClickSelecting"}$t(Ta,Nr),Ta.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Ta.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Ta.className="ClickSelectingTool";function uo(){Nr.call(this),this.name="Action",this.pk=null}$t(uo,Nr),uo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},uo.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()},uo.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))}},uo.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()},uo.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())},uo.prototype.doStop=function(){this.pk=null},uo.className="ActionTool";function To(){Nr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new st(0,0)}$t(To,Nr),To.prototype.canStart=function(){if(!this.isEnabled||this.archetypeNodeData===null)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(a.lastInput.clickCount===1&&(this.mw=a.lastInput.viewPoint.copy()),a.lastInput.clickCount!==2||this.isBeyondDragSize(this.mw))return!1}else if(a.lastInput.clickCount!==1)return!1;return!(a.currentTool!==this&&a.Ol(a.lastInput.documentPoint,!0)!==null)},To.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},To.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof xr)x.Zc()&&(Zc(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);tn(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=st.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),st.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Qe.Object.defineProperties(To.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}}),To.className="ClickCreatingTool";function co(){Nr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new xr;a.layerName="Tool",a.selectable=!1;var y=new Co;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}$t(co,Nr),co.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))},co.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},co.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},co.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var E=pi.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),pi.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},co.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()},co.prototype.computeBoxBounds=function(){var a=this.diagram;return new Mn(a.firstInput.documentPoint,a.lastInput.documentPoint)},co.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Xr?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 Un,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Qe.Object.defineProperties(co.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}}}),co.className="DragSelectingTool";function Ar(){Nr.call(this),this.name="Panning",this.Xt=new st,this.xy=new st,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(ht.document,"scroll",a.Kw,!1),a.stopTool()}}$t(Ar,Nr),Ar.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())},Ar.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(ht.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Ar.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ar.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ar.prototype.doMouseMove=function(){this.move()},Ar.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ar.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},Qe.Object.defineProperties(Ar.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ar.className="PanningTool",Vr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Vr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Vr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Vr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Vr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Fo(){this.F=this.u=this.j=this.o=null}Qe.Object.defineProperties(Fo.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}}}),Fo.className="HTMLInfo";function ta(a,y,x){this.text=a,this.hx=y,this.visible=x}ta.className="ContextMenuButtonInfo";function Sa(){Nr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new st,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}$t(Sa,Nr);function Pa(a){var y=new Fo;y.show=function(b,z,ne){ne.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},us=y,a.tu=function(){a.stopTool()},y=Qn("div");var x=Qn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var E=Qn("style");ht.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",ao,!1),E.addEventListener(y,"selectstart",ao,!1),E.addEventListener(x,"contextmenu",ao,!1)),y.className="goCXforeground",x.className="goCXbackground",ht.document.body&&(ht.document.body.appendChild(y),ht.document.body.appendChild(x)),Za=y,Ls=x,qs=!0}function ao(a){return a.preventDefault(),!1}Sa.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)},Sa.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Sa.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Sa.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof dn||(a instanceof Vt?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},Sa.prototype.doActivate=function(){},Sa.prototype.doMouseDown=function(){if(Nr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof pa){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&ka(this)},Sa.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof pa){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}ka(this)};function ka(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof Fo||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(Va(a,!0),a.isActive||a.stopTool())}Sa.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Va(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=us,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof Vt?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof pa&&!a.currentContextMenu.visible&&a.stopTool()}}Sa.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Sa.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof pa){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Fo&&a.show(y,x,this);this.currentContextMenu=a},Sa.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},Sa.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof pa?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Fo&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function bs(a){var y=new Un;return y.add(new ta("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new ta("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new ta("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new ta("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new ta("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new ta("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new ta("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new ta("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new ta("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new ta("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new ta("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new ta("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new ta("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Sa.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=bs(this)),Za.innerHTML="",Ls.addEventListener("pointerdown",this.tu,!1);var y=this,x=Qn("ul");x.className="goCXul",Za.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=Qn("li"),z.className="goCXli";var ne=Qn("a");ne.className="goCXa",ne.href="#",ne.ky=b.hx,ne.addEventListener("pointerdown",function(re){return this.ky(a),y.stopTool(),re.preventDefault(),!1},!1),ne.textContent=b.text,z.appendChild(ne),x.appendChild(z)}}Za.style.display="block",Ls.style.display="block"},Sa.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===us){Za.style.display="none",Ls.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Ls,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Qe.Object.defineProperties(Sa.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof pa?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return qs===!1&&us===null&&As&&Pa(this),us},set:function(a){a===null&&(qs=!0),us=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var us=null,qs=!1,Ls=null,Za=null;Sa.className="ContextMenuTool",Vr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function aa(){Nr.call(this),this.name="TextEditing",this.Zh=new es,this.ia=null,this.V=Xo,this.vj=null,this.qa=Uo,this.u=1,this.F=!0,this.o=null,this.j=new Fo,this.kt=null,fs(this,this.j)}$t(aa,Nr);function fs(a,y){if(As){var x=Qn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(da)):b==="Tab"?(a.acceptText(ba),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Uo){var E=a.kt;a.qa===Ra&&(a.qa=ss),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Uo){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof es&&z instanceof aa)if(z.state===Al)x.style.border="3px solid red",x.focus();else{var ne=E.ga(Oo),re=b.position,oe=b.scale,ue=E.Df()*oe;ue<z.minimumEditorScale&&(ue=z.minimumEditorScale);var ce=E.naturalBounds.width*ue+6,me=E.naturalBounds.height*ue+2,we=(ne.x-re.x)*oe;ne=(ne.y-re.y)*oe,re=E.verticalAlignment,oe=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*ue,me=re.y*me-re.y*oe+re.offsetY-(.5*me-.5*oe)-oe/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*ue+"%",x.style.lineHeight="normal",x.style.width=ce+"px",x.style.left=(we-ce/2|0)-1+"px",x.style.top=(ne+me|0)-1+"px",x.style.textAlign=E.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=E.lineCount,x.wA=ue,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}aa.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Vl&&Vl!==this&&(Vl.acceptText(cl),Vl&&Vl!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof es&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Xo&&!y.isSelected||this.starting===Ps&&2>a.lastInput.clickCount)):!1},aa.prototype.doStart=function(){Vl=this,this.textBlock!==null&&this.doActivate()},aa.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 es&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Ra;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Mn(this.textBlock.ga(Us),this.textBlock.ga(Nn));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},aa.prototype.doCancel=function(){this.stopTool()},aa.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},aa.prototype.doMouseDown=function(){this.isActive&&this.acceptText(cl)},aa.prototype.acceptText=function(a){switch(a){case cl:this.qa===bl?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Ra||this.qa===Al||this.qa===ss)&&(this.qa=cs,el(this));break;case Ws:case da:case ba:(da!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Ra||this.qa===Al||this.qa===ss)&&(this.qa=cs,el(this))}};function el(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=bl,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Al,a.doError(b,z))}}aa.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)},aa.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},aa.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Uo,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},aa.prototype.doStop=function(){Vl=null},aa.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},aa.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Qe.Object.defineProperties(aa.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)}}}),aa.prototype.measureTemporaryTextBlock=aa.prototype.Lx;var Ws=new Cn(aa,"LostFocus",0),cl=new Cn(aa,"MouseDown",1),ba=new Cn(aa,"Tab",2),da=new Cn(aa,"Enter",3),wa=new Cn(aa,"SingleClick",0),Xo=new Cn(aa,"SingleClickSelected",1),Ps=new Cn(aa,"DoubleClick",2),Uo=new Cn(aa,"StateNone",0),Ra=new Cn(aa,"StateActive",1),ss=new Cn(aa,"StateEditing",2),cs=new Cn(aa,"StateValidating",3),Al=new Cn(aa,"StateInvalid",4),bl=new Cn(aa,"StateValidated",5),Vl=null;aa.className="TextEditingTool",aa.LostFocus=Ws,aa.MouseDown=cl,aa.Tab=ba,aa.Enter=da,aa.SingleClick=wa,aa.SingleClickSelected=Xo,aa.DoubleClick=Ps,aa.StateNone=Uo,aa.StateActive=Ra,aa.StateEditing=ss,aa.StateValidating=cs,aa.StateInvalid=Al,aa.StateValidated=bl,Vr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Fs(a){Du||(Ul(),Du=!0),this.H=Bc,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=ml,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Yn,this.ce=new Ns,this.ce.Yd=this,this.Ei=new Yn,this.pu=new Yn,this.Sr=new Yn,this.pr=new Yn,a&&Object.assign(this,a)}Fs.prototype.Xe=function(a){this.H=a},Fs.prototype.canStart=function(){return!0};function Zl(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Ml(a.H),a.zb=!0)}function dl(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===ml?(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===Ou&&y.vc.clear(),a.Qw=!!(a.Pk===Iu&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),Hl(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==iu&&E!==null&&(delete E.start.scale,delete E.end.scale),ht.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Bl(x),Hd(x),a.zb=!1,y.start(),y.bc&&(Ms(a),x.Ya(),Vc(y,0),lu(x,!0),Gs(a),x.R("AnimationStarting",a)))}))}}function Fl(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function _c(a,y,x,E){a.isTicking||Fl(a)||y instanceof fi&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Ne=Fs.prototype,Ne.fv=function(a){return this.ce.fv(a)},Ne.Xu=function(a){return this.ce.Xu(a)};function Bs(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var ne=z.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var re=!0;else{for(re=ne.vc.iterator;re.next();){var oe=re.key;if(oe instanceof Vt&&oe.diagram!==null||oe instanceof dn){re=!0;break e}}re=!1}re?$u(ne,!1):ne.Xk=!0}}b.pu.clear(),b.bc!==!1&&(Ms(b),lu(b.H),Gs(b)),ht.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),ht.requestAnimationFrame(function(){x()}))}function Ts(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Ms(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 Gs(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(),Hl(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Hl(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),js(this,a))},Ne.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),$s(this.ce,y,"position",y.position,y.position),js(this,a))};function pl(a,y,x){!a.zb||y.D(x)||Fl(a)||(a.H.pi||(y=x.copy()),$s(a.ce,a.H,"position",y,x))}function is(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function js(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Dl(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],ne=a[1],re=a[2];a=a[3];var oe=y[0],ue=y[1],ce=y[2];return y=y[3],re===0||re===100?(z=oe,ne=ue):(ce===0||ce===100)&&(oe=z,ue=ne),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=b(x,z,oe-z,E)%360,ne=b(x,ne,ue-ne,E),re=b(x,re,ce-re,E),x=b(x,a,y-a,E),"hsla("+z+", "+ne+"%, "+re+"%, "+x+")"}function Ul(){function a(x,E,b,z,ne,re){x.position=new st(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}var y=new Ki;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!1):x.position=new st(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("location",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!0):x.location=new st(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("position:placeholder",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!1):x.position=new st(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("position:nodeCollapse",function(x,E,b,z,ne,re){var oe=x.actualBounds,ue=b.actualBounds;b=ue.x+ue.width/2-oe.width/2,oe=ue.y+ue.height/2-oe.height/2,ne<re?x.mm(z(ne,E.x,b-E.x,re),z(ne,E.y,oe-E.y,re),!1):x.position=new st(z(ne,E.x,b-E.x,re),z(ne,E.y,oe-E.y,re))}),y.add("desiredSize",function(x,E,b,z,ne,re){x.desiredSize=new Mn(z(ne,E.width,b.width-E.width,re),z(ne,E.height,b.height-E.height,re))}),y.add("width",function(x,E,b,z,ne,re){x.width=z(ne,E,b-E,re)}),y.add("height",function(x,E,b,z,ne,re){x.height=z(ne,E,b-E,re)}),y.add("fill",function(x,E,b,z,ne,re){x.fill=Dl(E,b,ne,re,z)}),y.add("stroke",function(x,E,b,z,ne,re){x.stroke=Dl(E,b,ne,re,z)}),y.add("strokeWidth",function(x,E,b,z,ne,re){x.strokeWidth=z(ne,E,b-E,re)}),y.add("strokeDashOffset",function(x,E,b,z,ne,re){x.strokeDashOffset=z(ne,E,b-E,re)}),y.add("background",function(x,E,b,z,ne,re){x.background=Dl(E,b,ne,re,z)}),y.add("areaBackground",function(x,E,b,z,ne,re){x.areaBackground=Dl(E,b,ne,re,z)}),y.add("opacity",function(x,E,b,z,ne,re){x.opacity=z(ne,E,b-E,re)}),y.add("scale",function(x,E,b,z,ne,re){x.scale=z(ne,E,b-E,re)}),y.add("angle",function(x,E,b,z,ne,re){x.angle=z(ne,E,b-E,re)}),Gu=y}Qe.Object.defineProperties(Fs.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&&Kn(a,">= 1",Fs,"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}}}),Fs.prototype.stopAnimation=Fs.prototype.Cc;var Gu=null,Du=!1,ml=new Cn(Fs,"Default",1),Iu=new Cn(Fs,"AnimateLocations",2),Ou=new Cn(Fs,"None",3);Fs.className="AnimationManager",Fs.defineAnimationEffect=function(a,y){Du||(Ul(),Du=!0),Gu.add(a,y)},Fs.Default=ml,Fs.AnimateLocations=Iu,Fs.None=Ou;function Ns(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=sc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=sa,this.vc=new Ki,this.Tt=new Ki,this.yl=new Yn,this.Ut=new Yn,this.dw=Yd,a&&Object.assign(this,a)}Ns.prototype.suspend=function(){this.Xk=!0},Ns.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,$u(this,!0),Ms(this.Yd),lu(this.H),Gs(this.Yd),this.H.redraw()};function Hl(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=Ns.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 dn?a=x:x instanceof Vt&&(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===ml&&this===y.defaultAnimation&&(this.Lp=lc,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=pf),Ms(y),this.yl.each(function(E){E.data=null,a.add(E)}),Gs(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Bs(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,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof dn?this.H=a:a instanceof Vt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof xr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return $s(this,a,y,x,E,b),this};function $s(a,y,x,E,b,z){var ne=a.vc;if(y instanceof dn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Cc(E),Yf(),E=[Ju.j,Ju.u,Ju.o,Ju.F],Cc(b),Yf(),b=[Ju.j,Ju.u,Ju.o,Ju.F]),ne.contains(y)){var re=ne.I(y),oe=re.start,ue=re.end;oe[x]===void 0&&(oe[x]=zs(E)),ue[x]=zs(b)}else oe={},ue={},oe[x]=zs(E),ue[x]=zs(b),re=oe.position,y instanceof Vt&&re instanceof st&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(ue.position),re=new Ku(oe,ue,z),ne.add(y,re);ne=oe[x],ne instanceof st&&!ne.w()&&ne.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof xr?re.Ku.location=zs(y.location):z&&(re.Ku[x]=zs(E))}function zs(a){return a instanceof st||a instanceof pi?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 $u(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),Ms(x),Vc(a,b),lu(a.H,!0),Gs(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function Vc(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Vt&&z.diagram===null)){var ne=E.value,re=b?ne.end:ne.start;ne=b?ne.start:ne.end;var oe=Gu,ue;for(ue in ne)ue==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||oe.get(ue)===null||oe.get(ue)(z,re[ue],ne[ue],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,Ms(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=Gu;E.next();){var ne=E.key,re=E.value,oe=b?re.end:re.start,ue=b?re.start:re.end,ce=re.Ku,me;for(me in ue)if(z.get(me)!==null){var we=me;!re.Hu||we!=="position:nodeCollapse"&&we!=="position:placeholder"||(we="position"),z.get(we)(ne,oe[me],ce[me]!==void 0?ce[me]:re.Hu?oe[me]:ue[me],this.Lp,this.Gd,this.Gd,this)}re.Hu&&ce.location!==void 0&&ne instanceof xr&&(ne.location=ce.location),re.nv&&ne instanceof xr&&ne.Zb(!1)}if(y.As.clear(),dh(y,!1),y.Ya(),y.N(),lu(y,!0),x.defaultAnimation===this){for(me=x.pr.iterator;me.next();)b=me.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}lu(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Gs(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Hl(this,null),x.Ml(this),y.$b())}},Ne.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof ho&&(E=y.placeholder),E!==null?(x=E.ga(Us),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new st(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof ho)for(a=a.memberParts;a.next();)E=a.value,E instanceof Ni&&this.Cj(E,y)},Ne.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof ho&&(x=y.placeholder),x!==null){var E=x.ga(Us);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof ho)for(a=a.memberParts;a.next();)E=a.value,E instanceof Ni&&this.Aj(E,y)}},Ne.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Qe.Object.defineProperties(Ns.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Kn(a,">= 1",Ns,"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:Et("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}}}),Ns.prototype.getTemporaryState=Ns.prototype.Ez,Ns.prototype.stop=Ns.prototype.stop,Ns.prototype.add=Ns.prototype.add,Ns.prototype.addTemporaryPart=Ns.prototype.Iy;function sc(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function lc(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Ns.className="Animation",Ns.EaseLinear=function(a,y,x,E){return x*a/E+y},Ns.EaseInOutQuad=sc,Ns.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Ns.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Ns.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Ns.EaseOutExpo=lc;function Ku(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ku.className="AnimationState";function Tu(a,y,x){this.xd=null,this.rf=a,this.so=x||Ys,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=vl))}Tu.prototype.copy=function(){var a=new Tu(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 ws(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))}Qe.Object.defineProperties(Tu.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 Ys=new Cn(Tu,"Default",1),vl=new Cn(Tu,"Immediate",2),Xs=new Cn(Tu,"Bundled",3);Tu.className="AnimationTrigger",Tu.Default=Ys,Tu.Immediate=vl,Tu.Bundled=Xs;function ms(a){Ao(this),this.H=null,this.Pa=new Un,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=ms.prototype,Ne.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Jl(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,E=0,b=0,z=0,ne=0,re=this.Pa.iterator;re.next();){var oe=re.value;oe instanceof ho?b++:oe instanceof Ni?E++:oe instanceof fi?z++:oe instanceof pa?ne++:x++}if(re="",0<x&&(re+=x+" Parts "),0<E&&(re+=E+" Nodes "),0<b&&(re+=b+" Groups "),0<z&&(re+=z+" Links "),0<ne&&(re+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,re+=`
`+x.toString(),E=x.data,E!==null&&nr(E)&&(re+=" #"+nr(E)),x instanceof Ni?re+=" "+sr(E):x instanceof fi&&(re+=" "+sr(x.fromNode)+" "+sr(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 E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=st.alloc(),z=this.Pa.s,ne=z.length;ne--;){var re=z[ne];if((E!==!0||wf(re)!==!1)&&re.isVisible()&&(b.assign(a),Eo(b,re.oe),re=re.ic(b,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return st.free(b),re}return st.free(b),null},Ne.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Un||E instanceof Yn||(E=new Yn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=st.alloc(),ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((b!==!0||wf(oe)!==!1)&&oe.isVisible()){z.assign(a),Eo(z,oe.oe);var ue=oe;oe.ji(z,y,x,E)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||E.add(ue))}}return st.free(z),E},Ne.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Un||b instanceof Yn||(b=new Yn),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((z!==!0||wf(oe)!==!1)&&oe.isVisible()){var ue=oe;oe.Cf(a,y,x,E,b)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||b.add(ue))}}return b},Ne.Nu=function(a,y,x,E,b,z,ne){if(this.Uh===!1)return b;for(var re=this.Pa.s,oe=re.length;oe--;){var ue=re[oe];if((ne!==!0||wf(ue)!==!1)&&z(ue)&&ue.isVisible()){var ce=ue;ue.Cf(a,y,x,E,b)&&(y!==null&&(ce=y(ce)),ce===null||x!==null&&!x(ce)||b.add(ce))}}return b},Ne.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Un||b instanceof Yn)&&(z=b),b=!0),z instanceof Un||z instanceof Yn||(z=new Yn),this.Uh===!1)return z;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var re=st.alloc(),oe=st.alloc(),ue=this.Pa.s,ce=ue.length;ce--;){var me=ue[ce];if((ne!==!0||wf(me)!==!1)&&me.isVisible()){re.assign(a),Eo(re,me.oe),oe.h(a.x+y,a.y),Eo(oe,me.oe);var we=me;me.og(re,oe,x,E,b,z)&&(x!==null&&(we=x(we)),we===null||E!==null&&!E(we)||z.add(we))}}return st.free(re),st.free(oe),z},Ne.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=vi();for(var b=vi(),z=0;z<E;z++){var ne=x[z];if(ne.vw=z,ne instanceof fi){if(ne.fd===!1)continue}else if(ne instanceof pa&&ne.adornedPart!==null)continue;var re=ne.actualBounds;ne.isVisible()&&eu(re,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&b.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],$v(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)$v(b[y]);Ti(a),Ti(b)}}};function yl(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 E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=yl(this,a);var z=this.Zq;z.length=0;for(var ne=y.scale,re=Mn.alloc(),oe=0;oe<E;oe++)this.Oj(a,x[oe],y,z,ne,re,!0);if(Mn.free(re),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Su(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var ne=yl(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,ue=Mn.alloc(),ce=0;ce<z;ce++){var me=b[ce];E.contains(me)&&a.Oj(y,me,x,re,oe,ue,!1)}Mn.free(ue),y.globalAlpha=ne}}}Ne.Oj=function(a,y,x,E,b,z,ne){if(ne&&!wf(y))a.Hs(y);else{if(E!==null&&y instanceof fi&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,E=y.containingGroup;E!==null;)ne?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(ne=!0,z.assign(E.tb)),E=E.containingGroup;var re=y.actualBounds;if(E=!1,ne&&y.isVisible()){if(!z.Yc(re)){a.Hs(y);return}E=!z.Re(re)}E&&(a.save(),a instanceof Ia?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),re.width*b>x.Oq||re.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Ds(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Ds(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),Ds(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),E&&(a.restore(),a.Vc(!0))}},Ne.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(_o,a,this,y,x,E,b)},Ne.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&Jl(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),xc(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 E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,Jl(y),a};function xc(a,y,x){if(y=jd(a,y,x),x instanceof ho&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];if(re===x&&(y=ne,0<=E)||0>E&&re.containingGroup===x&&(E=ne,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&xc(a,-1,y)}x.svg!==null&&x.svg.remove()}function jd(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,ne=NaN;0<=z&&(ne=a.M(z).zOrder,!!isNaN(ne));)z--;for(var re=y+1,oe=NaN;re<b&&(oe=a.M(re).zOrder,!!isNaN(oe));)re++;if(!isNaN(ne)&&ne>E)for(;;){if(z===-1||ne<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(ne=NaN;0<=--z&&(ne=a.M(z).zOrder,isNaN(ne)););}else if(!isNaN(oe)&&oe<E)for(;;){if(re===b||oe>=E){if(re--,re===y)break;return a.mb(y),a.Gb(re,x),re}for(oe=NaN;++re<b&&(oe=a.M(re).zOrder,isNaN(oe)););}return y}Qe.Object.defineProperties(ms.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===""&&Et("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Et("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)&&Kn(a,"0 <= value <= 1",ms,"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))}}}),ms.prototype.findObjectsNear=ms.prototype.og,ms.prototype.findObjectsIn=ms.prototype.Cf,ms.prototype.findObjectsAt=ms.prototype.ji,ms.prototype.findObjectAt=ms.prototype.ic,ms.className="Layer";function dn(a,y){if(ip||(Yl(),ip=!0),Ao(this),Bc=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,As){var x=this,E=function(){x.removeEventListener(ht.document,"DOMContentLoaded",E,!1),x.setRTL()};ht.document.body!==null?this.setRTL():x.addEventListener(ht.document,"DOMContentLoaded",E,!1)}this.ol=null,Uf.add("Model",ja);var b=this;return this.Hb=function(z){var ne=b.partManager;if(z.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var re=z.change;z.modelChange===""&&re===_o&&ne.updateDataBindings(z.object,z.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,df(this),this.model=Sy(),this.Wg=!0,hh(this),this.layout=new xs,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"||ht.Element&&a instanceof Element?Rh(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var sd,Bc;function df(a){a.Yd=new Fs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Un,a.pj=new Ki,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new st(NaN,NaN).freeze(),a.du=new st(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new st(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Yt,a.zu=new st(NaN,NaN).freeze(),a.ut=new Mn(NaN,NaN,NaN,NaN).freeze(),a.rj=new hr(0,0,0,0).freeze(),a.sj=Yd,a.nu=!1,a.Zt=null,a.fu=null,a.yh=iu,a.zk=Fi,a.Fg=iu,a.pq=Fi,a.yt=Us,a.Bt=Us,a.Fc=!0,a.pn=!1,a.De=new Yn,a.Eh=new Ki,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new hr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Or,a.bq.diagram=a,a.Qg=new Or,a.Qg.diagram=a,a.cj=new Or,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,Hp(a),a.ai=new Yn,a.Ht=!0,a.uu=Ld,a.pw=!1,a.wu=wh,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 Ki,a.Xn=new Un,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 hr(5).freeze(),a.Hw=new Yn().freeze(),a.Nt=999999999,a.nw=new Yn().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 Yn,a.ow=new Yn,a.Xh=null,a.aw=new pi(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new st,bounds:new Mn,Py:new pi,bA:new pi,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Mn(NaN,NaN,NaN,NaN).freeze(),a.wo=new pi(NaN,NaN).freeze(),a.Sp=new Mn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Ki;var y=new Ni,x=new es;x.bind(new tl("text","",sr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Ni,x=new es,x.stroke="brown",x.bind(new tl("text","",sr)),y.add(x),a.Lg.add("Comment",y),y=new Ni,y.selectable=!1,y.avoidable=!1,x=new Co,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new pi(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Ki,y=new ho,y.selectionObjectName="GROUPPANEL",y.type=ui.Vertical,x=new es,x.font="bold 12pt sans-serif",x.bind(new tl("text","",sr)),y.add(x),x=new ui(ui.Auto),x.name="GROUPPANEL";var E=new Co;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new Cu,E.padding=new hr(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Ki,y=new fi,x=new Co,x.isPanelMain=!0,y.add(x),x=new Co,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new fi,x=new Co,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new pa,y.type=ui.Auto,x=new Co,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Cu,x.margin=new hr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new pa,y.type=ui.Link,x=new Co,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 ja,a.toolManager=new jo,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=Zd(),a.eq=null,a.fq=Ga,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 st,a.zy=500,a.wp=new st,a.wq=!1}dn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Zh=null,Ud="",zd(this,!1),this.Xn.clear(),fp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function zd(a,y){a.animationManager.Cc(!0),a.Hw=new Yn().freeze(),a.nw=new Yn().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var re=a.Wa.s[y].parts;re.next();){var oe=re.value;oe!==b&&oe.data===null&&z.push(oe)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<ne;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),fp(),a.Og.clear(),Cr=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Zd(){return null}dn.prototype.reset=function(){this.clear(),this.vb=!0,df(this),Jc(this),this.Wg=!0,hh(this),this.layout=new xs,this.Wg=!1,this.model=Sy(),this.model.undoManager=new Oa,this.vb=this.rn=!1,this.N()},dn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=ht.document.body);var y=Qn("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},dn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=ht.document.body);var y=0;if(As){var x=np;y=sd,x===null&&(x=np=Qn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=sd=Qn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||Xr||(y=11)}this.Db=y,this.Gw=!0},dn.prototype.qb=function(a){a.classType===dn&&(this.autoScale=a)},dn.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 Rh(a,y){if(As){if(y!=null||Et("Diagram setup requires an argument DIV."),a.Ka!==null&&Et("Diagram has already completed setup."),typeof y=="string"?a.Ka=ht.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Et("No DIV or DIV id supplied: "+y),a.Ka===null&&Et("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Et("Invalid div id; div already has a Diagram associated with it."),!a.ol&&ht.ResizeObserver){var x=fn(function(){a.$b()},250);a.ol=new ht.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}ht.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=ht.go;var b=new Gl(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",ht.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),$d(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Gl(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,As){b=Qn("div");var z=Qn("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=Hf,b.addEventListener("pointerdown",fh),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=fn(function(){a.Yh=null,a.N()},300),a.Ov=fn(function(){Hd(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var re=Pu(a,ne,!0);re.bubbles=!0;var oe=0,ue=0;re.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(oe=0<ne.deltaX?1:-1),ne.deltaY!==0&&(ue=0<ne.deltaY?1:-1),re.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-oe:-ue):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(oe=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(ue=0<ne.wheelDeltaY?-1:1),re.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-oe:-ue):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(re.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),ku(re,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Pu(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var re=a.Yt;re[ne.pointerId]===void 0&&(re[ne.pointerId]=ne),re=a.oj;var oe=!1;if(re[0]===null||re[0].pointerId!==ne.pointerId&&re[0].pointerType===ne.pointerType)if(re[1]!==null&&re[1].pointerId===ne.pointerId)re[1]=ne,oe=!0;else if(re[0]===null)re[0]=ne;else if(re[1]===null)re[1]=ne,oe=!0;else{ne.preventDefault();return}else re[0]=ne;(re=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var ue=oe;oe=_h(a,ne,!0,!1,!0,ue),Uc(a,ne,oe),oe.targetDiagram=Md(ne,ne.target),oe.targetObject=null,ue||oe.clone(a.bq),ue=a.uw,re=re?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(ue.x-ne.screenX)>re||Math.abs(ue.y-ne.screenY)>re)?a.yq++:a.yq=1,oe.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():ku(oe,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var re=a.oj;if(re[0]===null||re[0].pointerId!==ne.pointerId&&re[0].pointerType===ne.pointerType){if(re[1]!==null&&re[1].pointerId===ne.pointerId){re[1]=ne;return}if(re[0]===null)re[0]=ne;else return}else re[0]=ne;if(re[0].pointerId===ne.pointerId){re=_h(a,ne,!1,!1,!1,re[1]!==null);var oe=ht.document.elementFromPoint(ne.clientX,ne.clientY)||null;oe!==null&&oe.shadowRoot!==void 0&&oe.shadowRoot!==null&&(oe=oe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var ue=a,ce=ne;oe&&oe.H&&(ce=ne,ue=oe.H),re.targetDiagram=ue,Uc(a,ce,re),re.targetObject=null,a.doMouseMove(),ku(re,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var re=ne.pointerType==="touch"||ne.pointerType==="pen",oe=a.Yt;if(re&&a.qu)delete oe[ne.pointerId],ne.preventDefault();else if(oe=a.oj,oe[0]===null||oe[0].pointerId!==ne.pointerId&&oe[0].pointerType===ne.pointerType)oe[1]!==null&&oe[1].pointerId===ne.pointerId&&(oe[1]=null);else{oe[0]=null,oe=_h(a,ne,!1,!0,!0,!1);var ue=ht.document.elementFromPoint(ne.clientX,ne.clientY)||null;ue!==null&&ue.shadowRoot!==void 0&&ue.shadowRoot!==null&&(ue=ue.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),ue!==null&&ue.H instanceof dn&&ue.H!==a&&Uc(ue.H,ne,oe),ue===null&&(ue=ne.target),Uc(a,ne,oe),oe.clickCount=a.yq,oe.targetDiagram=Md(ne,ue),oe.targetObject=null,a.doMouseUp(),ku(oe,ne),re&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var re=a.Yt;re[ne.pointerId]&&delete re[ne.pointerId],re=a.oj,re[0]!==null&&re[0].pointerId===ne.pointerId&&(re[0]=null),re[1]!==null&&re[1].pointerId===ne.pointerId&&(re[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var re=a.oj;re[0]!==null&&re[0].pointerId===ne.pointerId?(re[0]=null,a.wq=!1):re[1]!==null&&re[1].pointerId===ne.pointerId&&(re[1]=null)},a.Vp=E.Z["d"+bh[1]+bh[2]+"wI"+Eh.slice(1,5)]["b"+DS.slice(1,y)](E.Z,mf,y,y),E.Vc(!0),Qg(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}dn.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},dn.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};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(ht,"resize",a.Ov,!1)}function Bl(a){30<a.Sq&&(a.Yh=1)}function dh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),er&&er.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}dn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:ht.devicePixelRatio||1},dn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},dn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},dn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},dn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},dn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},dn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},dn.prototype.doFocus=function(){this.focus()},dn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=ht.scrollX||ht.pageXOffset,y=ht.scrollY||ht.pageYOffset;this.ta.focus(),ht.scrollTo(a,y)}},dn.prototype.Oy=function(){this.H.R("GainedFocus")},dn.prototype.Ny=function(){this.H.R("LostFocus")};function Hd(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===iu&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function hh(a){var y=new ms;y.name="Background",a.Al(y),y=new ms,y.name="",a.Al(y),y=new ms,y.name="Foreground",a.Al(y),y=new ms,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ms,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ms,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function hf(a){var y=new ui(ui.Grid);y.name="GRID";var x=new Co;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Co,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Co,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Co,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Co,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Co,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new xr,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 Hf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):cd(this.H)}function fh(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):cd(this.H)}dn.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,ne=E.x-z.left,re=E.y-z.top,oe=E.width+z.left+z.right,ue=E.height+z.top+z.bottom,ce=E.right+z.right;z=E.bottom+z.bottom;var me=b.x;E=b.y;var we=b.width,Fe=b.height,De=b.right,_e=b.bottom;b=this.scale;var pt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":pt=pt+a.scrollWidth-a.clientWidth;break;case"reverse":pt=a.scrollWidth-pt-a.clientWidth}var it=pt;we<oe||Fe<ue?(pt=st.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==it&&(pt.x=it/b+ne,this.ju=it),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(pt.y=a.scrollTop/b+re,this.lu=a.scrollTop),this.position=pt,st.free(pt),this.Ee=this.qr=!1):(pt=st.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<me&&(this.position=pt.h(it+ne,this.position.y)),ce>De&&(this.position=pt.h(-(y.scrollWidth-this.Aa)+it-this.Aa/b+ce,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<E&&(this.position=pt.h(this.position.x,a.scrollTop+re)),z>_e&&(this.position=pt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),st.free(pt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ce=E.right,De=b.right,z=E.bottom,_e=b.bottom,ne=E.x,me=b.x,re=E.y,E=b.y,we>=oe&&ne>=me&&ce<=De&&(x.style.width="1px"),Fe>=ue&&re>=E&&z<=_e&&(x.style.height="1px"))}},dn.prototype.computeBounds=function(a){return a===void 0&&(a=new Mn),Ml(this),gh(this,a)};function gh(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var ne=E[z];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var re=ne.length,oe=0;oe<re;oe++){var ue=ne[oe];ue.isInDocumentBounds&&ue.isVisible()&&(ue=ue.actualBounds,ue.w()&&(x?(x=!1,y.assign(ue)):y.ed(ue)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}dn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(sn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof fi||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof fi||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Mn(NaN,NaN,0,0):x};function Vu(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=st.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Mn.allocAt(0,0,E.width,E.height);var b=st.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Mn.free(E),st.free(b),st.free(x)}x=a.yh,y&&a.Fg!==iu&&(x=a.Fg);var z=x!==iu?Wd(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var ne=a.ya/z,re=a.zk,oe=a.pq;y&&!re.sb()&&(oe.sb()||oe.Xb())&&(re=oe.Xb()?Oo:oe),ff(a,a.documentBounds,b,ne,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,nt.B(z.x,x)&&nt.B(z.y,E)&&nt.B(z.width,b)&&nt.B(z.height,ne)||a.onViewportBoundsChanged(new Mn(x,E,b,ne),z,y,!1)}}function Wd(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),re=z/b,oe=ne/E;return y===Ru?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Hh?(y=oe>re?(ne-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}dn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Yd,this.scale=Wd(this,Ru),a!==Yd&&(Vu(this,!1),ff(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Ne=dn.prototype,Ne.BA=function(a,y){y===void 0&&(y=Ru);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===Ru||y===Hh)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===Hh?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new st(a.x,a.y)}},Ne.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new st(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Ne.zz=function(a){if(a instanceof Vt){this.eq=a;var y=st.alloc();this.fq=this.op(a.ga(Us,y)),st.free(y)}else this.eq=null,this.fq=Ga};function ff(a,y,x,E,b,z){var ne=st.allocAt(a.pa.x,a.pa.y),re=ne.x,oe=ne.y;if(a.eq!==null){var ue=st.alloc();ue=a.eq.ga(Us,ue),re=ue.x-a.fq.x/a.scale,oe=ue.y-a.fq.y/a.scale,b=Cs,st.free(ue)}(z||a.scrollMode===Yd)&&(b.sb()&&(x>y.width&&(re=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(oe=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(re=Math.min(re+x/2,y.right+Math.max(z,b.right)-x/2),re=Math.max(re,y.left-Math.max(z,b.left)+x/2),re-=x/2):re>y.left?re=y.left:re<y.right-x&&(re=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(oe=Math.min(oe+E/2,y.bottom+Math.max(x,b.bottom)-E/2),oe=Math.max(oe,y.top-Math.max(x,b.top)+E/2),oe-=E/2):oe>y.top?oe=y.top:oe<y.bottom-E&&(oe=y.bottom-E)),ne.x=isFinite(re)?re:-a.yb.left,ne.y=isFinite(oe)?oe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),pl(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Jc(a),st.free(ne)}Ne.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Mc(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof xr)return a}else if(a=Mc(this,a,function(x){return x.part}),a instanceof xr)return a;return null},Ne.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Ml(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function Mc(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),Ml(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Ne.lz=function(a,y,x){return y===void 0&&(y=!0),ld(this,a,function(E){return E.part},y?function(E){return E instanceof xr&&E.canSelect()}:null,x)};function ld(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof Un||b instanceof Yn||(b=new Yn),Ml(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Ne.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Un||E instanceof Yn||(E=new Yn),Ml(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Ne.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Gd(this,a,function(b){return b instanceof xr&&(!x||b.canSelect())},y,E)},Ne.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Un||b instanceof Yn||(b=new Yn),Ml(this);for(var z=this.Wa.iteratorBackwards;z.next();){var ne=z.value;ne.visible&&ne.Cf(a,y,x,E,b)}return b},Ne.Nu=function(a,y,x,E,b,z){var ne=new Yn;Ml(this);for(var re=this.Wa.iteratorBackwards;re.next();){var oe=re.value;oe.visible&&oe.Nu(a,y,x,E,ne,b,z)}return ne};function Gd(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Un||b instanceof Yn||(b=new Yn),Ml(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,z,x,E,b)}return b}Ne.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Bd(this,a,y,function(z){return z instanceof xr&&(!E||z.canSelect())},x,b)},Ne.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Un||b instanceof Yn)&&(z=b),b=!0),z instanceof Un||z instanceof Yn||(z=new Yn),Ml(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var re=ne.value;re.visible&&re.og(a,y,x,E,b,z)}return z};function Bd(a,y,x,E,b,z){var ne=null;for(ne===void 0&&(ne=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Un||b instanceof Yn)&&(z=b),b=!0),z instanceof Un||z instanceof Yn||(z=new Yn),Ml(a),a=a.Wa.iteratorBackwards;a.next();){var re=a.value;re.visible&&!re.isTemporary&&re.og(y,x,ne,E,b,z)}return z}dn.prototype.acceptEvent=function(a){return Pu(this,a,a instanceof MouseEvent)};function Pu(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Uc(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),Xr&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=Md(y,y.target),E.targetObject=null,E}function Md(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 _h(a,y,x,E,b,z){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,Xr&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=E,ne.handled=!1,ne.bubbles=b,ne.isMultiTouch=z,ne}function ku(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}dn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Pu(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(),ku(x,a)},dn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Pu(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(),ku(x,a)},dn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Pu(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),ku(x,a)},dn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Pu(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),ku(x,a)},dn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new st(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?Eo(new st(y,a),this.Ab):new st(y,a)};function Uc(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,ne=0,re=0;E!==null&&(E=E.getBoundingClientRect(),ne=y.clientX-b/E.width*E.left,re=y.clientY-z/E.height*E.top),x.viewPoint.h(ne,re),a.Ab!==null?(y=st.allocAt(ne,re),a.Ab.Cd(y),x.documentPoint.assign(y),st.free(y)):x.documentPoint.h(ne,re)}function ph(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}dn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function mh(a){a.ld||Ml(a),a.Va()}dn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Ne=dn.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,lu(this),this.hf=!1,this.du=new st(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&Rn(function(){E.ld=!1,Zl(y,"Model"),a(E)},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;ht.requestAnimationFrame(function(){y.kg&&y.bd()})}},Ne.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),lu(this))};function ud(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||cd(a)||(y&&Ml(a),x&&Vu(a,!1))}function lu(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];yt(re,!1),re.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(oe){oe.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Hd(a),ud(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Xc(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Ml(a),z=!1,(!a.hf||a.xh)&&(a.hf?Sg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Sg(a,!1)),z=!0),a.Jk=!1,Ml(a),a.ou||mh(a),ud(a,!0,!1),ne=!1,z?(x=Mn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,jh(a)),a.R("LayoutCompleted"),ud(a,!0,!1),Mn.free(x)):x.Ok&&x.Qw&&(a.Fg!==iu?a.scale=Wd(a,a.Fg):a.yh!==iu?a.scale=Wd(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Vu(a,!0)),z&&ne&&a.eb("Initial Layout"),Ml(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function jh(a){if(a.Fg!==iu)a.scale=Wd(a,a.Fg);else if(a.yh!==iu)a.scale=Wd(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Vu(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Xc(a)}function Ml(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 Yn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof ho&&E.U&65536&&(E.U=E.U^65536)})}}Ne.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof ho||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof ho&&x.isVisible()&&gs(this,x);for(a.reset();a.next();)x=a.value,x instanceof fi&&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 pa&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function gs(a,y){for(var x=vi(),E=vi(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof ho?(Pt(z)||kt(z)||Pf(z))&&gs(a,z):z instanceof fi?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(Ti(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();Ti(E)}Ne.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Ne.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Et("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){cc(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,ne=Math.round(y.y*b)/b,re=this.Ab;for(re.reset(),b!==1&&re.scale(b),y.x===0&&y.y===0||re.translate(-z,-ne),a.ti=null,ds(a,re.m11,re.m12,re.m21,re.m22,re.dx,re.dy),this.pb!==1&&(a.globalAlpha=this.pb),nu(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<E;y++)x[y].gc(a,this);a=!1,this.Yf?Jd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Yt.prototype.Cd=Yt.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,cc(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break e;z=this.Ab,z.reset(),ne=this.Mb,re=this.pa;var oe=this.Ca,ue=Math.round(re.x*oe)/oe,ce=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-ue,-ce),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),nu(this,a),re=0;re<b;re++)a.setTransform(ne,0,0,ne,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[re].gc(a,this);if(y=!1,this.Yf?Jd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Yt.prototype.Cd=Yt.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=er&&er.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function Js(a,y,x,E,b,z,ne,re,oe,ue){if(a.Ka!==null){a.ta===null&&Et("No canvas specified"),ne===void 0&&(ne=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),ue===void 0&&(ue=!1),cc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ce=a.Ca;a.Ca=b;var me=a.Wa.s,we=me.length;try{var Fe=new Mn(z.x,z.y,E.width/b,E.height/b),De=Fe.copy();De.Co(x),Xc(a,De),Ml(a),a.Fd(me,we,a,Fe),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),re!==null&&re!==""&&(y.fillStyle=re,y.ox(0,0,E.width,E.height));var _e=a.Mb;y.scale(_e,_e);var pt=Yt.alloc();pt.reset(),pt.translate(x.left,x.top),pt.scale(b),z.x===0&&z.y===0||pt.translate(-z.x,-z.y),y.setTransform(pt.m11,pt.m12,pt.m21,pt.m22,pt.dx,pt.dy),y.yc(),y instanceof Ia&&ds(y,pt.m11,pt.m12,pt.m21,pt.m22,pt.dx,pt.dy),Yt.free(pt),nu(a,y),y.globalAlpha=a.pb;var it=a.Qj("Grid");if(ne){var bt=new Yn,It=ne.iterator;for(It.reset();It.next();){var Rt=It.value;Rt instanceof xr&&(ue||Rt.layer!==it)&&(Rt.Gj(),bt.add(Rt))}for(ue=0;ue<we;ue++)Su(me[ue],y,a,bt,oe);bt.each(function(hn){return hn.Gj()})}else for(bt=0;bt<we;bt++){var Kt=me[bt];Kt===it?ue&&Kt.gc(y,a,!0):Kt.gc(y,a,oe)}a.$i=!1,a.Yf&&Jd(a.Yf,a)&&a.Vp()}finally{a.Ca=ce,a.ib.Vc(!0),a.vd=!0,a.Fd(me,we,a,a.viewportBounds),Xc(a),a.ib instanceof Ia&&(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 yr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Xr||Po),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function nu(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 yr,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 uc(this,a),this};function uc(a,y){var x=a instanceof ui,E=a instanceof dn,b;for(b in y){b===""&&Et("Setting properties requires non-empty property names");var z=a,ne=b;if(x||E){var re=b.indexOf(".");if(0<re){var oe=b.substring(0,re);x?z=a.fb(oe):(z=a[oe],z==null&&(z=a.toolManager[oe])),tn(z)?ne=b.substr(re+1):Et("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+b)}}if(ne[0]!=="_"&&!Zr(z,ne))if(E&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(E&&ne==="Changed"){a.Pe(y[ne]);continue}else if(E&&Zr(a.toolManager,ne))z=a.toolManager;else if(E&&qg(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof ar&&ne==="Changed"){a.Pe(y[ne]);continue}else Et('Trying to set undefined property "'+ne+'" on object: '+z.toString());z[ne]=y[b],ne[0]==="_"&&z instanceof Vt&&z.Vw(ne)}}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 Ki,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")},dn.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!==pf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=Math.max(a.y,y.y),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=Mn.alloc(),yg(this,this.computeBounds(E)),Mn.free(E)),E=this.ta,E===null||E instanceof Jo)))){var ne=this.Mb;b=this.Aa*ne;var re=this.ya*ne,oe=this.scale*ne;z=Math.round(Math.round(y.x*oe)-Math.round(a.x*oe)),y=Math.round(Math.round(y.y*oe)-Math.round(a.y*oe)),oe=this.jw,a=this.oy,oe.width!==b&&(oe.width=b),oe.height!==re&&(oe.height=re),a.clearRect(0,0,b,re),oe=190*ne;var ue=70*ne,ce=Math.max(z,0),me=Math.max(y,0),we=Math.floor(b-ce),Fe=Math.floor(re-me);a.drawImage(E.Oa,ce,me,we,Fe,0,0,we,Fe),Jd(this.Yf,this)&&a.clearRect(0,0,oe,ue),E=vi(),a=vi(),Fe=Math.abs(z),we=Math.abs(y);var De=ce===0?0:b-Fe;ce=st.allocAt(De,0),Fe=st.allocAt(Fe+De,re),a.push(new Mn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y)));var _e=this.Ab;if(_e.reset(),_e.scale(ne,ne),this.Ca!==1&&_e.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&_e.translate(-ne.x,-ne.y),Eo(ce,_e),Eo(Fe,_e),E.push(new Mn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),De=me===0?0:re-we,ce.h(0,De),Fe.h(b,we+De),a.push(new Mn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),Eo(ce,_e),Eo(Fe,_e),E.push(new Mn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),Jd(this.Yf,this)&&(b=0<z?0:-z,re=0<y?0:-y,ce.h(b,re),Fe.h(oe+b,ue+re),a.push(new Mn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),Eo(ce,_e),Eo(Fe,_e),E.push(new Mn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y)))),st.free(ce),st.free(Fe),ud(this,!1,!0),this.Ka===null&&Et("No div specified"),this.ta===null&&Et("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(cc(this),re=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*re,this.ya*re),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,ne=this.Ca,oe=Math.round(z.x*ne)/ne,ue=Math.round(z.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),z.x===0&&z.y===0||y.translate(-oe,-ue),b.save(),b.beginPath(),z=a.length,ne=0;ne<z;ne++)oe=a[ne],oe.width!==0&&oe.height!==0&&b.rect(Math.floor(oe.x),Math.floor(oe.y),Math.ceil(oe.width),Math.ceil(oe.height));for(b.clip(),b.setTransform(re,0,0,re,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),nu(this,b),b.globalAlpha=this.pb,re=0;re<z;re++)if(ne=y[re],oe=E,ne.visible&&ne.pb!==0){ue=yl(ne,b),me=ne.Zq,me.length=0,ce=this.scale,we=Mn.alloc(),Fe=ne.Pa.s,_e=Fe.length,De=oe.length;for(var pt=0;pt<_e;pt++){var it=Fe[pt],bt=eg(it,it.actualBounds);e:{for(var It=2/ce,Rt=4/ce,Kt=0;Kt<De;Kt++){var hn=oe[Kt];if(hn.width!==0&&hn.height!==0&&bt.Vu(hn.x-It,hn.y-It,hn.width+Rt,hn.height+Rt)){bt=!0;break e}}bt=!1}bt&&ne.Oj(b,it,this,me,ce,we,!0)}Mn.free(we),b.globalAlpha=ue}b.restore(),b.Vc(!0),this.Yf&&Jd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Ti(E),Ti(a),this.ld=!1}}else this.bd();x&&(Bl(this),this.bd(),dh(this,!0))}else x?(Bl(this),this.bd(),dh(this,!0)):this.bd()}};function cc(a){a.pn!==!1&&(a.pn=!1,$d(a,a.Aa,a.ya))}function $d(a,y,x){Jc(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function cd(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,ne=a.gf?a.Db:0,re=a.Be?a.Db:0,oe=b.clientWidth||x+ne,ue=b.clientHeight||E+re,ce=a.viewportBounds;b=ce.x;var me=ce.y,we=ce.width,Fe=ce.height;if((oe!==x+ne||ue!==E+re)&&(a.gf=!1,a.Be=!1,re=ne=0,a.Aa=oe,a.ya=ue,z=a.pn=!0,Jc(a)),!a.hf||!a.viewportBounds.w())return!0;var De=a.ku,_e=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var pt=a.documentBounds,it=0,bt=0,It=0,Rt=0,Kt=ce.width,hn=ce.height,bi=a.rj;a.contentAlignment.sb()?(pt.width>Kt&&(it=bi.left,bt=bi.right),pt.height>hn&&(It=bi.top,Rt=bi.bottom)):(it=bi.left,bt=bi.right,It=bi.top,Rt=bi.bottom);var Xi=pt.width+it+bt,zi=pt.height+It+Rt;bi=a.scale;var hi=Xi>oe/bi,ti=zi>ue/bi;if(!(z||a.gf||a.Be||hi||ti))return!0;it=pt.x-it,oe=ce.x,bt=pt.right+bt,ue=ce.right+ne,It=pt.y-It;var lo=ce.y;pt=pt.bottom+Rt,ce=ce.bottom+re;var $r="1px";if(Rt="1px",a.scrollMode===Yd&&(hi||ti)&&(hi&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(hi=1,it+1<oe&&(hi=Math.max((oe-it)*bi+a.Aa,hi)),bt>ue+1&&(hi=Math.max((bt-ue)*bi+a.Aa,hi)),Kt+ne+1<Xi&&(hi=Math.max((Xi-Kt)*bi+a.Aa,hi)),$r=hi.toString()+"px"),ti&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(hi=1,It+1<lo&&(hi=Math.max((lo-It)*bi+a.ya,hi)),pt>ce+1&&(hi=Math.max((pt-ce)*bi+a.ya,hi)),hn+re+1<zi&&(hi=Math.max((zi-hn)*bi+a.ya,hi)),Rt=hi.toString()+"px")),hi=$r!=="1px",ti=Rt!=="1px",hi&&ti||!hi&&!ti||(ti&&(ue-=a.Db),hi&&(ce-=a.Db),Xi<Kt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,it+1<oe&&(ne=Math.max((oe-it)*bi+a.Aa,ne)),bt>ue+1&&(ne=Math.max((bt-ue)*bi+a.Aa,ne)),Kt+1<Xi&&(ne=Math.max((Xi-Kt)*bi+a.Aa,ne)),$r=ne.toString()+"px"),hi=$r!=="1px",ne=a.ya,hi!==a.Be&&(ne=hi?a.ya-a.Db:a.ya+a.Db),zi<hn+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,It+1<lo&&(re=Math.max((lo-It)*bi+ne,re)),pt>ce+1&&(re=Math.max((pt-ce)*bi+ne,re)),hn+1<zi&&(re=Math.max((zi-hn)*bi+ne,re)),Rt=re.toString()+"px"),ti=Rt!=="1px"),a.qr&&hi===a.Be&&ti===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(hi!==a.Be&&($r==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=hi,_e.style.width=$r,ti!==a.gf&&(Rt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=st.alloc(),ti?(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)),st.free(re))),z&&Jc(a),a.gf=ti,_e.style.height=Rt,a.gu=!0,z&&(a.pn=!0),y=De.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Kt+1<Xi?y=(a.position.x-it)*bi:it+1<oe?y=De.scrollWidth-De.clientWidth:bt>ue+1&&(y=a.position.x*bi)),a.tn)switch(a.bu){case"negative":y=-(De.scrollWidth-y-De.clientWidth);break;case"reverse":y=De.scrollWidth-y-De.clientWidth}return De.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(hn+1<zi?De.scrollTop=(a.position.y-It)*bi:It+1<lo?De.scrollTop=De.scrollHeight-De.clientHeight:pt>ce+1&&(De.scrollTop=a.position.y*bi)),oe=a.Aa,ue=a.ya,De.style.width=oe+(a.gf?a.Db:0)+"px",De.style.height=ue+(a.Be?a.Db:0)+"px",x!==oe||E!==ue||a.animationManager.zb?(x=Mn.allocAt(b,me,we,Fe),a.onViewportBoundsChanged(x,a.viewportBounds,bi,z),Mn.free(x),!1):!0}Ne=dn.prototype,Ne.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Et("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&&Et('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(xa,"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;Jf(a,function(x){zh(y,x)}),(a instanceof pa||a instanceof ho&&a.placeholder!==null)&&a.v(),a.data!==null&&Jf(a,function(x){vy(y.partManager,x)}),kt(a)!==!0&&Pf(a)!==!0||this.De.add(a),_1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.$b()},Ne.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Jf(a,function(x){yy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.$b()},Ne.remove=function(a){vh(this,a,!0)};function vh(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(Wa,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Ne.Is=function(a,y){if(y===void 0&&(y=!1),sn(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new Yn,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)},dn.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Wf(this)),this.toolManager!==null){var b=new Ki;if(a!==null)if(sn(a))for(var z=0;z<a.length;z++)Sc(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Sc(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Sc(this,b,a.value,x,E);for(a=this.nodes;a.next();)Sc(this,b,a.value,x,E);for(a=this.links;a.next();)Sc(this,b,a.value,x,E)}Yc(this,b,y,E,x)}};function Sc(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=Wf(a)),x instanceof Ni){if(y.add(x,a.Pd(b,x,x.location)),x instanceof ho&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Sc(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var ne=z.value;if(!y.contains(ne)){var re=ne.fromNode,oe=ne.toNode;re!==null&&y.contains(re)&&oe!==null&&y.contains(oe)&&Sc(a,y,ne,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Sc(a,y,x.value,E,b)}else if(x instanceof fi)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Sc(a,y,x.value,E,b);else x instanceof pa||y.add(x,a.Pd(b,x,x.location))}function Yc(a,y,x,E,b){if(y!==null&&y.count!==0){var z=st.alloc(),ne=st.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||$f(a,y);for(var re=vi(),oe=vi(),ue=y.iterator,ce=st.alloc();ue.next();){var me=ue.key,we=ue.value;if(me.Zc()){var Fe=hg(a,me,y);Fe!==null?re.push(new ie(me,we,Fe)):(!b||me.canMove())&&(Fe=we.point,z.assign(Fe),a.computeMove(me,z.add(ne),E,ce),me.location=ce,we.shifted===void 0&&(we.shifted=new st),we.shifted.assign(ce.re(Fe)))}else ue.key instanceof fi&&oe.push(ue.sa)}for(st.free(ce),b=re.length,ue=0;ue<b;ue++)me=re[ue],z.assign(me.info.point),me.Su.shifted===void 0&&(me.Su.shifted=new st),me.node.location=z.add(me.Su.shifted);for(b=st.alloc(),ue=st.alloc(),me=oe.length,we=0;we<me;we++){var De=oe[we];if(Fe=De.key,Fe instanceof fi)if(Fe.suspendsRouting){Fe.Tg=null,ce=Fe.fromNode;var _e=Fe.toNode;if(a.draggedLink!==null&&E.dragsLink)if(_e=De.value.point,Fe.dragComputation===null)y.add(Fe,a.Pd(E,Fe,ne)),Yh(Fe,ne.x-_e.x,ne.y-_e.y);else{De=st.allocAt(0,0),(ce=Fe.i(0))&&ce.w()&&De.assign(ce);var pt=ce=st.alloc().assign(De).add(ne);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(pt=st.alloc(),Gf(a,Fe,ce,pt,E)),ce.assign(Fe.dragComputation(Fe,ce,pt)).re(De),y.add(Fe,a.Pd(E,Fe,ce)),Yh(Fe,ce.x-_e.x,ce.y-_e.y),st.free(De),st.free(ce),pt!==ce&&st.free(pt)}else ce!==null&&(b.assign(ce.location),pt=y.I(ce),pt!==null&&b.re(pt.point)),_e!==null&&(ue.assign(_e.location),pt=y.I(_e),pt!==null&&ue.re(pt.point)),ce!==null&&_e!==null?b.Xa(ue)?(ce=De.value.point,_e=z,_e.assign(b),_e.re(ce),y.add(Fe,a.Pd(E,Fe,b)),Yh(Fe,_e.x,_e.y)):(Fe.suspendsRouting=!1,Fe.bb()):(De=De.value.point,ce=ce!==null?b:_e!==null?ue:ne,y.add(Fe,a.Pd(E,Fe,ce)),Yh(Fe,ce.x-De.x,ce.y-De.y))}else(Fe.fromNode===null||Fe.toNode===null)&&(ce=De.value.point,y.add(Fe,a.Pd(E,Fe,ne)),Yh(Fe,ne.x-ce.x,ne.y-ce.y))}st.free(z),st.free(ne),st.free(b),st.free(ue),Ti(re),Ti(oe),x||(Ml(a),Kd(a,y))}}dn.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new st),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=st.alloc(),Gf(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var ne=a.minLocation,re=ne.x;isNaN(re)&&(re=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var oe=a.maxLocation,ue=oe.x;return isNaN(ue)&&(ue=z?Math.round(1e3*a.location.x)/1e3:a.location.x),oe=oe.y,isNaN(oe)&&(oe=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(re,Math.min(x.x,ue)),Math.max(ne,Math.min(x.y,oe))),b!==y&&st.free(b),E};function Wf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Gf(a,y,x,E,b){if(b===void 0&&(b=Wf(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var ne=b.gridSnapOrigin,re=ne.x;if(ne=ne.y,b=b.gridSnapCellSpot,z!==null){var oe=z.gridCellSize;isNaN(a)&&(a=oe.width),isNaN(y)&&(y=oe.height),z=z.gridOrigin,isNaN(re)&&(re=z.x),isNaN(ne)&&(ne=z.y)}z=st.allocAt(0,0),z.yi(0,0,a,y,b),nt.No(x.x,x.y,re+z.x,ne+z.y,a,y,E),st.free(z)}}function $f(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof fi&&(y.suspendsRouting=!0)}function Kd(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof fi&&(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=dn.prototype,Ne.Pd=function(a,y,x){if(x===void 0)return new dd(sa);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new dd(new st(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new dd(x.copy())};function fg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Et("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Et("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Et("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Et("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&Et("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(xa,"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,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Wa,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(xa,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Ne.Cy=function(a,y){fg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Wa,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(xa,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Ne.kA=function(a){if(a.diagram!==this&&Et("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(Wa,"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 Un),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 Un),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!==Aa&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Ne.cb=function(a,y,x,E,b,z,ne){z===void 0&&(z=null),ne===void 0&&(ne=null);var re=new gr;re.diagram=this,re.change=a,re.propertyName=y,re.object=x,re.oldValue=E,re.oldParam=z,re.newValue=b,re.newParam=ne,this.ds(re)},Ne.g=function(a,y,x,E,b){this.cb(_o,a,this,y,x,E,b)},dn.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===_o){var b=a.object;if(vs(b,a.propertyName,a.I(y)),b instanceof Vt){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===xa){var ne=a.object,re=a.newParam,oe=a.newValue;if(ne instanceof ui)if(typeof re=="number"&&oe instanceof Vt){y?ne.pc(re):ne.Gb(re,oe);var ue=ne.part;ue!==null&&ue.Wb()}else typeof re=="number"&&oe instanceof ol&&(oe.isRow?d1(ne,re,y?void 0:oe):h1(ne,re,y?void 0:oe));else if(ne instanceof ms){var ce=a.oldParam===!0;typeof re=="number"&&oe instanceof xr&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),ne.pc(ce?re:-1,oe,ce)):ne.oi(re,oe,ce))}else ne instanceof dn?typeof re=="number"&&oe instanceof ms&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):Et("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Wa){var me=a.object,we=a.oldParam,Fe=a.oldValue;if(me instanceof ui)typeof we=="number"&&Fe instanceof Vt?y?me.Gb(we,Fe):me.pc(we):typeof we=="number"&&Fe instanceof ol&&(Fe.isRow?d1(me,we,y?Fe:void 0):h1(me,we,y?Fe:void 0));else if(me instanceof ms){var De=a.newParam===!0;typeof we=="number"&&Fe instanceof xr&&(y?0>me.Pa.indexOf(Fe)&&me.oi(we,Fe,De):(Fe.isSelected=!1,Fe.isHighlighted=!1,Fe.Wb(),me.pc(De?we:-1,Fe,De)))}else me instanceof dn?typeof we=="number"&&Fe instanceof ms&&(y?(Fe.Xe(this),this.Wa.Gb(we,Fe)):this.Wa.mb(we)):Et("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==Aa&&Et("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},dn.prototype.Ea=function(a){return this.undoManager.Ea(a)},dn.prototype.eb=function(a){return this.undoManager.eb(a)},dn.prototype.Kf=function(){return this.undoManager.Kf()},dn.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},dn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},dn.prototype.rp=function(){this.partManager.rp()};function gg(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Jc(a),a.N(),a.Ee=!0,E.zb&&(Fl(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Jc(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,ne=a.ya,re=a.zoomPoint.x,oe=a.zoomPoint.y,ue=a.contentAlignment;isNaN(re)&&(ue.$c()?ue.Hf(Qi)?re=0:ue.Hf(Gi)&&(re=z-1):re=ue.sb()?ue.x*(z-1):z/2),isNaN(oe)&&(ue.$c()?ue.Hf(ai)?oe=0:ue.Hf(ki)&&(oe=ne-1):oe=ue.sb()?ue.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=st.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,st.free(z),a.Ca=x,Jc(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Vu(a,!1),E.zb&&(Fl(E)||E.ce.add(E.H,"scale",y,a.Ca))}}dn.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==iu||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof jo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Hs(b,this)),this.vb||this.invalidateViewport(a,y),Xc(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Xc(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=pi.alloc(),b=1,z=1,ne=x.O.s,re=ne.length,oe=0;oe<re;oe++){var ue=ne[oe],ce=Math.abs(ue.interval);2>ce||(bv(ue.figure)?z=z*ce/nt.vx(z,ce):b=b*ce/nt.vx(b,ce))}if(ne=x.gridCellSize,E.h(z*ne.width,b*ne.height),y!==void 0)b=y.width,z=y.height,a=y.x,ne=y.y;else{if(y=Mn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Mn.free(y);return}b=y.width,z=y.height,a=y.x,ne=y.y,Mn.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=st.alloc(),nt.No(a,ne,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),pi.free(E),x.part.location=y,st.free(y)}}dn.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},dn.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))},dn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),sn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof xr||Et("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof xr||Et("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},dn.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Ne=dn.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 Yn().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 xr||Et("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 E=y==="up"||y==="down",b=0,z=st.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),st.free(z);return}Et("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):Et("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),st.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,E=a.y,b=x+a.width,z=E+a.height,ne=y.m11,re=y.m12,oe=y.m21,ue=y.m22,ce=y.dx,me=y.dy,we=x*ne+E*oe+ce;y=x*re+E*ue+me;var Fe=b*ne+E*oe+ce;return a=b*re+E*ue+me,E=x*ne+z*oe+ce,x=x*re+z*ue+me,ne=b*ne+z*oe+ce,b=b*re+z*ue+me,z=Math.min(we,Fe),we=Math.max(we,Fe),Fe=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),we=Math.max(we,E),Fe=Math.min(Fe,x),y=Math.max(y,x),z=Math.min(z,ne),we=Math.max(we,ne),Fe=Math.min(Fe,b),y=Math.max(y,b),new Mn(z,Fe,we-z,y-Fe)},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),Eo(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 ja}dn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===Aa&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(oe){return oe.diagram=b}),a.mouseMoveTools.each(function(oe){return oe.diagram=b}),a.mouseUpTools.each(function(oe){return oe.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Aa){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Ml(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||dl(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(pg(this),this.As.clear(),Ts(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;Rn(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function zh(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)yh(a,y[E])}function yh(a,y){if(y instanceof zu){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Yn&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function vg(a,y){if(y instanceof zu){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof Yn&&x.Bg.remove(a),fp(E));break}}}}}dn.prototype.Wd=function(){this.partManager.Wd()},dn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},dn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},dn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},dn.prototype.Vb=function(a){return this.partManager.Vb(a)},dn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Ne=dn.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:Pn(wr(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:Pn(wr(y)))};function Jc(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),Vu(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Ne.Va=function(){if(this.Zi){var a=Mn.alloc();yg(this,this.computeBounds(a)),Mn.free(a)}},Ne.rz=function(){for(var a=new Yn,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){Ml(this),a&&xh(this,!0),this.ld?Sg(this,!1):(this.Jk=!0,lu(this))};function xh(a,y){for(var x=a.ai.iterator;x.next();)xg(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function xg(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)xg(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Sg(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Zl(z,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)Pg(a,ne.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),Ml(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||dl(z),a.aa=x}}}function Pg(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Pg(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),gs(a,y),b.isValidLayout=!0):a.xh=!0)}}Ne.yz=function(){for(var a=new Un,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function Hp(a){function y(b){var z=b.toLowerCase(),ne=new Un;x.add(b,ne),x.add(z,ne),E.add(b,b),E.add(z,b)}var x=new Ki,E=new Ki;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function qg(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Vd(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Et("Unknown DiagramEvent name: "+y)}Ne.Bj=function(a,y){return a=Vd(this,a),a!==null&&a.add(y),this},Ne.am=function(a,y){a=Vd(this,a),a!==null&&a.remove(y)},Ne.R=function(a,y,x){var E=Vd(this,a),b=new kr;if(b.diagram=this,a=qg(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function 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 gf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},dn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?gh(this,a):a.assign(this.documentBounds)};function gf(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new lm(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=ep(a,x)),x===null){y=Mn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var ne=z.value,re=ne.layer;re!==null&&re.visible&&!re.isTemporary&&Vf(a,ne,E,y)}Mn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Mn.alloc(),z=x.memberParts;z.next();)ne=z.value,ne instanceof Ni&&Vf(a,ne,E,y);Mn.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&ox(b);return b}function ep(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?ep(a,y.containingGroup):null}function Vf(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(xp(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill(Jh,x,y+1);else for(var ne=x;ne<=y;ne++)z[ne]=Jh}else if(y instanceof ho)for(y=y.memberParts;y.next();)b=y.value,b instanceof Ni&&Vf(a,b,x,E)}}function Sh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}dn.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=Rn(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=Mn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),yg(a,y),Mn.free(y),a.Fc=!0,a.bd(),wg(a))}},a.vp))}dn.prototype.ug=function(){this.vk!==-1&&(ht.clearTimeout(this.vk),this.vk=-1)},dn.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=Mn.allocAt(0,0,E.width*b,E.height*b);var z=st.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,z.x-=ne,a.x<E.x+x.left/2&&(z.x-=ne),a.x<E.x+x.left/4&&(z.x-=4*ne)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,z.x+=ne,a.x>E.x+E.width-x.right/2&&(z.x+=ne),a.x>E.x+E.width-x.right/4&&(z.x+=4*ne));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y-=ne,a.y<E.y+x.top/2&&(z.y-=ne),a.y<E.y+x.top/4&&(z.y-=4*ne)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y+=ne,a.y>E.y+E.height-x.bottom/2&&(z.y+=ne),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*ne)),z.Xa(sa)||(y=new st(y.x+z.x/b,y.y+z.y/b)),Mn.free(E),st.free(z),y},Ne=dn.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 ho&&(y.$p=null)})};function Ph(a,y,x){function E(){var ce=+new Date;for(z=!0,ne.reset();ne.next();)if(!ne.value[0].al){z=!1;break}z||ce-ue>oe?y(x,b,re):ht.requestAnimationFrame(E)}for(var b=x.callback,z=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var re=a,oe=x.callbackTimeout||300,ue=+new Date;return ht.requestAnimationFrame(function(){E()}),null}Ne.Wz=function(a){return As?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Ne.Jx=function(a){return a===void 0&&(a={}),Ph(this,this.Xz,a)},Ne.Xz=function(a,y,x){var E=tp(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case Eh+"data":b=E.getImageData(0,0,x.width,x.height);break;case Eh:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&Et('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function tp(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Et("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new pi(1/0,1/0):new pi(2e3,2e3));var re=y.position||null,oe=y.parts||null,ue=y.padding===void 0?1:y.padding,ce=y.background||null,me=y.omitTemporary;me===void 0&&(me=!0);var we=y.document||document,Fe=y.elementFinished||null,De=y.showTemporary;De===void 0&&(De=!me),y=y.showGrid,y===void 0&&(y=De),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof ue=="number"?ue=new hr(ue):ue instanceof hr||Et("MakeImage padding must be a Margin or a number."),ue.left=Math.max(ue.left,0),ue.right=Math.max(ue.right,0),ue.top=Math.max(ue.top,0),ue.bottom=Math.max(ue.bottom,0),a.ib.Vc(!0),me=new Gl(null,we,void 0,!0);var _e=me.context;if(!(b||z||oe||re))return me.width=a.Aa+Math.ceil(ue.left+ue.right),me.height=a.ya+Math.ceil(ue.top+ue.bottom),x==="SVG"?E===null?null:(E.resize(me.width,me.height,me.width,me.height),E.ownerDocument=we,E.hs=Fe,Js(a,E.context,ue,new pi(me.width,me.height),a.Ca,a.pa,oe,ce,De,y),E.context):(a.Xm=!1,Js(a,_e,ue,new pi(me.width,me.height),a.Ca,a.pa,oe,ce,De,y),a.Xm=!0,me.context);var pt=a.Pp,it=a.documentBounds.copy();if(it.Fv(a.yb),De)for(var bt=a.Wa.s,It=bt.length,Rt=0;Rt<It;Rt++){var Kt=bt[Rt];if(Kt.visible&&Kt.isTemporary){Kt=Kt.Pa.s;for(var hn=Kt.length,bi=0;bi<hn;bi++){var Xi=Kt[bi];Xi.isInDocumentBounds&&Xi.isVisible()&&(Xi=Xi.actualBounds,Xi.w()&&it.ed(Xi))}}}if(bt=new st(it.x,it.y),oe!==null){for(It=new Mn(0,0,0,0),Rt=!0,Kt=oe.iterator,Kt.reset();Kt.next();)hn=Kt.value,hn instanceof xr&&(bi=hn.layer,bi!==null&&!bi.visible||bi!==null&&!De&&bi.isTemporary||!hn.isVisible()||(hn=hn.actualBounds,hn.w()&&(Rt?(Rt=!1,It.assign(hn)):It.ed(hn))));it.width=It.width,it.height=It.height,bt.x=It.x,bt.y=It.y}return re!==null&&re.w()&&(bt=re,z||(z=pt)),It=re=0,ue!==null&&(re=ue.left+ue.right,It=ue.top+ue.bottom),Rt=Kt=0,b!==null&&(Kt=b.width,Rt=b.height,isFinite(Kt)&&(Kt=Math.max(0,Kt-re)),isFinite(Rt)&&(Rt=Math.max(0,Rt-It))),b!==null&&z!==null?(z==="NaN"&&(z=pt),b.w()?(b=Kt,it=Rt):isNaN(Rt)?(b=Kt,it=it.height*z):(b=it.width*z,it=Rt)):b!==null?b.w()?(z=Math.min(Kt/it.width,Rt/it.height),b=Kt,it=Rt):isNaN(Rt)?(z=Kt/it.width,b=Kt,it=it.height*z):(z=Rt/it.height,b=it.width*z,it=Rt):z!==null?z==="NaN"&&ne.w()?(z=Math.min((ne.width-re)/it.width,(ne.height-It)/it.height),z>pt?(z=pt,b=it.width,it=it.height):(b=ne.width,it=ne.height)):(b=it.width*z,it=it.height*z):(z=pt,b=it.width,it=it.height),ue!==null?(b+=re,it+=It):ue=new hr(0),ne!==null&&(pt=ne.width,ne=ne.height,isNaN(pt)&&(pt=2e3),isNaN(ne)&&(ne=2e3),isFinite(pt)&&(b=Math.min(b,pt)),isFinite(ne)&&(it=Math.min(it,ne))),me.width=Math.ceil(b),me.height=Math.ceil(it),x==="SVG"?E===null?null:(E.resize(me.width,me.height,me.width,me.height),E.ownerDocument=we,E.hs=Fe,Js(a,E.context,ue,new pi(Math.ceil(b),Math.ceil(it)),z,bt,oe,ce,De,y),E.context):(a.Xm=!1,Js(a,_e,ue,new pi(Math.ceil(b),Math.ceil(it)),z,bt,oe,ce,De,y),a.Xm=!0,me.context)}Qe.Object.defineProperties(dn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof ye||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Jo(this,ht.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 Jo(this,ht.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(ht,"resize",this.Ov,!1),this.removeEventListener(ht,"wheel",this.$j,!0),Bc===this&&(Bc=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Rh(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)&&Kn(a,"0 <= value <= 1",dn,"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),Vu(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),Vu(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),Vu(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),Vu(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Kn(a,">= 0",dn,"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&&Kn(a,">= 0",dn,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else Kn(a,">= 0",dn,"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&&Et("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=zd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Zl(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 b=0;b<x.length;b++)this.add(x[b]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=E,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(ht,"pointermove",this.dk,!0),this.addEventListener(ht,"pointerdown",this.ui,!0),this.addEventListener(ht,"pointerup",this.fk,!0),this.addEventListener(ht,"pointerout",this.ek,!0),this.addEventListener(ht,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(ht,"wheel",this.$j,!0),this.addEventListener(ht,"selectstart",this.preventDefault,!1)):(this.removeEventListener(ht,"pointermove",this.dk,!0),this.removeEventListener(ht,"pointerdown",this.ui,!0),this.removeEventListener(ht,"pointerup",this.fk,!0),this.removeEventListener(ht,"pointerout",this.ek,!0),this.removeEventListener(ht,"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(ht,"wheel",this.$j,!0),this.removeEventListener(ht,"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=st.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),pl(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Jc(this):(this.vb=!0,a=this.scale,ff(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}st.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=hf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=hf(this)),a.type!==ui.Grid&&Et("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),Xc(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),Jc(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||Et("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 hr(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===Yd&&Vu(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,Vu(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!==iu&&Vu(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()||Et("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()||Et("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)):Kn(a,"> 0",dn,"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)):Kn(a,"> 0",dn,"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),Vu(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 hr(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&&Et("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!==Ld&&a!==Ks&&a!==Ch&&Et("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new pi(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new hr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Qe.Object.defineProperties(dn,{licenseKey:{get:function(){return Mg.jc()},set:function(a){Mg.add(a.replace(/\s/g,""))}},version:{get:function(){return Xd}}}),dn.prototype.makeImageData=dn.prototype.Jx,dn.prototype.makeImage=dn.prototype.Wz,dn.prototype.cacheGroupExternalLinks=dn.prototype.Fu,dn.prototype.addRenderer=dn.prototype.bs,dn.prototype.makeSVG=dn.prototype.av,dn.prototype.makeSvg=dn.prototype.Cs,dn.prototype.stopAutoScroll=dn.prototype.ug,dn.prototype.doAutoScroll=dn.prototype.gs,dn.prototype.isUnoccupied=dn.prototype.Yj,dn.prototype.raiseDiagramEvent=dn.prototype.R,dn.prototype.removeDiagramListener=dn.prototype.am,dn.prototype.addDiagramListener=dn.prototype.Bj,dn.prototype.findTreeRoots=dn.prototype.yz,dn.prototype.layoutDiagram=dn.prototype.Uz,dn.prototype.findTopLevelGroups=dn.prototype.qz,dn.prototype.findTopLevelNodesAndLinks=dn.prototype.rz,dn.prototype.ensureBounds=dn.prototype.Va,dn.prototype.findLinksByExample=dn.prototype.ls,dn.prototype.findNodesByExample=dn.prototype.ms,dn.prototype.findLinkForData=dn.prototype.Kc,dn.prototype.findNodeForData=dn.prototype.ii,dn.prototype.findPartForData=dn.prototype.Lc,dn.prototype.findLinkForKey=dn.prototype.findLinkForKey,dn.prototype.findNodeForKey=dn.prototype.Vb,dn.prototype.findPartForKey=dn.prototype.findPartForKey,dn.prototype.rebuildParts=dn.prototype.Wd,dn.prototype.transformViewToDoc=dn.prototype.Ps,dn.prototype.transformRectDocToView=dn.prototype.zA,dn.prototype.transformDocToView=dn.prototype.op,dn.prototype.centerRect=dn.prototype.es,dn.prototype.scrollToRect=dn.prototype.tv,dn.prototype.scroll=dn.prototype.scroll,dn.prototype.highlightCollection=dn.prototype.Jz,dn.prototype.highlight=dn.prototype.Iz,dn.prototype.selectCollection=dn.prototype.rA,dn.prototype.select=dn.prototype.select,dn.prototype.updateAllRelationshipsFromData=dn.prototype.rp,dn.prototype.updateAllTargetBindings=dn.prototype.updateAllTargetBindings,dn.prototype.commit=dn.prototype.commit,dn.prototype.rollbackTransaction=dn.prototype.Kf,dn.prototype.commitTransaction=dn.prototype.eb,dn.prototype.startTransaction=dn.prototype.Ea,dn.prototype.raiseChanged=dn.prototype.g,dn.prototype.raiseChangedEvent=dn.prototype.cb,dn.prototype.removeChangedListener=dn.prototype.ik,dn.prototype.addChangedListener=dn.prototype.Pe,dn.prototype.removeModelChangedListener=dn.prototype.mA,dn.prototype.addModelChangedListener=dn.prototype.Yw,dn.prototype.findLayer=dn.prototype.Qj,dn.prototype.removeLayer=dn.prototype.kA,dn.prototype.addLayerAfter=dn.prototype.Cy,dn.prototype.addLayerBefore=dn.prototype.Ww,dn.prototype.addLayer=dn.prototype.Al,dn.prototype.moveParts=dn.prototype.moveParts,dn.prototype.copyParts=dn.prototype.Kj,dn.prototype.removeParts=dn.prototype.Is,dn.prototype.remove=dn.prototype.remove,dn.prototype.add=dn.prototype.add,dn.prototype.clearDelayedGeometries=dn.prototype.bx,dn.prototype.setProperties=dn.prototype.nm,dn.prototype.attach=dn.prototype.Du,dn.prototype.set=dn.prototype.set,dn.prototype.resetInputOptions=dn.prototype.Sx,dn.prototype.setInputOption=dn.prototype.sA,dn.prototype.getInputOption=dn.prototype.Ql,dn.prototype.resetRenderingHints=dn.prototype.Tx,dn.prototype.setRenderingHint=dn.prototype.Xx,dn.prototype.getRenderingHint=dn.prototype.Gf,dn.prototype.maybeUpdate=dn.prototype.bd,dn.prototype.requestUpdate=dn.prototype.$b,dn.prototype.delayInitialization=dn.prototype.Xy,dn.prototype.isUpdateRequested=dn.prototype.Pz,dn.prototype.invalidateDocumentBounds=dn.prototype.Ya,dn.prototype.findObjectsNear=dn.prototype.og,dn.prototype.findPartsNear=dn.prototype.mz,dn.prototype.findObjectsIn=dn.prototype.Cf,dn.prototype.findPartsIn=dn.prototype.ux,dn.prototype.findObjectsAt=dn.prototype.ji,dn.prototype.findPartsAt=dn.prototype.lz,dn.prototype.findObjectAt=dn.prototype.ic,dn.prototype.findPartAt=dn.prototype.Ol,dn.prototype.focusObject=dn.prototype.zz,dn.prototype.alignDocument=dn.prototype.Jy,dn.prototype.zoomToRect=dn.prototype.BA,dn.prototype.zoomToFit=dn.prototype.zoomToFit,dn.prototype.diagramScroll=dn.prototype.kx,dn.prototype.focus=dn.prototype.focus;var Uf=new Ki,np=null,As=ht.document!==void 0,Zh=null,Ud="",iu=new Cn(dn,"None",0),Ru=new Cn(dn,"Uniform",1),Hh=new Cn(dn,"UniformToFill",2),wh=new Cn(dn,"CycleAll",10),Cg=new Cn(dn,"CycleNotDirected",11),Eg=new Cn(dn,"CycleNotDirectedFast",12),bg=new Cn(dn,"CycleNotUndirected",13),Fg=new Cn(dn,"CycleDestinationTree",14),Bg=new Cn(dn,"CycleSourceTree",15),Yd=new Cn(dn,"DocumentScroll",1),pf=new Cn(dn,"InfiniteScroll",2),Ld=new Cn(dn,"TreeParentCollapsed",21),Ks=new Cn(dn,"AllParentsCollapsed",22),Ch=new Cn(dn,"AnyParentsCollapsed",23),Mg=new Un,Xd="2.3.10",Eh="image",mf=null,ip=!1;function Yl(){if(As){var a=ht.document.createElement("canvas"),y=a.getContext("2d"),x=Tn("7ca11abfd022028846");y[x]=Tn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",en.Dx+"4ae6247590da4bb21c324ba3a84e385776",Yt.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",nt.za],b=1;5>b;b++)y[Tn("7ca11abfd7330390")](Tn(E[b-1]),10,15*b);for(y[x]=Tn("39f046ebb36e4b"),x=1;5>x;x++)y[Tn("7ca11abfd7330390")](Tn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Yt.prototype.Cd=Yt.prototype.Eu),mf=a}}dn.className="Diagram",dn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=ht.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof dn?y.H:null},dn.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},dn.useDOM=function(a){As=a?ht.document!==void 0:!1},dn.isUsingDOM=function(){return As},dn.None=iu,dn.Uniform=Ru,dn.UniformToFill=Hh,dn.CycleAll=wh,dn.CycleNotDirected=Cg,dn.CycleNotDirectedFast=Eg,dn.CycleNotUndirected=bg,dn.CycleDestinationTree=Fg,dn.CycleSourceTree=Bg,dn.DocumentScroll=Yd,dn.InfiniteScroll=pf,dn.TreeParentCollapsed=Ld,dn.AllParentsCollapsed=Ks,dn.AnyParentsCollapsed=Ch;function rp(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Jd(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=ht[Tn("76a715b2f73f148a")][Tn("72ba13b5")]||"";if(a.Rc=!0,As){var E=dn[Tn("76a115b6ed251eaf4692")];if(E)for(var b=Mg.iterator;b.next()&&(E=b.value,E=Tn(E).split(Tn("39e9")),!(6>E.length));){var z=Tn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var ne=Tn(en[Tn("6cae19")]).split(".");if(z[0]>ne[0]||z[0]===ne[0]&&z[1]>=ne[1]){var re=ht[Tn("74a900bae4370f8b51")][Tn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=re[Tn("73a612b6fb191d")](Tn("3aad1ab6e022098b4dc4")),z=Tn(E[2]),-1<ne&&(re=re[Tn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<ne),!a.Rc))break;for(ne=x[Tn("76ad18b4f73e")],re=x[Tn("73a612b6fb191d")](Tn("35e7"))+2;re<ne;re++)y+=x[re];if(ne=y[Tn("73a612b6fb191d")](z),0>ne&&z!==Tn("7da71ca0ad381e90")&&(ne=y[Tn("73a612b6fb191d")](Tn("76a715b2ef3e149757"))),0>ne&&(ne=y[Tn("73a612b6fb191d")](Tn("76a715b2ef3e149757"))),0>ne&&(ne=y[Tn("73a612b6fb191d")](Tn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Tn("73a612b6fb191d")](Tn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Tn("73a612b6fb191d")](Tn("35"))||y[Tn("73a612b6fb191d")](Tn("35"))===-1),!a.Rc||x[Tn("73a612b6fb191d")](Tn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Tn("73a612b6fb191d")](z)),!a.Rc)||(ne=ht[Tn("76a715b2f73f148a")][Tn("69ad17a1e03e")],re=ne[Tn("73a612b6fb191d")](Tn("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(ne[Tn("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){ne=ht.document.createElement("div");for(var oe=E[0].replace(/[A-Za-z]/g,"");4>oe.length;)oe+="9";if(re=oe,oe=oe.substr(oe.length-4),E="",E+=["gsh","gsf"][parseInt(oe.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(oe.substr(0,1),10)%4],ne[Tn("79a417a0f0181a8946")]=E,ht.document[Tn("78a712aa")]){ht.document[Tn("78a712aa")][Tn("7bb806b6ed32388c4a875b")](ne),oe=ht.getComputedStyle(ne).getPropertyValue(Tn("78a704b7e62456904c9b12701b6532a8"));var ue=ht.getComputedStyle(ne).getPropertyValue(Tn("75b817b0ea2202"));if(ht.document[Tn("78a712aa")][Tn("68ad1bbcf533388c4a875b")](ne),oe){if(ne=ht[Tn("77a902b0eb1b1e804a8a")],ue==="0."+parseInt(re,10)%100||oe.indexOf(parseInt(z[1]+z[2],16))!==-1&&oe.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(Tn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){ne=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ce in ne)if(E===ne[ce].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ce=x[Tn("76ad18b4f73e")],b=x[Tn("73a612b6fb191d")](Tn("35e7"))+2;b<ce;b++)y+=x[b];x=y[Tn("73a612b6fb191d")](Tn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Tn("73a612b6fb191d")](Tn("35")))}}}return 0<a.Rc&&a!==a.wy}rp.className="DiagramHelper";function dd(a){this.j=a===void 0?new st:a,this.o=new st}Qe.Object.defineProperties(dd.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 bh="DraggingInfo";dd.className="DraggingInfo";function ie(a,y,x){this.node=a,this.info=y,this.Su=x}ie.className="DraggingNodeInfoPair";function ae(){this.reset()}ae.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new pi(NaN,NaN).freeze(),this.gridSnapCellSpot=Us,this.gridSnapOrigin=new st(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function ge(a,y){if(typeof a=="string"||ht.Element&&a instanceof Element)var x=dn.call(this,a)||this;else x=dn.call(this)||this,y=a;return fe(x),y&&x.nm(y),x}$t(ge,dn);function fe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=$l,a.layout=new Rl}ge.prototype.reset=function(){dn.prototype.reset.call(this),fe(this)},ge.className="Palette";function ye(a,y){if(typeof a=="string"||ht.Element&&a instanceof Element)var x=dn.call(this,a)||this;else x=dn.call(this)||this,y=a;var E=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new xr;var b=new Co;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new hr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new mt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var ne=z.viewportBounds,re=E.lastInput.documentPoint;z.position=new st(re.x-ne.width/2,re.y-ne.height/2)}},x.Pf=function(){E.Ya(),Je(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&Je(E)},x.autoScale=Ru,x.vb=!1,y&&Object.assign(x,y),x}$t(ye,dn),ye.prototype.computePixelRatio=function(){return 1},ye.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(cc(this),this.ql===null){var x=new Gl(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}}}dn.prototype.redraw.call(this)},ye.prototype.gc=function(){if(this.Ka===null&&Et("No div specified"),this.ta===null&&Et("No canvas specified"),!(this.ta instanceof Jo)&&($v(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){cc(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,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Re(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=Mn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Xc(y,b),Mn.free(b),Ml(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var ne=0;ne<z;ne++){var re=y[ne],oe=a;if(re.visible&&re.opacity!==0){var ue=re.diagram.grid.part;if(!x&&re.isTemporary)E&&ue.layer===re&&(re=yl(re,b),ue.gc(b,oe),b.globalAlpha=re);else{for(var ce=yl(re,b),me=oe.scale,we=Mn.alloc(),Fe=re.Pa.s,De=Fe.length,_e=0;_e<De;_e++){var pt=Fe[_e];(E||pt!==ue)&&re.Oj(b,pt,oe,null,me,we,!1)}Mn.free(we),b.globalAlpha=ce}}}}}function Je(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=pi.alloc();b.h(x.width,x.height),E.desiredSize=b,pi.free(b),a=2/a.scale,E instanceof Co&&(E.strokeWidth=a),y.location=new st(x.x-a/2,x.y-a/2),y.isSelected=!0}}}ye.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Do;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},ye.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},ye.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Je(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},Qe.Object.defineProperties(ye.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof ye&&Et("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),Je(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),Je(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),ye.className="Overview";function mt(){as.call(this),this.j=null}$t(mt,as),mt.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 st(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new st(a.x-this.j.x,a.y-this.j.y)),!0)},mt.prototype.doActivate=function(){this.j=null,as.prototype.doActivate.call(this)},mt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},mt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var E=a.firstInput.documentPoint;x=x.location,this.j=new st(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new st(a.x-this.j.x,a.y-this.j.y)}}},mt.className="OverviewDraggingTool";function gt(){Ao(this),this.H=Bc,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=Do,this.hb=!0,this.cg=null,this.ob=200}gt.prototype.toString=function(){return"CommandHandler"},gt.prototype.Xe=function(a){this.H=a},gt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Xr?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},gt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},gt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof jo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},gt.prototype.canStopCommand=function(){return!0},gt.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},gt.prototype.canSelectAll=function(){return this.diagram.allowSelect},gt.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 Yn,x=a.selection.iterator;x.next();)Cf(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},gt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},gt.prototype.copySelection=function(){var a=this.diagram,y=new Yn;for(a=a.selection.iterator;a.next();)Cf(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},gt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},gt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},gt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},gt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Zh=null,Ud="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new Un,x.addAll(z),Zh=x,Ud=y.model.dataFormat}}y.R("ClipboardChanged",x)},gt.prototype.pasteFromClipboard=function(){var a=new Yn,y=Zh;if(y===null)return a;var x=this.diagram;if(Ud!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,ne=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=ne.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},gt.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);Yc(y,z,new st(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},gt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Zh===null||Zh.count===0||Ud!==a.model.dataFormat)},gt.prototype.undo=function(){this.diagram.undoManager.undo()},gt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},gt.prototype.redo=function(){this.diagram.undoManager.redo()},gt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},gt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===iu&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},gt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==iu?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},gt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===iu&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},gt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==iu?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},gt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},gt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},gt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Zl(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Do):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),dl(y)},gt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},gt.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;Zl(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=jt(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var oe=b.pop();0<b.length&&oe instanceof Ni&&oe.isTreeExpanded&&(!(oe instanceof ho)||oe.isSubGraphExpanded);)oe=b.pop();0<b.length?(oe instanceof xr&&y.tv(oe.actualBounds),oe instanceof Ni&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof ho&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof xr&&y.es(oe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Rn(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",ne),z()}}else{var re=y.position.copy();y.es(a.actualBounds),re.Xa(y.position)&&x.Cc()}}};function jt(a,y,x){if(y.isVisible())return x;if(y instanceof pa)jt(a,y.adornedPart,x);else if(y instanceof fi){var E=y.fromNode;E!==null&&jt(a,E,x),y=y.toNode,y!==null&&jt(a,y,x)}else y instanceof Ni&&(E=y.labeledLink,E!==null&&jt(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),jt(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),jt(a,y,x));return x}gt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof xr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},gt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Zl(y.animationManager,"Collapse Tree");var x=new Un;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Ni&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},gt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Ni&&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 Ni&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},gt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Zl(y.animationManager,"Expand Tree");var x=new Un;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Ni&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},gt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Ni)||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 Ni&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},gt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new Un,z=a.selection.iterator;z.next();){var ne=z.value;ne.Zc()&&ne.canGroup()&&b.add(ne)}for(var re=new Un,oe=b.iterator;oe.next();){var ue=oe.value;z=!1;for(var ce=b.iterator;ce.next();)if(ue.Td(ce.value)){z=!0;break}z||re.add(ue)}if(0<re.count){var me=re.first().containingGroup;if(me!==null)for(;me!==null;){b=!1;for(var we=re.iterator;we.next();)if(!we.value.Td(me)){b=!0;break}if(b)me=me.containingGroup;else break}if(x instanceof ho)Zc(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Fe=y.copyNodeData(x);tn(Fe)&&(y.xf(Fe),E=a.ii(Fe))}if(E!==null){me!==null&&this.isValidMember(me,E)&&(E.containingGroup=me);for(var De=re.iterator;De.next();){var _e=De.value;this.isValidMember(E,_e)&&(_e.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},gt.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 Ln(a){var y=vi();for(a=a.iterator;a.next();){var x=a.value;x instanceof fi||y.push(x)}a=new Yn,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,ne=0;ne<x;ne++)if(b.Td(y[ne])){z=!1;break}z&&a.add(b)}return Ti(y),a}gt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof fi)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},gt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var E=new Un;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof ho&&z.canUngroup()&&E.add(z)}var ne=new Un;if(0<E.count){y.clearSelection(!0);for(var re=E.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var ue=oe.containingGroup,ce=ue!==null&&ue.data!==null?x.wa(ue.data):void 0;ne.addAll(oe.memberParts);for(var me=ne.iterator;me.next();){var we=me.value;if(we.isSelected=!0,!(we instanceof fi)){var Fe=we.data;Fe!==null?x.mp(Fe,ce):we.containingGroup=ue}}y.remove(oe)}}y.R("SelectionUngrouped",E,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},gt.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 ho))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ho&&y.canUngroup())return!0;return!1},gt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Ln(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},gt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Zl(y.animationManager,"Collapse SubGraph");var x=new Un;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof ho&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},gt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof ho&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ho&&y.isSubGraphExpanded)return!0;return!1},gt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Zl(y.animationManager,"Expand SubGraph");var x=new Un;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof ho&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},gt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof ho&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ho&&!y.isSubGraphExpanded)return!0;return!1},gt.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof es&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},gt.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 es))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 es&&x.editable}),a!==null))return!0;return!1},gt.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var E=y.lastInput,b=null;a instanceof Vt?b=a.ga(Oo):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new st(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,Va(x,!1,a)}},gt.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)},gt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new Ki,a===null)return E;for(var z=a.iterator;z.next();)Sc(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof fi&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Qe.Object.defineProperties(gt.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||Et("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}}}),gt.className="CommandHandler",Zd=function(){return new gt};function Vt(){Ao(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new st(NaN,NaN).freeze(),this.jd=Qa,this.Ab=new Yt,this.wh=new Yt,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=sl,this.uc=new Mn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Mn(NaN,NaN,NaN,NaN).freeze(),this.dc=new Mn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Fi,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 si,ii,tr,dr,Mr,so,Zo,Bo,ea,_a;Vt.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=In(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Vt.prototype.Vw=function(a){var y=this.Dh;if(sn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Vt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Vt.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},Vt.prototype.copy=function(){return this.clone()},Ne=Vt.prototype,Ne.qb=function(a){a.classType===fi?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Et("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Vt&&(this.stretch=a)},Ne.toString=function(){return Li(this.constructor)+"#"+nr(this)},Ne.th=function(){this.A!==null&&(this.A.nc=!0)};function Mo(a){a.A===null?a.A=new Gr:a.A.nc&&(a.A=a.A.copy())}Ne.Xc=function(){if(this.ba===null){var a=new yo;a.Xi=Cs,a.yj=Cs,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Ne.cb=function(a,y,x,E,b,z,ne){var re=this.part;if(re!==null&&(re.gk(a,y,x,E,b,z,ne),x===this&&a===_o&&Se(this)&&rs(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 Ki),ne=z.undoManager.transactionLevel===0,a.startCondition===vl?ne=!0:a.startCondition===Xs&&(ne=!1),ne?(z=new Ns,ws(a,z),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(Zl(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof ui&&x===re&&(re.l&16777216)!==0&&re.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)re=x[b],re instanceof ui&&Jf(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function rs(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,ne=null;if(z.sourceName!==null){if(ne=Bx(z,E,a),ne===null)continue;z.sp(a,ne,x,null)}else if(z.isToModel){var re=y.diagram;re===null||re.skipsModelSourceBindings||z.sp(a,re.model.modelData,x,E)}else{if(re=E.data,re===null)continue;var oe=y.diagram;oe===null||oe.skipsModelSourceBindings||z.sp(a,re,x,E)}ne===a&&(re=E.ks(z.Ai),re!==null&&z.Mv(re,ne,x))}}Ne.ks=function(a){return this.bindingId===a?this:null},Ne.g=function(a,y,x){this.cb(_o,a,this,y,x)},Ne.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Yt);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function rl(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Ne.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?Na(a.x,a.y,0,0,0,E.height)<=y||Na(a.x,a.y,0,E.height,E.width,E.height)<=y||Na(a.x,a.y,E.width,E.height,E.width,0)<=y||Na(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Ne.se=function(){return!0},Ne.ca=function(a){var y=st.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return st.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),ne=z/2,re=this.naturalBounds;E=this.Df()*E.scale;var oe=1/E;if(re.width*E<b&&re.height*E<b)return a=Ba(x.x-ne*oe,x.y-ne*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),st.free(y),a}return b=!1,(this instanceof pa||this instanceof Co?Ba(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),st.free(y),b},Ne.gh=function(a){var y=this.naturalBounds;return Ba(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=Mn.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=st.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),st.free(b),Mn.free(y),E},Ne.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=st.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),st.free(b),E},Ne.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=st.allocAt(0,0),b=st.allocAt(0,x.height),z=st.allocAt(x.width,x.height),ne=st.allocAt(x.width,0),re=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(ne)))re=!0;else{x=Mn.allocAt(0,0,x.width,x.height);var oe=st.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)))),st.free(oe),Mn.free(x),!re&&(nt.us(a,E,b)||nt.us(a,b,z)||nt.us(a,z,ne)||nt.us(a,ne,E))&&(re=!0)}return st.free(E),st.free(b),st.free(z),st.free(ne),re},Ne.ga=function(a,y){if(y===void 0&&(y=new st),a instanceof Ji){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 Mn);var y=this.naturalBounds,x=this.oe,E=st.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),ps(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),ps(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),ps(a,E.x,E.y,0,0),st.free(E),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 st),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,E,b){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,ue=-z.m21*ne,ce=z.m11*ne,me=ne*(z.m21*z.dy-z.m22*z.dx),we=ne*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,nt.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(ne=a*re+y*ue+me,a=a*oe+y*ce+we,y=x*re+E*ue+me,x=x*oe+E*ce+we,b.h(0,0),E=this.naturalBounds,x=nt.Ff(0,0,E.width,E.height,ne,a,y,x,b),b.transform(z),x)},Vt.prototype.measure=function(a,y,x,E){if(Pt(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var ne=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+ne:a,y=isFinite(b.width)?b.width+ne:y):(a=isFinite(b.width)?b.width+ne:a,y=isFinite(b.height)?b.height+ne:y),b=x||0,ne=E||0;var re=this instanceof ui;switch(fu(this,!0)){case ii:ne=b=0,re&&(y=a=1/0);break;case si:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(ne=y);break;case dr:isFinite(a)&&a>x&&(b=a),ne=0,re&&(y=1/0);break;case Mr:isFinite(y)&&y>E&&(ne=y),b=0,re&&(a=1/0)}re=this.maxSize;var oe=this.minSize;b>re.width&&oe.width<re.width&&(b=re.width),ne>re.height&&oe.height<re.height&&(ne=re.height),x=Math.max(b,oe.width),E=Math.max(ne,oe.height),re.width<x&&(x=Math.min(oe.width,x)),re.height<E&&(E=Math.min(oe.height,E)),a=Math.min(re.width,a),y=Math.min(re.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||Et("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),yt(this,!1)}},Vt.prototype.Wl=function(){},Vt.prototype.Dd=function(){return!1},Vt.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Mn.alloc();z.assign(this.Ib),this.Ib.ka(),kt(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&$h(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof es&&(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()||Et("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Ht(this,!1),Mn.free(z)},Ne=Vt.prototype,Ne.eh=function(){};function ru(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=z.width+y,z=z.height+ne,E+=y,b+=ne,y=fu(a,!0),x===E&&z===b&&(y=ii),y){case ii:(x>E||z>b)&&(yt(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case si:yt(a,!0),a.measure(E,b,0,0);break;case dr:yt(a,!0),a.measure(E,z,0,0);break;case Mr:yt(a,!0),a.measure(x,b,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||Uv(x,!0),this.N(),Ol(a,y)||(x.oh(),this.Pn(x)))},Ne.Pn=function(a){this.portId!==null&&(Uv(a,!0),a instanceof Ni&&G1(a,this))},Ne.gc=function(a,y){if(!Yu(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof ui&&$h(this),ne=this.Ib;if(z){var re=this.Ib,oe=this.dc,ue=this.areaBackground,ce=this.Ma;ue===null&&ce===null||a.yc(),ue!==null&&(Ds(this,a,ue,!0,!0,oe,re),ue instanceof ha&&ue.type===Nc?(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)),ce!==null&&(Ds(this,a,ce,!0,!1,oe,re),ce instanceof ha&&ce.type===Nc?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ce)):a.fillRect(re.x,re.y,re.width,re.height)),this.hh(a,y)}if(!z&&(z||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){z=this.transform,re=this.panel,this.l&4096&&Sl(this),ue=this.part,oe=!1;var me=0;ue&&y.Gf("drawShadows")&&(oe=ue.isShadowed)&&(ce=ue.shadowOffset,me=Math.max(ce.y,ce.x)*y.scale*y.Mb),ce=this.Dd();var we;if(!(we=y.$i||!ce)){var Fe=this.naturalBounds;we=this.wh;var De=we.m11,_e=we.m21,pt=we.dx,it=we.m12,bt=we.m22,It=we.dy,Rt,Kt=Rt=0;we=Rt*De+Kt*_e+pt;var hn=Rt*it+Kt*bt+It;Rt=Fe.width+me,Kt=0;var bi=Rt*De+Kt*_e+pt;Rt=Rt*it+Kt*bt+It,Kt=Math.min(we,bi);var Xi=Math.min(hn,Rt),zi=Math.max(we+0,bi)-Kt,hi=Math.max(hn+0,Rt)-Xi;we=Kt,hn=Xi,Rt=Fe.width+me,Kt=Fe.height+me,bi=Rt*De+Kt*_e+pt,Rt=Rt*it+Kt*bt+It,Kt=Math.min(we,bi),Xi=Math.min(hn,Rt),zi=Math.max(we+zi,bi)-Kt,hi=Math.max(hn+hi,Rt)-Xi,we=Kt,hn=Xi,Rt=0,Kt=Fe.height+me,bi=Rt*De+Kt*_e+pt,Rt=Rt*it+Kt*bt+It,Kt=Math.min(we,bi),Xi=Math.min(hn,Rt),zi=Math.max(we+zi,bi)-Kt,hi=Math.max(hn+hi,Rt)-Xi,we=Kt,hn=Xi,me=y.viewportBounds,Fe=me.x,De=me.y,we=!(we>me.width+Fe||Fe>zi+we||hn>me.height+De||De>hi+hn)}if(we){if(we=(this.l&256)!==0,a.clipInsteadOfFill&&(we=!1),this instanceof es&&(a.font=this.font),we){if(hn=re.se()?re.naturalBounds:re.actualBounds,zi=Math.max(ne.x,hn.x),hi=Math.max(ne.y,hn.y),me=Math.min(ne.right,hn.right)-zi,Fe=Math.min(ne.bottom,hn.bottom)-hi,De=this.tb,De!==null&&(zi=De.x,hi=De.y,me=De.width,Fe=De.height),zi>ne.width+ne.x||ne.x>hn.width+hn.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(zi,hi,me,Fe),a.clip()}if(ce){if(!ue.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}oe&&(hn=ue.shadowOffset,a.Ev(hn.x*y.scale*this.scale*y.Mb,hn.y*y.scale*this.scale*y.Mb,ue.shadowBlur),Il(a),a.shadowColor=ue.shadowColor)}oe&&this.shadowVisible===!0?Il(a):oe&&this.shadowVisible===!1&&gu(a),ue=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Uu(this,a,ue,ne)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),oe&&xl(this,re)&&this.shadowVisible===null&&gu(a),this.Ma!==null&&(a.yc(),wu(this,a,ue,ne)),oe&&(this.Ma!==null||this.areaBackground!==null||xl(this,re))?(Pc(this,!0),this.shadowVisible===null&&gu(a)):Pc(this,!1),this.hh(a,y),oe&&this.l&512&&Il(a),ce&&oe&&gu(a),we&&(a.restore(),a.Vc(this instanceof ui)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function xl(a,y){return y===null?!1:($h(y)&&(y=y.panel),(y.l&512)!==0||(y.type===ui.Auto||y.type===ui.Spot)&&y.Pb()!==a)}Ne.Dv=function(){};function Uu(a,y,x,E){Ds(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof ha&&a.areaBackground.type===Nc?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function wu(a,y,x,E){var b=a.kq(),z=x.x,ne=x.y,re=x.width+b,oe=x.height+b;Ds(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof ha&&a.Ma.type===Nc?(y.beginPath(),y.rect(z-b/2,ne-b/2,re,oe),y.ng(a.Ma)):y.fillRect(z-b/2,ne-b/2,re,oe)}function Xl(a,y,x){for(var E=y.O.s,b=E.length,z=-1,ne=0;ne<b;ne++)if(E[ne]===a){z=ne;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===ui.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 Yu(a,y,x){if(!(y instanceof Ia))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var E=a.panel,b=a.nk(y);if(a.kk(y,x,b))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):E&&Xl(a,E,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),Il(y),y.shadowColor=a.shadowColor}a instanceof es&&(y.font=a.font),y.yd=null;var ne=a.transform;z=a instanceof ui;var re=a instanceof ui?$h(a):!1;a.l&4096&&Sl(a);var oe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&re?(Lc(y,1,0,0,1,0,0),a.svg=y.ad):z?(Lc(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):Lc(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var ue=ne.copy().Vj();y.rb.ha=[ue.m11,ue.m12,ue.m21,ue.m22,ue.dx,ue.dy],Uu(a,y,b,oe),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(z?(re&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),wu(a,y,b,oe),re&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],wu(a,y,b,oe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,b=a.part,re=!1,b&&x.Gf("drawShadows")&&(re=b.isShadowed),y.clipInsteadOfFill&&(re=!1),a.Dd()&&re&&Il(y),re&&a.shadowVisible===!0?Il(y):re&&a.shadowVisible===!1&&gu(y),b=a.panel,re&&xl(a,b)&&a.shadowVisible===null&&gu(y),y.Il&&(ue=x.computePixelRatio(),ue="drop-shadow("+y.shadowOffsetX/ue+"px "+y.shadowOffsetY/ue+"px "+y.shadowBlur/ue/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",ue),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",ue)),re&&(a.Ma!==null||a.areaBackground!==null||xl(a,b))?(Pc(a,!0),a.shadowVisible===null&&gu(y)):Pc(a,!1),b=re,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,re=z?a.svg:y.yd,ue=a.svg,!z&&ue!==null&&re!==ue&&ue.parentNode===a.panel.svg?(a.svg.replaceWith(re),a.svg=re,re!==null&&a.$o(y,E,oe,re),hu(y,ue),!0):(a.svg=re,ne!==null&&re===null&&(wc(y),y.nh.pop()),re===null||(a.$o(y,E,oe,re),y.Il&&(x=x.computePixelRatio(),a.Dv(re,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&Il(y),a.Dd()&&gu(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&re.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&re.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(re):y.Nj.prepend(re),y.ti=re):E!==null&&Xl(a,E,re),ne!==null&&ne(a,re)),!0)}Ne.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var ne=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,ne=z.width,x=z.height),z=E.getAttribute("clip-path");var re=null;z!==null&&(re=a.svg.getElementById(z.split("#")[1].slice(0,-1))),re===null?(z="CLIP"+qo++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:ne,height:x}),this instanceof ui&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),re.appendChild(y),a.svg.appendChild(re),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=re.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),hu(a,E)};function hu(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Jl(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=wr(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}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 E=this.transform,b=this instanceof ui?$h(this):!1;if(!(this instanceof ui&&b))if(this instanceof zu){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&ks(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Ql(a)):y.setAttributeNS(null,"transform",Ql(a))}else if(!x||this instanceof ui)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Co){z=y.getElementsByTagName("path");for(var ne=0;ne<z.length;ne++)z[ne].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=E.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Uu(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&Nd(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(Nd(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof ui))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),wu(this,a,this.naturalBounds,this.actualBounds),y.Ma?(Nd(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&&Nd(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 Ds(a,y,x,E,b,z,ne){if(x!==null){var re=1,oe=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Gh)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var ue=a.kq();if(re=z.width,oe=z.height,b?(re=ne.width,oe=ne.height):E||(re+=ue,oe+=ue),(z=y instanceof fd)&&x.xe&&(x.type===lp||x.yk===re&&x.ft===oe))var ce=x.xe;else{var me=0,we=0,Fe=0,De=0,_e=0,pt=0;if(pt=_e=0,b?(_e=ne.x,pt=ne.y):E||(_e-=ue/2,pt-=ue/2),me=x.start.x*re+x.start.offsetX,we=x.start.y*oe+x.start.offsetY,Fe=x.end.x*re+x.end.offsetX,De=x.end.y*oe+x.end.offsetY,me+=_e,Fe+=_e,we+=pt,De+=pt,x.type===Bh)ce=y.createLinearGradient(me,we,Fe,De);else if(x.type===Nc)pt=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(_e=0,pt=Math.max(re,oe)/2):_e=x.startRadius,ce=y.createRadialGradient(me,we,_e,Fe,De,pt);else if(x.type===lp)try{ce=y.createPattern(x.pattern,"repeat")}catch(bt){ce=null}if(x.type!==lp&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ce.addColorStop(b.key,b.value);if(z&&(x.xe=ce,ce!==null&&(x.yk=re,x.ft=oe),ce===null&&x.type===lp&&x.yk!==-1)){x.yk=-1;var it=a.diagram;it!==null&&x.yk===-1&&Rn(function(){it.redraw()},600)}}E?y.fillStyle=ce:y.strokeStyle=ce}}}Ne.rg=function(a){if(a instanceof ui)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 ui?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Sl(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Te(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)}Te(a,!1),Ke(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ke(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,Ke(a,!1)))}Ne.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=st.alloc();z.yi(y,x,E,b,Oo),a.rotate(this.Kb,z.x,z.y),st.free(z)}},Ne.v=function(a){if(!Pt(this)){a===void 0&&(a=!1),yt(this,!0),Ht(this,!0);var y=this.panel;y===null||a||y.v()}},Ne.Uj=function(){Pt(this)||(yt(this,!0),Ht(this,!0))};function uu(a){if(!kt(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Ni&&a.Bd(),y.$b())),Ht(a,!0)}}Ne.Uk=function(){!(this.l&2048)&&(Te(this,!0),Ke(this,!0))},Ne.Wu=function(){Ke(this,!0)},Ne.N=function(){var a=this.part;a!==null&&a.N()};function fu(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===ui.Table?jc(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===ui.Auto&&E.Pb()===a?Pl(a,si,y):x===so?E!==null?E.type===ui.Spot&&E.Pb()===a?Pl(a,si,y):(x=E.defaultStretch,x===so?Pl(a,ii,y):Pl(a,x,y)):Pl(a,ii,y):Pl(a,x,y)}function jc(a,y,x,E){var b=a.stretch;if(b!==so)return Pl(a,b,E);var z=b=null;switch(y.stretch){case Mr:z=!0;break;case si:z=!0}switch(x.stretch){case dr:b=!0;break;case si:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===dr||y===si),z===null&&(z=y===Mr||y===si),b===!0&&z===!0?Pl(a,si,E):b===!0?Pl(a,dr,E):z===!0?Pl(a,Mr,E):Pl(a,ii,E)}function Pl(a,y,x){if(x)return y;if(y===ii||(x=a.desiredSize,x.w()))return ii;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===dr)return ii;if(y===si)return Mr}else{if(y===Mr)return ii;if(y===si)return dr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Mr)return ii;if(y===si)return dr}else{if(y===dr)return ii;if(y===si)return Mr}return y}function Pc(a,y){a.l=y?a.l|512:a.l&-513}function Se(a){return(a.l&1024)!==0}function Ce(a,y){a.l=y?a.l|1024:a.l&-1025}function Te(a,y){a.l=y?a.l|2048:a.l&-2049}function Ke(a,y){a.l=y?a.l|4096:a.l&-4097}function Pt(a){return(a.l&8192)!==0}function yt(a,y){a.l=y?a.l|8192:a.l&-8193}function kt(a){return(a.l&16384)!==0}function Ht(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,uu(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 xn(a){var y=a.part;if(y instanceof Ni&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||G1(y,a)}}function Wn(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof ui?a instanceof Ni?a.Bd():a.qm(a,function(x){xn(x)}):xn(a))}Ne.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new tl(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&f1(a)&&Et("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new Un),this.localBindings.add(b),this},Ne.set=function(a){return Object.assign(this,a),this},Ne.Du=function(a){return Bn(this,a),this},Ne.apply=function(a){return a(this),this},Ne.nm=function(a){return uc(this,a),this},Ne.pz=function(){return this.ih()},Ne.ih=function(){for(var a=this instanceof ui?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 Ki),this.animationTriggers.add(a.propertyName,a),this};function An(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=Ii.I(a);typeof z=="function"?(x=In(arguments),E=z(x),tn(E)||Et('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=ht.go[a]}if(E===null&&(b!=null&&b.constructor||Et("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof dn&&1<x.length){z=E;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Rh(z,ne),b++)}for(;b<x.length;b++)z=x[b],z===void 0?Et("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):Bn(E,z);return E}function Bn(a,y){if(typeof y=="string")if(a instanceof es)a.text=y;else if(a instanceof Co)a.figure=y;else if(a instanceof zu)a.source=y;else if(a instanceof ui)y=Qc.I(y),y!==null&&(a.type=y);else if(a instanceof ha){var x=ri(ha,y);x!==null?a.type=x:Et("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Qt?(y=ri(Qt,y),y!==null&&(a.type=y)):a instanceof fr&&(y=ri(fr,y),y!==null&&(a.type=y));else if(y instanceof Vt)a instanceof ui||Et("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof ol){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof ol?Qm(E,y):Et("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Cn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ll)a.type=y;else if(y instanceof tl)a instanceof Vt||a instanceof ol?a.bind(y):Et("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Tu)a instanceof Vt?a.Jv(y):Et("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof So)a instanceof Qt&&a.type===Qt.o?a.figures.add(y):Et("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof fr)a instanceof So?a.segments.add(y):Et("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof xs)a instanceof dn||a instanceof ho?a.layout=y:Et("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++)Bn(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof ha){x=new yr;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);uc(a,x)}else if(a instanceof ol){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&Et("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&Et("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new yr;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);uc(a,b)}else uc(a,y);else Et('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Fn(a,y){Ii.add(a,y)}function ni(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Qe.Object.defineProperties(Vt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Gr),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 Gr),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 Gr),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Mo(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&&(Mo(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Eu},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new no),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Eu&&(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 no),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 no),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:sa},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new no),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:so},set:function(a){var y=this.stretch;y!==a&&(Mo(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&&(Mo(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)&&Kn(a,"0 <= value <= 1",Vt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(eg(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(eg(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(),Wn(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&&yf(a,"GraphObject.areaBackground"),a instanceof ha&&a.freeze(),Mo(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&&yf(a,"GraphObject.background"),a instanceof ha&&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 xr)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new st(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Et("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,Wn(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Co&&this.qc(),this.g("desiredSize",E,a),Se(this)&&(a=this.part,a!==null&&(rs(this,a,"width"),rs(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new pi(a,this.jd.height).freeze(),this.v(),this instanceof Co&&this.qc(),this.g("desiredSize",y,a),Se(this)&&(a=this.part,a!==null&&rs(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new pi(this.jd.width,a).freeze(),this.v(),this instanceof Co&&this.qc(),this.g("desiredSize",y,a),Se(this)&&(a=this.part,a!==null&&rs(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:io},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(),Mo(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:$a},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(),Mo(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 hr(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&&Sl(this),this.Ab}},oe:{get:function(){return this.l&4096&&Sl(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Mo(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:ii},set:function(a){this.reshapingBehavior!==a&&(Mo(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()&&Et("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),uu(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&&Kn(a,">= 0",Vt,"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&&Kn(a,">= 1",Vt,"columnSpan"),Mo(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&&Kn(a,">= 0",Vt,"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&&Kn(a,">= 1",Vt,"rowSpan"),Mo(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&&(Mo(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 Ni||Et("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Qv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,V1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Cs},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),xn(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Kn(a,">= 0",Vt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),xn(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),xn(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&&Kn(a,">= 0",Vt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Cs},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),xn(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Kn(a,">= 0",Vt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),xn(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),xn(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&&Kn(a,">= 0",Vt,"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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Vt.prototype.trigger=Vt.prototype.Jv,Vt.prototype.findBindingPanel=Vt.prototype.ih,Vt.prototype.findTemplateBinder=Vt.prototype.pz,Vt.prototype.setProperties=Vt.prototype.nm,Vt.prototype.apply=Vt.prototype.apply,Vt.prototype.attach=Vt.prototype.Du,Vt.prototype.set=Vt.prototype.set,Vt.prototype.isEnabledObject=Vt.prototype.If,Vt.prototype.isVisibleObject=Vt.prototype.Ed,Vt.prototype.isContainedBy=Vt.prototype.rg,Vt.prototype.getNearestIntersectionPoint=Vt.prototype.rs,Vt.prototype.getLocalPoint=Vt.prototype.qs,Vt.prototype.getDocumentScale=Vt.prototype.Df,Vt.prototype.getDocumentAngle=Vt.prototype.li,Vt.prototype.getDocumentBounds=Vt.prototype.mi,Vt.prototype.getDocumentPoint=Vt.prototype.ga,Vt.prototype.intersectsRect=Vt.prototype.Yc,Vt.prototype.containedInRect=Vt.prototype.fh,Vt.prototype.containsRect=Vt.prototype.Re,Vt.prototype.containsPoint=Vt.prototype.ca,Vt.prototype.raiseChanged=Vt.prototype.g,Vt.prototype.raiseChangedEvent=Vt.prototype.cb,Vt.prototype.addCopyProperty=Vt.prototype.Vw;var Ii=null;Vt.className="GraphObject",Ii=new Ki,Fn("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=An(ui,ui.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof ui){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},An(Co,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ji(0,0,2.76142374915397,2.761423749153969),spot2:new Ji(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof ui&&(x=E.fb("ButtonBorder"),x instanceof Co)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof ui&&(x=E.fb("ButtonBorder"),x instanceof Co&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof ui&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Co){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=ne,ne=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=ne,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof ui&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Co){var z=x.diagram,ne=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=ne}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof ui&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Co){var z=x.diagram,ne=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=ne}}},y.actionMove=function(x,E){if(E.If()&&E instanceof ui&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Co))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var ne=E._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=E._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),b.skipsUndoManager=z}}},y}),Fn("TreeExpanderButton",function(){var a=An("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},An(Co,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ca},new tl("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new tl("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof pa&&(x=x.adornedPart),x instanceof Ni){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),Fn("SubGraphExpanderButton",function(){var a=An("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},An(Co,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ca},new tl("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 pa&&(x=x.adornedPart),x instanceof ho){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),Fn("ToolTip",function(){return An(pa,ui.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},An(Co,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Ji(0,0,4,6),spot2:new Ji(1,1,-4,-4)}))}),Fn("ContextMenu",function(){return An(pa,ui.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},new tl("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Fn("ContextMenuButton",function(){var a=An("Button");a.stretch=dr;var y=a.fb("ButtonBorder");return y instanceof Co&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Ji(0,0,2,3),y.spot2=new Ji(1,1,-2,-2)),a}),Fn("PanelExpanderButton",function(a){var y=ni(a,"COLLAPSIBLE"),x=An("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},An(Co,{name:"ButtonIcon",strokeWidth:2},new tl("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Co&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var ne=b.ih();ne===null&&(ne=b.part),ne!==null&&(b=ne.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),Fn("CheckBoxButton",function(a){var y=ni(a);return a=An("Button",{desiredSize:new pi(14,14)},An(Co,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:si,geometryStretch:tr,visible:!1},y!==""?new tl("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof ui){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),Fn("CheckBox",function(a){a=ni(a),a=An("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new hr(0,1,0,0)});var y=An(ui,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new hr(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}),Vt.None=ii=new Cn(Vt,"None",0),Vt.Default=so=new Cn(Vt,"Default",0),Vt.Vertical=Mr=new Cn(Vt,"Vertical",4),Vt.Horizontal=dr=new Cn(Vt,"Horizontal",5),Vt.Fill=si=new Cn(Vt,"Fill",3),Vt.Uniform=tr=new Cn(Vt,"Uniform",1),Vt.UniformToFill=Zo=new Cn(Vt,"UniformToFill",2),Vt.FlipVertical=Bo=new Cn(Vt,"FlipVertical",1),Vt.FlipHorizontal=ea=new Cn(Vt,"FlipHorizontal",2),Vt.FlipBoth=_a=new Cn(Vt,"FlipBoth",3),Vt.make=An,Vt.getBuilders=function(){var a=new Ki,y;for(y in Ii)if(y!==y.toLowerCase()){var x=Ii.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Vt.defineBuilder=Fn,Vt.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Ii.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof Vt))return y&&E.set(y),E;Et('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Vt.takeBuilderArgument=ni;function Gr(){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=io,this.o=$a,this.hg=so,this.ob=this.Bi=1,this.Pf=ii,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Gr.prototype.copy=function(){var a=new Gr;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 no(){this.u=-1/0,this.o=0,this.F=sa,this.rr=Eu,this.j=this.V="None"}no.prototype.copy=function(){var a=new no;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},no.className="LinkElementSettings";function yo(){this.yj=this.Xi=Fi,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}yo.prototype.copy=function(){var a=new yo;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},yo.className="LinkSettings";function ko(){this.ha=[1,0,0,1,0,0]}ko.prototype.copy=function(){var a=new ko;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},ko.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},ko.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},ko.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,ne=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=ne,this.translate(-y,-x)}},ko.className="STransform";function na(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}na.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},na.className="SGradient";function Jo(a,y,x){this.ownerDocument=a=y===void 0?ht.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 Ia(this,x)}Jo.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},Jo.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),tn(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},Jo.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Jo.prototype.focus=function(){this.Oa.focus()},Jo.prototype.mx=function(){this.ownerDocument=null},Qe.Object.defineProperties(Jo.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}}}),Jo.className="SVGSurface";function Ia(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 ko,this.j=wc(this),this.Nj=wc(this,"gojs-diagram"),this.Hl=this.ti=null;var x=qo++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function ds(a,y,x,E,b,z,ne){a.Nj===void 0?Lc(a,y,x,E,b,z,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+ne+")")}Ne=Ia.prototype,Ne.arc=function(a,y,x,E,b,z,ne,re){var oe=2*Math.PI,ue=oe-1e-6,ce=x*Math.cos(E),me=x*Math.sin(E),we=a+ce,Fe=y+me,De=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(ne-we)||1e-6<Math.abs(re-Fe))&&this.path.push(["L",we,+Fe]),0>E&&(E=E%oe+oe),E>ue?(this.path.push(["A",x,x,0,1,De,a-ce,y-me]),this.path.push(["A",x,x,0,1,De,we,Fe])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),De,a+x*Math.cos(b),y+x*Math.sin(b)])},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,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Ne.clearRect=function(){},Ne.clip=function(){this.Yl.clipPath=!0},Ne.closePath=function(){this.path.push(["z"])},Ne.createLinearGradient=function(a,y,x,E){var b=new na("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},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 E="PATTERN"+qo++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Eh,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Ne.createRadialGradient=function(a,y,x,E,b,z){var ne=new na("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=E,ne.y2=b,ne.r2=z,ne};function ks(a,y,x,E,b,z,ne,re,oe){E=re/E,b=oe/b,z===0&&ne===0||a.rb.translate(z,ne),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Ne.drawImage=function(a,y,x,E,b,z,ne,re,oe){var ue="";a instanceof HTMLCanvasElement&&(ue=a.toDataURL()),a instanceof HTMLImageElement&&(ue=a.getAttribute("src"));var ce=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,ne=x,re=E=ce,oe=b=a),E=E||0,b=b||0,re=re||0,oe=oe||0,ks(this,y,x,E,b,z||0,ne||0,re,oe),z={x:0,y:0,width:ce||E,height:a||b,href:ue},nt.$(E,re)&&nt.$(b,oe)?ue.toLowerCase().indexOf(".svg")===-1&&ue.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ce||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),Is(this,Eh,z,this.rb),this.addElement(Eh,z)},Ne.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),Wl(this,this.Yl)},Ne.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Ne.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},Is(this,"fill",a,this.rb),this.addElement("rect",a)},Ne.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},Is(this,"fill",a,this.rb),Wl(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},Is(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,E){this.path.push(["Q",a,y,x,E])},Ne.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},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,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Lc(this,a,y,x,E,b,z)};function Ql(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(){Xu(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 Is(a,y,x,E){y==="fill"?Wl(a,x):y==="stroke"&&Xu(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function Wl(a,y){a.fillStyle instanceof na?y.fill=hd(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 _u(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof na?y.setAttributeNS(null,"fill",hd(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 Xu(a,y){if(a.strokeStyle instanceof na)y.stroke=hd(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 hd(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+qo++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],ne=0;ne<y;ne++){var re=b[ne],oe=re.color;re={offset:re.offset,"stop-color":oe},/^rgba\(/.test(oe)&&(oe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(oe),re["stop-color"]="rgb("+oe[1]+","+oe[2]+","+oe[3]+")",re["stop-opacity"]=oe[4]),z.push(re)}for(z.sort(function(ue,ce){return ue.offset>ce.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Ne.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=In(a[b]),ne=[z.shift()];if(ne[0]==="A")ne.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)ne.push(z.shift()+","+z.shift());E.push(ne.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,Is(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 Lc(a,y,x,E,b,z,ne){var re=new ko;re.ha=[y,x,E,b,z,ne],y={},Is(a,"g",y,re),re=a.addElement("g",y),a.nh.push(re)}function wc(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 gu(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Il(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(){},Ia.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ia.prototype.getImageData=function(){return null},Ia.prototype.measureText=function(){return null};function Nd(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()))}Ia.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ia.className="SVGContext",dn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Jo(this,ht.document));var y=new Jo(this,ht.document,!0);a===void 0&&(a=new yr);var x=this;return Ph(this,function(E,b){return E=tp(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},dn.prototype.makeSvg=dn.prototype.Cs,dn.prototype.av=function(a){return this.Cs(a)},dn.prototype.makeSVG=dn.prototype.av;function Gl(a,y,x,E){this.ownerDocument=y=y===void 0?ht.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new fd(y,x,E),y.H=a}Gl.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},Gl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Gl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Gl.prototype.focus=function(){this.Oa.focus()},Gl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Qe.Object.defineProperties(Gl.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}}}),Gl.className="CanvasSurface";function fd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Et("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 Yt,this.isTemporary=!!x}Ne=fd.prototype,Ne.Wx=function(a){this.Z.imageSmoothingEnabled=a},Ne.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Ne.beginPath=function(){this.Z.beginPath()},Ne.Se=function(){},Ne.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Ne.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Ne.clip=function(){this.Z.clip()},Ne.closePath=function(){this.Z.closePath()},Ne.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Ne.createPattern=function(a,y){return this.Z.createPattern(a,y)},Ne.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Ne.drawImage=function(a,y,x,E,b,z,ne,re,oe){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,ne,re,oe)},Ne.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Ne.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Ne.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Ne.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Ne.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},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,E){this.Z.quadraticCurveTo(a,y,x,E)},Ne.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Ne.restore=function(){this.Z.restore()},Ne.save=function(){this.yc(),this.Z.save()},fd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Ne=fd.prototype,Ne.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,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,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var ne=this.El,re=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*E,x=ne.m12*x+ne.m22*E,ne.dx=ne.m11*b+ne.m21*z+ne.dx,ne.dy=ne.m12*b+ne.m22*z+ne.dy,ne.m11=re,ne.m12=a,ne.m21=y,ne.m22=x}},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 ha&&a.type===Nc){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(vf),a.lineDashOffset=0)},Ne.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Ne.Hs=function(){},Qe.Object.defineProperties(fd.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var vf=Object.freeze([]);fd.className="CanvasSurfaceContext";function gd(){this.F=this.o=this.u=this.j=0}gd.className="ColorNumbers";function ha(a,y){sp||(ap(),sp=!0),Ao(this),this._isFrozen=!1,a===void 0?(this.na=Gh,this.xk="black"):typeof a=="string"?(this.na=Gh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Bh?(this.Qd=$l,this.Lk=En):this.Lk=a===Nc?this.Qd=Oo:this.Qd=Cs,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}ha.prototype.copy=function(){var a=new ha;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=ha.prototype,Ne.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Ne.ka=function(){return Object.isFrozen(this)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Ne.qb=function(a){a.classType===ha&&(this.type=a)},Ne.toString=function(){var a="Brush(";if(this.type===Gh)a+=this.color;else if(a=this.type===Bh?a+"Linear ":this.type===Nc?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&&wn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Kn(a,"0 <= loc <= 1",ha,"addColorStop:loc"),this.we===null&&(this.we=new Ki),this.we.add(a,y),this.na===Gh&&(this.type=Bh),this.xe=null,this},Ne.Vz=function(a,y){if(this._isFrozen&&wn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===Gh)Cc(this.color),this.color=Fh(a,y);else if((this.type===Bh||this.type===Nc)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Cc(x.value),this.addColorStop(x.key,Fh(a,y));return this};function Wh(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,Cc(a),Fh(y,x)}Ne.Wy=function(a,y){if(this._isFrozen&&wn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===Gh)Cc(this.color),this.color=Fh(-a,y);else if((this.type===Bh||this.type===Nc)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Cc(x.value),this.addColorStop(x.key,Fh(-a,y));return this};function Lg(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,Cc(a),Fh(-y,x)}function pd(a,y,x){Cc(a),a=Ya.j;var E=Ya.u,b=Ya.o,z=Ya.F;return Cc(y),x===void 0&&(x=.5),"rgba("+Math.round((Ya.j-a)*x+a)+", "+Math.round((Ya.u-E)*x+E)+", "+Math.round((Ya.o-b)*x+b)+", "+Math.round((Ya.F-z)*x+z)+")"}Ne.Gx=function(){if(this.type===Gh)return Qd(this.color);if((this.type===Bh||this.type===Nc)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Nc)return Qd(a.first().value);if(a.get(.5)!==null)return Qd(a.get(.5));if(a.count===2)return a=a.Fa(),Qd(pd(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var ne=y.key,re=Math.abs(.5-y.key);b>z&&re<b?(x=ne,b=re):z>=b&&re<z&&(E=ne,z=re)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,Qd(pd(a.get(x),a.get(E),1-z/b))}return!1};function Qd(a){return a?a instanceof ha?a.Gx():(Cc(a),128>(299*Ya.j+587*Ya.u+114*Ya.o)/1e3):!1}function Fh(a,y){switch(y){case up:y=100*Xf(Ya.j);var x=100*Xf(Ya.u),E=100*Xf(Ya.o);return kl.j=.4124564*y+.3575761*x+.1804375*E,kl.u=.2126729*y+.7151522*x+.072175*E,kl.o=.0193339*y+.119192*x+.9503041*E,kl.F=Ya.F,y=Wp(kl.j/Sf[0]),x=Wp(kl.u/Sf[1]),E=Wp(kl.o/Sf[2]),zc.j=116*x-16,zc.u=500*(y-x),zc.o=200*(x-E),zc.F=kl.F,zc.j=Math.min(100,Math.max(0,zc.j+100*a)),a=(zc.j+16)/116,y=a-zc.o/200,kl.j=Sf[0]*Ng(zc.u/500+a),kl.u=Sf[1]*(zc.j>xf*Ag?Math.pow(a,3):zc.j/xf),kl.o=Sf[2]*Ng(y),kl.F=zc.F,a=-.969266*kl.j+1.8760108*kl.u+.041556*kl.o,y=.0556434*kl.j+-.2040259*kl.u+1.0572252*kl.o,Ya.j=255*op((3.2404542*kl.j+-1.5371385*kl.u+-.4985314*kl.o)/100),Ya.u=255*op(a/100),Ya.o=255*op(y/100),Ya.F=kl.F,Ya.j=Math.round(Ya.j),255<Ya.j?Ya.j=255:0>Ya.j&&(Ya.j=0),Ya.u=Math.round(Ya.u),255<Ya.u?Ya.u=255:0>Ya.u&&(Ya.u=0),Ya.o=Math.round(Ya.o),255<Ya.o?Ya.o=255:0>Ya.o&&(Ya.o=0),"rgba("+Ya.j+", "+Ya.u+", "+Ya.o+", "+Ya.F+")";case i1:return Yf(),Ju.o=Math.min(100,Math.max(0,Ju.o+100*a)),"hsla("+Ju.j+", "+Ju.u+"%, "+Ju.o+"%, "+Ju.F+")";default:Et("Unknown color space: "+y)}}function Cc(a){sp||(ap(),sp=!0);var y=Dg;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,Ya.j=a[0],Ya.u=a[1],Ya.o=a[2],Ya.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ya.j=0,Ya.u=0,Ya.o=0,Ya.F=1)}}function Yf(){var a=Ya.j/255,y=Ya.u/255,x=Ya.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var ne=a=0;else{switch(E){case a:ne=(y-x)/z%6;break;case y:ne=(x-a)/z+2;break;case x:ne=(a-y)/z+4}ne*=60,0>ne&&(ne+=360),a=z/(1-Math.abs(2*b-1))}Ju.j=Math.round(ne),Ju.u=Math.round(100*a),Ju.o=Math.round(100*b),Ju.F=Ya.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 Wp(a){return a>Ag?Math.pow(a,1/3):(xf*a+16)/116}function Ng(a){var y=a*a*a;return y>Ag?y:(116*a-16)/xf}function yf(a,y){typeof a!="string"&&(a instanceof ha||Et("Value for "+y+" must be a color string or a Brush, not "+a))}function ap(){Dg=As?new Gl(null,void 0,{willReadFrequently:!0}).context:null}Qe.Object.defineProperties(ha.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&wn(this,a),this.na=a,this.start.Mc()&&(a===Bh?this.start=$l:a===Nc&&(this.start=Oo)),this.end.Mc()&&(a===Bh?this.end=En:a===Nc&&(this.end=Oo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&wn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&wn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&wn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&wn(this,a),0>a&&Kn(a,">= zero",ha,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&wn(this,a),0>a&&Kn(a,">= zero",ha,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&wn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&wn(this,a),this.cr=a,this.xe=null}}}),ha.prototype.isDark=ha.prototype.Gx,ha.prototype.darkenBy=ha.prototype.Wy,ha.prototype.lightenBy=ha.prototype.Vz,ha.prototype.addColorStop=ha.prototype.addColorStop;var Ag=216/24389,xf=24389/27,Sf=[95.047,100,108.883],Dg=null,Ya=new gd,Ju=new gd,kl=new gd,zc=new gd,sp=!1;ha.className="Brush";var Gh;ha.Solid=Gh=new Cn(ha,"Solid",0);var Bh;ha.Linear=Bh=new Cn(ha,"Linear",1);var Nc;ha.Radial=Nc=new Cn(ha,"Radial",2);var lp;ha.Pattern=lp=new Cn(ha,"Pattern",4);var up;ha.Lab=up=new Cn(ha,"Lab",5);var i1;ha.HSL=i1=new Cn(ha,"HSL",6),ha.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},ha.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;sp||(ap(),sp=!0);var y=Dg;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)},ha.lighten=function(a){return Wh(a)},ha.lightenBy=Wh,ha.darken=function(a){return Lg(a)},ha.darkenBy=Lg,ha.mix=pd,ha.isDark=Qd;function ll(){this.xa="Base"}ll.prototype.measure=function(){},ll.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},ll.prototype.arrange=function(){},ll.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},ll.prototype.iA=function(a){a.Uj()},ll.prototype.gc=function(){},Qe.Object.defineProperties(ll.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return ui}}}),ll.prototype.remeasureObject=ll.prototype.iA,ll.prototype.arrangeElement=ll.prototype.Ly,ll.prototype.measureElement=ll.prototype.Yz,ll.className="PanelLayout";function _m(){this.xa="Base"}$t(_m,ll),_m.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;a=Mh(a);for(var oe=0;oe<re;oe++){var ue=E[oe];if(ue.visible||ue===a){var ce=ue.margin,me=ce.right+ce.left;ce=ce.top+ce.bottom,ue.measure(y,x,z,ne);var we=ue.measuredBounds;me=Math.max(we.width+me,0),ce=Math.max(we.height+ce,0),we=ue.position.x;var Fe=ue.position.y;isFinite(we)||(we=0),isFinite(Fe)||(Fe=0),ue instanceof Co&&ue.isGeometryPositioned&&(ue=ue.strokeWidth/2,we-=ue,Fe-=ue),ps(b,we,Fe,me,ce)}}},_m.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],ne=z.measuredBounds,re=z.margin,oe=z.position.x,ue=z.position.y;if(oe=isNaN(oe)?-a:oe-a,ue=isNaN(ue)?-x:ue-x,z instanceof Co&&z.isGeometryPositioned){var ce=z.strokeWidth/2;oe-=ce,ue-=ce}z.visible&&z.arrange(oe+re.left,ue+re.top,ne.width,ne.height)}};function jm(){this.xa="Base"}$t(jm,ll),jm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;y=vi(),z=Mh(a);for(var oe=0;oe<re;oe++){var ue=E[oe];if(ue.visible||ue===z){var ce=fu(ue,!1);if(ce!==ii&&ce!==dr)y.push(ue);else{ue.measure(1/0,x,0,ne),ce=ue.margin,ue=ue.measuredBounds;var me=Math.max(ue.height+ce.top+ce.bottom,0);b.width+=Math.max(ue.width+ce.right+ce.left,0),b.height=Math.max(b.height,me)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)oe=y[a],(oe.visible||oe===z)&&(ce=oe.margin,re=ce.right+ce.left,ce=ce.top+ce.bottom,oe.measure(1/0,x,0,ne),oe=oe.measuredBounds,ce=Math.max(oe.height+ce,0),b.width+=Math.max(oe.width+re,0),b.height=Math.max(b.height,ce));Ti(y)},jm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,ne=a.isOpposite,re=ne?x.width:b.left,oe=0;oe<E;oe++){var ue=z,ce=y[oe];if(ce.visible){var me=ce.measuredBounds,we=ce.margin,Fe=we.top+we.bottom,De=z+b.bottom,_e=me.height,pt=fu(ce,!1);(isNaN(ce.desiredSize.height)&&pt===si||pt===Mr)&&(_e=Math.max(x.height-Fe-De,0)),Fe=_e+Fe+De,De=ce.alignment,De.Xb()&&(De=a.defaultAlignment),De.sb()||(De=Oo),ne&&(re-=me.width+we.left+we.right),ce.arrange(re+De.offsetX+we.left,ue+De.offsetY+we.top+(x.height*De.y-Fe*De.y),me.width,_e),ne||(re+=me.width+we.left+we.right)}}};function zm(){this.xa="Base"}$t(zm,ll),zm.prototype.measure=function(a,y,x,E,b,z){var ne=E.length;x=vi();for(var re=Mh(a),oe=0;oe<ne;oe++){var ue=E[oe];if(ue.visible||ue===re){var ce=fu(ue,!1);if(ce!==ii&&ce!==Mr)x.push(ue);else{var me=ue.margin;ce=me.right+me.left,me=me.top+me.bottom,ue.measure(y,1/0,z,0),ue=ue.measuredBounds,Ss(b,Math.max(b.width,Math.max(ue.width+ce,0)),b.height+Math.max(ue.height+me,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)oe=x[a],(oe.visible||oe===re)&&(ue=oe.margin,ne=ue.right+ue.left,ue=ue.top+ue.bottom,oe.measure(y,1/0,z,0),oe=oe.measuredBounds,ue=Math.max(oe.height+ue,0),b.width=Math.max(b.width,Math.max(oe.width+ne,0)),b.height+=ue);Ti(x)}},zm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,ne=a.isOpposite,re=ne?x.height:b.top,oe=0;oe<E;oe++){var ue=z,ce=y[oe];if(ce.visible){var me=ce.measuredBounds,we=ce.margin,Fe=we.left+we.right,De=z+b.right,_e=me.width,pt=fu(ce,!1);(isNaN(ce.desiredSize.width)&&pt===si||pt===dr)&&(_e=Math.max(x.width-Fe-De,0)),Fe=_e+Fe+De,De=ce.alignment,De.Xb()&&(De=a.defaultAlignment),De.sb()||(De=Oo),ne&&(re-=me.height+we.bottom+we.top),ce.arrange(ue+De.offsetX+we.left+(x.width*De.x-Fe*De.x),re+De.offsetY+we.top,_e,me.height),ne||(re+=me.height+we.bottom+we.top)}}};function Zm(){this.xa="Base"}$t(Zm,ll),Zm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),ue=oe.margin,ce=ue.right+ue.left,me=ue.top+ue.bottom;oe.measure(y,x,z,ne);var we=oe.measuredBounds;z=we.width,ne=we.height;var Fe=Math.max(z+ce,0),De=Math.max(ne+me,0),_e=a.isClipping,pt=Mn.allocAt(-ue.left,-ue.top,Fe,De),it=Mn.allocAt(0,0,z,ne);Cv(oe,it,!0),z=it.width,ne=it.height;for(var bt=!0,It=Mh(a),Rt=0;Rt<re;Rt++){var Kt=E[Rt];we=y;var hn=x;if(Kt!==oe&&(Kt.visible||Kt===It)){ue=Kt.margin;var bi=ue.left,Xi=ue.top;switch(Fe=ue.right+ue.left,De=ue.top+ue.bottom,ue=fu(Kt,!1),ue){case si:we=z,hn=ne,Xi=bi=De=Fe=0;break;case dr:we=z,bi=Fe=0;break;case Mr:hn=ne,Xi=De=0}Kt.measure(we,hn,0,0),we=Kt.measuredBounds,Fe=Math.max(we.width+Fe,0),De=Math.max(we.height+De,0),ue=Kt.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=Oo);var zi=Kt.alignmentFocus;if(zi.Xb()&&(zi=Oo),hn=null,Kt instanceof ui&&Kt.$e!==""&&(hn=Kt.fb(Kt.$e),hn===Kt&&(hn=null)),bi=it.x-bi,Xi=it.y-Xi,hn!==null){for(Kt.arrange(0,0,we.width,we.height),we=hn.actualBounds,we=st.allocAt(we.x+(zi.x*we.width-zi.offsetX),we.y+(zi.y*we.height-zi.offsetY)),hn=hn.panel;hn!==Kt;)hn.transform.Ga(we),hn=hn.panel;bi+=ue.x*z+ue.offsetX-we.x,Xi+=ue.y*ne+ue.offsetY-we.y,st.free(we)}else bi+=ue.x*z+ue.offsetX-(zi.x*we.width+zi.offsetX),Xi+=ue.y*ne+ue.offsetY-(zi.y*we.height+zi.offsetY);bt?(bt=!1,b.h(bi,Xi,Fe,De)):ps(b,bi,Xi,Fe,De)}}switch(bt?b.assign(pt):_e?b.Uu(it.x,it.y,it.width,it.height):ps(b,pt.x,pt.y,pt.width,pt.height),Mn.free(pt),Mn.free(it),ue=oe.stretch,ue===so&&(ue=fu(oe,!1)),ue){case ii:return;case si:if(!isFinite(y)&&!isFinite(x))return;break;case dr:if(!isFinite(y))return;break;case Mr:if(!isFinite(x))return}for(we=oe.measuredBounds,z=we.width,ne=we.height,Fe=Math.max(z+ce,0),De=Math.max(ne+me,0),ue=oe.margin,it=Mn.allocAt(-ue.left,-ue.top,Fe,De),Cv(oe,it,!0),z=it.width,ne=it.height,y=0;y<re;y++)x=E[y],x===oe||!x.visible&&x!==It||(ue=x.margin,Fe=ue.right+ue.left,De=ue.top+ue.bottom,we=x.measuredBounds,Fe=Math.max(we.width+Fe,0),De=Math.max(we.height+De,0),ce=x.alignment,ce.Xb()&&(ce=a.defaultAlignment),ce.sb()||(ce=Oo),x=x.alignmentFocus,x.Xb()&&(x=Oo),bt?(bt=!1,b.h(ce.x*z+ce.offsetX-(x.x*we.width+x.offsetX)-ue.left,ce.y*ne+ce.offsetY-(x.y*we.height+x.offsetY)-ue.top,Fe,De)):ps(b,ce.x*z+ce.offsetX-(x.x*we.width+x.offsetX)-ue.left,ce.y*ne+ce.offsetY-(x.y*we.height+x.offsetY)-ue.top,Fe,De));bt?b.assign(pt):_e?b.Uu(it.x,it.y,it.width,it.height):ps(b,pt.x,pt.y,pt.width,pt.height),Mn.free(it)},Zm.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,ne=z.width,re=z.height,oe=a.padding;z=oe.left,oe=oe.top;var ue=z-x.x,ce=oe-x.y;for(b.arrange(ue,ce,ne,re),ne=Mn.allocAt(0,0,ne,re),Cv(b,ne,!1),re=0;re<E;re++){var me=y[re];if(me!==b){ue=me.measuredBounds;var we=ue.width,Fe=ue.height;ce=me.alignment,ce.Xb()&&(ce=a.defaultAlignment),ce.sb()||(ce=Oo);var De=me.alignmentFocus;if(De.Xb()&&(De=Oo),ue=null,me instanceof ui&&me.$e!==""&&(ue=me.fb(me.$e),ue===me&&(ue=null)),ue!==null){var _e=ue.actualBounds;for(De=st.allocAt(_e.x+(De.x*_e.width-De.offsetX),_e.y+(De.y*_e.height-De.offsetY)),ue=ue.panel;ue!==me;)ue.transform.Ga(De),ue=ue.panel;ue=ce.x*ne.width+ce.offsetX-De.x,ce=ce.y*ne.height+ce.offsetY-De.y,st.free(De)}else ue=ce.x*ne.width+ce.offsetX-(De.x*we+De.offsetX),ce=ce.y*ne.height+ce.offsetY-(De.y*Fe+De.offsetY);ue+=ne.x-x.x,ce+=ne.y-x.y,me.visible&&me.arrange(z+ue,oe+ce,we,Fe)}}Mn.free(ne)};function Cv(a,y,x){var E=null;if(a instanceof ui&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function Hm(){this.xa="Base"}$t(Hm,ll),Hm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),ue=oe.margin,ce=y,me=x,we=ue.right+ue.left,Fe=ue.top+ue.bottom;oe.measure(y,x,z,ne),ue=oe.measuredBounds;var De=0,_e=null;oe instanceof Co&&(_e=oe,De=_e.strokeWidth*_e.scale);var pt=Math.max(ue.width+we,0);ue=Math.max(ue.height+Fe,0);var it=Bv(oe),bt=it.x*pt+it.offsetX;it=it.y*ue+it.offsetY;var It=Mv(oe),Rt=It.x*pt+It.offsetX;for(It=It.y*ue+It.offsetY,isFinite(y)&&(ce=Math.max(Math.abs(bt-Rt)-De,0)),isFinite(x)&&(me=Math.max(Math.abs(it-It)-De,0)),De=pi.alloc(),De.h(0,0),a=Mh(a),It=0;It<re;It++)it=E[It],it===oe||!it.visible&&it!==a||(ue=it.margin,pt=ue.right+ue.left,bt=ue.top+ue.bottom,it.measure(ce,me,0,0),ue=it.measuredBounds,pt=Math.max(ue.width+pt,0),ue=Math.max(ue.height+bt,0),De.h(Math.max(pt,De.width),Math.max(ue,De.height)));if(re===1)b.width=pt,b.height=ue,pi.free(De);else{switch(it=Bv(oe),It=Mv(oe),re=E=0,It.x!==it.x&&It.y!==it.y&&(E=De.width/Math.abs(It.x-it.x),re=De.height/Math.abs(It.y-it.y)),pi.free(De),De=0,_e!==null&&(De=_e.strokeWidth*_e.scale,Ov(_e)===tr&&(E=re=Math.max(E,re))),E+=Math.abs(it.offsetX)+Math.abs(It.offsetX)+De,re+=Math.abs(it.offsetY)+Math.abs(It.offsetY)+De,_e=oe.stretch,_e===so&&(_e=fu(oe,!1)),_e){case ii:ne=z=0;break;case si:isFinite(y)&&(E=y),isFinite(x)&&(re=x);break;case dr:isFinite(y)&&(E=y),ne=0;break;case Mr:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(E,re,z,ne),b.width=oe.measuredBounds.width+we,b.height=oe.measuredBounds.height+Fe}},Hm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Mn.alloc();z.h(0,0,1,1);var ne=E.margin,re=ne.left;ne=ne.top;var oe=a.padding,ue=oe.left;oe=oe.top,E.arrange(ue+re,oe+ne,b.width,b.height);var ce=Bv(E),me=Mv(E),we=ce.y*b.height+ce.offsetY,Fe=me.x*b.width+me.offsetX;for(me=me.y*b.height+me.offsetY,z.x=ce.x*b.width+ce.offsetX,z.y=we,ps(z,Fe,me,0,0),z.x+=re+ue,z.y+=ne+oe,b=0;b<x;b++)re=y[b],re!==E&&(ue=re.measuredBounds,ne=re.margin,oe=Math.max(ue.width+ne.right+ne.left,0),ce=Math.max(ue.height+ne.top+ne.bottom,0),we=re.alignment,we.Xb()&&(we=a.defaultAlignment),we.sb()||(we=Oo),oe=z.width*we.x+we.offsetX-oe*we.x+ne.left+z.x,ne=z.height*we.y+we.offsetY-ce*we.y+ne.top+z.y,re.visible&&(Ba(z.x,z.y,z.width,z.height,oe,ne,ue.width,ue.height)?re.arrange(oe,ne,ue.width,ue.height):re.arrange(oe,ne,ue.width,ue.height,new Mn(z.x,z.y,z.width,z.height))));Mn.free(z)};function Wm(){this.xa="Base",this.name="Table"}$t(Wm,ll),Wm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,ne=vi(),re=vi(),oe=0;oe<z;oe++){var ue=E[oe],ce=ue instanceof ui?ue:null;if(ce!==null&&$h(ce)&&ue.visible){re.push(ce);for(var me=ce.O.s,we=me.length,Fe=0;Fe<we;Fe++){var De=me[Fe];ce.type===ui.TableRow?De.row=ue.row:ce.type===ui.TableColumn&&(De.column=ue.column),ne.push(De)}}else ne.push(ue)}z=ne.length,z===0&&(a.Fb(0),a.Eb(0));for(var _e=[],pt=0;pt<z;pt++){var it=ne[pt];it.visible&&(yt(it,!0),Ht(it,!0),_e[it.row]||(_e[it.row]=[]),_e[it.row][it.column]||(_e[it.row][it.column]=[]),_e[it.row][it.column].push(it))}Ti(ne);var bt=vi(),It=vi(),Rt=vi(),Kt={count:0},hn={count:0},bi=y,Xi=x,zi=a.rowDefs,hi=a.colDefs,ti=null;z=zi.length;for(var lo=0;lo<z;lo++)ti=zi[lo],ti!==void 0&&(ti.actual=0);z=hi.length;for(var $r=0;$r<z;$r++)ti=hi[$r],ti!==void 0&&(ti.actual=0);for(var Fa=_e.length,qa=0,wl=0;wl<Fa;wl++)_e[wl]&&(qa=Math.max(qa,_e[wl].length));var Nl=Math.min(a.topIndex,Fa-1),pu=Math.min(a.leftIndex,qa-1),Cl=0;Fa=_e.length;for(var tf=Mh(a),nl=0;nl<Fa;nl++)if(_e[nl]){qa=_e[nl].length;var Sd=a.Fb(nl);Sd.actual=0;for(var mu=Sd.oc=0;mu<qa;mu++)if(_e[nl][mu]){var nf=a.Eb(mu);bt[mu]===void 0&&(nf.actual=0,nf.oc=0,bt[mu]=!0);for(var Fc=_e[nl][mu],Gc=Fc.length,fc=0;fc<Gc;fc++){var qu=Fc[fc];if(qu.visible||qu===tf){var Of=1<qu.rowSpan||1<qu.columnSpan;Of&&(nl<Nl||mu<pu||It.push(qu));var Pd=qu.margin,Dp=Pd.right+Pd.left,gc=Pd.top+Pd.bottom,vu=jc(qu,Sd,nf,!1),Nm=qu.desiredSize,Gg=!isNaN(Nm.height),Id=!isNaN(Nm.width)&&Gg;if(Of||vu===ii||Id||nl<Nl||mu<pu||(Kt[mu]!==void 0||vu!==si&&vu!==dr||(Kt[mu]=-1,Kt.count++),hn[nl]!==void 0||vu!==si&&vu!==Mr||(hn[nl]=-1,hn.count++),Rt.push(qu)),qu.measure(1/0,1/0,0,0),!(nl<Nl||mu<pu)){var ec=qu.measuredBounds,og=Math.max(ec.width+Dp,0),pc=Math.max(ec.height+gc,0);if(qu.rowSpan===1&&(vu===ii||vu===dr)){ti=a.Fb(nl);var Tf=ti.Wc();Cl=Math.max(pc-ti.actual,0),Cl+Tf>Xi&&(Cl=Math.max(Xi-Tf,0));var hv=ti.oa===0;ti.oc=ti.oc+Cl,ti.actual=ti.oa+Cl,Xi=Math.max(Xi-(Cl+(hv?Tf:0)),0)}if(qu.columnSpan===1&&(vu===ii||vu===Mr)){ti=a.Eb(mu);var Am=ti.Wc();Cl=Math.max(og-ti.actual,0),Cl+Am>bi&&(Cl=Math.max(bi-Am,0));var Xy=ti.oa===0;ti.oc=ti.oc+Cl,ti.actual=ti.oa+Cl,bi=Math.max(bi-(Cl+(Xy?Am:0)),0)}Of&&qu.Uj()}}}}}Ti(bt);var sh=0,Ah=0;z=a.columnCount;for(var $g=0;$g<z;$g++){var kf=hi[$g];kf!==void 0&&(sh+=isNaN(kf.Hc)?kf.oc:kf.Hc,kf.oc!==0&&(sh+=kf.Wc()))}z=a.rowCount;for(var Ip=0;Ip<z;Ip++){var Rf=zi[Ip];Rf!==void 0&&(Ah+=isNaN(Rf.Hc)?Rf.oc:Rf.Hc,Rf.oc!==0&&(Ah+=Rf.Wc()))}bi=Math.max(y-sh,0);var lh=Xi=Math.max(x-Ah,0),rf=bi;z=Rt.length;for(var tc=0;tc<z;tc++){var Od=Rt[tc],fv=a.Fb(Od.row),Dh=a.Eb(Od.column),Op=Od.measuredBounds,wd=Od.margin,ag=wd.right+wd.left,Td=wd.top+wd.bottom;Kt[Od.column]=Dh.oc===0&&Kt[Od.column]!==void 0?Math.max(Op.width+ag,Kt[Od.column]):null,hn[Od.row]=fv.oc===0&&hn[Od.row]!==void 0?Math.max(Op.height+Td,hn[Od.row]):null}var Kg=0,Tp=0,rd;for(rd in hn)rd!=="count"&&(Kg+=hn[rd]);for(rd in Kt)rd!=="count"&&(Tp+=Kt[rd]);for(var _l=pi.alloc(),Dm=0;Dm<z;Dm++){var Lu=Rt[Dm];if(Lu.visible||Lu===tf){var il=a.Fb(Lu.row),Nu=a.Eb(Lu.column),Ih=0;isFinite(Nu.width)?Ih=Nu.width:(isFinite(bi)&&Kt[Lu.column]!==null?Tp===0?Ih=Nu.actual+bi:Ih=Kt[Lu.column]/Tp*rf:Kt[Lu.column]!==null?Ih=bi:Ih=Nu.actual||bi,Ih=Math.max(0,Ih-Nu.Wc()));var of=0;switch(isFinite(il.height)?of=il.height:(isFinite(Xi)&&hn[Lu.row]!==null?Kg===0?of=il.actual+Xi:of=hn[Lu.row]/Kg*lh:hn[Lu.row]!==null?of=Xi:of=il.actual||Xi,of=Math.max(0,of-il.Wc())),_l.h(Math.max(Nu.minimum,Math.min(Ih,Nu.maximum)),Math.max(il.minimum,Math.min(of,il.maximum))),vu=jc(Lu,il,Nu,!1),vu){case dr:_l.height=Math.max(_l.height,il.actual+Xi);break;case Mr:_l.width=Math.max(_l.width,Nu.actual+bi)}var sg=Lu.margin,Jy=sg.right+sg.left,gv=sg.top+sg.bottom;Lu.Uj(),Lu.measure(_l.width,_l.height,Nu.minimum,il.minimum);var kp=Lu.measuredBounds,lg=Math.max(kp.width+Jy,0),Vg=Math.max(kp.height+gv,0);isFinite(bi)&&(lg=Math.min(lg,_l.width)),isFinite(Xi)&&(Vg=Math.min(Vg,_l.height));var nc=0;nc=il.actual,il.actual=Math.max(il.actual,Vg),il.oc=Math.max(il.oc,Vg),Cl=il.actual-nc,Xi=Math.max(Xi-Cl,0),hn[Lu.row]===null&&(lh=Math.max(lh-Cl,0)),nc=Nu.actual,Nu.actual=Math.max(Nu.actual,lg),Nu.oc=Math.max(Nu.oc,lg),Cl=Nu.actual-nc,bi=Math.max(bi-Cl,0),Kt[Lu.column]===null&&(rf=Math.max(rf-Cl,0))}}Ti(Rt);var Oh=pi.alloc(),Cd=vi(),Tc=vi();if(z=It.length,z!==0){for(var _f=0;_f<Fa;_f++)if(_e[_f]){qa=_e[_f].length;var Rp=a.Fb(_f);Cd[_f]=Rp.actual;for(var jf=0;jf<qa;jf++)if(_e[_f][jf]){var pv=a.Eb(jf);Tc[jf]=pv.actual}}}for(var _p=0;_p<z;_p++){var Vs=It[_p];if(Vs.visible||Vs===tf){var od=a.Fb(Vs.row),$c=a.Eb(Vs.column);switch(_l.h(Math.max($c.minimum,Math.min(y,$c.maximum)),Math.max(od.minimum,Math.min(x,od.maximum))),vu=jc(Vs,od,$c,!1),vu){case si:Tc[$c.index]!==0&&(_l.width=Math.min(_l.width,Tc[$c.index])),Cd[od.index]!==0&&(_l.height=Math.min(_l.height,Cd[od.index]));break;case dr:Tc[$c.index]!==0&&(_l.width=Math.min(_l.width,Tc[$c.index]));break;case Mr:Cd[od.index]!==0&&(_l.height=Math.min(_l.height,Cd[od.index]))}isFinite($c.width)&&(_l.width=$c.width),isFinite(od.height)&&(_l.height=od.height),Oh.h(0,0);for(var mv=$c.minimum,mc=od.minimum,af=1;af<Vs.rowSpan&&!(Vs.row+af>=a.rowCount);af++)ti=a.Fb(Vs.row+af),Cl=0,Cl=vu===si||vu===Mr?Math.max(ti.minimum,Cd[Vs.row+af]===0?ti.maximum:Math.min(Cd[Vs.row+af],ti.maximum)):Math.max(ti.minimum,isNaN(ti.Hc)?ti.maximum:Math.min(ti.Hc,ti.maximum)),Oh.height+=Cl,mc+=ti.minimum;for(var Kc=1;Kc<Vs.columnSpan&&!(Vs.column+Kc>=a.columnCount);Kc++)ti=a.Eb(Vs.column+Kc),Cl=0,Cl=vu===si||vu===dr?Math.max(ti.minimum,Tc[Vs.column+Kc]===0?ti.maximum:Math.min(Tc[Vs.column+Kc],ti.maximum)):Math.max(ti.minimum,isNaN(ti.Hc)?ti.maximum:Math.min(ti.Hc,ti.maximum)),Oh.width+=Cl,mv+=ti.minimum;_l.width+=Oh.width,_l.height+=Oh.height;var jp=Vs.margin,zf=jp.right+jp.left,Im=jp.top+jp.bottom;Vs.measure(_l.width,_l.height,mv,mc);for(var zp=Vs.measuredBounds,kd=Math.max(zp.width+zf,0),ug=Math.max(zp.height+Im,0),Zf=0,Zp=0;Zp<Vs.rowSpan&&!(Vs.row+Zp>=a.rowCount);Zp++)ti=a.Fb(Vs.row+Zp),Zf+=ti.total||0;if(Zf<ug){var sf=ug-Zf,uh=ug-Zf;if(Vs.spanAllocation!==null)for(var lf=Vs.spanAllocation,Th=0;Th<Vs.rowSpan&&!(0>=sf)&&!(Vs.row+Th>=a.rowCount);Th++){ti=a.Fb(Vs.row+Th);var uf=ti.oa||0,cg=lf(Vs,ti,uh);ti.actual=Math.min(ti.maximum,uf+cg),ti.oa!==uf&&(sf-=ti.oa-uf)}for(;0<sf;){var Ed=ti.oa||0;if(isNaN(ti.height)&&ti.maximum>Ed&&(ti.actual=Math.min(ti.maximum,Ed+sf),ti.oa!==Ed&&(sf-=ti.oa-Ed)),ti.index===0)break;ti=a.Fb(ti.index-1)}}for(var Ug=0,cf=0;cf<Vs.columnSpan&&!(Vs.column+cf>=a.columnCount);cf++)ti=a.Eb(Vs.column+cf),Ug+=ti.total||0;if(Ug<kd){var Yg=kd-Ug,Qy=kd-Ug;if(Vs.spanAllocation!==null)for(var kh=Vs.spanAllocation,dg=0;dg<Vs.columnSpan&&!(0>=Yg)&&!(Vs.column+dg>=a.columnCount);dg++){ti=a.Eb(Vs.column+dg);var Om=ti.oa||0,qy=kh(Vs,ti,Qy);ti.actual=Math.min(ti.maximum,Om+qy),ti.oa!==Om&&(Yg-=ti.oa-Om)}for(;0<Yg;){var vv=ti.oa||0;if(isNaN(ti.width)&&ti.maximum>vv&&(ti.actual=Math.min(ti.maximum,vv+Yg),ti.oa!==vv&&(Yg-=ti.oa-vv)),ti.index===0)break;ti=a.Eb(ti.index-1)}}}}Ti(It),pi.free(Oh),pi.free(_l),Cd!==void 0&&Ti(Cd),Tc!==void 0&&Ti(Tc);var Xg=0,Jg=0,yv=a.desiredSize,pS=a.maxSize;vu=fu(a,!0);var Tm=Ah=sh=0,km=0;z=a.columnCount;for(var xv=0;xv<z;xv++)hi[xv]!==void 0&&(ti=a.Eb(xv),isFinite(ti.width)?(Tm+=ti.width,Tm+=ti.Wc()):qm(ti)===Vp?(Tm+=ti.oa,Tm+=ti.Wc()):ti.oa!==0&&(sh+=ti.oa,sh+=ti.Wc()));isFinite(yv.width)?Xg=Math.min(yv.width,pS.width):Xg=vu!==ii&&isFinite(y)?y:sh,Xg=Math.max(Xg,a.minSize.width),Xg=Math.max(Xg-Tm,0);for(var JS=sh===0?1:Math.max(Xg/sh,1),Sv=0;Sv<z;Sv++)hi[Sv]!==void 0&&(ti=a.Eb(Sv),isFinite(ti.width)||qm(ti)===Vp||(ti.actual=ti.oa*JS),ti.position=b.width,ti.oa!==0&&(b.width+=ti.oa,b.width+=ti.Wc()));z=a.rowCount;for(var Pv=0;Pv<z;Pv++)zi[Pv]!==void 0&&(ti=a.Fb(Pv),isFinite(ti.height)?(km+=ti.height,km+=ti.Wc()):qm(ti)===Vp?(km+=ti.oa,km+=ti.Wc()):ti.oa!==0&&(Ah+=ti.oa,Ah+=ti.Wc()));isFinite(yv.height)?Jg=Math.min(yv.height,pS.height):Jg=vu!==ii&&isFinite(x)?x:Ah,Jg=Math.max(Jg,a.minSize.height),Jg=Math.max(Jg-km,0);for(var QS=Ah===0?1:Math.max(Jg/Ah,1),wv=0;wv<z;wv++)zi[wv]!==void 0&&(ti=a.Fb(wv),isFinite(ti.height)||qm(ti)===Vp||(ti.actual=ti.oa*QS),ti.position=b.height,ti.oa!==0&&(b.height+=ti.oa,b.height+=ti.Wc()));z=re.length;for(var e1=0;e1<z;e1++){var Rm=re[e1],t1=0,n1=0;Rm.type===ui.TableRow?(t1=b.width,ti=a.Fb(Rm.row),n1=ti.actual):(ti=a.Eb(Rm.column),t1=ti.actual,n1=b.height),Rm.measuredBounds.h(0,0,t1,n1),yt(Rm,!1)}Ti(re),a.inRowsCols=_e},Wm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var ne=a.inRowsCols;if(ne!==null){for(var re,oe,ue=ne.length,ce=0,me=0;me<ue;me++)ne[me]&&(ce=Math.max(ce,ne[me].length));oe=a.rowDefs,re=a.colDefs;var we=me=0,Fe=Math.min(a.topIndex,ue-1);if(0<oe.length){for(;Fe!==ue&&(oe[Fe]===void 0||oe[Fe].oa===0);)Fe++;Fe=Math.max(Math.min(Fe,ue-1),0),me=-oe[Fe].position}var De=Math.min(a.leftIndex,ce-1);if(0<re.length){for(;De!==ce&&(re[De]===void 0||re[De].oa===0);)De++;De=Math.max(Math.min(De,ce-1),0),we=-re[De].position}for(var _e=0,pt=0;_e!==ue&&oe[_e]===void 0;)_e++;for(;pt!==ue&&re[pt]===void 0;)pt++;ce=a.part,a.Fb(_e),a.Eb(pt);for(var it=0;it<y.length;it++){var bt=y[it];if(bt instanceof ui&&bt.visible&&$h(bt)){if(bt.type===ui.TableRow){re=a.Fb(bt.row);var It=a.Eb(pt)}else re=a.Fb(_e),It=a.Eb(bt.column);oe=re.position+me+b,re.oa!==0&&(oe+=re.Io(Math.max(_e,Fe))),re=It.position+we+z,It.oa!==0&&(re+=It.Io(Math.max(pt,De))),It=bt.measuredBounds,bt.Uk(),bt.actualBounds.ka();var Rt=bt.actualBounds,Kt=Mn.allocAt(Rt.x,Rt.y,Rt.width,Rt.height);Rt.x=bt.type===ui.TableRow?z:re,Rt.y=bt.type===ui.TableColumn?b:oe,Rt.width=It.width,Rt.height=It.height,bt.actualBounds.freeze(),Ht(bt,!1),Ol(Kt,Rt)||ce===null||(ce.oh(),bt.Pn(ce)),Mn.free(Kt)}}for(it=pi.alloc(),bt=0;bt<ue;bt++)if(ne[bt]){for(ce=ne[bt].length,It=a.Fb(bt),oe=It.position+me+b,It.oa!==0&&(oe+=It.Io(Math.max(_e,Fe))),Rt=0;Rt<ce;Rt++)if(ne[bt][Rt]){Kt=a.Eb(Rt),re=Kt.position+we+z,Kt.oa!==0&&(re+=Kt.Io(Math.max(pt,De)));for(var hn=ne[bt][Rt],bi=hn.length,Xi=0;Xi<bi;Xi++){var zi=hn[Xi],hi=zi.measuredBounds;it.h(0,0);for(var ti=1;ti<zi.rowSpan&&!(bt+ti>=a.rowCount);ti++){var lo=a.Fb(bt+ti);lo.oa!==0&&(it.height+=lo.total)}for(ti=1;ti<zi.columnSpan&&!(Rt+ti>=a.columnCount);ti++)lo=a.Eb(Rt+ti),lo.oa!==0&&(it.width+=lo.total);var $r=Kt.oa+it.width,Fa=It.oa+it.height;ti=re,lo=oe;var qa=$r,wl=Fa,Nl=re,pu=oe,Cl=$r,tf=Fa;re+$r>x.width&&(Cl=Math.max(x.width-re,0)),oe+Fa>x.height&&(tf=Math.max(x.height-oe,0));var nl=zi.alignment;if(nl.Xb()){nl=a.defaultAlignment,nl.sb()||(nl=Oo);var Sd=nl.x,mu=nl.y,nf=nl.offsetX;nl=nl.offsetY;var Fc=Kt.alignment,Gc=It.alignment;Fc.sb()&&(Sd=Fc.x,nf=Fc.offsetX),Gc.sb()&&(mu=Gc.y,nl=Gc.offsetY)}else Sd=nl.x,mu=nl.y,nf=nl.offsetX,nl=nl.offsetY;(isNaN(Sd)||isNaN(mu))&&(mu=Sd=.5,nl=nf=0),Fc=hi.width,Gc=hi.height;var fc=zi.margin,qu=fc.left+fc.right,Of=fc.top+fc.bottom,Pd=jc(zi,It,Kt,!1);!isNaN(zi.desiredSize.width)||Pd!==si&&Pd!==dr||(Fc=Math.max($r-qu,0)),!isNaN(zi.desiredSize.height)||Pd!==si&&Pd!==Mr||(Gc=Math.max(Fa-Of,0)),$r=zi.maxSize,Fa=zi.minSize,Fc=Math.min($r.width,Fc),Gc=Math.min($r.height,Gc),Fc=Math.max(Fa.width,Fc),Gc=Math.max(Fa.height,Gc),$r=Gc+Of,ti+=qa*Sd-(Fc+qu)*Sd+nf+fc.left,lo+=wl*mu-$r*mu+nl+fc.top,zi.visible&&(Ba(Nl,pu,Cl,tf,ti,lo,hi.width,hi.height)?zi.arrange(ti,lo,Fc,Gc):zi.arrange(ti,lo,Fc,Gc,new Mn(Nl,pu,Cl,tf)))}}}for(pi.free(it),a=0;a<E;a++)x=y[a],z=x instanceof ui?x:null,z!==null&&$h(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function Gm(){this.xa="Base"}$t(Gm,ll),Gm.prototype.measure=function(){},Gm.prototype.arrange=function(){};function $m(){this.xa="Base"}$t($m,ll),$m.prototype.measure=function(){},$m.prototype.arrange=function(){};function Km(){this.xa="Base"}$t(Km,ll),Km.prototype.measure=function(a,y,x,E,b,z,ne){1<E.length&&Et("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,ne);var re=E.measuredBounds,oe=E.margin,ue=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var ce=E.scale,me=re.width;re=re.height;var we=Math.max(y-ue,0),Fe=Math.max(x-oe,0),De=1;a.viewboxStretch===tr?me!==0&&re!==0&&(De=Math.min(we/me,Fe/re)):me!==0&&re!==0&&(De=Math.max(we/me,Fe/re)),De===0&&(De=1e-4),E.Ca*=De,ce!==E.scale&&(yt(E,!0),E.measure(1/0,1/0,z,ne))}re=E.measuredBounds,b.width=isFinite(y)?y:Math.max(re.width+ue,0),b.height=isFinite(x)?x:Math.max(re.height+oe,0)},Km.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=Oo),y.arrange(x.width*ne.x-z*ne.x+ne.offsetX,x.height*ne.y-b*ne.y+ne.offsetY,E.width,E.height)};function Gp(){this.xa="Base"}$t(Gp,ll),Gp.prototype.measure=function(){},Gp.prototype.arrange=function(){},Gp.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,ne=a.actualBounds,re=z.width,oe=z.height,ue=Math.ceil(re/b),ce=Math.ceil(oe/E),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 Fe=[],De=a.O.s,_e=De.length,pt=0;pt<_e;pt++){var it=De[pt],bt=[];if(Fe.push(bt),it.visible){var It=it.interval;if(!(0>It)){it=bv(it.figure);for(var Rt=0;Rt<_e;Rt++)if(Rt!==pt){var Kt=De[Rt];Kt.visible&&bv(Kt.figure)===it&&(Kt=Kt.interval,Kt>It&&bt.push(Kt))}}}}for(De=a.O.s,_e=De.length,pt=0;pt<_e;pt++){var hn=De[pt];if(hn.visible&&(bt=hn.interval||1,it=Math.abs(bt),!(2>b*it*x))){if(It=hn.segmentIndex,(!isFinite(It)||isNaN(It))&&(It=0),0>It&&(It=it-Math.min(-It,it)),It=Math.round(It%it),it=hn.opacity,Rt=1,it!==1){if(it===0)continue;Rt=y.globalAlpha,y.globalAlpha=Rt*it}Kt=Fe[pt];var bi=!1,Xi=hn.strokeDashArray;if(Xi!==null&&(bi=!0,y.js(Xi,hn.strokeDashOffset)),hn.figure==="LineV"&&hn.stroke!==null&&0<hn.strokeWidth){for(y.lineWidth=hn.strokeWidth,Ds(a,y,hn.stroke,!1,!1,z,ne),y.beginPath(),Xi=hn=Math.floor((we-b)/b);Xi<=hn+ue;Xi++){var zi=Xi*b+we;0<=zi&&zi<=re&&Vm(Xi,bt,It,Kt)&&(y.moveTo(zi,0),y.lineTo(zi,oe))}y.stroke(),y.Se()}else if(hn.figure==="LineH"&&hn.stroke!==null&&0<hn.strokeWidth){for(y.lineWidth=hn.strokeWidth,Ds(a,y,hn.stroke,!1,!1,z,ne),y.beginPath(),Xi=hn=Math.floor((me-E)/E);Xi<=hn+ce;Xi++)zi=Xi*E+me,0<=zi&&zi<=oe&&Vm(Xi,bt,It,Kt)&&(y.moveTo(0,zi),y.lineTo(re,zi));y.stroke(),y.Se()}else if(hn.figure==="BarV"&&hn.fill!==null)for(Ds(a,y,hn.fill,!0,!1,z,ne),hn=hn.width,isNaN(hn)&&(hn=b),zi=Xi=Math.floor((we-b)/b);zi<=Xi+ue;zi++){var hi=zi*b+we;0<=hi+hn&&hi<=re&&Vm(zi,bt,It,Kt)&&y.fillRect(hi,0,hn,oe)}else if(hn.figure==="BarH"&&hn.fill!==null)for(Ds(a,y,hn.fill,!0,!1,z,ne),hn=hn.height,isNaN(hn)&&(hn=E),zi=Xi=Math.floor((me-E)/E);zi<=Xi+ce;zi++)hi=zi*E+me,0<=hi+hn&&hi<=oe&&Vm(zi,bt,It,Kt)&&y.fillRect(0,hi,re,hn);bi&&y.fs(),it!==1&&(y.globalAlpha=Rt)}}y.restore(),y.Vc(!1)};function Vm(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function Um(){this.xa="Base"}$t(Um,ll),Um.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof pa||a instanceof fi){var ne=null,re=null;if(a instanceof fi&&(ne=a),a instanceof pa&&(re=a,ne=re.adornedPart,a.j===null&&(a.j=[])),ne instanceof fi){var oe=ne;if(z===0)Ss(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ue=a instanceof pa?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ce=oe.points,me=ne.pointsCount;re!==null?re.Ul(!1):ne!==null&&ne.Ul(!1),re=y.width;var we=y.height,Fe=a.j;if(Fe.length=0,ue!==null){r1(a,re,we,ue);var De=ue.measuredBounds;x.ed(De),Fe.push(De)}De=Yt.alloc();for(var _e=st.alloc(),pt=st.alloc(),it=0;it<z;it++){var bt=E[it];if(bt!==ue)if(bt.isPanelMain&&bt instanceof Co){r1(a,re,we,bt);var It=bt.measuredBounds;x.ed(It),Fe.push(It)}else if(2>me)bt.measure(1/0,1/0,0,0),It=bt.measuredBounds,x.ed(It),Fe.push(It);else{var Rt=bt.segmentIndex,Kt=bt.segmentFraction,hn=bt.alignmentFocus;hn.Mc()&&(hn=Oo);var bi=bt.segmentOrientation,Xi=bt.segmentOffset;if(isNaN(Rt)){var zi=oe.ua;It=vi(),zi.Qu(Kt,It);var hi=st.allocAt(It[0],It[1]);if(hi.add(oe.i(0)),zi.type===Qt.j?hi.offset(-zi.startX,-zi.startY):(zi=zi.figures.first(),zi!==null&&hi.offset(-zi.startX,-zi.startY)),zi=It[2],bi!==Eu){var ti=oe.computeAngle(bt,bi,zi);bt.Kb=ti}ti=hi.x-y.x;var lo=hi.y-y.y;st.free(hi),Ti(It)}else if(Rt<-me||Rt>=me)It=st.alloc(),oe.vg(),oe.computeMidPoint(It),zi=oe.midAngle,bi!==Eu&&(ti=oe.computeAngle(bt,bi,zi),bt.Kb=ti),ti=It.x-y.x,lo=It.y-y.y,st.free(It);else{if(ti=0,0<=Rt?(lo=ce.M(Rt),It=Rt<me-1?ce.M(Rt+1):lo):(ti=me+Rt,lo=ce.M(ti),It=0<ti?ce.M(ti-1):lo),lo.Xa(It)){0<=Rt?(zi=0<Rt?ce.M(Rt-1):lo,ti=Rt<me-2?ce.M(Rt+2):It):(zi=ti<me-1?ce.M(ti+1):lo,ti=1<ti?ce.M(ti-2):It),hi=zi.Bf(lo);var $r=It.Bf(ti);zi=hi>$r+10?0<=Rt?zi.ab(lo):lo.ab(zi):$r>hi+10?0<=Rt?It.ab(ti):ti.ab(It):0<=Rt?zi.ab(ti):ti.ab(zi)}else zi=0<=Rt?lo.ab(It):It.ab(lo);bi!==Eu&&(ti=oe.computeAngle(bt,bi,zi),bt.Kb=ti),ti=lo.x+(It.x-lo.x)*Kt-y.x,lo=lo.y+(It.y-lo.y)*Kt-y.y}bt.measure(1/0,1/0,0,0),It=bt.measuredBounds,hi=bt.naturalBounds;var Fa=0;bt instanceof Co&&(Fa=bt.strokeWidth),$r=hi.width+Fa;var qa=hi.height+Fa;De.reset(),De.translate(-It.x,-It.y),De.scale(bt.scale,bt.scale),De.rotate(bi===Eu?bt.angle:zi,$r/2,qa/2),bi!==im&&bi!==om||De.rotate(90,$r/2,qa/2),bi!==rm&&bi!==am||De.rotate(-90,$r/2,qa/2),bi===E0&&(45<zi&&135>zi||225<zi&&315>zi)&&De.rotate(-zi,$r/2,qa/2),hi=new Mn(0,0,$r,qa),_e.xi(hi,hn),De.Ga(_e),hn=-_e.x+Fa/2*bt.scale,bt=-_e.y+Fa/2*bt.scale,pt.assign(Xi),Fa=isNaN(Xi.x);var wl=isNaN(Xi.y);if(Fa||wl){$r=$r/2+3,qa=qa/2+3;var Nl=45<=zi&&135>=zi,pu=225<=zi&&315>=zi;bi===Eu&&(Nl||pu)?(pt.x=wl?$r:Xi.y,pt.y=Fa?qa:Xi.x,Nl?0<=Rt||isNaN(Rt)&&.5>Kt||!Fa||(pt.y=-qa):pu&&((0<=Rt||isNaN(Rt)&&.5>Kt)&&Fa&&(pt.y=-qa),wl&&(pt.x=-$r))):(Fa&&(pt.x=0<=Rt||isNaN(Rt)&&.5>Kt?$r:-$r),wl&&(pt.y=-qa),pt.rotate(zi))}else pt.rotate(zi);ti+=pt.x,lo+=pt.y,hi.set(It),hi.h(ti+hn,lo+bt,It.width,It.height),Fe.push(hi),x.ed(hi)}}if(ne!==null)for(E=ne.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Ss(b,x.width||0,x.height||0),Yt.free(De),st.free(_e),st.free(pt)}}}},Um.prototype.arrange=function(a,y){var x=y.length;if(a instanceof pa||a instanceof fi){var E=a,b=null;a instanceof pa&&(b=a,E=b.adornedPart);var z=a instanceof pa?null:E.path,ne=a.j;if(ne.length!==0){var re=0;if(z!==null&&re<ne.length){var oe=ne[re];re++,z.arrange(oe.x-a.jg.x,oe.y-a.jg.y,oe.width,oe.height)}for(oe=0;oe<x;oe++){var ue=y[oe];if(ue!==z&&re<ne.length){var ce=ne[re];re++,ue.arrange(ce.x-a.jg.x,ce.y-a.jg.y,ce.width,ce.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof fi)for(z=a.labelNodes;z.next();){var me=a;ne=z.value,re=ne.segmentIndex,oe=ne.segmentFraction;var we=ne.alignmentFocus;if(ue=ne.segmentOrientation,ce=ne.segmentOffset,isNaN(re)){var Fe=me.ua,De=vi();Fe.Qu(oe,De);var _e=st.allocAt(De[0],De[1]);_e.add(me.i(0)),Fe.type===Qt.j||(Fe=Fe.figures.first()),_e.offset(-Fe.startX,-Fe.startY),Fe=De[2],ue!==Eu&&(me=me.computeAngle(ne,ue,Fe),ne.angle=me),me=_e.x;var pt=_e.y;st.free(_e),Ti(De)}else if(re<-x||re>=x)De=st.alloc(),Fe=me,pt=De,Fe.vg(),Fe.computeMidPoint(pt),Fe=me.midAngle,ue!==Eu&&(me=me.computeAngle(ne,ue,Fe),ne.angle=me),me=De.x,pt=De.y,st.free(De);else{if(_e=0,0<=re?(De=y.s[re],pt=re<x-1?y.s[re+1]:De):(_e=x+re,De=y.s[_e],pt=0<_e?y.s[_e-1]:De),De.Xa(pt)){0<=re?(Fe=0<re?y.s[re-1]:De,_e=re<x-2?y.s[re+2]:pt):(Fe=_e<x-1?y.s[_e+1]:De,_e=1<_e?y.s[_e-2]:pt);var it=Fe.Bf(De),bt=pt.Bf(_e);Fe=it>bt+10?0<=re?Fe.ab(De):De.ab(Fe):bt>it+10?0<=re?pt.ab(_e):_e.ab(pt):0<=re?Fe.ab(_e):_e.ab(Fe)}else Fe=0<=re?De.ab(pt):pt.ab(De);ue!==Eu&&(me=me.computeAngle(ne,ue,Fe),ne.angle=me),me=De.x+(pt.x-De.x)*oe,pt=De.y+(pt.y-De.y)*oe}if(we.ys())ne.location=new st(me,pt);else{we.Mc()&&(we=Oo),De=Yt.alloc(),De.reset(),De.scale(ne.scale,ne.scale),De.rotate(ne.angle,0,0);var It=ne.naturalBounds;_e=Mn.allocAt(0,0,It.width,It.height),it=st.alloc(),it.xi(_e,we),De.Ga(it),we=-it.x,bt=-it.y;var Rt=It.width,Kt=It.height;It=st.alloc(),It.assign(ce);var hn=isNaN(ce.x),bi=isNaN(ce.y);if(hn||bi){Rt=Rt/2+3,Kt=Kt/2+3;var Xi=45<=Fe&&135>=Fe,zi=225<=Fe&&315>=Fe;ue===Eu&&(Xi||zi)?(It.x=bi?Rt:ce.y,It.y=hn?Kt:ce.x,Xi?0<=re||isNaN(re)&&.5>oe||!hn||(It.y=-Kt):zi&&((0<=re||isNaN(re)&&.5>oe)&&hn&&(It.y=-Kt),bi&&(It.x=-Rt))):(hn&&(It.x=0<=re||isNaN(re)&&.5>oe?Rt:-Rt),bi&&(It.y=-Kt),It.rotate(Fe))}else It.rotate(Fe);me+=It.x,pt+=It.y,De.pp(_e),we+=_e.x,bt+=_e.y,re=st.allocAt(me+we,pt+bt),ne.move(re),st.free(re),st.free(It),st.free(it),Mn.free(_e),Yt.free(De)}}b!==null?b.Ul(!1):E.Ul(!1),E=I1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),st.free(E)}};function r1(a,y,x,E){if(Pt(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof pa&&a.type===ui.Link&&a.adornedObject instanceof Co&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof fi&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof pa&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),yt(E,!1)}}function $p(){this.xa="Base"}$t($p,ll),$p.prototype.measure=function(a,y,x,E,b,z,ne){var re=a.Pb();a.graduatedBounds=[];var oe=re.margin,ue=oe.right+oe.left,ce=oe.top+oe.bottom;re.measure(y,x,z,ne);var me=re.measuredBounds,we=new Mn(-oe.left,-oe.top,Math.max(me.width+ue,0),Math.max(me.height+ce,0));a.graduatedBounds.push(we),b.assign(we);for(var Fe=re.geometry,De=re.strokeWidth,_e=Fe.flattenedSegments,pt=Fe.flattenedLengths,it=Fe.flattenedTotalLength,bt=_e.length,It=0,Rt=0,Kt=vi(),hn=0;hn<bt;hn++){var bi=_e[hn],Xi=[];Rt=It=0;for(var zi=bi.length,hi=0;hi<zi;hi+=2){var ti=bi[hi],lo=bi[hi+1];if(hi!==0){var $r=180*Math.atan2(lo-Rt,ti-It)/Math.PI;0>$r&&($r+=360),Xi.push($r)}It=ti,Rt=lo}Kt.push(Xi)}if(a.graduatedIntervals===null){for(var Fa=[],qa=a.O.s,wl=qa.length,Nl=0;Nl<wl;Nl++){var pu=qa[Nl],Cl=[];if(Fa.push(Cl),pu.visible){var tf=pu.interval;if(!(0>tf)){for(var nl=0;nl<wl;nl++)if(nl!==Nl){var Sd=qa[nl];if(Sd.visible&&pu.constructor===Sd.constructor){var mu=Sd.interval;mu>tf&&Cl.push(mu)}}}}}a.graduatedIntervals=Fa}var nf=a.graduatedIntervals,Fc=a.O.s,Gc=Fc.length,fc=0,qu=0,Of=it;a.graduatedMarks=[];for(var Pd,Dp=0;Dp<Gc;Dp++){var gc=Fc[Dp];if(Pd=[],gc.visible&&gc!==re){var vu=Math.abs(gc.interval),Nm=a.graduatedTickUnit;if(!(2>Nm*vu*it/a.graduatedRange&&gc.graduatedSkip===null)){var Gg=pt[0][0],Id=0,ec=0;qu=it*gc.graduatedStart-1e-4,Of=it*gc.graduatedEnd+1e-4;var og=Nm*vu,pc=a.graduatedTickBase;if(pc<a.graduatedMin){var Tf=(a.graduatedMin-pc)/og;Tf=Tf%1===0?Tf:Math.floor(Tf+1),pc+=Tf*og}else pc>a.graduatedMin+og&&(pc-=Math.floor((pc-a.graduatedMin)/og)*og);for(var hv=nf[Dp],Am=pc,Xy=1e-6*a.graduatedMax,sh=1;pc<=a.graduatedMax+Xy;sh++){e:{for(var Ah=hv.length,$g=0;$g<Ah;$g++){var kf=(pc-a.graduatedTickBase)%(hv[$g]*a.graduatedTickUnit),Ip=1e-6*a.graduatedTickUnit;if(kf<Ip&&kf>-Ip){var Rf=!1;break e}}Rf=!0}if(Rf&&(pc>a.graduatedMax&&(pc=a.graduatedMax),gc.graduatedSkip===null||gc instanceof es&&!gc.graduatedSkip(pc,gc)||gc instanceof Co&&!gc.graduatedSkip(pc,gc))&&(fc=(pc-a.graduatedMin)*it/a.graduatedRange,fc>it&&(fc=it),qu<=fc&&fc<=Of)){for(var lh=Kt[Id][ec],rf=pt[Id][ec];Id<pt.length;){for(;fc>Gg&&ec<pt[Id].length-1;)ec++,lh=Kt[Id][ec],rf=pt[Id][ec],Gg+=rf;if(fc<=Gg)break;Id++,ec=0,lh=Kt[Id][ec],rf=pt[Id][ec],Gg+=rf}var tc=_e[Id],Od=tc[2*ec],fv=tc[2*ec+1],Dh=(fc-(Gg-rf))/rf,Op=new st(Od+(tc[2*ec+2]-Od)*Dh+De/2-Fe.bounds.x,fv+(tc[2*ec+3]-fv)*Dh+De/2-Fe.bounds.y);Op.scale(re.scale,re.scale);e:{var wd=lh,ag=Kt[Id];if(!(.5005>Dh&&.4995<Dh)){var Td=wd;if(.5>Dh?0<ec?Td=ag[ec-1]:nt.$(tc[0],tc[tc.length-2])&&nt.$(tc[1],tc[tc.length-1])&&(Td=ag[ag.length-1]):.5<Dh&&(ec+1<ag.length?Td=ag[ec+1]:nt.$(tc[0],tc[tc.length-2])&&nt.$(tc[1],tc[tc.length-1])&&(Td=ag[0])),wd!==Td){var Kg=Math.abs(wd-Td);if(180<Kg&&(wd<Td?wd+=360:Td+=360,Kg=Math.abs(wd-Td)),5e-4>Dh||.9995<Dh){lh=(wd+Td)/2%360;break e}if(10>Kg){var Tp=1-Math.abs(.5-Dh);lh=(wd*Tp+Td*(1-Tp))%360;break e}}}lh=wd}if(gc instanceof es){var rd="";gc.graduatedFunction!==null?(rd=gc.graduatedFunction(pc,gc),rd=rd!=null?rd.toString():""):rd=(+pc.toFixed(2)).toString(),rd!==""&&Pd.push({$l:Op,angle:lh,text:rd})}else Pd.push({$l:Op,angle:lh})}pc=Am+sh*og}}}a.graduatedMarks.push(Pd)}Ti(Kt);var _l=a.graduatedMarks;if(_l!==null)for(var Dm=E.length,Lu=0;Lu<Dm;Lu++){var il=E[Lu],Nu=_l[Lu];if(il.visible&&il!==re&&Nu.length!==0){if(il instanceof Co){var Ih=a,of=b,sg=il.alignmentFocus;sg.Mc()&&(sg=$l);var Jy=il.angle;il.Kb=0,il.measure(1/0,1/0,0,0),il.Kb=Jy;var gv=il.measuredBounds,kp=gv.width,lg=gv.height,Vg=Mn.allocAt(0,0,kp,lg),nc=st.alloc();nc.xi(Vg,sg),Mn.free(Vg);for(var Oh=-nc.x,Cd=-nc.y,Tc=new Mn,_f=Nu.length,Rp=0;Rp<_f;Rp++)for(var jf=Nu[Rp],pv=jf.$l.x,_p=jf.$l.y,Vs=jf.angle,od=0;4>od;od++){switch(od){case 0:nc.h(Oh,Cd);break;case 1:nc.h(Oh+kp,Cd);break;case 2:nc.h(Oh,Cd+lg);break;case 3:nc.h(Oh+kp,Cd+lg)}nc.rotate(Vs+il.angle),nc.offset(pv,_p),Rp===0&&od===0?Tc.h(nc.x,nc.y,0,0):Tc.Ye(nc),nc.offset(-pv,-_p),nc.rotate(-Vs-il.angle)}st.free(nc),Ih.graduatedBounds!==null&&Ih.graduatedBounds.push(Tc),ps(of,Tc.x,Tc.y,Tc.width,Tc.height)}else if(il instanceof es){var $c=a,mv=b;$c.temporaryTextBlock===null&&($c.temporaryTextBlock=new es);var mc=$c.temporaryTextBlock;x1(mc,il);var af=il.alignmentFocus;af.Mc()&&(af=$l);for(var Kc=il.segmentOrientation,jp=il.segmentOffset,zf=new Mn,Im=0,zp=0,kd=0,ug=0,Zf=0,Zp=Nu.length,sf=0;sf<Zp;sf++){var uh=Nu[sf];Im=uh.$l.x,zp=uh.$l.y,kd=uh.angle,Zf=ug=il.angle,Kc!==Eu&&(Zf=Kc===nm||Kc===C0?kd+il.angle:kd,ug=fi.computeAngle(Kc,Zf)),mc.Kb=ug,mc.text=uh.text||"",mc.measure(1/0,1/0,0,0);var lf=mc.measuredBounds,Th=mc.naturalBounds,uf=Th.width,cg=Th.height,Ed=Yt.alloc();Ed.reset(),Ed.translate(-lf.x,-lf.y),Ed.scale(mc.scale,mc.scale),Ed.rotate(Zf,uf/2,cg/2),Kc!==im&&Kc!==om||Ed.rotate(90,uf/2,cg/2),Kc!==rm&&Kc!==am||Ed.rotate(-90,uf/2,cg/2),Kc===E0&&(45<kd&&135>kd||225<kd&&315>kd)&&Ed.rotate(-kd,uf/2,cg/2);var Ug=Mn.allocAt(0,0,uf,cg),cf=st.alloc();cf.xi(Ug,af),Ed.Ga(cf);var Yg=-cf.x,Qy=-cf.y,kh=st.alloc();kh.assign(jp),isNaN(kh.x)&&(kh.x=uf/2+3),isNaN(kh.y)&&(kh.y=-(cg/2+3)),kh.rotate(kd),Im+=kh.x+Yg,zp+=kh.y+Qy;var dg=new Mn(Im,zp,lf.width,lf.height),Om=new Mn(lf.x,lf.y,lf.width,lf.height),qy=new Mn(Th.x,Th.y,Th.width,Th.height);uh.Sz=ug,uh.lineCount=mc.lineCount,uh.lines=[mc.Cb,mc.Ih,mc.df,mc.Le,mc.Qc,mc.Qb,mc.ze],uh.actualBounds=dg,uh.measuredBounds=Om,uh.naturalBounds=qy,sf===0?zf.assign(dg):zf.ed(dg),st.free(kh),st.free(cf),Mn.free(Ug),Yt.free(Ed)}$c.graduatedBounds!==null&&$c.graduatedBounds.push(zf),ps(mv,zf.x,zf.y,zf.width,zf.height)}yt(il,!1)}}},$p.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,ne=0,re=z[ne];ne++,E!==null&&E.arrange(re.x-x.x,re.y-x.y,re.width,re.height);for(var oe=y.length,ue=0;ue<oe;ue++){var ce=y[ue];re=b[ue],ce.visible&&ce!==E&&re.length!==0&&(re=z[ne],ne++,ce.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},$p.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,ne=b.height;b=y instanceof Ia,y.save(),y.beginPath(),y.rect(-1,-1,z+1,ne+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var re=z.actualBounds,oe=a.O.s,ue=a.graduatedMarks,ce=oe.length,me=0;me<ce;me++){var we=oe[me],Fe=ue[me],De=Fe.length;if(we.visible&&we!==z&&Fe.length!==0){if(we instanceof Co){if(!(2>a.graduatedTickUnit*we.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ne&&we.graduatedSkip===null)){var _e=we.measuredBounds,pt=we.strokeWidth*we.scale,it=we.alignmentFocus;it.Mc()&&(it=$l);for(var bt=0;bt<De;bt++){var It=Fe[bt].$l,Rt=Fe[bt].angle,Kt=it,hn=we.Ab;hn.reset(),hn.translate(It.x+re.x,It.y+re.y),hn.rotate(Rt+we.angle,0,0),hn.translate(-_e.width*Kt.x+Kt.offsetX+pt/2,-_e.height*Kt.y+Kt.offsetY+pt/2),hn.scale(we.scale,we.scale),Te(we,!1),we.wh.set(we.Ab),we.Kk=we.scale,Ke(we,!1),we.gc(y,x),b&&(a.svg.appendChild(we.svg),we.svg=null),we.Ab.reset()}}}else if(we instanceof es)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new es),_e=a.temporaryTextBlock,x1(_e,we),pt=0;pt<De;pt++)it=Fe[pt],it.actualBounds&&it.measuredBounds&&it.naturalBounds&&(_e.ec=it.text||"",_e.Kb=it.Sz||0,_e.Gc=it.lineCount||0,bt=it.lines,bt!==void 0&&(_e.Cb=bt[0],_e.Ih=bt[1],_e.df=bt[2],_e.Le=bt[3],_e.Qc=bt[4],_e.Qb=bt[5],_e.ze=bt[6]),it.naturalBounds&&(_e.dc=it.naturalBounds),it.actualBounds&&(bt=it.actualBounds,_e.arrange(bt.x,bt.y,bt.width,bt.height)),bt=it.actualBounds,_e.arrange(bt.x,bt.y,bt.width,bt.height),It=it.measuredBounds,it=it.naturalBounds,Rt=_e.Ab,Rt.reset(),Rt.translate(bt.x+re.x,bt.y+re.y),Rt.translate(-It.x,-It.y),_e.no(Rt,it.x,it.y,it.width,it.height),Te(_e,!1),_e.wh.set(_e.Ab),_e.Kk=_e.scale,Ke(_e,!1),_e.Ng=we.part,_e.Me=we.panel,_e.gc(y,x),_e.Me=null,_e.Ng=null,b&&(a.svg.appendChild(_e.svg),_e.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function ui(a,y){if(Vt.call(this),this.na=null,a===void 0)this.na=ui.Position;else if(typeof a=="string"){var x=Qc.I(a);x!==null&&(this.na=x)}else a instanceof ll?this.na=a:a&&(this.na=ui.Position,y=a);this.na===null&&Et("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===ui.Grid?1048576:0),this.O=new Un,this.yb=sl,this.Tm=Fi,this.Uf=so,this.$g=null,this.$e="",this.jg=new Mn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=tr,this.jn=fa,this.kn=sa,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}$t(ui,Vt),ui.prototype.cloneProtected=function(a){Vt.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},ui.prototype.Af=function(a){Vt.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},ui.prototype.copy=function(){var a=Vt.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,ne=z.count;if(z.Gb(ne,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof Ni&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(xa,"elements",a,null,b,null,ne)}}return a}return null},Ne=ui.prototype,Ne.toString=function(){return"Panel("+this.type.name+")#"+nr(this)},Ne.Pn=function(a){Vt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Ne.hh=function(a,y){if(this.na===ui.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===ui.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===ui.Table)if(a.yc(),a instanceof Ia){var x=a.yd;a.yd=wc(a,"gojs-ts"),Ev(this,a),a.nh.pop(),a.yd=x}else Ev(this,a);(x=this.isClipping&&this.na===ui.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];x&&re===E&&(a.clipInsteadOfFill=!0),re.gc(a,y),x&&re===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function Ev(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Ym(a,y,!0,x,!0),E!==null&&Ym(a,y,!1,E,!0),x!==null&&o1(a,y,!0,x),E!==null&&o1(a,y,!1,E),x!==null&&Ym(a,y,!0,x,!1),E!==null&&Ym(a,y,!1,E,!1)}function o1(a,y,x,E){for(var b=E.length,z=a.actualBounds,ne=a.naturalBounds,re=!0,oe=0;oe<b;oe++){var ue=E[oe];if(ue!==void 0&&ue.actual!==0)if(re)re=!1;else{if(x){if(ue.position>ne.height)continue}else if(ue.position>ne.width)continue;var ce=ue.separatorStrokeWidth;isNaN(ce)&&(ce=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var me=ue.separatorStroke;if(me===null&&(me=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ce!==0&&me!==null){Ds(a,y,me,!1,!1,ne,z),me=!1;var we=ue.separatorDashArray;we===null&&(we=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),we!==null&&(me=!0,y.js(we,0)),y.beginPath(),we=ue.position+ce,x?we>ne.height&&(ce-=we-ne.height):we>ne.width&&(ce-=we-ne.width),ue=ue.position+ce/2,y.lineWidth=ce,ce=a.yb,x?(ue+=ce.top,we=ne.width-ce.right,y.moveTo(ce.left,ue),y.lineTo(we,ue)):(ue+=ce.left,we=ne.height-ce.bottom,y.moveTo(ue,ce.top),y.lineTo(ue,we)),y.stroke(),y.Se(),me&&y.fs()}}}}function Ym(a,y,x,E,b){for(var z=E.length,ne=a.actualBounds,re=a.naturalBounds,oe=a1(a,!0),ue=a1(a,!1),ce=0;ce<z;ce++){var me=E[ce];if(me!==void 0&&me.background!==null&&me.coversSeparators!==b&&me.actual!==0){var we=x?ne.height:ne.width;if(!(me.position>we)){var Fe=me.Wc(),De=me.separatorStrokeWidth;isNaN(De)&&(De=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var _e=me.separatorStroke;_e===null&&(_e=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(_e===null||me.index===(x?oe:ue))&&(De=0),Fe-=De,De=me.position+De,Fe+=me.actual,De+Fe>we&&(Fe=we-De),0>=Fe||(we=a.yb,Ds(a,y,me.background,!0,!1,re,ne),x?y.fillRect(we.left,De+we.top,ne.width-(we.left+we.right),Fe):y.fillRect(De+we.left,we.top,Fe,ne.height-(we.top+we.bottom)))}}}}function a1(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function bv(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(!Vt.prototype.kk.call(this,a,y,x))return!1;if(this.type===ui.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,Ev(this,a),a.yd=null;else if(this.na===ui.Grid||this.na===ui.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Ne.nk=function(){return!0},Ne.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var re=y[ne].actualBounds;b=ne===0?re.x:Math.min(re.x,b),z=ne===0?re.y:Math.min(re.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Vt.prototype.$o.call(this,a,y,x,E)},Ne.Sj=function(a,y,x,E,b){var z=this.se(),ne=this.transform,re=1/(ne.m11*ne.m22-ne.m12*ne.m21),oe=ne.m22*re,ue=-ne.m12*re,ce=-ne.m21*re,me=ne.m11*re,we=re*(ne.m21*ne.dy-ne.m22*ne.dx),Fe=re*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,nt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,E,b);if(this.background!==null)return z=a*oe+y*ce+we,re=a*ue+y*me+Fe,a=x*oe+E*ce+we,oe=x*ue+E*me+Fe,b.h(0,0),x=this.naturalBounds,z=nt.Ff(0,0,x.width,x.height,z,re,a,oe,b),b.transform(ne),z;z||(oe=1,ce=ue=0,me=1,Fe=we=0),re=a*oe+y*ce+we,a=a*ue+y*me+Fe,oe=x*oe+E*ce+we,x=x*ue+E*me+Fe,b.h(oe,x),E=(oe-re)*(oe-re)+(x-a)*(x-a),ue=!1,me=this.O.s,Fe=me.length,ce=st.alloc(),we=null,y=1/0;var De=null,_e=this.isClipping&&this.na===ui.Spot;_e&&(De=st.alloc(),we=this.Pb(),(ue=we.Sj(re,a,oe,x,De))&&(y=(re-De.x)*(re-De.x)+(a-De.y)*(a-De.y)));for(var pt=0;pt<Fe;pt++){var it=me[pt];it.visible&&it!==we&&it.Sj(re,a,oe,x,ce)&&(ue=!0,it=(re-ce.x)*(re-ce.x)+(a-ce.y)*(a-ce.y),it<E&&(E=it,b.set(ce)))}return _e&&(y>E&&b.set(De),st.free(De)),st.free(ce),z&&b.transform(ne),ue},Ne.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Vt.prototype.Gj.call(this)},Ne.v=function(a){if(!Pt(this)){Vt.prototype.v.call(this,a),a=null,(this.na===ui.Auto||this.na===ui.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=fu(b,!1);(b instanceof Cu||b instanceof ui||b instanceof es||z!==ii)&&b.v(!0)}}}},Ne.Uj=function(){if(!Pt(this)){yt(this,!0),Ht(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)){Te(this,!0),Ke(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Ne.Wu=function(){Ke(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,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,E=ne.height),x=Math.max(x,ne.width),E=Math.max(E,ne.height);var re=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,re.width)),isNaN(z.height)||(y=Math.min(z.height,re.height)),a=Math.max(x,a),y=Math.max(E,y);var oe=this.yb;a=Math.max(a-oe.left-oe.right,0),y=Math.max(y-oe.top-oe.bottom,0);var ue=this.O.s;ue.length!==0&&this.na.measure(this,a,y,ue,b,x,E),a=b.width+oe.left+oe.right,oe=b.height+oe.top+oe.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(oe=z.height),a=Math.min(re.width,a),oe=Math.min(re.height,oe),a=Math.max(ne.width,a),oe=Math.max(ne.height,oe),a=Math.max(x,a),oe=Math.max(E,oe),Ss(b,a,oe),Ss(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 E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function Mh(a){return a.part!==null?a.part.locationObject:null}Ne.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=fu(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var ne=this.Kg,re=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&z===E&&(a=ii),a){case ii:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case si:this.v(!0),this.measure(x+re,E+ne,0,0);break;case dr:this.v(!0),this.measure(x+re,z+ne,0,0);break;case Mr:this.v(!0),this.measure(y+re,E+ne,0,0)}}this.na.arrange(this,b,this.jg)}},Ne.gh=function(a){var y=this.naturalBounds,x=Mh(this);if(Ba(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=st.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Eo(b.set(a),z.transform),z.ca(b)))return st.free(b),!0}return st.free(b),!(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,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Ne.qm=function(a,y){if(y(this,a),a instanceof ui){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Jf(a,y){s1(a,a,y)}function s1(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof ui&&s1(a,z,x)}}function vS(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof ui){y=y.O.s;for(var E=y.length,b=0;b<E;b++)l1(a,y[b],x)}}Ne.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof ui){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=u1(a,y[b],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=Kp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof ui){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function c1(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof ui?x=Math.max(x,c1(b)):b instanceof Co&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Ne.se=function(){return!(this.type===ui.TableRow||this.type===ui.TableColumn)};function $h(a){return a.type===ui.TableRow||a.type===ui.TableColumn}Ne.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),kt(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),ne=z?a:Eo(st.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,ue=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),ue=oe/2),Ba(-(ue*b),-(ue*b),E.width+oe*b,E.height+oe*b,ne.x,ne.y)){if(!this.isAtomic){b=this.O.s;var ce=b.length;if(re=st.alloc(),ue=(oe=this.isClipping&&this.na===ui.Spot)?this.Pb():null,oe&&(ue.se()?Eo(re.set(a),ue.transform):re.set(a),!ue.ca(re)))return st.free(re),z||st.free(ne),null;for(var me=Mh(this);ce--;){var we=b[ce];if((we.visible||we===me)&&(we.se()?Eo(re.set(a),we.transform):re.set(a),!oe||we!==ue)){var Fe=null;if(we instanceof ui?Fe=we.ic(re,y,x):we.pickable===!0&&we.ca(re)&&(Fe=we),Fe!==null&&(y!==null&&(Fe=y(Fe)),Fe!==null&&(x===null||x(Fe))))return st.free(re),z||st.free(ne),Fe}}st.free(re)}return this.background===null&&this.areaBackground===null?(z||st.free(ne),null):(a=Ba(0,0,E.width,E.height,ne.x,ne.y)?this:null,z||st.free(ne),a)}return z||st.free(ne),null},Ne.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),ne=z?a:Eo(st.allocAt(a.x,a.y),this.transform);if(b=Ba(0,0,b.width,b.height,ne.x,ne.y),$h(this)||b){if(!this.isAtomic){for(var re=this.O.s,oe=re.length,ue=st.alloc(),ce=Mh(this);oe--;){var me=re[oe];if(me.visible||me===ce){me.se()?Eo(ue.set(a),me.transform):ue.set(a);var we=me;me=me instanceof ui?me:null,(me!==null?me.ji(ue,y,x,E):we.ca(ue))&&we.pickable!==!1&&(y!==null&&(we=y(we)),we===null||x!==null&&!x(we)||E.add(we))}}st.free(ue)}return z||st.free(ne),b&&(this.background!==null||this.areaBackground!==null)}return z||st.free(ne),!1},Ne.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=z;if(z===void 0&&(ne=Yt.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return Fv(this,y,x,b),z===void 0&&Yt.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var re=Mh(this),oe=this.O.s,ue=oe.length;ue--;){var ce=oe[ue];if(ce.visible||ce===re){var me=ce.actualBounds,we=this.naturalBounds;me.x>we.width||me.y>we.height||0>me.x+me.width||0>me.y+me.height||(me=ce,ce=ce instanceof ui?ce:null,we=Yt.alloc(),we.set(ne),(ce!==null?ce.Cf(a,y,x,E,b,we):rl(me,a,E,we))&&(y!==null&&(me=y(me)),me===null||x!==null&&!x(me)||b.add(me)),Yt.free(we))}}return z===void 0&&Yt.free(ne),E}return z===void 0&&Yt.free(ne),!1};function Fv(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var ne=b[z];if(ne.visible){var re=ne.actualBounds,oe=a.naturalBounds;re.x>oe.width||re.y>oe.height||0>re.x+re.width||0>re.y+re.height||(ne instanceof ui&&Fv(ne,y,x,E),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||E.add(ne))}}}Ne.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var ne=this.naturalBounds,re=this.se(),oe=re?a:Eo(st.allocAt(a.x,a.y),this.transform),ue=re?y:Eo(st.allocAt(y.x,y.y),this.transform),ce=oe.Bf(ue),me=0<oe.x&&oe.x<ne.width&&0<oe.y&&oe.y<ne.height||Na(oe.x,oe.y,0,0,0,ne.height)<=ce||Na(oe.x,oe.y,0,ne.height,ne.width,ne.height)<=ce||Na(oe.x,oe.y,ne.width,ne.height,ne.width,0)<=ce||Na(oe.x,oe.y,ne.width,0,0,0)<=ce;if(ne=oe.zd(0,0)<=ce&&oe.zd(0,ne.height)<=ce&&oe.zd(ne.width,0)<=ce&&oe.zd(ne.width,ne.height)<=ce,re||(st.free(oe),st.free(ue)),me){if(!this.isAtomic){oe=st.alloc(),ue=st.alloc(),ce=Mh(this);for(var we=this.O.s,Fe=we.length;Fe--;){var De=we[Fe];if(De.visible||De===ce){var _e=De.actualBounds,pt=this.naturalBounds;(!re||!(_e.x>pt.width||_e.y>pt.height||0>_e.x+_e.width||0>_e.y+_e.height))&&(De.se()?(_e=De.transform,Eo(oe.set(a),_e),Eo(ue.set(y),_e)):(oe.set(a),ue.set(y)),_e=De,De=De instanceof ui?De:null,(De!==null?De.og(oe,ue,x,E,b,z):_e.tx(oe,ue,b))&&(x!==null&&(_e=x(_e)),_e===null||E!==null&&!E(_e)||z.add(_e)))}}st.free(oe),st.free(ue)}return b?me:ne}return!1};function Bv(a){var y=null;return a instanceof Co&&(y=a.spot1,y===Fi&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Us),y}function Mv(a){var y=null;return a instanceof Co&&(y=a.spot2,y===Fi&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Nn),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 xr&&Et("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Et("Cannot make a Panel contain itself: "+this.toString()),Et("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Et("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!==ui.Grid||y instanceof Co||Et("Can only add Shapes to a Grid Panel, not: "+y),this.na!==ui.Graduated||y instanceof Co||y instanceof es||Et("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new Ki),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,ne=this.O.s,re=ne.length,oe=0;oe<re;oe++)if(ne[oe]===y){z=oe;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else Et("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Pt(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof ui&&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 Ni&&(x.Te=!0),x.Te&&x instanceof Ni&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Wa,"elements",this,y,null,E,null),x.cb(xa,"elements",this,null,y,null,a)))};function Lv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Ne.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Ne.mb=function(a){0<=a&&this.pc(a,!0)},Ne.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),yt(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof Ni&&(E instanceof ui?E.qm(E,function(ne,re){Qv(z,re,y)}):Qv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Wa,"elements",this,E,null,a,null))},Ne.Fb=function(a){0>a&&Kn(a,">= 0",ui,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new ol;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(xa,"rowdefs",this,null,x,null,a)}return y[a]},Ne.oA=function(a){if(0>a&&Kn(a,">= 0",ui,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Wa,"rowdefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof ol?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Ne.Eb=function(a){0>a&&Kn(a,">= 0",ui,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new ol;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(xa,"coldefs",this,null,x,null,a)}return y[a]},Ne.jA=function(a){if(0>a&&Kn(a,">= 0",ui,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Wa,"coldefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof ol?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.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 ol(y)),this},Ne.By=function(a,y){return(a=this.Eb(a))&&Qm(a,new ol(y)),this},Ne.nz=function(a){if(0>a||this.type!==ui.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Ne.fz=function(a){if(0>a||this.type!==ui.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Ne.Fz=function(a,y){if(y===void 0&&(y=new st(NaN,NaN)),this.type!==ui.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!==ui.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function f1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Zc(a){var y=a.allBindings;if(y===null)a.data!==null&&Et("Template cannot have .data be non-null: "+a),a.allBindings=y=new Un;else if(y._isFrozen)return;var x=new Un;Lv(a,!1),a.qm(a,function(ue,ce){ce.th();var me=ce.localBindings;if(me!==null)for(Ce(ce,!1),me=me.iterator;me.next();){var we=me.value;we.mode===gm&&Ce(ce,!0);var Fe=we.sourceName;Fe!==null&&(Fe==="/"&&Lv(ue,!0),Fe=Bx(we,ue,ce),Fe!==null&&(x.add(Fe),Fe.srcBindings===null&&(Fe.srcBindings=new Un),Fe.srcBindings.add(we))),y.add(we)}if(ce instanceof ui&&ce.type===ui.Table){if(0<ce.rowCount){for(ue=ce.rowDefs,me=ue.length,we=0;we<me;we++)if(Fe=ue[we],Fe!==void 0&&Fe.be!==null)for(var De=Fe.be.iterator;De.next();){var _e=De.value;_e.xd=Fe,_e.to=2,_e.wl=Fe.index,y.add(_e)}}if(0<ce.columnCount){for(ce=ce.colDefs,ue=ce.length,me=0;me<ue;me++)if(we=ce[me],we!==void 0&&we.be!==null)for(Fe=we.be.iterator;Fe.next();)De=Fe.value,De.xd=we,De.to=1,De.wl=we.index,y.add(De)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){Ce(b,!0);for(var z=b.srcBindings.iterator;z.next();){var ne=z.value;b.localBindings===null&&(b.localBindings=new Un),b.localBindings.add(ne)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var re=b.targetProperty,oe=re.indexOf(".");0<oe&&z instanceof ui&&(ne=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(ne),oe!==null?(z=oe,b.targetProperty=re):Ei('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+b.toString())),z instanceof ol?(ne=nr(z.panel),b.Ai=ne===void 0?-1:ne,z.panel.bindingId=b.Ai):z instanceof Vt?(ne=nr(z),b.Ai=ne===void 0?-1:ne,z.bindingId=b.Ai):Et("Unknown type of binding target: "+z)}y.freeze(),a instanceof xr&&a.Zc()&&a.Va()}Ne.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vS(y,function(x){x instanceof ui&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&Zc(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,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,ne=x.Ai;if(ne!==-1){if(z=this.ks(ne),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof ui))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Ne.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yS(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof ui&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var ne=0;b<x&&ne<E;){if(z=a[b],!(z instanceof ui)||z.data!==y[ne])return!0;b++,ne++}return!1}function Kp(a){if(a.type===ui.Spot||a.type===ui.Auto)return Math.min(a.O.length,1);if(a.type===ui.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Co&&E.isPanelMain))break}return x}return a.type===ui.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof ui&&$h(a))?1:0}Ne.mv=function(){for(var a=Kp(this);this.O.length>a;)this.pc(this.O.length-1,!1);g1(this,this.itemArray)};function g1(a,y){var x=Kp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;E<x;E++)Xm(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],ne=E<a.O.length?a.O.M(E):null;if(ne instanceof ui){if(ne.data!==z){var re=Av(a,ne.data),oe=Av(a,z),ue=oe!==re;ue||(re=Dv(a,re),ue=Dv(a,oe)!==re),ue?(a.pc(E,!1),Xm(a,z,b,!1)):ne.data=z}}else Xm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,Nv(a,x,0),Pt(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 Ni&&(y.Te=!0),y.Te&&y instanceof Ni&&(y.wc=null))}}function Xm(a,y,x,E){if(!(y==null||0>x)){var b=Av(a,y);if(b=Dv(a,b),b!==null){if(Zc(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Lv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Ki),a.ge.add(y,b)),z=x+Kp(a),a.Gb(z,b),E&&(b.ub=y,Nv(a,z,x),b.ub=null),b.data=y}}}function Nv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof ui){var b=y,z=x;E.type===ui.TableRow?E.row=b:E.type===ui.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Av(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=Qs(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Et("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Dv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(p1||(p1=!0,Ei('No item template Panel found for category "'+y+'" on '+a),Ei(" Using default item template."),a=new ui,y=new es,y.bind(new tl("text","",sr)),a.add(y),m1=a),E=m1)),E}function Jm(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof ui){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof ui&&!z.isEnabled||Jm(a,z,x)}}}function Ad(a,y){y.name=a,Qc.add(a,y)}Qe.Object.defineProperties(ui.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===ui.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&&Kn(a,">= 0",ui,"padding"),a=new hr(a)):(0>a.left&&Kn(a.left,">= 0",ui,"padding:value.left"),0>a.right&&Kn(a.right,">= 0",ui,"padding:value.right"),0>a.top&&Kn(a.top,">= 0",ui,"padding:value.top"),0>a.bottom&&Kn(a.bottom,">= 0",ui,"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:sl},set:function(a){typeof a=="number"&&(a=new hr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Ac),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 ha)&&(a instanceof ha&&a.freeze(),this.T===null&&(this.T=new Ac),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 Ac),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Et("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Ac),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 ha)&&(a instanceof ha&&a.freeze(),this.T===null&&(this.T=new Ac),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 Ac),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Et("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Ac),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 Ac),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||Et("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Xc(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()||Et("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Xc(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 Lh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Se(this)&&(a=this.part,a!==null&&rs(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 Lh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Se(this)&&(a=this.part,a!==null&&rs(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 Lh),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 Lh),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 Lh,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 Lh,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 Lh,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 Lh,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 Ac),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Ac),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 Ac),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 Ac),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)&&Et("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Ac),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)&&Et("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Ac),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 xr&&!(this instanceof pa);Zc(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof fi?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof xr&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),E!==null&&E.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Gr),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yS(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||g1(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 Ki}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof xr||a.isPanelMain)&&Et("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(););Mo(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&&(Mo(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 ho&&(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))}}}),Qe.Object.defineProperties(ui,{Position:{get:function(){return Qc.I("Position")}},Horizontal:{get:function(){return Qc.I("Horizontal")}},Vertical:{get:function(){return Qc.I("Vertical")}},Spot:{get:function(){return Qc.I("Spot")}},Auto:{get:function(){return Qc.I("Auto")}},Table:{get:function(){return Qc.I("Table")}},Viewbox:{get:function(){return Qc.I("Viewbox")}},TableRow:{get:function(){return Qc.I("TableRow")}},TableColumn:{get:function(){return Qc.I("TableColumn")}},Link:{get:function(){return Qc.I("Link")}},Grid:{get:function(){return Qc.I("Grid")}},Graduated:{get:function(){return Qc.I("Graduated")}}}),ui.prototype.rebuildItemElements=ui.prototype.mv,ui.prototype.findItemPanelForData=ui.prototype.sx,ui.prototype.updateTargetBindings=ui.prototype.La,ui.prototype.copyTemplate=ui.prototype.Uy,ui.prototype.graduatedValueForPoint=ui.prototype.Gz,ui.prototype.graduatedPointForValue=ui.prototype.Fz,ui.prototype.findColumnForLocalX=ui.prototype.fz,ui.prototype.findRowForLocalY=ui.prototype.nz,ui.prototype.addColumnDefinition=ui.prototype.By,ui.prototype.addRowDefinition=ui.prototype.Hy,ui.prototype.addRowColumnDefinition=ui.prototype.Gy,ui.prototype.removeColumnDefinition=ui.prototype.jA,ui.prototype.getColumnDefinition=ui.prototype.Eb,ui.prototype.removeRowDefinition=ui.prototype.oA,ui.prototype.getRowDefinition=ui.prototype.Fb,ui.prototype.removeAt=ui.prototype.mb,ui.prototype.remove=ui.prototype.remove,ui.prototype.insertAt=ui.prototype.Gb,ui.prototype.elt=ui.prototype.M,ui.prototype.add=ui.prototype.add,ui.prototype.findObject=ui.prototype.fb,ui.prototype.findInVisualTree=ui.prototype.Nl,ui.prototype.walkVisualTreeFrom=ui.prototype.qm,ui.prototype.findMainElement=ui.prototype.Pb;var p1=!1,m1=null,Qc=new Ki;ui.className="Panel",ui.definePanelLayout=Ad,Ad("Position",new _m),Ad("Vertical",new zm),Ad("Auto",new Hm),Ad("Link",new Um);function Lh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Lh.prototype.copy=function(){var a=new Lh;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},Lh.className="GradPanelSettings";function Ac(){this.Pc=[],this.Oc=[],this.j=this.ob=e0,this.hb=this.Hb=0,this.Qp=sl,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Ac.prototype.copy=function(a){for(var y=new Ac,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var ne=x[z].copy();ne.wi(a),b[z]=ne}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(ne=x[z].copy(),ne.wi(a),b[z]=ne);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},Ac.className="TablePanelSettings";function ol(a){Ao(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Fi,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Iv,this.hg=so,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}ol.prototype.copy=function(){var a=new ol;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=In(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=In(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Ne=ol.prototype,Ne.qb=function(a){a.classType===ol&&(this.sizing=a)},Ne.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+nr(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,E=this.isRow;if(y!==null&&y.type===ui.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var ne=E?y.rowDefs[z]:y.colDefs[z];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Ne.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(_o,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function qm(a){if(a.sizing===Iv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Ne.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new tl(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&Et("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new Un),this.be.add(b),this},Qe.Object.defineProperties(ol.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&&Kn(a,">= 0",ol,"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&&Kn(a,">= 0",ol,"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))&&Kn(a,">= 0",ol,"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&&Kn(a,">= 0",ol,"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 hr(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&&yf(a,"RowColumnDefinition.separatorStroke"),a instanceof ha&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Et("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&yf(a,"RowColumnDefinition.background"),a instanceof ha&&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}}}),ol.prototype.computeEffectiveSpacing=ol.prototype.Wc,ol.prototype.computeEffectiveSpacingTop=ol.prototype.Io;var Iv=new Cn(ol,"Default",0),Vp=new Cn(ol,"None",1),e0=new Cn(ol,"ProportionalExtra",2);ol.className="RowColumnDefinition",ol.Default=Iv,ol.None=Vp,ol.ProportionalExtra=e0;function Co(a,y){Vt.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)}$t(Co,Vt),Co.prototype.cloneProtected=function(a){Vt.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=In(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 Qf(a){a.Na===null?a.Na=new kv:a.Na.nc&&(a.Na=a.Na.copy())}Ne=Co.prototype,Ne.th=function(){Vt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Ne.qb=function(a){a===ii||a===tr||a===Zo||a===so?this.geometryStretch=a:Vt.prototype.qb.call(this,a)},Ne.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+nr(this)};function cp(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,ne=Math.max(1,z.width);z=z.height;for(var re=x[0],oe=x[1],ue,ce,me,we,Fe,De,_e=0,pt=vi(),it=2;it<b;it+=2)ue=x[it],ce=x[it+1],me=ue-re,re=ce-oe,me===0&&(me=.001),we=re/me,Fe=Math.atan2(re,me),De=Math.sqrt(me*me+re*re),pt.push([me,Fe,we,De]),_e+=De,re=ue,oe=ce;re=x[0],oe=x[1],me=E.measuredBounds.width,E instanceof Co&&(me-=E.strokeWidth),1>me&&(me=1),b=x=me,ue=ne/2,ce=ue!==0,it=0,De=pt[it],me=De[0],Fe=De[1],we=De[2],De=De[3];for(var bt=0;.1<=_e;){if(bt===0&&(ce?(b=x,b-=ue,_e-=ue,ce=!1):b=x,b===0&&(b=1)),b>_e){Ti(pt);return}b>De?(bt=b-De,b=De):bt=0;var It=Math.sqrt(b*b/(1+we*we));if(0>me&&(It=-It),re+=It,oe+=we*It,a.translate(re,oe),a.rotate(Fe),a.translate(-(ne/2),-(z/2)),bt===0&&E.hh(a,y),a.translate(ne/2,z/2),a.rotate(-Fe),a.translate(-re,-oe),_e-=b,De-=b,bt!==0){if(it++,it===pt.length){Ti(pt);return}De=pt[it],me=De[0],Fe=De[1],we=De[2],De=De[3],b=bt}}Ti(pt)}}Ne.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,ne=this.naturalBounds;E!==null&&Ds(this,a,E,!0,!1,ne,z);var re=this.part,oe=this.ig;if(x===null||oe!==0||re===null||!this.isPanelMain&&re.Pb()!==this||(oe=re.type===ui.Link&&re instanceof pa&&re.category==="Selection"&&re.adornedObject instanceof Co&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),oe===0&&(x=null),x!==null&&oe!==0&&(Ds(this,a,x,!1,!1,ne,z),a.lineWidth=oe,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,re&&y.Gf("drawShadows")&&(z=re.isShadowed),a.Il===!1&&(z=!1),re=!0,x===null||E!==null&&E!=="transparent"||(re=!1),ne=!1,oe=this.strokeDashArray,oe!==null&&(ne=!0,a.js(oe,this.strokeDashOffset)),b.type===Qt.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===Qt.u){var ue=b.startX;oe=b.startY;var ce=b.endX,me=b.endY;b=Math.min(ue,ce);var we=Math.min(oe,me);ue=Math.abs(ce-ue),oe=Math.abs(me-oe),a.beginPath(),a.rect(b,we,ue,oe),E!==null&&a.ng(E),x!==null&&(re&&z&&gu(a),a.jk(),re&&z&&Il(a)),a.Se()}else if(b.type===Qt.F)ue=b.startX,oe=b.startY,ce=b.endX,me=b.endY,b=Math.abs(ce-ue)/2,we=Math.abs(me-oe)/2,ue=Math.min(ue,ce)+b,oe=Math.min(oe,me)+we,a.beginPath(),a.moveTo(ue,oe-we),a.bezierCurveTo(ue+nt.wg*b,oe-we,ue+b,oe-nt.wg*we,ue+b,oe),a.bezierCurveTo(ue+b,oe+nt.wg*we,ue+nt.wg*b,oe+we,ue,oe+we),a.bezierCurveTo(ue-nt.wg*b,oe+we,ue-b,oe+nt.wg*we,ue-b,oe),a.bezierCurveTo(ue-b,oe-nt.wg*we,ue-nt.wg*b,oe-we,ue,oe-we),a.closePath(),E!==null&&a.ng(E),x!==null&&(re&&z&&gu(a),a.jk(),re&&z&&Il(a)),a.Se();else if(b.type===Qt.o)for(b=b.figures,oe=b.length,we=0;we<oe;we++){ue=b.s[we],a.beginPath(),a.moveTo(ue.startX,ue.startY),ce=ue.segments.s,me=ce.length;for(var Fe=null,De=0;De<me;De++){var _e=ce[De];switch(_e.type){case ji:a.moveTo(_e.endX,_e.endY);break;case Ai:a.lineTo(_e.endX,_e.endY);break;case Wr:a.bezierCurveTo(_e.point1X,_e.point1Y,_e.point2X,_e.point2Y,_e.endX,_e.endY);break;case zo:a.quadraticCurveTo(_e.point1X,_e.point1Y,_e.endX,_e.endY);break;case Br:if(_e.radiusX===_e.radiusY){var pt=Math.PI/180;a.arc(_e.point1X,_e.point1Y,_e.radiusX,_e.startAngle*pt,(_e.startAngle+_e.sweepAngle)*pt,0>_e.sweepAngle,Fe!==null?Fe.endX:ue.startX,Fe!==null?Fe.endY:ue.startY)}else if(Fe=pr(_e,ue),pt=Fe.length,pt===0)a.lineTo(_e.centerX,_e.centerY);else for(var it=0;it<pt;it++){var bt=Fe[it];it===0&&a.lineTo(bt[0],bt[1]),a.bezierCurveTo(bt[2],bt[3],bt[4],bt[5],bt[6],bt[7])}break;case Er:if(it=pt=0,Fe!==null&&Fe.type===Br){if(Fe=pr(Fe,ue),bt=Fe.length,bt===0){a.lineTo(_e.endX,_e.endY);break}Fe=Fe[bt-1]||null,Fe!==null&&(pt=Fe[6],it=Fe[7])}else pt=Fe!==null?Fe.endX:ue.startX,it=Fe!==null?Fe.endY:ue.startY;if(Fe=vr(_e,ue,pt,it),pt=Fe.length,pt===0){a.lineTo(_e.endX,_e.endY);break}for(it=0;it<pt;it++)bt=Fe[it],a.bezierCurveTo(bt[2],bt[3],bt[4],bt[5],bt[6],bt[7]);break;default:Et("Segment not of valid type: "+_e.type)}_e.isClosed&&a.closePath(),Fe=_e}ce=ue.isFilled,z?ue.isShadowed?(ce===!0&&E!=="transparent"&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&(ce&&re&&gu(a),a.jk(),ce&&re&&Il(a))):(gu(a),ce&&E!=="transparent"&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&a.jk(),Il(a)):(ce&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&a.jk()),a.Se(we)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=vi(),z.type===Qt.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),cp(a,y,E,x);else if(z.type===Qt.o)for(z=z.figures.iterator;z.next();){for(re=z.value,E.length=0,E.push(re.startX),E.push(re.startY),ne=re.startX,b=re.startY,oe=ne,we=b,ue=re.segments.s,ce=ue.length,me=0;me<ce;me++){switch(De=ue[me],De.type){case ji:cp(a,y,E,x),E.length=0,E.push(De.endX),E.push(De.endY),ne=De.endX,b=De.endY,oe=ne,we=b;break;case Ai:E.push(De.endX),E.push(De.endY),ne=De.endX,b=De.endY;break;case Wr:nt.Qe(ne,b,De.point1X,De.point1Y,De.point2X,De.point2Y,De.endX,De.endY,.5,E),ne=De.endX,b=De.endY;break;case zo:nt.ep(ne,b,De.point1X,De.point1Y,De.endX,De.endY,.5,E),ne=De.endX,b=De.endY;break;case Br:if(_e=pr(De,re),Fe=_e.length,Fe===0){E.push(De.centerX),E.push(De.centerY),ne=De.centerX,b=De.centerY;break}for(pt=0;pt<Fe;pt++)it=_e[pt],nt.Qe(ne,b,it[2],it[3],it[4],it[5],it[6],it[7],.5,E),ne=it[6],b=it[7];break;case Er:if(_e=vr(De,re,ne,b),Fe=_e.length,Fe===0){E.push(De.endX),E.push(De.endY),ne=De.endX,b=De.endY;break}for(pt=0;pt<Fe;pt++)it=_e[pt],nt.Qe(ne,b,it[2],it[3],it[4],it[5],it[6],it[7],.5,E),ne=it[6],b=it[7];break;default:Et("Segment not of valid type: "+De.type)}De.isClosed&&(E.push(oe),E.push(we),cp(a,y,E,x))}cp(a,y,E,x)}else if(z.type===Qt.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),cp(a,y,E,x);else if(z.type===Qt.F){if(b=new So,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,ne=new fr(Br),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(z.startX+z.endX)/2,ne.centerY=(z.startY+z.endY)/2,ne.radiusX=Math.abs(z.startX-z.endX)/2,ne.radiusY=Math.abs(z.startY-z.endY)/2,b.add(ne),z=pr(ne,b),re=z.length,re===0)E.push(ne.centerX),E.push(ne.centerY);else for(ne=b.startX,b=b.startY,oe=0;oe<re;oe++)we=z[oe],nt.Qe(ne,b,we[2],we[3],we[4],we[5],we[6],we[7],.5,E),ne=we[6],b=we[7];cp(a,y,E,x)}Ti(E),a.restore(),a.Vc(!1)}}}},Ne.kk=function(a,y,x){return!Vt.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:Vt.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 st),a instanceof Ji){a.Mc()&&Et("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Ne.mi=function(a){a===void 0&&(a=new Mn);var y=this.naturalBounds,x=this.oe;y=Mn.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=st.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),ps(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),ps(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),ps(a,E.x,E.y,0,0),Mn.free(y),st.free(E),a},Ne.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==Qt.j||y||(b+=2);var z=Mn.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Mn.free(z),!1;if(E=b+1e-4,x.type===Qt.j)return this.stroke===null||(E=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(Mn.free(z),nt.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===Qt.u){y=x.startX;var ne=x.startY,re=x.endX;if(x=x.endY,z.x=Math.min(y,re),z.y=Math.min(ne,x),z.width=Math.abs(re-y),z.height=Math.abs(x-ne),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return Mn.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Mn.free(z),a}if(x.type===Qt.F){ne=x.startX,b=x.startY,re=x.endX;var oe=x.endY;if(x=Math.min(ne,re),y=Math.min(b,oe),ne=Math.abs(re-ne)/2,b=Math.abs(oe-b)/2,x=a.x-(x+ne),y=a.y-(y+b),this.fill===null){if(ne-=E,b-=E,0>=ne||0>=b||1>=x*x/(ne*ne)+y*y/(b*b))return Mn.free(z),!1;ne+=E,b+=E}return this.stroke!==null&&(ne+=E,b+=E),Mn.free(z),0>=ne||0>=b?!1:1>=x*x/(ne*ne)+y*y/(b*b)}if(x.type===Qt.o)return Mn.free(z),this.fill===null?Bi(x,a.x,a.y,b):mr(x,a,b,1<this.strokeWidth,y);Et("Unknown Geometry type: "+x.type)},Ne.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var re=this.figure,oe=Tv[re];if(oe===void 0){var ue=nt.Ze[re];typeof ue=="string"&&(ue=nt.Ze[ue]),typeof ue=="function"?(oe=ue(null,100,100),Tv[re]=oe):Et("Unsupported Figure: "+re)}ne=oe.bounds}re=ne.width,oe=ne.height,ue=ne.width;var ce=ne.height;switch(fu(this,!0)){case ii:E=x=0;break;case si:ue=Math.max(a-z,0),ce=Math.max(y-z,0);break;case dr:ue=Math.max(a-z,0),E=0;break;case Mr:x=0,ce=Math.max(y-z,0)}isFinite(b.width)&&(ue=b.width),isFinite(b.height)&&(ce=b.height);var me=this.maxSize,we=this.minSize;switch(x=Math.max(x-z,we.width),E=Math.max(E-z,we.height),ue=Math.min(me.width,ue),ce=Math.min(me.height,ce),ue=isFinite(ue)?Math.max(x,ue):Math.max(re,x),ce=isFinite(ce)?Math.max(E,ce):Math.max(oe,E),x=Ov(this),x){case ii:break;case si:re=ue,oe=ce;break;case tr:x=Math.min(ue/re,ce/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:Et(x+" is not a valid geometryStretch.")}this.Rd!==null?(re===0&&(re=.001),oe===0&&(oe=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,E=re/ne.width,ne=oe/ne.height,isFinite(E)||(E=1),isFinite(ne)||(ne=1),this.ua=E===1&&ne===1?x:x.copy().scale(E,ne)):this.ua!==null&&nt.$(this.ua.Sk,a-z)&&nt.$(this.ua.Rk,y-z)||(this.ua=Co.makeGeometry(this,re,oe)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-z/2,ne.y-z/2,a===0&&re===0?0:ne.width+z,y===0&&oe===0?0:ne.height+z):this.Ge(-(z/2),-(z/2),ue+z,ce+z),b.w()?(ue=b.width,ce=b.height,ue=Math.min(me.width,ue),ce=Math.min(me.height,ce),ue=Math.max(we.width,ue),ce=Math.max(we.height,ce),this.dc.h(0,0,ue,ce)):this.dc.assign(ne)};function Ov(a){var y=a.geometryStretch;return a.Rd!==null?y===so?si:y:y===so?Tv[a.figure].defaultStretch:y}Ne.eh=function(a,y,x,E){ru(this,a,y,x,E)},Ne.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ne.Sj=function(a,y,x,E,b){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,ue=-z.m21*ne,ce=z.m11*ne,me=ne*(z.m21*z.dy-z.m22*z.dx),we=ne*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*ue+me,ne=a*oe+y*ce+we,re=x*re+E*ue+me,oe=x*oe+E*ce+we,me=this.ig/2,ue=this.ua,ue===null&&(this.measure(1/0,1/0),ue=this.ua);var Fe=ue.bounds;if(ce=!1,ue.type===Qt.j)if(1.5>=this.strokeWidth)ce=nt.Ve(ue.startX,ue.startY,ue.endX,ue.endY,z,ne,re,oe,b);else{if(ue.startX===ue.endX?(E=me,ce=0):(y=(ue.endY-ue.startY)/(ue.endX-ue.startX),ce=me/Math.sqrt(1+y*y),E=ce*y),y=vi(),a=new st,nt.Ve(ue.startX+E,ue.startY+ce,ue.endX+E,ue.endY+ce,z,ne,re,oe,a)&&y.push(a),a=new st,nt.Ve(ue.startX-E,ue.startY-ce,ue.endX-E,ue.endY-ce,z,ne,re,oe,a)&&y.push(a),a=new st,nt.Ve(ue.startX+E,ue.startY+ce,ue.startX-E,ue.startY-ce,z,ne,re,oe,a)&&y.push(a),a=new st,nt.Ve(ue.endX+E,ue.endY+ce,ue.endX-E,ue.endY-ce,z,ne,re,oe,a)&&y.push(a),re=y.length,re===0)return Ti(y),!1;for(ce=!0,oe=1/0,E=0;E<re;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-ne)*(a.y-ne),x<oe&&(oe=x,b.x=a.x,b.y=a.y);Ti(y)}else if(ue.type===Qt.u)ce=nt.Ff(Fe.x-me,Fe.y-me,Fe.x+Fe.width+me,Fe.y+Fe.height+me,z,ne,re,oe,b);else if(ue.type===Qt.F){y=Mn.allocAt(Fe.x,Fe.y,Fe.width,Fe.height).Bc(me,me);e:if(y.width===0)ce=nt.Ve(y.x,y.y,y.x,y.y+y.height,z,ne,re,oe,b);else if(y.height===0)ce=nt.Ve(y.x,y.y,y.x+y.width,y.y,z,ne,re,oe,b);else{if(a=y.width/2,ue=y.height/2,E=y.x+a,ce=y.y+ue,x=9999,z!==re&&(x=(ne-oe)/(z-re)),9999>Math.abs(x)){if(oe=ne-ce-x*(z-E),0>a*a*x*x+ue*ue-oe*oe){b.x=NaN,b.y=NaN,ce=!1;break e}me=Math.sqrt(a*a*x*x+ue*ue-oe*oe),re=(-(a*a*x*oe)+a*ue*me)/(ue*ue+a*a*x*x)+E,a=(-(a*a*x*oe)-a*ue*me)/(ue*ue+a*a*x*x)+E,ue=x*(re-E)+oe+ce,oe=x*(a-E)+oe+ce,Math.abs((z-re)*(z-re))+Math.abs((ne-ue)*(ne-ue))<Math.abs((z-a)*(z-a))+Math.abs((ne-oe)*(ne-oe))?(b.x=re,b.y=ue):(b.x=a,b.y=oe)}else{if(re=ue*ue,oe=z-E,re-=re/(a*a)*oe*oe,0>re){b.x=NaN,b.y=NaN,ce=!1;break e}oe=Math.sqrt(re),re=ce+oe,oe=ce-oe,Math.abs(re-ne)<Math.abs(oe-ne)?(b.x=z,b.y=re):(b.x=z,b.y=oe)}ce=!0}Mn.free(y)}else if(ue.type===Qt.o){we=st.alloc();var De=re-z,_e=oe-ne,pt=De*De+_e*_e,it=z,bt=ne;if(0<pt&&Fe.contains(it,bt)&&(we.x=it,we.y=bt,this.ca(we)))for(De!==0&&.5>Math.abs(De)?(_e*=.5/De,De=.5):_e!==0&&.5>Math.abs(_e)&&(De*=.5/_e,_e=.5),it-=De,bt-=_e;Fe.contains(it,bt);)it-=De,bt-=_e;for(b.x=re,b.y=oe,_e=0;_e<ue.figures.count;_e++){var It=ue.figures.s[_e],Rt=It.isFilled?it:z,Kt=It.isFilled?bt:ne,hn=It.segments;Fe=It.startX,De=It.startY;for(var bi=Fe,Xi=De,zi=0;zi<hn.count;zi++){var hi=hn.s[zi],ti=hi.type,lo=hi.endX,$r=hi.endY,Fa=!1;switch(ti){case ji:bi=lo,Xi=$r;break;case Ai:Fa=n0(Fe,De,lo,$r,Rt,Kt,re,oe,we);break;case Wr:Fa=nt.Eo(Fe,De,hi.point1X,hi.point1Y,hi.point2X,hi.point2Y,lo,$r,Rt,Kt,re,oe,.6,we);break;case zo:Fa=nt.Eo(Fe,De,Fe+2/3*(hi.point1X-Fe),De+2/3*(hi.point1Y-De),lo+2/3*(hi.point1X-lo),$r+2/3*(hi.point1Y-$r),lo,$r,Rt,Kt,re,oe,.6,we);break;case Br:case Er:ti=hi.type===Br?pr(hi,It):vr(hi,It,Fe,De);var qa=ti.length;if(qa===0){Fa=n0(Fe,De,hi.type===Br?hi.centerX:hi.endX,hi.type===Br?hi.centerY:hi.endY,Rt,Kt,re,oe,we);break}for($r=null,lo=0;lo<qa;lo++){if($r=ti[lo],lo===0&&n0(Fe,De,$r[0],$r[1],Rt,Kt,re,oe,we)){var wl=t0(Rt,Kt,we,pt,b);wl<pt&&(pt=wl,ce=!0)}nt.Eo($r[0],$r[1],$r[2],$r[3],$r[4],$r[5],$r[6],$r[7],Rt,Kt,re,oe,.6,we)&&(wl=t0(Rt,Kt,we,pt,b),wl<pt&&(pt=wl,ce=!0))}lo=$r[6],$r=$r[7];break;default:Et("Unknown Segment type: "+ti)}Fe=lo,De=$r,Fa&&(Fa=t0(Rt,Kt,we,pt,b),Fa<pt&&(pt=Fa,ce=!0)),hi.isClosed&&(lo=bi,$r=Xi,n0(Fe,De,lo,$r,Rt,Kt,re,oe,we)&&(hi=t0(Rt,Kt,we,pt,b),hi<pt&&(pt=hi,ce=!0)))}}z=x-a,ne=E-y,re=Math.sqrt(z*z+ne*ne),re!==0&&(z/=re,ne/=re),b.x-=z*me,b.y-=ne*me,st.free(we)}else Et("Unknown Geometry type: "+ue.type);return ce?(this.transform.Ga(b),!0):!1};function t0(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function n0(a,y,x,E,b,z,ne,re,oe){if(nt.$(a,x)&&nt.$(y,E)||nt.$(b,ne)&&nt.$(z,re))return!1;var ue=!1,ce=(b-ne)*(y-E)-(z-re)*(a-x);return ce===0?!1:(oe.x=((b*re-z*ne)*(a-x)-(b-ne)*(a*E-y*x))/ce,oe.y=((b*re-z*ne)*(y-E)-(z-re)*(a*E-y*x))/ce,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(oe.y>a||nt.$(oe.y,a))&&(oe.y<y||nt.$(oe.y,y))&&(ue=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||nt.$(oe.x,y))&&(oe.x<a||nt.$(oe.x,a))&&(ue=!0)),ue)}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 E=this.strokeWidth/2,b=!1,z=st.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),st.free(z),b},Ne.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Yt.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var ne=st.alloc();if(ne.h(E,z),x.Ga(ne),this.gh(ne,!0)||(ne.h(b,z),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0)))return st.free(ne),!0;var re=st.alloc(),oe=st.alloc();return x.set(y),x.bv(this.transform),x.Vj(),re.x=b,re.y=z,re.transform(x),ne.x=E,ne.y=z,ne.transform(x),y=!1,qf(this,ne,re,oe)?y=!0:(ne.x=b,ne.y=a,ne.transform(x),qf(this,ne,re,oe)?y=!0:(re.x=E,re.y=a,re.transform(x),qf(this,ne,re,oe)?y=!0:(ne.x=E,ne.y=z,ne.transform(x),qf(this,ne,re,oe)&&(y=!0)))),st.free(ne),Yt.free(x),st.free(re),st.free(oe),y};function qf(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Ne.tx=function(a,y,x){function E(pt,it){for(var bt=pt.length,It=0;It<bt;It+=2)if(it.zd(pt[It],pt[It+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,re=ne.x,oe=ne.y,ue=ne.x+ne.width;if(ne=ne.y+ne.height,os(a.x,a.y,re,oe)<=b&&os(a.x,a.y,ue,oe)<=b&&os(a.x,a.y,re,ne)<=b&&os(a.x,a.y,ue,ne)<=b)return!0}if(re=y.startX,oe=y.startY,ue=y.endX,ne=y.endY,y.type===Qt.j){if(x=(re-ue)*(a.x-ue)+(oe-ne)*(a.y-ne),Na(a.x,a.y,re,oe,ue,ne)<=(0<=(ue-re)*(a.x-re)+(ne-oe)*(a.y-oe)&&0<=x?b:z))return!0}else{if(y.type===Qt.u)return y=!1,x&&(y=Na(a.x,a.y,re,oe,re,ne)<=b||Na(a.x,a.y,re,oe,ue,oe)<=b||Na(a.x,a.y,ue,oe,ue,ne)<=b||Na(a.x,a.y,re,ne,ue,ne)<=b),y;if(y.type===Qt.F){y=a.x-(re+ue)/2,z=a.y-(oe+ne)/2;var ce=Math.abs(ue-re)/2,me=Math.abs(ne-oe)/2;if(ce===0||me===0)return Na(a.x,a.y,re,oe,ue,ne)<=b;if(x){if(a=nt.$y(ce,me,y,z),a*a<=b)return!0}else return!(os(y,z,-ce,0)>=b||os(y,z,0,-me)>=b||os(y,z,0,me)>=b||os(y,z,ce,0)>=b)}else if(y.type===Qt.o){if(ue=y.bounds,z=ue.x,re=ue.y,oe=ue.x+ue.width,ue=ue.y+ue.height,a.x>oe&&a.x<z&&a.y>ue&&a.y<re&&Na(a.x,a.y,z,re,z,ue)>b&&Na(a.x,a.y,z,re,oe,re)>b&&Na(a.x,a.y,oe,ue,z,ue)>b&&Na(a.x,a.y,oe,ue,oe,re)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?Bi(y,a.x,a.y,z):mr(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],ne=z.startX,ce=z.startY,a.zd(ne,ce)>b)return!1;for(re=z.segments.s,oe=re.length,ue=0;ue<oe;ue++)switch(me=re[ue],me.type){case ji:case Ai:if(ne=me.endX,ce=me.endY,a.zd(ne,ce)>b)return!1;break;case Wr:var we=vi();if(nt.Qe(ne,ce,me.point1X,me.point1Y,me.point2X,me.point2Y,me.endX,me.endY,.8,we),ne=E(we,a),Ti(we),ne||(ne=me.endX,ce=me.endY,a.zd(ne,ce)>b))return!1;break;case zo:if(we=vi(),nt.ep(ne,ce,me.point1X,me.point1Y,me.endX,me.endY,.8,we),ne=E(we,a),Ti(we),ne||(ne=me.endX,ce=me.endY,a.zd(ne,ce)>b))return!1;break;case Br:case Er:we=me.type===Br?pr(me,z):vr(me,z,ne,ce);var Fe=we.length;if(Fe===0){if(ne=me.type===Br?me.centerX:me.endX,ce=me.type===Br?me.centerY:me.endY,a.zd(ne,ce)>b)return!1;break}me=null;for(var De=vi(),_e=0;_e<Fe;_e++)if(me=we[_e],De.length=0,nt.Qe(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],.8,De),E(De,a))return Ti(De),!1;Ti(De),me!==null&&(ne=me[6],ce=me[7]);break;default:Et("Unknown Segment type: "+me.type)}}return!0}}}return!1},Ne.qc=function(){this.ua=null},Ne.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=nm,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Io):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Ji(1-Io.x,Io.y)))}Co.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=qd[a.toArrow];else a.fromArrow!=="None"?E=qd[a.fromArrow]:(E=nt.Ze[a.figure],typeof E=="string"&&(E=nt.Ze[E]),E===void 0&&Et("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=nt.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function y1(a){var y=qd[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=qd[x],y===void 0){var E=null,b;for(b in nt.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=Qt.parse(nt.um[E],!1),qd[E]=a,x!==E&&(qd[x]=E),E}}return typeof y=="string"?y:y instanceof Qt?a:null}Qe.Object.defineProperties(Co.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),Se(this)&&(a=this.part,a!==null&&rs(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Qt.parse(a);var y=a.normalize();this.geometry=a,this.position=a=st.allocAt(-y.x,-y.y),st.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&&yf(a,"Shape.fill"),a instanceof ha&&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&&yf(a,"Shape.stroke"),a instanceof ha&&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 Kn(a,"value >= 0",Co,"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"?Kn(a,'"butt", "round", or "square"',Co,"strokeCap"):(Qf(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"?Kn(a,'"miter", "bevel", or "round"',Co,"strokeJoin"):(Qf(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){Qf(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||Et("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(Qf(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=nt.Ze[a];typeof x=="function"?x=a:(x=nt.Ze[a.toLowerCase()])||Et("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=y1(a);x===null?Et("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new no),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(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=y1(a);x===null?Et("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new no),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Fi},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Qf(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Fi},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Qf(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&&(Qf(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:so},set:function(a){var y=this.geometryStretch;y!==a&&(Qf(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 eh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Xc(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 eh),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 eh),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 eh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Co.prototype.intersectsRect=Co.prototype.Yc,Co.prototype.containedInRect=Co.prototype.fh,Co.prototype.getNearestIntersectionPoint=Co.prototype.rs,Co.prototype.getDocumentBounds=Co.prototype.mi,Co.prototype.getDocumentPoint=Co.prototype.ga;var qd=new yr,Tv=new yr;Co.className="Shape",Co.getFigureGenerators=function(){var a=new Ki,y;for(y in nt.Ze)y!==y.toLowerCase()&&a.add(y,nt.Ze[y]);return a.freeze(),a},Co.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=nt.Ze;E[a]=y,E[x]=a},Co.getArrowheadGeometries=function(){var a=new Ki;for(E in nt.um)if(qd[E]===void 0){var y=Qt.parse(nt.um[E],!1);qd[E]=y,y=E.toLowerCase(),y!==E&&(qd[y]=E)}for(var x in qd)if(x!==x.toLowerCase()){var E=qd[x];E instanceof Qt&&a.add(x,E)}return a.freeze(),a},Co.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Qt.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Et("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=qd;E[a]=x,E[y]=a};function kv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=so,this.gg=this.fg=Fi}kv.prototype.copy=function(){var a=new kv;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function es(a,y){return Vt.call(this),s0||(ju=As?new Gl(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}$t(es,Vt),es.prototype.cloneProtected=function(a){Vt.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 Dd(a){a.da===null?a.da=new Wv:a.da.nc&&(a.da=a.da.copy())}Ne=es.prototype,Ne.th=function(){Vt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function x1(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===es?this.wrap=a:Vt.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(){Vt.prototype.v.call(this)},Ne.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,ne=Yp(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 ue=this.isStrikethrough;Ds(this,a,this.xc,!0,!1,x,E),(oe||ue)&&Ds(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ce=this.oe,me=ce.dx-(ne*ce.m21+ce.dx);ce=ce.dy-(ne*ce.m22+ce.dy);var we=y.scale;switch(8>(me*me+ce*ce)*we*we&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ia&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,me=this.spacingBelow,this.flip){case ea:a.translate(b,0),a.scale(-1,1);break;case Bo:a.translate(0,z),a.scale(1,-1);break;case _a:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ce=this.Gc,we=(y+ne+me)*ce,z>we&&(E=this.verticalAlignment,E=E.y*z-E.y*we+E.offsetY),ce===1&&this.ze!==null)me=this.Cb,me>b&&(me=b),this.Oj(this.ze,a,0,E+y,b,ne,me,x,re,oe,ue);else if(this.Qc!==null&&this.Qb!==null)for(we=0;we<ce;we++){var Fe=this.Qc[we];Fe>b&&(Fe=b),E+=y,this.Oj(this.Qb[we],a,0,E,b,ne,Fe,x,re,oe,ue),E+=ne+me}switch(this.flip){case ea:a.scale(-1,1),a.translate(-b,0);break;case Bo:a.scale(1,-1),a.translate(0,-z);break;case _a:a.scale(-1,-1),a.translate(-b,-z)}}},Ne.Oj=function(a,y,x,E,b,z,ne,re,oe,ue,ce){var me=0;if(re)oe==="left"?me=0:oe==="right"?me=b-ne:oe==="center"&&(me=(b-ne)/2),y.fillRect(x+me,E+.25*z,ne,1);else{if(oe==="left"?me=0:oe==="right"?me=b:oe==="center"&&(me=b/2),b=i0!==null?i0(this,z):.75*z,y.fillText(a,x+me,E+b),a=z/20|0,a===0&&(a=1),oe==="right"?me-=ne:oe==="center"&&(me-=ne/2),ue){re=r0!==null?r0(this,z):.8*z,oe=x+me,ue=E+re,b=x+me+ne,re=E+re;var we=a;y.beginPath(),y.lineWidth=we,y.moveTo(oe,ue),y.lineTo(b,re),y.stroke(),y.Se(),y instanceof Ia&&y.ad.classList.add("gojs-td")}ce&&(ce=E+z-z/2.2|0,a%2!==0&&(ce+=.5),E=x+me,z=ce,x=x+me+ne,ne=ce,me=a,y.beginPath(),y.lineWidth=me,y.moveTo(E,z),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Ia&&y.ad.classList.add("gojs-td"))}},Ne.kk=function(a,y,x){if(!Vt.prototype.kk.call(this,a,y,x))return!1;if(Ds(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++)_u(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,_u(a,y,!0);return!0},Ne.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Vt.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,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;ju!==null&&F1!==z&&(F1=ju.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),z.length===0)z=8;else if(this.isMultiline){for(var re=ne=0,oe=!1;!oe;){var ue=z.indexOf(`
`,re);ue===-1&&(ue=z.length,oe=!0),re=z.substr(re,ue-re),this.formatting===Xp&&(re=re.trim()),ne=Math.max(ne,qc(re)),re=ue+1}z=ne}else ne=z.indexOf(`
`,0),0<=ne&&(z=z.substr(0,ne)),z=qc(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),ne=P1(this,z),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,oe=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===o0&&(y=this.Ae,y=this.overflow===o0?S1(y):0,ue=this.spacingAbove+this.spacingBelow,ue=Math.max(0,Yp(this)+ue),oe=Math.min(this.maxLines-1,Math.max(Math.floor(oe/ue+.01)-1,0)),!(oe+1>=this.Qb.length))){for(this.l|=16777216,ue=this.Qb[oe],y=Math.max(1,a-y);qc(ue)>y&&1<ue.length;)ue=ue.substr(0,ue.length-1);ue+=Jp,y=qc(ue),this.Qb[oe]=ue,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===w1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),ne=Math.max(E,ne),Ss(this.dc,z,ne),this.Ge(0,0,z,ne),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Ne.eh=function(a,y,x,E){ru(this,a,y,x,E)};function Up(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,E){var b=a.formatting===Xp;b&&(y=y.trim());var z=0,ne=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,Yp(a)+re);var oe=a.overflow===o0?S1(ne):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,re);else if(ne=y,a.wrap===_v){a.Le=1;var ue=qc(y);if(oe===0||ue<=x)a.Cb=Math.max(a.Cb,ue),Up(a,y,a.Cb),E!==null&&E.h(ue,re);else{for(z=dp(a,ne),ne=ne.substr(z.length),y=dp(a,ne),ue=qc(z+y);0<y.length&&ue<=x;)z+=y,ne=ne.substr(y.length),y=dp(a,ne),ue=z+y,b&&(ue=ue.trim()),ue=qc(ue);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);qc(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=Jp;var ce=qc(z);a.Cb=ce,Up(a,z,ce),E!==null&&E.h(ce,re)}}else{for(oe=0,ne.length===0&&(oe=1,Up(a,ne,0));0<ne.length;){for(y=dp(a,ne),ne=ne.substr(y.length);qc(y)>x;){var me=1;for(ue=qc(y.substr(0,me)),ce=0;ue<=x;)me++,ce=ue,ue=qc(y.substr(0,me));if(me===1){var we=ue;z=Math.max(z,ue)}else we=ce,z=Math.max(z,ce);if(me--,1>me&&(me=1),Up(a,y.substr(0,me),we),oe++,y=y.substr(me),a.Gc+oe>a.maxLines)break}for(ce=dp(a,ne),ue=qc(y+ce);0<ce.length&&ue<=x;)y+=ce,ne=ne.substr(ce.length),ce=dp(a,ne),ue=y+ce,b&&(ue=ue.trim()),ue=qc(ue);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ce.length===0?(me=ue,z=Math.max(z,ue)):(me=ce=qc(y),z=Math.max(z,ce)),Up(a,y,me),oe++,a.Gc+oe>a.maxLines))break}a.Le=Math.min(a.maxLines,oe),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,re*a.Le)}}function dp(a,y){if(a.wrap===C1)return y.substr(0,1);for(var x=y.length,E=0,b=xS;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===E1&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function qc(a){return ju===null?8*a.length:ju.measureText(a).width}function Yp(a){if(a.df!==null)return a.df;var y=a.Ae;if(ju===null){var x=16;return a.df=x}return Zv[y]!==void 0&&5e3>b1?x=Zv[y]:(x=1.3*ju.measureText("M").width,Zv[y]=x,b1++),a.df=x}function S1(a){if(ju===null)return 6;if(a0[a]!==void 0&&5e3>Hv)var y=a0[a];else y=ju.measureText(Jp).width,a0[a]=y,Hv++;return y}function P1(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,Yp(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,ne,re=!1;!re;){if(ne=x.indexOf(`
`,z),ne===-1&&(ne=x.length,re=!0),z<=ne){if(z=x.substr(z,ne-z),a.wrap!==_v){a.Le=0;var oe=pi.alloc();Rv(a,z,y,oe),b+=oe.height,pi.free(oe),a.Gc+=a.Le}else Rv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=ne+1}return a.Lq=b}Qe.Object.defineProperties(es.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"||(Dd(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:ii},set:function(a){var y=this.flip;y!==a&&(Dd(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ma},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Dd(this),this.da.Yr=a,uu(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=pi.alloc();Rv(this,this.ec,999999,a);var y=a.width;pi.free(a),a=P1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Ss(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:jv},set:function(a){var y=this.wrap;y!==a&&(Dd(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:zv},set:function(a){var y=this.overflow;y!==a&&(Dd(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&&yf(a,"TextBlock.stroke"),a instanceof ha&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Yp(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&&(Dd(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&&(Dd(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 eh),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 eh),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 eh),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 eh),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 eh),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&&(Dd(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&&(Dd(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&&(Dd(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&&(Dd(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Xp},set:function(a){var y=this.formatting;y!==a&&(Dd(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&&Kn(a,"> 0",es,"maxLines"),Dd(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,_v=new Cn(es,"None",0),w1=new Cn(es,"WrapFit",1),jv=new Cn(es,"WrapDesiredSize",2),C1=new Cn(es,"WrapBreakAll",3),zv=new Cn(es,"OverflowClip",0),o0=new Cn(es,"OverflowEllipsis",1),Xp=new Cn(es,"FormatTrim",0),E1=new Cn(es,"FormatNone",0),xS=/[ \u200b\u00ad]/,Zv=new yr,b1=0,a0=new yr,Hv=0,Jp="...",F1="",ju=null,s0=!1;es.className="TextBlock";function Wv(){this.nc=!1,this.Hd=null,this.Xf=ii,this.gq=Xp,this.Jq=1/0,this.$q=zv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ma,this.$r=jv}Wv.prototype.copy=function(){var a=new Wv;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},es.getEllipsis=function(){return Jp},es.setEllipsis=function(a){Jp=a,a0=new yr,Hv=0},es.getBaseline=function(){return i0},es.setBaseline=function(a){i0=a},es.getUnderline=function(){return r0},es.setUnderline=function(a){r0=a},es.isValidFont=function(a){if(s0||(ju=As?new Gl(null).context:null,s0=!0),ju===null)return!0;var y=ju.font;if(a===y||a==="10px sans-serif")return!0;ju.font="10px sans-serif",ju.font=a;var x=ju.font;if(x!=="10px sans-serif")return ju.font=y,!0;ju.font="19px serif";var E=ju.font;return ju.font=a,x=ju.font,ju.font=y,x!==E},es.FormatNone=E1,es.FormatTrim=Xp,es.None=_v,es.OverflowClip=zv,es.OverflowEllipsis=o0,es.WrapBreakAll=C1,es.WrapDesiredSize=jv,es.WrapFit=w1;function eh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}eh.prototype.copy=function(){var a=new eh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},eh.className="GradElementSettings";function zu(a,y){Vt.call(this),this.Eg=null,this.qo="",this.Xg=Ea,this.Nk=si,this.Zg=this.Hd=null,this.Mk=Oo,this.Xf=ii,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;$t(zu,Vt),zu.prototype.cloneProtected=function(a){Vt.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},zu.prototype.qb=function(a){a===ii||a===tr||a===Zo?this.imageStretch=a:Vt.prototype.qb.call(this,a)},zu.prototype.toString=function(){return"Picture("+this.source+")#"+nr(this)};function fp(a){a===void 0&&(a=""),a!==""?hp[a]&&(delete hp[a],l0--):(hp=new yr,l0=0)}function B1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",ne=b.Og.I(z);if(ne!==null)for(var re=ne.length,oe=0;oe<re;oe++)z=ne[oe],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(yt(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",ne=b.Og.I(z);if(ne!==null){b=ne.length,z=vi();for(var re=0;re<b;re++)z.push(ne[re]);if(y.hn)for(re=0;re<b;re++)ne=z[re],ne.Hd!==null&&ne.Hd(ne,x);Ti(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}zu.prototype.hA=function(){if(this.source!==""){fp(this.source);var a=this.source;this.source="",this.source=a}},zu.prototype.redraw=function(){this.N(),this.Uc=!0},zu.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof fd)){var b=a instanceof Ia;E=this.naturalBounds;var z=0,ne=0,re=this.qn,oe=re?+x.width:x.naturalWidth;if(re=re?+x.height:x.naturalHeight,oe===void 0&&x.videoWidth&&(oe=x.videoWidth),re===void 0&&x.videoHeight&&(re=x.videoHeight),oe=oe||E.width,re=re||E.height,oe!==0&&re!==0){var ue=oe,ce=re;this.sourceRect.w()&&(z=this.Xg.x,ne=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var me=oe,we=re,Fe=this.Nk,De=this.Mk;switch(Fe){case ii:if(this.sourceRect.w())break;me>=E.width&&(z=z+De.offsetX+(me*De.x-E.width*De.x)),we>=E.height&&(ne=ne+De.offsetY+(we*De.y-E.height*De.y)),oe=Math.min(E.width,me),re=Math.min(E.height,we);break;case si:me=E.width,we=E.height;break;case tr:case Zo:Fe===tr?(Fe=Math.min(E.height/we,E.width/me),me*=Fe,we*=Fe):Fe===Zo&&(Fe=Math.max(E.height/we,E.width/me),me*=Fe,we*=Fe,me>=E.width&&(z=(z+De.offsetX+(me*De.x-E.width*De.x)/me)*oe),we>=E.height&&(ne=(ne+De.offsetY+(we*De.y-E.height*De.y)/we)*re),oe*=1/(me/E.width),re*=1/(we/E.height),me=E.width,we=E.height)}Fe=this.Df()*y.scale;var _e=me*Fe*we*Fe,pt=oe*re/_e,it=x.__goCache;Fe=null;var bt=SS;if(!b){if(x.sq&&it!==void 0&&4<_e&&pt>bt*bt)for(it.gi===null&&(L1(it,4,ue,ce,x),L1(it,16,ue,ce,x)),b=it.gi,ue=b.length,ce=0;ce<ue&&b[ce].ratio*b[ce].ratio<pt;ce++)Fe=b[ce];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Gl(null).context;try{b.drawImage(this.Eg,0,0)}catch(It){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(It){this.vl=!0}}if(this.vl)return}}switch(b=me<E.width?De.offsetX+(E.width*De.x-me*De.x):0,De=we<E.height?De.offsetY+(E.height*De.y-we*De.y):0,this.flip){case ea:a.translate(Math.min(E.width,me),0),a.scale(-1,1);break;case Bo:a.translate(0,Math.min(E.height,we)),a.scale(1,-1);break;case _a:a.translate(Math.min(E.width,me),Math.min(E.height,we)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&it!==void 0&&Fe!==null&&Fe.ratio!==1){a.save(),y=Fe.ratio;try{a.drawImage(Fe.source,z/y,ne/y,Math.min(Fe.source.width,oe/y),Math.min(Fe.source.height,re/y),b,De,Math.min(E.width,me),Math.min(E.height,we)),a instanceof Ia&&(this.bt=[z/y,ne/y,Math.min(Fe.source.width,oe/y),Math.min(Fe.source.height,re/y),b,De,Math.min(E.width,me),Math.min(E.height,we)])}catch(It){this.en=!1}a.restore()}else try{a.drawImage(x,z,ne,oe,re,b,De,Math.min(E.width,me),Math.min(E.height,we)),a instanceof Ia&&(this.bt=[z,ne,oe,re,b,De,Math.min(E.width,me),Math.min(E.height,we)])}catch(It){this.en=!1}switch(this.flip){case ea:a.scale(-1,1),a.translate(-Math.min(E.width,me),0);break;case Bo:a.scale(1,-1),a.translate(0,-Math.min(E.height,we));break;case _a:a.scale(-1,-1),a.translate(-Math.min(E.width,me),-Math.min(E.height,we))}}}}},zu.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=fu(this,!0),ne=this.Eg,re=this.qn,oe=0,ue=0;(re||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(oe=re?+ne.width:ne.naturalWidth,ue=re?+ne.height:ne.naturalHeight),isFinite(b.width)||z===si||z===dr?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=oe)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:oe),isFinite(b.height)||z===si||z===Mr?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=ue)),E=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:ue),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Ss(this.dc,a,y),this.Ge(0,0,a,y)},zu.prototype.eh=function(a,y,x,E){ru(this,a,y,x,E)},Qe.Object.defineProperties(zu.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||Et("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&vg(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Yn),E!==null&&x&&yh(E,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(yt(this,!1),this.v())):x&&B1(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(As){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<l0&&(fp(),x=hp),E=Qn("img"),E.hn=!0,B1(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,l0++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new M1),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}}}),zu.prototype.redraw=zu.prototype.redraw,zu.prototype.reloadSource=zu.prototype.hA;var l0=0,SS=4;zu.className="Picture",hp=new yr,zu.clearCache=fp;function M1(){this.gi=null}function L1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Gl(null),ne=z.context,re=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new N1(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),ne.setTransform(re*x,0,0,re*x,0,0),ne.yc(),ne.drawImage(b,0,0),a.gi.push(y))}M1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function gp(){this.os=new Qt,this.mc=null}gp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Qt,this.mc=null};function pp(a,y,x,E,b,z){a.mc=new So,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function PS(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 E=new fr(ji);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},gp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new fr(Ai);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Kh(a,y,x,E,b,z,ne){var re;re===void 0&&(re=!1);var oe=new fr(Wr);oe.point1X=y,oe.point1Y=x,oe.point2X=E,oe.point2Y=b,oe.endX=z,oe.endY=ne,re&&oe.close(),a.mc.segments.add(oe)}function u0(a,y,x,E,b){var z;z===void 0&&(z=!1);var ne=new fr(zo);ne.point1X=y,ne.point1Y=x,ne.endX=E,ne.endY=b,z&&ne.close(),a.mc.segments.add(ne)}gp.prototype.arcTo=function(a,y,x,E,b,z,ne){z===void 0&&(z=0),ne===void 0&&(ne=!1);var re=new fr(Br);re.startAngle=a,re.sweepAngle=y,re.centerX=x,re.centerY=E,re.radiusX=b,re.radiusY=z!==0?z:b,ne&&re.close(),this.mc.segments.add(re)};function wS(a,y,x,E,b,z,ne,re){var oe;oe===void 0&&(oe=!1),y=new fr(Er,ne,re,y,x,E,b,z),oe&&y.close(),a.mc.segments.add(y)}function A1(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 cu(a,y){var x=a.toLowerCase(),E=nt.Ze;E[a]=y,E[x]=a}cu("Rectangle",function(a,y,x){a="r"+y+","+x;var E=nt.Mf[a];return E!==void 0||(E=new Qt(Qt.u),E.endX=y,E.endY=x,nt.Nf<nt.vm&&(nt.Mf[a]=E,nt.Nf++)),E}),cu("Square",function(a,y,x){a="s"+y+","+x;var E=nt.Mf[a];return E!==void 0||(E=new Qt(Qt.u),E.endX=y,E.endY=x,E.defaultStretch=tr,nt.Nf<nt.vm&&(nt.Mf[a]=E,nt.Nf++)),E}),cu("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var E="rr"+y+","+x+","+a,b=nt.Mf[E];if(b!==void 0)return b;var z=a*nt.wg;return b=new Qt().add(new So(a,0,!0).add(new fr(Ai,y-a,0)).add(new fr(Wr,y,a,y-z,0,y,z)).add(new fr(Ai,y,x-a)).add(new fr(Wr,y-a,x,y,x-z,y-z,x)).add(new fr(Ai,a,x)).add(new fr(Wr,0,x-a,z,x,0,x-z)).add(new fr(Ai,0,a)).add(new fr(Wr,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Ji(0,0,z,z),b.spot2=new Ji(1,1,-z,-z)),nt.Nf<nt.vm&&(nt.Mf[E]=b,nt.Nf++),b}),cu("Border","RoundedRectangle"),cu("Ellipse",function(a,y,x){a="e"+y+","+x;var E=nt.Mf[a];return E!==void 0||(E=new Qt(Qt.F),E.endX=y,E.endY=x,E.spot1=Da,E.spot2=Ha,nt.Nf<nt.vm&&(nt.Mf[a]=E,nt.Nf++)),E}),cu("Circle",function(a,y,x){a="c"+y+","+x;var E=nt.Mf[a];return E!==void 0||(E=new Qt(Qt.F),E.endX=y,E.endY=x,E.spot1=Da,E.spot2=Ha,E.defaultStretch=tr,nt.Nf<nt.vm&&(nt.Mf[a]=E,nt.Nf++)),E}),cu("TriangleRight",function(a,y,x){return new Qt().add(new So(0,0).add(new fr(Ai,y,.5*x)).add(new fr(Ai,0,x).close())).pm(0,.25,.5,.75)}),cu("TriangleDown",function(a,y,x){return new Qt().add(new So(0,0).add(new fr(Ai,y,0)).add(new fr(Ai,.5*y,x).close())).pm(.25,0,.75,.5)}),cu("TriangleLeft",function(a,y,x){return new Qt().add(new So(y,x).add(new fr(Ai,0,.5*x)).add(new fr(Ai,y,0).close())).pm(.5,.25,1,.75)}),cu("TriangleUp",function(a,y,x){return new Qt().add(new So(y,x).add(new fr(Ai,0,x)).add(new fr(Ai,.5*y,0).close())).pm(.25,.5,.75,1)}),cu("Triangle","TriangleUp"),cu("Diamond",function(a,y,x){return new Qt().add(new So(.5*y,0).add(new fr(Ai,0,.5*x)).add(new fr(Ai,.5*y,x)).add(new fr(Ai,y,.5*x).close())).pm(.25,.25,.75,.75)}),cu("LineH",function(a,y,x){return a=new Qt(Qt.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),cu("LineV",function(a,y,x){return a=new Qt(Qt.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),cu("None","Rectangle"),cu("BarH","Rectangle"),cu("BarV","Rectangle"),cu("MinusLine","LineH"),cu("PlusLine",function(a,y,x){return new Qt().add(new So(0,x/2,!1).add(new fr(Ai,y,x/2)).add(new fr(ji,y/2,0)).add(new fr(Ai,y/2,x)))}),cu("XLine",function(a,y,x){return new Qt().add(new So(0,x,!1).add(new fr(Ai,y,0)).add(new fr(ji,0,0)).add(new fr(Ai,y,x)))}),cu("LineRight",function(a,y,x){return new Qt().add(new So(.25*y,0,!1).add(new fr(Ai,.75*y,.5*x)).add(new fr(Ai,.25*y,x)))}),cu("LineDown",function(a,y,x){return new Qt().add(new So(0,.25*x,!1).add(new fr(Ai,.5*y,.75*x)).add(new fr(Ai,y,.25*x)))}),cu("LineLeft",function(a,y,x){return new Qt().add(new So(.75*y,0,!1).add(new fr(Ai,.25*y,.5*x)).add(new fr(Ai,.75*y,x)))}),cu("LineUp",function(a,y,x){return new Qt().add(new So(0,.75*x,!1).add(new fr(Ai,.5*y,.25*x)).add(new fr(Ai,y,.75*x)))}),nt.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 Gv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Qa,this.ir=null,this.jr="",this.lr=Fi,this.Gq="",this.Hq=Us,this.Pq=va,this.Kq=Ma,this.Up=null,this.Cq=127,this.zr=hs,this.yr="gray",this.Vg=4}Gv.prototype.copy=function(){var a=new Gv;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 xr(a,y){a===void 0||a instanceof ll||typeof a=="string"?ui.call(this,a):(ui.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 st(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Mn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}$t(xr,ui),xr.prototype.cloneProtected=function(a){ui.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=xr.prototype,Ne.Af=function(a){ui.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Ne.toString=function(){var a=Li(this.constructor)+"#"+nr(this);return this.data!==null&&(a+="("+sr(this.data)+")"),a};function Zu(a){a.P===null?a.P=new Gv:a.P.nc&&(a.P=a.P.copy())}Ne.th=function(){ui.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Ne.gk=function(a,y,x,E,b,z,ne){var re=this.diagram;re!==null&&(a===xa&&y==="elements"?b instanceof ui?Jf(b,function(oe){vy(re.partManager,oe),zh(re,oe)}):yh(re,b):a===Wa&&y==="elements"&&(b instanceof ui?Jf(b,function(oe){yy(re.partManager,oe,re)}):vg(re,b)),re.cb(a,y,x,E,b,z,ne))},Ne.La=function(a){if(ui.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof ui&&Jf(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},xr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},xr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},xr.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new Ki),y.Tf!==a&&(y.category=a),E.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},xr.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},xr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=vi();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Ti(y)}},xr.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 ho?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof pa))break e;Zc(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=ui.Link),x.adornedObject=y)}if(x!==null){x.type===ui.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(CS(this,a),y=this.adornments;y.next();)y.value.La()}},xr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function $v(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function CS(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function d0(a){if(Pf(a)===!1){Vv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function D1(a){if(a.G|=2097152,Pf(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||T1(a,y,x),x=a.Ib;var E=Mn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Mn.free(E),Vv(a,!1)}}xr.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Yt);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},xr.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Oo;this.locationSpot.sb()&&(z=this.locationSpot);var ne=st.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(ne),ne.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else ne.yi(y,x,E,b,z);a.rotate(this.Kb,ne.x,ne.y),st.free(ne)}},xr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},xr.prototype.moveTo=function(a,y,x){a=st.allocAt(a,y),this.move(a,x),st.free(a)},xr.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())},xr.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())},xr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Ki),y.I(a)!==null)return y.I(a);var x=ui.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Vh(a,y,x,E){E===void 0&&(E=new st),x=x.Mc()?Oo:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}xr.prototype.mi=function(a){return a===void 0&&(a=new Mn),a.assign(this.actualBounds)},xr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function I1(a){var y=st.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Co?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function eg(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=c1(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,z+=ne,y+=ne,E-=ne/2,b-=ne/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}xr.prototype.arrange=function(){if(kt(this)===!1)D1(this);else{Ht(this,!1);var a=this.Ib,y=Mn.alloc();y.assign(a);var x=wf(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;T1(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||nt.B(y.width,a.width)&&nt.B(y.height,a.height)||0<=this.vw&&this.C(16),Mn.free(y),Vv(this,!1)}},Ne=xr.prototype,Ne.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Mn.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),Mn.free(b)}!(this.G&65536)&&a.D(y)||_1(this,E,x),x.N(),!a.w()&&!y.w()||Ol(a,y)||(this instanceof Ni&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Ne.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&O1(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new st(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),Pf(this)===!1&&kt(this)===!1&&(d0(this),D1(this)),!0};function O1(a,y,x,E,b){y===null||a instanceof pa||(y=y.animationManager,y.zb&&_c(y,a,new st(E,b),x))}Ne.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;Pf(this)||kt(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}d0(this)},Ne.Av=function(){this.G&=-2097153,d0(this)};function T1(a,y,x){var E=I1(a),b=a.diagram,z=x.w(),ne=y.w();z&&ne?a.G&2097152?k1(a,y,x,b,E):R1(a,y,x,b,E):z?k1(a,y,x,b,E):ne&&R1(a,y,x,b,E),a.G|=2097152,st.free(E),a.Uk()}function k1(a,y,x,E,b){var z=y.x,ne=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof pa||_c(x,a,new st(z,ne),y),E||y.x===z&&y.y===ne||a.g("position",new st(z,ne),y.copy()))}function R1(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function _1(a,y,x){Uv(a,!1),a instanceof Ni&&Sh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?wf(a)?(eu(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(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 Kv(a,y,x,E){y.constructor===a.constructor||Z1||(Z1=!0,Ei('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Ei(" Old class: "+Li(a.constructor)+", new class: "+Li(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,ne=a.isHighlighted,re=!0,oe=!0,ue=!1;a instanceof Ni&&(re=a.isTreeLeaf,oe=a.isTreeExpanded,ue=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof Ni&&(a.U=re?a.U|4:a.U&-5,a.U=oe?a.U|1:a.U&-2,a.U=ue?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}xr.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},xr.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},xr.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},xr.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},xr.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},xr.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},xr.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},xr.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},xr.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 Pf(a){return(a.G&32768)!==0}function Vv(a,y){a.G=y?a.G|32768:a.G&-32769}function Uv(a,y){a.G=y?a.G|65536:a.G&-65537}function wf(a){return(a.G&131072)!==0}Ne=xr.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&&!kt(this)&&!Pf(this)&&this.isVisible()&&this.Ib.w()&&a.N(eg(this,this.Ib))},Ne.v=function(){ui.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Ni&&this.labeledLink!==null&&uu(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 Yv(this,this)};function Yv(a,y){var x=y.containingGroup;return x!==null?1+Yv(a,x):y instanceof Ni&&(y=y.labeledLink,y!==null)?Yv(a,y):0}Ne.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof Ni&&(x=y.labeledLink,x!==null)?j1(a,x):y}Ne.Td=function(a){return a instanceof ho?Xv(this,this,a):!1};function Xv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!Xv(a,E,x)?y instanceof Ni&&(y=y.labeledLink,y!==null)?Xv(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 ho&&h0(y,!0),y instanceof Ni){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 Ni&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof ho&&h0(y,!1),y instanceof Ni&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},xr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Ni&&this.isLinkLabel)},xr.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 Ni&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function Cf(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof pa)){if(a.add(y),y instanceof Ni){if(x&&y instanceof ho)for(var ne=y.memberParts;ne.next();)Cf(a,ne.value,x,E,b,z);if(b!==!1)for(ne=y.linksConnected;ne.next();){var re=ne.value;if(!a.contains(re)){var oe=re.fromNode,ue=re.toNode;oe=oe===null||a.contains(oe),ue=ue===null||a.contains(ue),(b?oe&&ue:oe||ue)&&Cf(a,re,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)Cf(a,y.value,x,E-1,b,z)}else if(y instanceof fi)for(y=y.labelNodes;y.next();)Cf(a,y.value,x,E,b,z)}}Qe.Object.defineProperties(xr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Ur:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var E=y.pc(-1,this,!0);if(0<=E&&x.cb(Wa,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(xa,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(Zu(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&&xc(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 pa?this.type!==ui.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:va},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Zu(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Ma},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Zu(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&&(Zu(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:Us},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Zu(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,kt(this)===!1&&(d0(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),O1(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof pa)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof pa?this instanceof pa&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Zc(x),x=x.copy(),x!==null&&Kv(this,x,y,a))):(z!==null&&z.jm(E,a),x=hx(x.partManager,E,a),x!==null&&(Zc(x),x=x.copy(),x===null||x instanceof fi||(E=this.location.copy(),Kv(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){Kv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(Zu(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&&(Zu(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&&(Zu(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 fi?(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&&(Zu(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&&(Zu(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&&(Zu(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:Qa},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Zu(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&&(Zu(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&&(Zu(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:Fi},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Zu(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&&Et("Cannot make a Group a member of itself: "+this.toString()),Et("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 ho&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ey(a,this):this instanceof ho&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof ho){for(x=new Yn,Cf(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Ni)for(E=E.linksConnected;E.next();)mp(E.value)}if(this instanceof Ni){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&&xc(y,-1,a))}}else Et("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&&(Zu(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Ni&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Zu(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&&(Zu(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:hs},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Zu(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&&(Zu(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&&(Zu(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),xr.prototype.invalidateLayout=xr.prototype.C,xr.prototype.findCommonContainingGroup=xr.prototype.px,xr.prototype.isMemberOf=xr.prototype.Td,xr.prototype.findTopLevelPart=xr.prototype.sz,xr.prototype.findSubGraphLevel=xr.prototype.oz,xr.prototype.ensureBounds=xr.prototype.Va,xr.prototype.getDocumentBounds=xr.prototype.mi,xr.prototype.findObject=xr.prototype.fb,xr.prototype.moveTo=xr.prototype.moveTo,xr.prototype.invalidateAdornments=xr.prototype.Wb,xr.prototype.clearAdornments=xr.prototype.Ej,xr.prototype.removeAdornment=xr.prototype.Jf,xr.prototype.addAdornment=xr.prototype.bh,xr.prototype.findAdornment=xr.prototype.Pj,xr.prototype.updateTargetBindings=xr.prototype.La;var Z1=!1;xr.className="Part",xr.LayoutNone=0,xr.LayoutAdded=1,xr.LayoutRemoved=2,xr.LayoutShown=4,xr.LayoutHidden=8,xr.LayoutNodeSized=16,xr.LayoutGroupLayout=32,xr.LayoutNodeReplaced=64,xr.LayoutStandard=127,xr.LayoutAll=16777215;function pa(a,y){a===void 0||a instanceof ll||typeof a=="string"?xr.call(this,a):(xr.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)}$t(pa,xr),pa.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},pa.prototype.updateRelationshipsFromData=function(){},pa.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof fi&&y instanceof Co){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof Co&&(b.ua=a)}}},pa.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!kt(a))},pa.prototype.Zc=function(){return!1},pa.prototype.gk=function(a,y,x,E,b,z,ne){if(a===xa&&y==="elements"){if(b instanceof Cu)this.$a===null&&(this.$a=b);else if(b instanceof ui){var re=b.Nl(function(oe){return oe instanceof Cu});re instanceof Cu&&this.$a===null&&(this.$a=re)}}else a===Wa&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof ui&&this.$a.rg(E)&&(this.$a=null));xr.prototype.gk.call(this,a,y,x,E,b,z,ne)},pa.prototype.updateAdornments=function(){},pa.prototype.Lj=function(){},Qe.Object.defineProperties(pa.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}}}),pa.className="Adornment";function Jv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=jl,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 Ni(a,y){a===void 0||a instanceof ll||typeof a=="string"?xr.call(this,a):(xr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Un,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}$t(Ni,xr),Ni.prototype.cloneProtected=function(a){xr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Ne=Ni.prototype,Ne.Af=function(a){xr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Uh(a){a.Ba===null?a.Ba=new Jv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Ne.th=function(){xr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function H1(a,y){y!==null&&(a.af===null&&(a.af=new Yn),a.af.add(y))}function W1(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Ne.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},Ne.gk=function(a,y,x,E,b,z,ne){a===xa&&y==="elements"?this.wc=null:a===Wa&&y==="elements"&&(this.wc=null),xr.prototype.gk.call(this,a,y,x,E,b,z,ne)},Ne.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(dc(x.fromPort),dc(x.toPort),x.bb())}};function G1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(dc(x.fromPort),dc(x.toPort),x.bb())}}function dc(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||dc(y.port)}}Ne.si=function(){return!0},Ni.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Ni.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Ni.prototype.isVisible=function(){if(!xr.prototype.isVisible.call(this))return!1;var a=!0,y=Ld,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Ld){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Ks){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===Ch&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},Ni.prototype.Zb=function(a){xr.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},Ni.prototype.qx=function(){var a=new Yn,y=new Yn;return $1(this,this,a,y),y.iterator};function $1(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(b?ne.fromNode===y:ne.toNode===y)&&$1(a,b?ne.toNode:ne.fromNode,x,E):E.add(ne)})}}Ni.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Tr(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Ne=Ni.prototype,Ne.Mo=function(a){a===void 0&&(a=null);var y=new Tr(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Ne.Sd=function(a){a===void 0&&(a=null);var y=new Tr(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Ne.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Yn,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Yn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new zr(x):Ur},Ne.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Yn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new zr(x):Ur},Ne.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Yn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new zr(x):Ur},Ne.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Tr(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Ne.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Tr(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function f0(a,y,x){dc(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,ne=a.diagram;ne!==null&&(z=ne.aa,ne.aa=!0),b(a,y,x),ne!==null&&(ne.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function g0(a,y,x){dc(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=ne)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):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 E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}Ni.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Ne=Ni.prototype,Ne.Vo=function(a){xr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&ex(a,this))},Ne.Wo=function(a){xr.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 E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,xr.prototype.Lj.call(this)},Ne.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;K1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function K1(a){a.wc===null?a.wc=new Ki:a.wc.clear(),a.qm(a,function(y,x){V1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function V1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Qv(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=vi()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Ti(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 E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},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 E=x.value;if(E.isTreeLink&&(a=E.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},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 Ni)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,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new Yn;return a(this,y),y},Ne.uz=function(){return U1(this,this)};function U1(a,y){return y=y.pg(),y===null?0:1+U1(a,y)}Ne.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Tr(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Ne.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Un,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Un,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new zr(x):Ur},Ne.wz=function(a){a===void 0&&(a=1/0);var y=new Yn;return Cf(y,this,!1,a,!0),y},Ni.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 Yn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ld),y.Ue=!1}};function Y1(a,y,x,E,b,z,ne){if(1<E)for(var re=x?a.Mo():a.Sd();re.next();){var oe=re.value;oe.isTreeLink&&(oe=oe.To(a),oe===null||oe===a||y.contains(oe)||(y.add(oe),Y1(oe,y,x,E-1,b,z,ne)))}else X1(a,y,x,b,z,ne)}function X1(a,y,x,E,b,z){for(var ne=b===a?!0:a.isTreeExpanded,re=x?a.Mo():a.Sd(),oe={};re.next();){var ue=re.value;if(ue.isTreeLink&&(ue=ue.To(a),ue!==null&&ue!==a)){var ce=y.contains(ue);if(ce||y.add(ue),ne){var me=x?ue.Oo():ue.Po();oe.uv=a,me.all(function(we){return function(Fe){return Fe===we.uv||!Fe.isTreeExpanded}}(oe))&&E.Aj(ue,b),ue.oh(),ue.Zb(!1)}ue.isTreeExpanded&&(ue.wasTreeExpanded=ue.isTreeExpanded,ce||X1(ue,y,x,E,b,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}Ni.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 Yn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ld),y.Ue=!1}};function J1(a,y,x,E,b,z,ne){for(var re=z===a?!1:a.isTreeExpanded,oe=x?a.Mo():a.Sd(),ue={};oe.next();){var ce=oe.value;if(ce.isTreeLink&&(re||ce.fd||ce.bb(),ce=ce.To(a),ce!==null&&ce!==a&&!y.contains(ce))){if(y.add(ce),!re){ce.Zb(!0),ce.oh();var me=x?ce.Oo():ce.Po();ue.vv=a,me.all(function(we){return function(Fe){return Fe===we.vv||!Fe.isTreeExpanded}}(ue))&&b.Cj(ce,z)}(2<E||ce.wasTreeExpanded)&&(ce.wasTreeExpanded=!1,J1(ce,y,x,E-1,b,z,ne))}ue={vv:ue.vv}}a.isTreeExpanded=!0}Qe.Object.defineProperties(Ni.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:p0},set:function(a){var y=this.portSpreading;y!==a&&(Uh(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:jl},set:function(a){typeof a=="number"&&(a=new hr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Uh(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&&(Uh(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&&(Uh(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&&(Uh(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var ne=z.wa(E);ne!==void 0&&z.Qx(b,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(ex(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),uu(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&K1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(Uh(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))}}}),Ni.prototype.expandTree=Ni.prototype.expandTree,Ni.prototype.collapseTree=Ni.prototype.collapseTree,Ni.prototype.findTreeParts=Ni.prototype.wz,Ni.prototype.findTreeChildrenNodes=Ni.prototype.Ou,Ni.prototype.findTreeChildrenLinks=Ni.prototype.Qo,Ni.prototype.findTreeLevel=Ni.prototype.uz,Ni.prototype.findTreeParentChain=Ni.prototype.vz,Ni.prototype.findTreeParentNode=Ni.prototype.pg,Ni.prototype.findTreeParentLink=Ni.prototype.kh,Ni.prototype.findCommonTreeParent=Ni.prototype.gz,Ni.prototype.findTreeRoot=Ni.prototype.xz,Ni.prototype.isInTreeOf=Ni.prototype.Nz,Ni.prototype.findPort=Ni.prototype.ns,Ni.prototype.findLinksTo=Ni.prototype.kz,Ni.prototype.findLinksBetween=Ni.prototype.jz,Ni.prototype.findNodesInto=Ni.prototype.Oo,Ni.prototype.findNodesOutOf=Ni.prototype.Po,Ni.prototype.findNodesConnected=Ni.prototype.Mu,Ni.prototype.findLinksInto=Ni.prototype.Sd,Ni.prototype.findLinksOutOf=Ni.prototype.Mo,Ni.prototype.findExternalTreeLinksConnected=Ni.prototype.qx,Ni.prototype.invalidateConnectedLinks=Ni.prototype.Bd,Ni.prototype.invalidateLinkBundle=Ni.prototype.Lz;var ES=new Cn(Ni,"SpreadingNone",10),p0=new Cn(Ni,"SpreadingEvenly",11),qv=new Cn(Ni,"SpreadingPacked",12);Ni.className="Node",Ni.SpreadingNone=ES,Ni.SpreadingEvenly=p0,Ni.SpreadingPacked=qv;function ho(a,y){a===void 0||a instanceof ll||typeof a=="string"?Ni.call(this,a):(Ni.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Yn,this.$a=null,this.Sc=new xs,this.Sc.group=this,this.gl=new Yn,this.tb=this.$p=null,y&&Object.assign(this,y)}$t(ho,Ni),ho.prototype.cloneProtected=function(a){Ni.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Cu});y instanceof Cu?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=ho.prototype,Ne.Af=function(a){Ni.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 Ni)x.Bd(y);else if(x instanceof fi)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Ne.gk=function(a,y,x,E,b,z,ne){if(a===xa&&y==="elements"){if(b instanceof Cu)this.$a===null?this.$a=b:this.$a!==b&&Et("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof ui){var re=b.Nl(function(oe){return oe instanceof Cu});re instanceof Cu&&(this.$a===null?this.$a=re:this.$a!==re&&Et("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Wa&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof ui&&this.$a.rg(E)&&(this.$a=null));Ni.prototype.gk.call(this,a,y,x,E,b,z,ne)},Ne.Xl=function(a,y){Ni.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==ui.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof ui&&(a=a.Pb()),this.tb===null&&(this.tb=new Mn),a.mi(this.tb),a instanceof Co&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Ne.eh=function(a,y,x,E){this.nf=this.$a,Ni.prototype.eh.call(this,a,y,x,E)},Ne.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof fi||y.Va()}),Ni.prototype.Va.call(this)},Ne.si=function(){if(!Ni.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Ni){if(y.isVisible()&&kt(y))return!1}else if(y instanceof fi&&y.isVisible()&&kt(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ey(a,y){if(a.Gn.add(y)){y instanceof ho&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof fi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function ty(a,y){if(a.Gn.remove(y)){y instanceof ho&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof fi&&!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)}Ni.prototype.Lj.call(this)},ho.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Ln(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},ho.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Ln(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},ho.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=ho.prototype,Ne.Bd=function(a){var y=(this.U&65536)!==0;if(Ni.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?(dc(x.fromPort),dc(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(dc(x.fromPort),dc(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 Yn,E=y.iterator;E.next();){var b=E.value;if(b instanceof Ni)for(b=b.linksConnected;b.next();){var z=b.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 Yn,x=a.iterator;x.next();){var E=x.value;if(E instanceof Ni)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Ne.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Yn;return a(this,y),y},Ne.Rj=function(){var a=new Yn;return Cf(a,this,!0,0,!0),a.remove(this),a},Ne.Zb=function(a){Ni.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},ho.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof ho&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,Q1(z,y,x,E)),z instanceof Ni)z.Bd(y),x.Aj(z,E);else if(z instanceof fi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}ho.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();q1(this,y,a,this),a.Ue=!1}};function q1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof ho&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,q1(z,y,x,E)),z instanceof Ni)z.Bd(y),x.Cj(z,E);else if(z instanceof fi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}ho.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=st.alloc(),Ni.prototype.move.call(this,a,y),a=new Yn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof fi&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof Ni&&b.isLinkLabel)){var ne=b.position,re=b.location;ne.w()?(z.x=ne.x+E,z.y=ne.y+x,b.position=z):re.w()&&(z.x=re.x+E,z.y=re.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof fi&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(ne=b.position,z.x=ne.x+E,z.y=ne.y+x,z.w()?b.move(z):b.bb(),iy(b)&&b.bb());st.free(z)}},Qe.Object.defineProperties(ho.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&&Et("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&&(Uh(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&&(Uh(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&&(Uh(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(Uh(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)}}}),ho.prototype.expandSubGraph=ho.prototype.expandSubGraph,ho.prototype.collapseSubGraph=ho.prototype.collapseSubGraph,ho.prototype.findSubGraphParts=ho.prototype.Rj,ho.prototype.findContainingGroupChain=ho.prototype.hz,ho.prototype.findExternalNodesConnected=ho.prototype.iz,ho.prototype.findExternalLinksConnected=ho.prototype.Lu,ho.prototype.ensureBounds=ho.prototype.Va,ho.className="Group";function Cu(a){Vt.call(this),this.yb=sl,this.ko=new Mn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}$t(Cu,Vt),Cu.prototype.cloneProtected=function(a){Vt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Cu.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Ba(0,0,y.width,y.height,a.x,a.y)},Cu.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof ho||a instanceof pa)||Et("Placeholder is not inside a Group or Adornment."),a instanceof ho){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Ss(E,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=st.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),st.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var ne=0;z instanceof Co&&(ne=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,ue=(oe.width+ne)*re;ne=(oe.height+ne)*re,a.type!==ui.Link&&(re=z.ga(a.category==="Selection"?Us:a.locationSpot,st.alloc()),a.location=re,st.free(re)),isNaN(ue)||isNaN(ne)?(a=z.ga(Us,st.alloc()),ue=Mn.allocAt(a.x,a.y,0,0),ue.Ye(z.ga(Nn,a)),ue.Ye(z.ga(Tl,a)),ue.Ye(z.ga(zl,a)),Ss(y,ue.width+E||0,ue.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),st.free(a),Mn.free(ue)):(Ss(y,ue+E||0,ne+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Cu.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},Cu.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof ho&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=Mn.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof ho&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),Mn.free(x),E&&y instanceof ho&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Cu.prototype.computeMemberBounds=function(a){if(!(this.part instanceof ho))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,ne=y.memberParts;ne.next();){var re=ne.value;if(re.isVisible()){if(re instanceof fi&&(!y.computesBoundsIncludingLinks||Pt(re)||re.fromNode===y||re.toNode===y))continue;re=re.actualBounds,re.left<x&&(x=re.left),re.top<E&&(E=re.top),re.right>b&&(b=re.right),re.bottom>z&&(z=re.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},Qe.Object.defineProperties(Cu.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new hr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Cu.className="Placeholder";function fi(a){xr.call(this,ui.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Eu,this.Om=0,this.Qm=Eu,this.Rm=NaN,this.qj=ay,this.po=.5,this.wd=null,this.Nb=new Un().freeze(),this.Tg=this.Mg=null,this.ml=new Mn,this.ua=new Qt,this.u=this.o=this.Sf=this.Wf=null,this.su=new st,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}$t(fi,xr),fi.prototype.cloneProtected=function(a){xr.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=fi.prototype,Ne.Af=function(a){xr.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&&dc(y),a=a.toPort,a!==null&&dc(a)},Ne.qb=function(a){a.classType===fi?(a.value&2)===2?this.routing=a:a===Ec||a===Xh||a===yp?this.curve=a:a===tm||a===P0||a===w0?this.adjusting=a:a!==ay&&a!==Eu&&Et("Unknown Link enum value for a Link property: "+a):xr.prototype.qb.call(this,a)},Ne.Xc=function(){this.ba===null&&(this.ba=new yo)},Ne.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),kt(a)||Pf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),kt(a)||Pf(a)))},Ne.zv=function(){return!1},Ne.Av=function(){},Ne.Zc=function(){return!1},fi.prototype.computeAngle=function(a,y,x){return fi.computeAngle(y,x)},fi.computeAngle=function(a,y){switch(a){default:case Eu: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=nt.bp(y),90<a&&270>a&&(a-=180);break;case om:a=nt.bp(y+90),90<a&&270>a&&(a-=180);break;case am:a=nt.bp(y-90),90<a&&270>a&&(a-=180);break;case E0:if(a=nt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return nt.bp(a)};function mp(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&ty(x,a),a.Ah=y,y!==null&&ey(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,ne=a.diagram;ne!==null&&(z=ne.aa,ne.aa=!0),b(a,x,y),ne!==null&&(ne.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Ne=fi.prototype,Ne.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&xr.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 ex(a,y){a.wd===null&&(a.wd=new Yn),a.wd.add(y),a.v()}Ne.Vo=function(a){if(xr.prototype.Vo.call(this,a),tg(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 E=this.toPort;x===a&&E===y||f0(x,this,E)}qp(this)}},Ne.Wo=function(a){if(xr.prototype.Wo.call(this,a),tg(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 E=this.toPort;x===a&&E===y||g0(x,this,E)}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))},fi.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},fi.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?xr.prototype.move.call(this,a,!1):(a=st.allocAt(x.x+E,x.y+b),xr.prototype.move.call(this,a,!1),st.free(a)),Yh(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},fi.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},fi.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},fi.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Ga),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Ec))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()===Ec){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return nt.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),nt.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=ne[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},fi.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()===Ec))return this.ua.wx(.5);if(this.computeCurve()===Ec&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var E=this.i(x+2);return x=this.i(x+3),nt.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Ne=fi.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 st(y,x))},Ne.Kz=function(a,y){this.Nb.Gb(a,y)},Ne.m=function(a,y,x){this.Nb.Gb(a,new st(y,x))},Ne.ne=function(a){this.Nb.add(a)},Ne.yf=function(a,y){this.Nb.add(new st(a,y))},Ne.pv=function(a){this.Nb.mb(a)},Ne.Fj=function(){this.Nb.clear()};function Yh(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var E=a.fd,b=new Un,z=a.Nb.iterator;z.next();){var ne=z.value;b.add(new st(ne.x+y,ne.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),uu(a)),E?m0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&is(ne.animationManager,a,b),a.g("points",z,b)}}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,E=1/0,b=a.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];x=Math.min(re.x,x),E=Math.min(re.y,E)}re=ne=1/0;for(var oe=y.s,ue=oe.length,ce=0;ce<ue;ce++){var me=oe[ce];ne=Math.min(me.x,ne),re=Math.min(me.y,re),me.freeze()}if(y.freeze(),ue===z){for(z=0;z<ue;z++)if(ce=b[z],me=oe[z],ce.x-x!==me.x-ne||ce.y-E!==me.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&is(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),S0(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()}}},fi.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Tg||(Tg=new Ni,Tg.desiredSize=io,Tg.Va()),this.defaultFromPoint&&(Tg.location=this.defaultFromPoint,Tg.Va(),y=a=Tg)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var E=this.toNode,b=null;if(E===null?(kg||(kg=new Ni,kg.desiredSize=io,kg.Va()),this.defaultToPoint&&(kg.location=this.defaultToPoint,kg.Va(),b=E=kg)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var re=vp(ne),oe=vp(x),ue=y===b&&y!==null,ce=this.isOrthogonal,me=this.curve===Ec;this.Wf=ue&&!ce?me=!0:!1;var we=this.computeAdjusting()===Eu||ue;if(!ce&&!ue&&re&&oe){if(re=!1,!we&&3<=z&&(we=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=this.adjustPoints(0,we,z-1,oe))&&(we=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,we,z-1,oe)),!re)if(this.Fj(),me){z=this.getLinkPoint(a,y,ne,!0,!1,E,b),we=this.getLinkPoint(E,b,x,!1,!1,a,y),re=we.x-z.x,oe=we.y-z.y,ue=this.computeCurviness(),me=ce=0;var Fe=z.x+re/3,De=z.y+oe/3,_e=Fe,pt=De;nt.B(oe,0)?pt=0<re?pt-ue:pt+ue:(ce=-re/oe,me=Math.sqrt(ue*ue/(ce*ce+1)),0>ue&&(me=-me),_e=(0>oe?-1:1)*me+Fe,pt=ce*(_e-Fe)+De),Fe=z.x+2*re/3,De=z.y+2*oe/3;var it=Fe,bt=De;nt.B(oe,0)?bt=0<re?bt-ue:bt+ue:(it=(0>oe?-1:1)*me+Fe,bt=ce*(it-Fe)+De),this.Fj(),this.ne(z),this.yf(_e,pt),this.yf(it,bt),this.ne(we),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,we=b,E=this.getLinkPoint(a,y,ne,!0,!1,z,we),b=this.getLinkPoint(z,we,x,!1,!1,a,y),this.hasCurviness()?(we=b.x-E.x,x=b.y-E.y,ne=this.computeCurviness(),a=E.x+we/2,y=E.y+x/2,z=a,re=y,nt.B(x,0)?re=0<we?re-ne:re+ne:(we=-we/x,z=Math.sqrt(ne*ne/(we*we+1)),0>ne&&(z=-z),z=(0>x?-1:1)*z+a,re=we*(z-a)+y),this.ne(E),this.yf(z,re),this.ne(b)):(this.ne(E),this.ne(b),re=Mn.alloc(),y.mi(re),oe=re.ca(b),we.mi(re),ue=re.ca(E),(oe||ue)&&(ne=y.ga(y0(ne),new st),this.dd(0,this.getLinkPointFromPoint(a,y,ne,b,!0,ne)),x=we.ga(y0(x),new st),this.dd(1,this.getLinkPointFromPoint(z,we,x,E,!1,x))),Mn.free(re))}else{me=this.isAvoiding,we&&(ce&&me||ue)&&this.Fj();var It=ue?this.computeCurviness():0;me=this.getLinkPoint(a,y,ne,!0,ce,E,b),Fe=_e=De=0,(ce||!re||ue)&&(pt=this.computeEndSegmentLength(a,y,ne,!0),Fe=this.getLinkDirection(a,y,me,ne,!0,ce,E,b),ue&&(re||ne.D(x)||!ce&&ne.x+x.x===1&&ne.y+x.y===1)&&(Fe-=ce?90:30,0>It&&(Fe-=180)),0>Fe?Fe+=360:360<=Fe&&(Fe-=360),ue&&(pt+=Math.abs(It)*(ce?1:2)),Fe===0?De=pt:Fe===90?_e=pt:Fe===180?De=-pt:Fe===270?_e=-pt:(De=pt*Math.cos(Fe*Math.PI/180),_e=pt*Math.sin(Fe*Math.PI/180)),ne.Mc()&&ue&&(pt=y.ga(Oo,st.alloc()),it=st.allocAt(pt.x+1e3*De,pt.y+1e3*_e),this.getLinkPointFromPoint(a,y,pt,it,!0,me),st.free(pt),st.free(it))),pt=this.getLinkPoint(E,b,x,!1,ce,a,y);var Rt=bt=it=0;if(ce||!oe||ue){var Kt=this.computeEndSegmentLength(E,b,x,!1);Rt=this.getLinkDirection(E,b,pt,x,!1,ce,a,y),ue&&(oe||ne.D(x)||!ce&&ne.x+x.x===1&&ne.y+x.y===1)&&(Rt+=ce?0:30,0>It&&(Rt+=180)),0>Rt?Rt+=360:360<=Rt&&(Rt-=360),ue&&(Kt+=Math.abs(It)*(ce?1:2)),Rt===0?it=Kt:Rt===90?bt=Kt:Rt===180?it=-Kt:Rt===270?bt=-Kt:(it=Kt*Math.cos(Rt*Math.PI/180),bt=Kt*Math.sin(Rt*Math.PI/180)),x.Mc()&&ue&&(x=b.ga(Oo,st.alloc()),ne=st.allocAt(x.x+1e3*it,x.y+1e3*bt),this.getLinkPointFromPoint(E,b,x,ne,!1,pt),st.free(x),st.free(ne))}x=me,(ce||!re||ue)&&(x=new st(me.x+De,me.y+_e)),ne=pt,(ce||!oe||ue)&&(ne=new st(pt.x+it,pt.y+bt)),!we&&!ce&&re&&3<z&&this.adjustPoints(0,me,z-2,ne)?this.dd(z-1,pt):!we&&!ce&&oe&&3<z&&this.adjustPoints(1,x,z-1,pt)?this.dd(0,me):!we&&(ce?6<=z:4<z)&&this.adjustPoints(1,x,z-2,ne)?(this.dd(0,me),this.dd(z-1,pt)):(this.Fj(),this.ne(me),(ce||!re||ue)&&this.ne(x),ce&&this.addOrthoPoints(x,Fe,ne,Rt,a,E),(ce||!oe||ue)&&this.ne(ne),this.ne(pt))}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}fi.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new st),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var ne=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*b;var re=-a.m12*b,oe=-a.m21*b,ue=a.m11*b,ce=b*(a.m21*a.dy-a.m22*a.dx),me=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*ne+E.y*oe+ce,E=E.x*re+E.y*ue+me,ne=x.x*ne+x.y*oe+ce,x=x.x*re+x.y*ue+me}return y.Sj(b,E,ne,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),lx(x,a)}fi.prototype.getLinkPoint=function(a,y,x,E,b,z,ne,re){if(re===void 0&&(re=new st),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),b&&this.routing===nx){var ue=v0(this,ne);if(ue!==null&&oe.Gl<ue.Gl){oe=st.alloc(),ue=st.alloc();var ce=new Mn(y.ga(Us,oe),y.ga(Nn,ue)),me=this.computeSpot(!E,ne);a=this.getLinkPoint(z,ne,me,!E,b,a,y,ue),(x.Hf(Qi)||x.Hf(Gi))&&a.y>=ce.y&&a.y<=ce.y+ce.height?re.y=a.y:(x.Hf(ai)||x.Hf(ki))&&a.x>=ce.x&&a.x<=ce.x+ce.width&&(re.x=a.x),st.free(oe),st.free(ue)}}return re}}return x=y.ga(y0(x),st.alloc()),this.pointsCount>(b?6:2)?(ne=E?this.i(1):this.i(this.pointsCount-2),b&&(ne=ny(x,ne.copy()))):(oe=this.computeSpot(!E,ne),z=st.alloc(),ne=ne.ga(y0(oe),z),b&&(ne=ny(x,ne)),st.free(z)),this.getLinkPointFromPoint(a,y,x,ne,E,re),st.free(x),re},fi.prototype.getLinkDirection=function(a,y,x,E,b,z,ne,re){e:if(E.sb())var oe=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(oe=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(Oo,st.alloc()),this.pointsCount>(z?6:2)?(re=b?this.i(1):this.i(this.pointsCount-2),re=z?ny(oe,re.copy()):x):(x=st.alloc(),re=re.ga(Oo,x),st.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,st.free(oe),oe=x}return E.Mc()&&ne.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),vp(E)||(a=y.li(),a===0)||(45<=a&&135>a?oe+=90:135<=a&&225>a?oe+=180:225<=a&&315>a&&(oe+=270),360<=oe&&(oe-=360)),oe},fi.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=v0(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},fi.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Oo:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Fi?Cs:y)):(a=y||this.toPort,a===null?a=Oo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Fi?Cs:y)),a};function vp(a){return a===Cs||a.x===.5&&a.y===.5}function y0(a){return a.x===.5&&a.y===.5?a:Oo}fi.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Eu&&4<this.pointsCount?this.computeMidPoint(new st):(a=y.Zn,a=a!==null?lx(a,this):null,a!==null?a.Zo:y.ga(Oo))},fi.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},fi.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=z;if(z===void 0&&(ne=Yt.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return Fv(this,y,x,b),z===void 0&&Yt.free(ne),!0;if(this.Yc(a,ne)){var re=!1;if(!this.isAtomic)for(var oe=this.O.s,ue=oe.length;ue--;){var ce=oe[ue];if(ce.visible||ce===this.locationObject){var me=ce.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=Yt.alloc(),me.set(ne),ce instanceof ui)re=ce.Cf(a,y,x,E,b,me);else if(this.path===ce){if(ce instanceof Co)if(re=a,we=E,ce.pickable===!1)re=!1;else if(me.multiply(ce.transform),we)e:{var Fe=re,De=me;if(ce.fh(Fe,De))re=!0;else{if(De===void 0&&(De=ce.transform,Fe.Re(ce.actualBounds))){re=!0;break e}re=Fe.left,we=Fe.right;var _e=Fe.top;Fe=Fe.bottom;var pt=st.alloc(),it=st.alloc(),bt=st.alloc(),It=Yt.alloc();It.set(De),It.bv(ce.transform),It.Vj(),it.x=we,it.y=_e,it.transform(It),pt.x=re,pt.y=_e,pt.transform(It),De=!1,qf(ce,pt,it,bt)?De=!0:(pt.x=we,pt.y=Fe,pt.transform(It),qf(ce,pt,it,bt)?De=!0:(it.x=re,it.y=Fe,it.transform(It),qf(ce,pt,it,bt)?De=!0:(pt.x=re,pt.y=_e,pt.transform(It),qf(ce,pt,it,bt)&&(De=!0)))),Yt.free(It),st.free(pt),st.free(it),st.free(bt),re=De}}else re=ce.fh(re,me)}else re=rl(ce,a,E,me);re&&(we=ce,y!==null&&(we=y(ce)),we&&(x===null||x(we))&&b.add(we)),Yt.free(me)}}}return z===void 0&&Yt.free(ne),re||this.background!==null||this.areaBackground!==null}return z===void 0&&Yt.free(ne),!1},fi.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?Ec:this.curve},fi.prototype.computeCorner=function(){if(this.curve===Ec)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},fi.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},fi.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rx;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,ne=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===nm||E===C0||E===sy?a=Math.max(a,b):E===rm||E===am||E===im||E===om?a=Math.max(a,ne):(y=y.ga(Oo).ab(x.ga(Oo))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*b)+1)),this.curve===Ec&&(a*=1.333)}}return a},fi.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Eu&&x.bb()}},fi.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=ix;var y=this.Sf;if(y!==null){for(var x=vi(),E=0,b=y.links,z=0;z<b.length;z++){var ne=b[z].computeSpacing();x.push(ne),E+=ne}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),Ti(x)}}return a},fi.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},fi.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},fi.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===P0)return!1;b===w0&&(b=tm)}switch(b){case P0:var z=this.i(a),ne=this.i(x);if(!z.Xa(y)||!ne.Xa(E)){b=z.x,z=z.y;var re=ne.x-b,oe=ne.y-z,ue=Math.sqrt(re*re+oe*oe);if(!nt.$(ue,0)){if(nt.$(re,0))var ce=0>oe?-Math.PI/2:Math.PI/2;else ce=Math.atan(oe/Math.abs(re)),0>re&&(ce=Math.PI-ce);ne=y.x;var me=y.y;re=E.x-ne;var we=E.y-me;for(oe=Math.sqrt(re*re+we*we),nt.$(re,0)?we=0>we?-Math.PI/2:Math.PI/2:(we=Math.atan(we/Math.abs(re)),0>re&&(we=Math.PI-we)),ue=oe/ue,ce=we-ce,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),re=y.x-b,oe=y.y-z,y=Math.sqrt(re*re+oe*oe),nt.$(y,0)||(nt.$(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+ce,y*=ue,this.L(a,ne+y*Math.cos(re),me+y*Math.sin(re)));this.dd(x,E)}}return!0;case w0:if(z=this.i(a),me=this.i(x),!z.Xa(y)||!me.Xa(E)){b=z.x,z=z.y,ne=me.x,me=me.y,ue=(ne-b)*(ne-b)+(me-z)*(me-z),re=y.x,ce=y.y,oe=E.x,we=E.y;var Fe=1;if(oe-re!==0){var De=(we-ce)/(oe-re);Fe=Math.sqrt(1+1/(De*De))}else De=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var _e=y.x,pt=y.y,it=.5;ue!==0&&(it=((b-_e)*(b-ne)+(z-pt)*(z-me))/ue);var bt=b+it*(ne-b),It=z+it*(me-z);y=Math.sqrt((_e-bt)*(_e-bt)+(pt-It)*(pt-It)),pt<De*(_e-bt)+It&&(y=-y),0<De&&(y=-y),_e=re+it*(oe-re),it=ce+it*(we-ce),De!==0?(y=_e+y/Fe,this.L(a,y,it-(y-_e)/De)):this.L(a,_e,it+y)}this.dd(x,E)}return!0;case tm:e:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),ne=this.i(a+2),re=z.x,ce=z.y,me=re,ue=ce,nt.B(b.y,z.y)?nt.B(z.x,ne.x)?ce=y.y:nt.B(z.y,ne.y)&&(re=y.x):nt.B(b.x,z.x)&&(nt.B(z.y,ne.y)?re=y.x:nt.B(z.x,ne.x)&&(ce=y.y)),this.L(a+1,re,ce),b=this.i(x),z=this.i(x-1),ne=this.i(x-2),re=z.x,ce=z.y,oe=re,we=ce,nt.B(b.y,z.y)?nt.B(z.x,ne.x)?ce=E.y:nt.B(z.y,ne.y)&&(re=E.x):nt.B(b.x,z.x)&&(nt.B(z.y,ne.y)?re=E.x:nt.B(z.x,ne.x)&&(ce=E.y)),this.L(x-1,re,ce),iy(this))){this.L(a+1,me,ue),this.L(x-1,oe,we),x=!1;break e}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},fi.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var ne=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var re=b.actualBounds.copy(),oe=z.actualBounds.copy();if(re.w()&&oe.w()){re.Bc(sm,sm),oe.Bc(sm,sm),re.Ye(a),oe.Ye(x);var ue=st.alloc(),ce=st.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&oe.right>a.x||E===90&&x.y>a.y&&oe.right>a.x?(ue.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),E===180?(ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ce.x=ue.x,ce.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(ue.x=a.x<oe.left?this.computeMidOrthoPosition(a.x,a.y,oe.left,x.y,!1):a.x<oe.right&&(E===270&&a.y<oe.top||E===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.right,ce.x=ue.x,ce.y=x.y):E===0&&a.x<oe.left&&a.y>oe.top&&a.y<oe.bottom&&(ue.x=a.x,ue.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ce.y=ue.y)):(ue.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===180&&(oe.ca(a)||re.ca(x))?ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?ue.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===180||E===270)&&(ue.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ce.x=x.x,ce.y=ue.y),ue.y>re.top&&ue.y<re.bottom&&(x.x>=re.left&&x.x<=a.x||a.x<=oe.right&&a.x>=x.x?(E===90||E===270)&&(ue.h(Math.max((a.x+x.x)/2,a.x),a.y),ce.h(ue.x,x.y)):(ue.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===0?re.bottom:Math.max(re.bottom,oe.bottom)),ce.x=x.x,ce.y=ue.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&oe.left<a.x||E===90&&x.y>a.y&&oe.left<a.x?(ue.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),E===0?(ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ce.x=ue.x,ce.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(ue.x=a.x>oe.right?this.computeMidOrthoPosition(a.x,a.y,oe.right,x.y,!1):a.x>oe.left&&(E===270&&a.y<oe.top||E===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.left,ce.x=ue.x,ce.y=x.y):E===180&&a.x>oe.right&&a.y>oe.top&&a.y<oe.bottom&&(ue.x=a.x,ue.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ce.y=ue.y)):(ue.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===0&&(oe.ca(a)||re.ca(x))?ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?ue.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===0||E===270)&&(ue.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ce.x=x.x,ce.y=ue.y),ue.y>re.top&&ue.y<re.bottom&&(x.x<=re.right&&x.x>=a.x||a.x>=oe.left&&a.x<=x.x?(E===90||E===270)&&(ue.h(Math.min((a.x+x.x)/2,a.x),a.y),ce.h(ue.x,x.y)):(ue.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===180?re.bottom:Math.max(re.bottom,oe.bottom)),ce.x=x.x,ce.y=ue.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&oe.bottom>a.y||E===0&&x.x>a.x&&oe.bottom>a.y?(ue.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),E===270?(ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ce.x=x.x,ce.y=ue.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(ue.y=a.y<oe.top?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.top,!0):a.y<oe.bottom&&(E===180&&a.x<oe.left||E===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.bottom,ce.x=x.x,ce.y=ue.y):E===90&&a.y<oe.top&&a.x>oe.left&&a.x<oe.right&&(ue.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),ue.y=a.y,ce.x=ue.x)):(ue.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===270&&(oe.ca(a)||re.ca(x))?ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?ue.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(ue.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ce.x=ue.x,ce.y=x.y),ue.x>re.left&&ue.x<re.right&&(x.y>=re.top&&x.y<=a.y||a.y<=oe.bottom&&a.y>=x.y?(E===0||E===180)&&(ue.h(a.x,Math.max((a.y+x.y)/2,a.y)),ce.h(x.x,ue.y)):(ue.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===90?re.right:Math.max(re.right,oe.right)),ce.x=ue.x,ce.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&oe.top<a.y||E===0&&x.x>a.x&&oe.top<a.y?(ue.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),E===90?(ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ce.x=x.x,ce.y=ue.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(ue.y=a.y>oe.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.bottom,!0):a.y>oe.top&&(E===180&&a.x<oe.left||E===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.top,ce.x=x.x,ce.y=ue.y):E===270&&a.y>oe.bottom&&a.x>oe.left&&a.x<oe.right&&(ue.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),ue.y=a.y,ce.x=ue.x)):(ue.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===90&&(oe.ca(a)||re.ca(x))?ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?ue.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(ue.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ce.x=ue.x,ce.y=x.y),ue.x>re.left&&ue.x<re.right&&(x.y<=re.bottom&&x.y>=a.y||a.y>=oe.top&&a.y<=x.y?(E===0||E===180)&&(ue.h(a.x,Math.min((a.y+x.y)/2,a.y)),ce.h(x.x,ue.y)):(ue.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===270?re.right:Math.max(re.right,oe.right)),ce.x=ue.x,ce.y=x.y)));var me=x;if(this.isAvoiding){var we=this.diagram;if(we===null||b===z||this.layer.isTemporary||!Kf(we)||re.ca(me)&&!z.Td(b)||oe.ca(a)&&!b.Td(z))y=!1;else{var Fe=gf(we,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Fe.Yj(Math.min(a.x,ue.x),Math.min(a.y,ue.y),Math.abs(a.x-ue.x),Math.abs(a.y-ue.y))&&Fe.Yj(Math.min(ue.x,ce.x),Math.min(ue.y,ce.y),Math.abs(ue.x-ce.x),Math.abs(ue.y-ce.y))&&Fe.Yj(Math.min(ce.x,me.x),Math.min(ce.y,me.y),Math.abs(ce.x-me.x),Math.abs(ce.y-me.y)))y=!1;else{b=a,z=me;var De=x=null;if(we.isVirtualized){we=Fe.bounds.copy(),we.Bc(-Fe.Ho,-Fe.Go);var _e=st.alloc();xp(Fe,a.x,a.y)||(nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,a.x,a.y,ue.x,ue.y,_e)?(x=a=_e.copy(),y=_e.ab(ue)):nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,ce.x,ce.y,_e)?(x=a=_e.copy(),y=_e.ab(ce)):nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ce.x,ce.y,me.x,me.y,_e)&&(x=a=_e.copy(),y=_e.ab(me))),xp(Fe,me.x,me.y)||(nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,me.x,me.y,ce.x,ce.y,_e)?(De=me=_e.copy(),E=ce.ab(_e)):nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ce.x,ce.y,ue.x,ue.y,_e)?(De=me=_e.copy(),E=ue.ab(_e)):nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,a.x,a.y,_e)&&(De=me=_e.copy(),E=a.ab(_e))),st.free(_e)}re=re.copy().ed(oe),re.Bc(Fe.Ho*Fe.Os,Fe.Go*Fe.Os),ax(Fe,a,y,me,E,re,!0),oe=th(Fe,me.x,me.y),!Fe.abort&&oe>=Sp&&(ox(Fe),re.Bc(Fe.Ho*Fe.Hx,Fe.Go*Fe.Ix),ax(Fe,a,y,me,E,re,!1),oe=th(Fe,me.x,me.y)),!Fe.abort&&oe<Sp&&th(Fe,me.x,me.y)!==Jh?(ry(this,Fe,me.x,me.y,E,!0,ne),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)):(ne=this.i(3),y===0||y===180?nt.B(re.x,ne.x)?(re=y===0?Math.max(re.x,a.x):Math.min(re.x,a.x),this.L(2,re,a.y),this.L(3,re,ne.y)):nt.B(re.y,ne.y)?(Math.abs(a.y-re.y)<=Fe.Go/2&&(this.L(2,re.x,a.y),this.L(3,ne.x,a.y)),this.m(2,re.x,a.y)):this.L(2,a.x,re.y):(y===90||y===270)&&(nt.B(re.y,ne.y)?(re=y===90?Math.max(re.y,a.y):Math.min(re.y,a.y),this.L(2,a.x,re),this.L(3,ne.x,re)):nt.B(re.x,ne.x)?(Math.abs(a.x-re.x)<=Fe.Ho/2&&(this.L(2,a.x,re.y),this.L(3,a.x,ne.y)),this.m(2,a.x,re.y)):this.L(2,re.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),De!==null&&(E===0||E===180?this.yf(z.x,De.y):this.yf(De.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ue.copy()),this.ne(ce.copy())),st.free(ue),st.free(ce)}},fi.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function 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=gf(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function ry(a,y,x,E,b,z,ne){var re=y.Ho,oe=y.Go,ue=th(y,x,E),ce=x,me=E;for(b===0?ce+=re:b===90?me+=oe:b===180?ce-=re:me-=oe,b!==ne&&ue>ng&&th(y,ce,me)!==ue-1&&(th(y,x-re,E)===ue-1?(b=180,ce=x-re,me=E):th(y,x+re,E)===ue-1?(b=0,ce=x+re,me=E):th(y,x,E-oe)===ue-1?(b=270,ce=x,me=E-oe):th(y,x,E+oe)===ue-1&&(b=90,ce=x,me=E+oe));ue>ng&&th(y,ce,me)===ue-1;)x=ce,E=me,b===0?ce+=re:b===90?me+=oe:b===180?ce-=re:me-=oe,--ue;z?ue>ng&&(b===180||b===0?x=Math.floor(x/re)*re+re/2:(b===90||b===270)&&(E=Math.floor(E/oe)*oe+oe/2)):(x=Math.floor(x/re)*re+re/2,E=Math.floor(E/oe)*oe+oe/2),ue>ng&&(z=b,ne=x,ce=E,b===0?(z=90,ce+=oe):b===90?(z=180,ne-=re):b===180?(z=270,ce-=oe):b===270&&(z=0,ne+=re),th(y,ne,ce)===ue-1?ry(a,y,ne,ce,z,!1,z):(ne=x,ce=E,b===0?(z=270,ce-=oe):b===90?(z=0,ne+=re):b===180?(z=90,ce+=oe):b===270&&(z=180,ne-=re),th(y,ne,ce)===ue-1&&ry(a,y,ne,ce,z,!1,z))),a.yf(x,E)}fi.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=Na(y,a,x.x,x.y,E.x,E.y),z=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var re=Na(y,a,E.x,E.y,x.x,x.y);E=x,re<b&&(z=ne,b=re)}return z},fi.prototype.qc=function(){this.lk=!1,this.v()},fi.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof Co&&(b.ua=this.ua)}}},fi.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&tg(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var ne=this.computeCurve();if(ne===Ec&&3<=y&&!nt.$(this.smoothness,0))if(y===3){var re=this.i(1);E=Math.min(b.x,re.x);var oe=Math.min(b.y,re.y);re=this.i(2),E=Math.min(E,re.x),oe=Math.min(oe,re.y)}else{if(this.isOrthogonal)for(oe=0;oe<y;oe++)re=E[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),oe=this.i(E),z.x=Math.min(oe.x,z.x),z.y=Math.min(oe.y,z.y);E=z.x,oe=z.y}else{for(oe=0;oe<y;oe++)re=E[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);E=z.x,oe=z.y}if(E-=this.su.x,oe-=this.su.y,b.x-=E,b.y-=oe,y!==2||tg(this)){if(a.type=Qt.o,re=A1(a),this.computeShortLength(!0)!==0&&(b=Ig(this,b,!0,z)),pp(re,b.x,b.y,!1),ne===Ec&&3<=y&&!nt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-oe,b=this.i(2).copy(),b.x-=E,b.y-=oe,this.computeShortLength(!1)!==0&&(b=Ig(this,b,!1,z)),Kh(re,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=st.allocAt(E,oe),x=st.alloc(),x.assign(this.i(1)),z=st.allocAt(E,oe),b=st.allocAt(E,oe),ne=this.i(0);for(var ue,ce=this.smoothness/3,me=1;me<this.pointsCount-1;me++){ue=this.i(me);var we=ne,Fe=ue,De=this.i(oy(this,ue,me,!1));if((!nt.$(we.x,Fe.x)||!nt.$(Fe.x,De.x))&&(!nt.$(we.y,Fe.y)||!nt.$(Fe.y,De.y))){var _e=ce;isNaN(_e)&&(_e=this.smoothness/3);var pt=we.x;we=we.y;var it=Fe.x;Fe=Fe.y;var bt=De.x;De=De.y;var It=_e*x0(pt,we,it,Fe);_e*=x0(it,Fe,bt,De),nt.$(we,Fe)&&nt.$(it,bt)&&(it>pt?De>Fe?(z.x=it-It,z.y=Fe-It,b.x=it+_e,b.y=Fe+_e):(z.x=it-It,z.y=Fe+It,b.x=it+_e,b.y=Fe-_e):De>Fe?(z.x=it+It,z.y=Fe-It,b.x=it-_e,b.y=Fe+_e):(z.x=it+It,z.y=Fe+It,b.x=it-_e,b.y=Fe-_e)),nt.$(pt,it)&&nt.$(Fe,De)&&(Fe>we?(bt>it?(z.x=it-It,z.y=Fe-It,b.x=it+_e):(z.x=it+It,z.y=Fe-It,b.x=it-_e),b.y=Fe+_e):(bt>it?(z.x=it-It,z.y=Fe+It,b.x=it+_e):(z.x=it+It,z.y=Fe+It,b.x=it-_e),b.y=Fe-_e)),(nt.$(pt,it)&&nt.$(it,bt)||nt.$(we,Fe)&&nt.$(Fe,De))&&(pt=.5*(pt+bt),we=.5*(we+De),z.x=pt,z.y=we,b.x=pt,b.y=we),(me===1||me===2&&nt.$(ne.x,this.i(0).x)&&nt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+ue.x),x.y=.5*(ne.y+ue.y)),Kh(re,x.x-E,x.y-oe,z.x-E,z.y-oe,ue.x-E,ue.y-oe),y.set(z),x.set(b),ne=ue}}ue=ne.x,ne=ne.y,ce=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ce=Ig(this,ce.copy(),!1,sa)),ue=.5*(ue+ce.x),ne=.5*(ne+ce.y),Kh(re,b.x-E,b.y-oe,ue-E,ne-oe,ce.x-E,ce.y-oe),st.free(y),st.free(x),st.free(z),st.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Ig(this,ne.copy(),!1,sa)),Kh(re,z.x-E,z.y-oe,b.x-E,b.y-oe,ne.x-E,ne.y-oe);else{for(z=st.alloc(),z.assign(this.i(0)),b=st.alloc(),b.assign(z),ne=this.computeCorner(),me=1,ue=0;me<y;){if(me=oy(this,z,me,1<me),ce=this.i(me),me>=y-1){if(!z.D(ce))this.computeShortLength(!1)!==0&&(ce=Ig(this,ce.copy(),!1,sa)),Og(this,re,-E,-oe,z,ce,x);else if(ue===0)for(me=1;me<y;)b.assign(z),ce=this.i(me++),Og(this,re,-E,-oe,z,ce,x),z.assign(ce);break}if(ue=oy(this,ce,me+1,me<y-3),me=-E,pt=-oe,we=ce,it=this.i(ue),_e=x,nt.B(z.y,we.y)&&nt.B(we.x,it.x))if(De=Math.min(ne,Math.abs(we.x-b.x)/2),De=It=Math.min(De,Math.abs(it.y-we.y)/2),nt.B(De,0))Og(this,re,me,pt,z,we,_e),z.assign(we);else{var Rt=we.x,Kt=we.y;Fe=Rt,bt=Kt,we.x>z.x?Rt=we.x-De:Rt=we.x+De,it.y>we.y?bt=we.y+It:bt=we.y-It,it=st.allocAt(Rt,Kt),Og(this,re,me,pt,z,it,_e),st.free(it),u0(re,we.x+me,we.y+pt,Fe+me,bt+pt),z.h(Fe,bt)}else nt.B(z.x,we.x)&&nt.B(we.y,it.y)?(De=Math.min(ne,Math.abs(we.y-b.y)/2),De=It=Math.min(De,Math.abs(it.x-we.x)/2),nt.B(It,0)?(Og(this,re,me,pt,z,we,_e),z.assign(we)):(Rt=we.x,Kt=we.y,Fe=Rt,bt=Kt,we.y>z.y?Kt=we.y-De:Kt=we.y+De,it.x>we.x?Fe=we.x+It:Fe=we.x-It,it=st.allocAt(Rt,Kt),Og(this,re,me,pt,z,it,_e),st.free(it),u0(re,we.x+me,we.y+pt,Fe+me,bt+pt),z.h(Fe,bt))):(Og(this,re,me,pt,z,we,_e),z.assign(we));b.assign(ce),me=ue}st.free(z)}c0=re}else re=this.i(1).copy(),re.x-=E,re.y-=oe,this.computeShortLength(!0)!==0&&(b=Ig(this,b,!0,z)),this.computeShortLength(!1)!==0&&(re=Ig(this,re,!1,z)),a.type=Qt.j,a.startX=b.x,a.startY=b.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function x0(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),nt.$(a,0)?y:nt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Ig(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=x0(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=x0(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function oy(a,y,x,E){for(var b=a.pointsCount,z=y;nt.$(y.x,z.x)&&nt.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!nt.$(y.x,z.x)&&!nt.$(y.y,z.y))return x-1;for(var ne=z;nt.$(y.x,z.x)&&nt.$(z.x,ne.x)&&(!E||(y.y>=z.y?z.y>=ne.y:z.y<=ne.y))||nt.$(y.y,z.y)&&nt.$(z.y,ne.y)&&(!E||(y.x>=z.x?z.x>=ne.x:z.x<=ne.x));){if(x>=b)return b-1;ne=a.i(x++)}return x-2}fi.prototype.computeJumpLength=function(){return 10};function Og(a,y,x,E,b,z,ne){if(!ne&&tg(a)){ne=a.computeJumpLength();var re=ne/2,oe=[],ue=0;if(a.isVisible()&&(ue=bS(a,b,z,oe)),0<ue){if(nt.B(b.y,z.y))if(b.x<z.x)for(var ce=0;ce<ue;){var me=Math.max(b.x,Math.min(oe[ce++]-re,z.x-ne));y.lineTo(me+x,z.y+E);for(var we=me+x,Fe=Math.min(me+ne,z.x);ce<ue&&(me=oe[ce],me<Fe+ne);)ce++,Fe=Math.min(me+re,z.x);me=z.y-ne+E,Fe+=x;var De=z.y+E;a.curve===Xh?pp(y,Fe,De,!1):Kh(y,we,me,Fe,me,Fe,De)}else for(--ue;0<=ue;){for(ce=Math.min(b.x,Math.max(oe[ue--]+re,z.x+ne)),y.lineTo(ce+x,z.y+E),we=ce+x,me=Math.max(ce-ne,z.x);0<=ue&&(ce=oe[ue],ce>me-ne);)ue--,me=Math.max(ce-re,z.x);ce=z.y-ne+E,me+=x,Fe=z.y+E,a.curve===Xh?pp(y,me,Fe,!1):Kh(y,we,ce,me,ce,me,Fe)}else if(nt.B(b.x,z.x))if(b.y<z.y)for(ce=0;ce<ue;){for(me=Math.max(b.y,Math.min(oe[ce++]-re,z.y-ne)),y.lineTo(z.x+x,me+E),we=me+E,me=Math.min(me+ne,z.y);ce<ue&&(Fe=oe[ce],Fe<me+ne);)ce++,me=Math.min(Fe+re,z.y);Fe=z.x-ne+x,De=z.x+x,me+=E,a.curve===Xh?pp(y,De,me,!1):Kh(y,Fe,we,Fe,me,De,me)}else for(--ue;0<=ue;){for(ce=Math.min(b.y,Math.max(oe[ue--]+re,z.y+ne)),y.lineTo(z.x+x,ce+E),we=ce+E,ce=Math.max(ce-ne,z.y);0<=ue&&(me=oe[ue],me>ce-ne);)ue--,ce=Math.max(me-re,z.y);me=z.x-ne+x,Fe=z.x+x,ce+=E,a.curve===Xh?pp(y,Fe,ce,!1):Kh(y,me,we,me,ce,Fe,ce)}}}y.lineTo(z.x+x,z.y+E)}function bS(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var ne=z.length,re=0;re<ne;re++){var oe=z[re];if(oe instanceof fi){if(oe===a)return 0<E.length&&E.sort(function(ce,me){return ce-me}),E.length;if(oe.isVisible()&&tg(oe)){var ue=oe.routeBounds;ue.w()&&a.routeBounds.Yc(ue)&&!a.usesSamePort(oe)&&(ue=oe.path,ue!==null&&ue.Ed()&&FS(y,x,E,oe))}}}}}return 0<E.length&&E.sort(function(ce,me){return ce-me}),E.length}function FS(a,y,x,E){for(var b=nt.B(a.y,y.y),z=E.pointsCount,ne=E.i(0),re=st.alloc(),oe=1;oe<z;oe++){var ue=E.i(oe);if(oe<z-1){var ce=E.i(oe+1);if(ne.y===ue.y&&ue.y===ce.y){if(ue.x>ne.x&&ce.x>=ue.x||ue.x<ne.x&&ce.x<=ue.x)continue}else if(ne.x===ue.x&&ue.x===ce.x&&(ue.y>ne.y&&ce.y>=ue.y||ue.y<ne.y&&ce.y<=ue.y))continue}e:{ce=a.x;var me=a.y,we=y.x,Fe=y.y,De=ne.x;ne=ne.y;var _e=ue.x,pt=ue.y;if(nt.B(ce,we)){if(!nt.B(me,Fe)&&nt.B(ne,pt)&&Math.min(me,Fe)<ne&&Math.max(me,Fe)>ne&&Math.min(De,_e)<ce&&Math.max(De,_e)>ce&&!nt.B(De,_e)){re.x=ce,re.y=ne,ce=!0;break e}}else if(nt.B(me,Fe)&&nt.B(De,_e)&&Math.min(ce,we)<De&&Math.max(ce,we)>De&&Math.min(ne,pt)<me&&Math.max(ne,pt)>me&&!nt.B(ne,pt)){re.x=De,re.y=me,ce=!0;break e}re.x=0,re.y=0,ce=!1}ce&&(b?x.push(re.x):x.push(re.y)),ne=ue}st.free(re)}function tg(a){return a=a.curve,a===yp||a===Xh}function S0(a,y){(y||tg(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()))}fi.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var ne=b.length,re=0;re<ne;re++){var oe=b[re];oe instanceof fi&&(oe===this?z=!0:z&&tx(this,oe,a))}}else if(E)for(z=b.Pa.s,b=z.length,ne=0;ne<b;ne++)re=z[ne],re instanceof fi&&tx(this,re,a)}}}}};function tx(a,y,x){if(y!==null&&y.lk&&y.fd&&tg(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}fi.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},fi.prototype.isVisible=function(){if(!xr.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},fi.prototype.Zb=function(a){if(xr.prototype.Zb.call(this,a),a&&S0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},fi.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 E=a.ff,b=a.vf,z=a=null,ne=y.jb.s,re=ne.length,oe=0;oe<re;oe++){var ue=ne[oe];(ue.ef===y&&ue.ff===E&&ue.uf===x&&ue.vf===b||ue.ef===x&&ue.ff===b&&ue.uf===y&&ue.vf===E)&&(z===null?z=ue:(a===null&&(a=[],a.push(z)),a.push(ue)))}if(a!==null){for(z=W1(y,x,E,b),z===null&&(z=new b0(y,E,x,b),H1(y,z),H1(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&&(Di(y.links,a),y.Sl()))}fi.prototype.ph=function(){return!0},Qe.Object.defineProperties(fi.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 E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ne)}a!==null&&(this.uf!==a&&f0(a,this,b),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&&dc(x),em(this),this.ff=a;var E=this.fromPort;E!==null&&dc(E);var b=this.diagram;if(b!==null){var z=this.data,ne=b.model;z!==null&&ne.ri()&&ne.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(ne=!0,b!==null&&(ne=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ne))),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 E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ne)}a!==null&&(this.ef!==a&&f0(a,this,b),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&&dc(x),em(this),this.vf=a;var E=this.toPort;E!==null&&dc(E);var b=this.diagram;if(b!==null){var z=this.data,ne=b.model;z!==null&&ne.ri()&&ne.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(ne=!0,b!==null&&(ne=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ne))),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:Fi},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&&dc(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&&Kn(a,">= 0",fi,"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:Fi},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&&dc(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&&Kn(a,">= 0",fi,"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?Ur: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 Co?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===Ec&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),nt.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var ne=this.i(z-2);z+3>=E&&(z=E-1);var re=this.i(z-1),oe=this.i(z);nt.Dl(b.x,b.y,ne.x,ne.y,re.x,re.y,oe.x,oe.y,.5,a),y=Math.min(oe.x,y),x=Math.min(oe.y,x),b=oe}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new st)}},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 E=this.i(x),b=this.i(x+1);nt.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):nt.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new Un,E=0;E<a.length/2;E++)b=new st(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!tn(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new Un,E=0;E<a.length;E++)b=a[E],x.add(new st(b.x,b.y).freeze())}}else if(a instanceof Un)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Et("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&&is(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(),S0(this,y===Xh||y===yp||a===Xh||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(),S0(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)}}}),fi.prototype.invalidateOtherJumpOvers=fi.prototype.Xo,fi.prototype.findClosestSegment=fi.prototype.ez,fi.prototype.updateRoute=fi.prototype.vg,fi.prototype.invalidateRoute=fi.prototype.bb,fi.prototype.rollbackRoute=fi.prototype.rv,fi.prototype.commitRoute=fi.prototype.zf,fi.prototype.startRoute=fi.prototype.uh,fi.prototype.clearPoints=fi.prototype.Fj,fi.prototype.removePoint=fi.prototype.pv,fi.prototype.addPointAt=fi.prototype.yf,fi.prototype.addPoint=fi.prototype.ne,fi.prototype.insertPointAt=fi.prototype.m,fi.prototype.insertPoint=fi.prototype.Kz,fi.prototype.setPointAt=fi.prototype.L,fi.prototype.setPoint=fi.prototype.dd,fi.prototype.getPoint=fi.prototype.i,fi.prototype.getOtherPort=fi.prototype.Cz,fi.prototype.getOtherNode=fi.prototype.To;var Tg=null,kg=null,ay=new Cn(fi,"Normal",1),BS=new Cn(fi,"Orthogonal",2),MS=new Cn(fi,"AvoidsNodes",6),nx=new Cn(fi,"AvoidsNodesStraight",7),Eu=new Cn(fi,"None",0),Ec=new Cn(fi,"Bezier",9),Xh=new Cn(fi,"JumpGap",10),yp=new Cn(fi,"JumpOver",11),tm=new Cn(fi,"End",17),P0=new Cn(fi,"Scale",18),w0=new Cn(fi,"Stretch",19),nm=new Cn(fi,"OrientAlong",21),im=new Cn(fi,"OrientPlus90",22),rm=new Cn(fi,"OrientMinus90",23),sy=new Cn(fi,"OrientOpposite",24),C0=new Cn(fi,"OrientUpright",25),om=new Cn(fi,"OrientPlus90Upright",26),am=new Cn(fi,"OrientMinus90Upright",27),E0=new Cn(fi,"OrientUpright45",28),ix=16,rx=14,sm=8;fi.className="Link",fi.Normal=ay,fi.Orthogonal=BS,fi.AvoidsNodes=MS,fi.AvoidsNodesStraight=nx,fi.None=Eu,fi.Bezier=Ec,fi.JumpGap=Xh,fi.JumpOver=yp,fi.End=tm,fi.Scale=P0,fi.Stretch=w0,fi.OrientAlong=nm,fi.OrientPlus90=im,fi.OrientMinus90=rm,fi.OrientOpposite=sy,fi.OrientUpright=C0,fi.OrientPlus90Upright=om,fi.OrientMinus90Upright=am,fi.OrientUpright45=E0,fi.EndSegmentStep=8,fi.CurvinessStart=ix,fi.SpacingMin=rx,fi.OrthoShortCut=sm;function b0(a,y,x,E){Ao(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}b0.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},b0.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))}},b0.className="LinkBundle";function lm(a){Ao(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,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=ly,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function xp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function th(a,y,x){return xp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):ly}function ox(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=ng&&(x[E]=ly)}lm.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===Jh)return!1}return!0};function nh(a,y,x,E,b,z,ne,re,oe){if(!(y<z||y>ne||x<re||x>oe)){var ue=y|0,ce=x|0,me=a.ac[ue][ce];if(me>=ng&&me<Sp)for(b?ce+=E:ue+=E,me+=1;z<=ue&&ue<=ne&&re<=ce&&ce<=oe&&!(me>=a.ac[ue][ce]);)a.ac[ue][ce]=me,me+=1,b?ce+=E:ue+=E;if(ue=b?ce:ue,b)if(0<E)for(x+=E;x<ue;x+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe);else for(x+=E;x>ue;x+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe);else if(0<E)for(y+=E;y<ue;y+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe);else for(y+=E;y>ue;y+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe)}}function F0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var ue=Jh,ce=ng;for(a.ac[y][x]=ce;ue===Jh&&y>z&&y<ne&&x>re&&x<oe;)ce+=1,a.ac[y][x]=ce,b?x+=E:y+=E,ue=a.ac[y][x]}function B0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var ue=Jh,ce=Sp;for(a.ac[y][x]=ce;ue===Jh&&y>z&&y<ne&&x>re&&x<oe;)a.ac[y][x]=ce,b?x+=E:y+=E,ue=a.ac[y][x]}function ax(a,y,x,E,b,z,ne){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(xp(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var ue=E.x,ce=E.y;if(xp(a,ue,ce))if(ue-=a.Nd,ue/=a.rc,ce-=a.Od,ce/=a.sc,1>=Math.abs(re-ue)&&1>=Math.abs(oe-ce))a.abort=!0;else{var me=z.x;E=z.y,y=z.x+z.width;var we=z.y+z.height;me-=a.Nd,me/=a.rc,E-=a.Od,E/=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,E|0)),we=Math.min(a.ei,Math.max(0,we|0)),E=a.ac,re|=0,oe|=0,ue|=0,ce|=0;var Fe=x===0||x===90?1:-1;if(x=x===90||x===270,E[re][oe]===Jh?(F0(a,re,oe,Fe,x,z,y,me,we),F0(a,re,oe,1,!x,z,y,me,we),F0(a,re,oe,-1,!x,z,y,me,we)):F0(a,re,oe,Fe,x,re,oe,re,oe),E[ue][ce]===Jh?(B0(a,ue,ce,b===0||b===90?1:-1,b===90||b===270,z,y,me,we),B0(a,ue,ce,1,!(b===90||b===270),z,y,me,we),B0(a,ue,ce,-1,!(b===90||b===270),z,y,me,we)):B0(a,ue,ce,Fe,x,ue,ce,ue,ce),x=vi(),ne&&sx(a,ue,ce,b,re,oe,x))for((x[0]!==ue||x[1]!==ce)&&(x.unshift(ce),x.unshift(ue)),(x[x.length-2]!==re||x[x.length-1]!==oe)&&(x.push(re),x.push(oe)),a=ng,b=x[x.length-2],ne=x[x.length-1],E[b][ne]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],ne=x[z+3],y=x[z],ue=x[z+1];y>b?b++:y<b?b--:ue>ne?ne++:ue<ne&&ne--,E[b][ne]=a++,b!==y||ne!==ue;);else nh(a,re,oe,1,!1,z,y,me,we),nh(a,re,oe,-1,!1,z,y,me,we),nh(a,re,oe,1,!0,z,y,me,we),nh(a,re,oe,-1,!0,z,y,me,we);Ti(x)}}}}function sx(a,y,x,E,b,z,ne){for(var re=a.ac,oe=y,ue=x;;){if(oe===b&&ue===z)return!0;var ce=oe,me=ue;if(E===0)if(ce<b)ce++;else break;else if(E===90)if(me<z)me++;else break;else if(E===180)if(ce>b)ce--;else break;else if(me>z)me--;else break;var we=re[ce][me];if(we===0||we===uy)break;oe=ce,ue=me}for(;;){if(ce=E,me=oe,we=ue,E===0?we<z?(ce=90,we++):we>z&&(ce=270,we--):E===90?me<b?(ce=0,me++):me>b&&(ce=180,me--):E===180?we<z?(ce=90,we++):we>z&&(ce=270,we--):me<b?(ce=0,me++):me>b&&(ce=180,me--),me=re[me][we],ce!==E&&me!==0&&me!==uy){if(ne.push(oe),ne.push(ue),sx(a,oe,ue,ce,b,z,ne))return!0;ne.pop(),ne.pop()}if(re[oe][ue]=uy,E===0){if(oe===y)return!1;oe--}else if(E===90){if(ue===x)return!1;ue--}else if(E===180){if(oe===y)return!1;oe++}else{if(ue===x)return!1;ue++}}}Qe.Object.defineProperties(lm.prototype,{bounds:{get:function(){return new Mn(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 Jh=0,ng=1,Sp=999999,ly=Sp+1,uy=Sp+2;lm.className="PositionArray";function Rg(){Ao(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 E=a[x];E!==null&&(y+=`
`+E.toString())}return y};function LS(a,y,x,E){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return E&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}Rg.prototype.Sl=function(){this.pe.length=0};function lx(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof ho?b:null;if(z===null||z.isSubGraphExpanded)var ne=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break e}E=z,ne=E.Lu()}z=a.pe.length=0;var re=a.port.ga(Us,st.alloc()),oe=a.port.ga(Nn,st.alloc());for(b=Mn.allocAt(re.x,re.y,0,0),b.Ye(oe),st.free(re),st.free(oe),re=st.allocAt(b.x+b.width/2,b.y+b.height/2),oe=a.port.li(),ne=ne.iterator;ne.next();){var ue=ne.value;if(ue.isVisible()&&ue.fromPort!==ue.toPort){var ce=ue.fromPort===a.port||ue.fromNode!==null&&ue.fromNode.Td(E),me=ue.computeSpot(ce,a.port);if(me.$c()&&(ce=ce?ue.toPort:ue.fromPort,ce!==null)){var we=ce.part;if(we!==null){var Fe=we.findVisibleNode();Fe!==null&&Fe!==we&&(we=Fe,ce=we.port),ce=ue.computeOtherPoint(we,ce),we=re.ab(ce),we-=oe,0>we?we+=360:360<=we&&(we-=360),me=LS(b,me,we,ue.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)),Fe=a.pe[z],Fe===void 0?(Fe=new cy(ue,we,me),a.pe[z]=Fe):(Fe.link=ue,Fe.angle=we,Fe.Nc=me),Fe.hv.set(ce),z++}}}}for(st.free(re),a.pe.sort(Rg.prototype.j),oe=a.pe.length,E=-1,z=re=0;z<oe;z++)ne=a.pe[z],ne!==void 0&&(ne.Nc!==E&&(E=ne.Nc,re=0),ne.Uo=re,re++);for(E=-1,re=0,z=oe-1;0<=z;z--)oe=a.pe[z],oe!==void 0&&(oe.Nc!==E&&(E=oe.Nc,re=oe.Uo+1),oe.Gl=re);if(z=a.pe,me=a.port,E=a.node.portSpreading,re=st.alloc(),oe=st.alloc(),ne=st.alloc(),ue=st.alloc(),me.ga(Us,re),me.ga(Tl,oe),me.ga(Nn,ne),me.ga(zl,ue),Fe=we=ce=me=0,E===qv)for(var De=0;De<z.length;De++){var _e=z[De];if(_e!==null){var pt=_e.link.computeThickness();switch(_e.Nc){case 8:we+=pt;break;case 2:Fe+=pt;break;case 1:me+=pt;break;default:case 4:ce+=pt}}}var it=De=0,bt=1,It=_e=0;for(pt=0;pt<z.length;pt++){var Rt=z[pt];if(Rt!==null){if(De!==Rt.Nc){switch(De=Rt.Nc,De){case 8:var Kt=ne;it=ue;break;case 2:Kt=ue,it=re;break;case 1:Kt=re,it=oe;break;default:case 4:Kt=oe,it=ne}switch(_e=it.x-Kt.x,It=it.y-Kt.y,De){case 8:we>Math.abs(_e)?(bt=Math.abs(_e)/we,we=Math.abs(_e)):bt=1;break;case 2:Fe>Math.abs(It)?(bt=Math.abs(It)/Fe,Fe=Math.abs(It)):bt=1;break;case 1:me>Math.abs(_e)?(bt=Math.abs(_e)/me,me=Math.abs(_e)):bt=1;break;default:case 4:ce>Math.abs(It)?(bt=Math.abs(It)/ce,ce=Math.abs(It)):bt=1}it=0}var hn=Rt.Zo;if(E===qv){switch(Rt=Rt.link.computeThickness(),Rt*=bt,hn.set(Kt),De){case 8:hn.x=Kt.x+_e/2+we/2-it-Rt/2;break;case 2:hn.y=Kt.y+It/2+Fe/2-it-Rt/2;break;case 1:hn.x=Kt.x+_e/2-me/2+it+Rt/2;break;default:case 4:hn.y=Kt.y+It/2-ce/2+it+Rt/2}it+=Rt}else{var bi=.5;E===p0&&(bi=(Rt.Uo+1)/(Rt.Gl+1)),hn.x=Kt.x+_e*bi,hn.y=Kt.y+It*bi}}}for(st.free(re),st.free(oe),st.free(ne),st.free(ue),Kt=a.pe,z=0;z<Kt.length;z++)E=Kt[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Mn.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}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,Cs,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},Rg.className="Knot";function cy(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new st,this.Gl=this.Uo=0,this.Zo=new st,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 xs(a){Ao(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new st(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}xs.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},xs.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},xs.prototype.qb=function(){},xs.prototype.toString=function(){var a=Li(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},xs.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())}}},xs.prototype.createNetwork=function(){return new ts(this)},xs.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof dn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof ho?y.lg(a.memberParts):y.lg(a.iterator),y},xs.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")}},xs.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()}},xs.prototype.doLayout=function(a){var y=new Yn;a instanceof dn?(Ef(this,y,a.nodes,!0,this.rh,!0,!1,!0),Ef(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof ho?Ef(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},xs.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,ne=0;for(a=a.iterator;a.next();){var re=a.value;um(re);var oe=re.measuredBounds,ue=oe.width;oe=oe.height,re.moveTo(E,b),re instanceof ho&&(re.rh=!1),E+=Math.max(ue,50)+20,ne=Math.max(ne,Math.max(oe,50)),z>=y-1?(z=0,E=x,b+=ne+20,ne=0):z++}},xs.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,E=this.arrangementOrigin.y,b=0,z=0,ne=this.network.vertexes.iterator;ne.next();){var re=ne.value.node;if(!(re===null||re instanceof fi)&&(um(re),this.rh(re))){var oe=re.measuredBounds,ue=oe.width;oe=oe.height,re.moveTo(x,E),re instanceof ho&&(re.rh=!1),x+=Math.max(ue,50)+20,z=Math.max(z,Math.max(oe,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},xs.prototype.rh=function(a){return!!(!a.location.w()||a instanceof ho&&a.rh)};function Ef(a,y,x,E,b,z,ne,re){for(x=x.iterator;x.next();){var oe=x.value;E&&!oe.isTopLevel||b!==null&&!b(oe)||!oe.canLayout()||(z&&oe instanceof Ni?oe.isLinkLabel||(oe instanceof ho&&oe.layout===null?Ef(a,y,oe.memberParts,!1,b,z,ne,re):(um(oe),y.add(oe))):ne&&oe instanceof fi?y.add(oe):!re||!oe.Zc()||oe instanceof Ni||(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()}xs.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Mn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},xs.prototype.ex=function(a){var y=new Yn;return a instanceof dn?(Ef(this,y,a.nodes,!0,null,!0,!0,!0),Ef(this,y,a.links,!0,null,!0,!0,!0),Ef(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof ho?Ef(this,y,a.memberParts,!1,null,!0,!0,!0):Ef(this,y,a.iterator,!1,null,!0,!0,!0),y},xs.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(Us),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Qe.Object.defineProperties(xs.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())}}}),xs.prototype.collectParts=xs.prototype.ex,xs.prototype.getLayoutBounds=xs.prototype.ni,xs.prototype.invalidateLayout=xs.prototype.C,xs.className="Layout";function ts(a){Ao(this),this.Sc=a,this.wf=new Yn,this.ye=new Yn,this.Es=new Ki,this.zs=new Ki}ts.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 Yn,this.ye=new Yn,this.Es=new Ki,this.zs=new Ki},ts.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},ts.prototype.createVertex=function(){return new ul(this)},ts.prototype.createEdge=function(){return new hc(this)},ts.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof Ni)return!ne.isLinkLabel;if(ne instanceof fi){var re=ne.fromNode;return re===null||re.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof Ni&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof ho&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof fi&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},ts.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=ts.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&&ux(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function ux(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,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},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 E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}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=vi(),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]);Ti(a)},ts.prototype.deleteArtificialVertexes=function(){for(var a=vi(),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=vi(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);Ti(a),Ti(y)};function NS(a){for(var y=vi(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);Ti(y)}ts.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),NS(this),this.Ko()),a=new Un;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),fy(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function fy(a,y,x){if(x!==null&&x.network!==y){ux(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(hy(a,b),dy(y,b),fy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(hy(a,x),dy(y,x),fy(a,y,x.toVertex))}}ts.prototype.dz=function(){for(var a=new Yn,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},Qe.Object.defineProperties(ts.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}}}),ts.prototype.findAllParts=ts.prototype.dz,ts.prototype.splitIntoSubNetworks=ts.prototype.Zx,ts.prototype.deleteSelfEdges=ts.prototype.Ko,ts.prototype.reverseEdge=ts.prototype.gm,ts.prototype.linkVertexes=ts.prototype.Zj,ts.prototype.findEdge=ts.prototype.Lo,ts.prototype.deleteLink=ts.prototype.Yy,ts.prototype.deleteEdge=ts.prototype.Mj,ts.prototype.addLink=ts.prototype.Dy,ts.prototype.addEdge=ts.prototype.Bo,ts.prototype.findVertex=ts.prototype.ki,ts.prototype.deleteNode=ts.prototype.Zy,ts.prototype.deleteVertex=ts.prototype.Iu,ts.prototype.addNode=ts.prototype.Bl,ts.prototype.addVertex=ts.prototype.dh,ts.prototype.addParts=ts.prototype.lg,ts.className="LayoutNetwork";function ul(a){Ao(this),this.ob=a,this.j=new Mn(0,0,10,10).freeze(),this.o=new st(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Un,this.mg=new Un}ul.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Un,this.mg=new Un},ul.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+nr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},ul.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 ho)){x=Mn.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Oo);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Mn.free(x);return}Mn.free(x)}a.moveTo(y.x,y.y)}},ul.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},ul.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},ul.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},ul.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}Qe.Object.defineProperties(ul.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=Mn.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),Mn.free(x),!(a instanceof ho)&&(a=a.locationObject.ga(Oo),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new Yn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Yn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Yn,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 Un,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}}}),ul.prototype.deleteDestinationEdge=ul.prototype.Jl,ul.prototype.addDestinationEdge=ul.prototype.zl,ul.prototype.deleteSourceEdge=ul.prototype.Kl,ul.prototype.addSourceEdge=ul.prototype.Cl,ul.className="LayoutVertex",ul.standardComparer=gy,ul.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function hc(a){Ao(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}hc.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},hc.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+nr(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},hc.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},hc.prototype.commit=function(){},hc.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Qe.Object.defineProperties(hc.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)}}}),hc.prototype.getOtherVertex=hc.prototype.Ax,hc.className="LayoutEdge";function Rl(a){xs.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new pi(NaN,NaN).freeze(),this.tf=new pi(10,10).freeze(),this.Jb=cm,this.Rb=L0,this.nd=dm,this.hd=cx,a&&Object.assign(this,a)}$t(Rl,xs),Rl.prototype.cloneProtected=function(a){xs.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},Rl.prototype.qb=function(a){a.classType===Rl?a===dm||a===A0||a===py||a===N0?this.sorting=a:a===L0||a===md?this.arrangement=a:a===cm||a===M0?this.alignment=a:Et("Unknown enum value: "+a):xs.prototype.qb.call(this,a)},Rl.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof ho)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case N0:b.reverse();break;case dm:b.sort(this.comparer);break;case A0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=z&&0>=ne&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case M0:var re=y,oe=x,ue=Mn.alloc(),ce=Math.max(this.cellSize.width,1);if(!isFinite(ce))for(var me=ce=0;me<b.length;me++){var we=this.ni(b[me],ue);ce=Math.max(ce,we.width)}if(ce=Math.max(ce+re,1),me=Math.max(this.cellSize.height,1),!isFinite(me))for(we=me=0;we<b.length;we++){var Fe=this.ni(b[we],ue);me=Math.max(me,Fe.height)}me=Math.max(me+oe,1),we=this.arrangement;for(var De=Fe=this.arrangementOrigin.x,_e=this.arrangementOrigin.y,pt=0,it=0,bt=0;bt<b.length;bt++){var It=b[bt],Rt=this.ni(It,ue),Kt=Math.ceil((Rt.width+re)/ce)*ce,hn=Math.ceil((Rt.height+oe)/me)*me;switch(we){case md:var bi=Math.abs(De-Rt.width);break;default:bi=De+Rt.width}switch((0<z&&pt>z-1||0<ne&&0<pt&&bi-Fe>ne)&&(E.push(new Mn(0,_e,ne+re,it)),pt=0,De=Fe,_e+=it,it=0),it=Math.max(it,hn),we){case md:Rt=-Rt.width;break;default:Rt=0}switch(It.moveTo(De+Rt,_e),we){case md:De-=Kt;break;default:De+=Kt}pt++}E.push(new Mn(0,_e,ne+re,it)),Mn.free(ue);break;case cm:for(oe=ne,ce=z,me=y,we=x,ne=Mn.alloc(),Fe=Math.max(this.cellSize.width,1),z=_e=ue=0,re=st.alloc(),De=0;De<b.length;De++)it=b[De],pt=this.ni(it,ne),it=Vh(it,it.locationObject,it.locationSpot,re),ue=Math.max(ue,it.x),_e=Math.max(_e,pt.width-it.x),z=Math.max(z,it.y);switch(De=this.arrangement,De){case md:ue+=me;break;default:_e+=me}Fe=isFinite(Fe)?Math.max(Fe+me,1):Math.max(ue+_e,1);var Xi=it=this.arrangementOrigin.x;for(bt=this.arrangementOrigin.y,_e=0,oe>=ue&&(oe-=ue),ue=It=0,Kt=Math.max(this.cellSize.height,1),Rt=z=0,hn=!0,pt=st.alloc(),bi=0;bi<b.length;bi++){var zi=b[bi],hi=this.ni(zi,ne),ti=Vh(zi,zi.locationObject,zi.locationSpot,re);if(0<_e)switch(De){case md:Xi=(Xi-it-(hi.width-ti.x))/Fe,Xi=nt.$(Math.round(Xi),Xi)?Math.round(Xi):Math.floor(Xi),Xi=Xi*Fe+it;break;default:Xi=(Xi-it+ti.x)/Fe,Xi=nt.$(Math.round(Xi),Xi)?Math.round(Xi):Math.ceil(Xi),Xi=Xi*Fe+it}else switch(De){case md:It=Xi+ti.x+hi.width;break;default:It=Xi-ti.x}switch(De){case md:var lo=-(Xi+ti.x)+It;break;default:lo=Xi+hi.width-ti.x-It}if(0<ce&&_e>ce-1||0<oe&&0<_e&&lo>oe){for(E.push(new Mn(0,hn?bt-z:bt,oe+me,Rt+z+we)),Xi=0;Xi<_e&&bi!==_e;Xi++){lo=b[bi-_e+Xi];var $r=Vh(lo,lo.locationObject,lo.locationSpot,pt);lo.moveTo(lo.position.x,lo.position.y+z-$r.y)}Rt+=we,bt=hn?bt+Rt:bt+(Rt+z),_e=Rt=z=0,Xi=it,hn=!1}switch(Xi===it&&(ue=De===md?Math.max(ue,hi.width-ti.x):Math.min(ue,-ti.x)),z=Math.max(z,ti.y),Rt=Math.max(Rt,hi.height-ti.y),isFinite(Kt)&&(Rt=Math.max(Rt,Math.max(hi.height,Kt)-ti.y)),hn?zi.moveTo(Xi-ti.x,bt-ti.y):zi.moveTo(Xi-ti.x,bt),De){case md:Xi-=ti.x+me;break;default:Xi+=hi.width-ti.x+me}_e++}if(E.push(new Mn(0,bt,oe+me,(hn?Rt:Rt+z)+we)),b.length!==_e)for(oe=0;oe<_e;oe++)ce=b[b.length-_e+oe],me=Vh(ce,ce.locationObject,ce.locationSpot,re),ce.moveTo(ce.position.x,ce.position.y+z-me.y);if(st.free(re),st.free(pt),De===md)for(b=0;b<E.length;b++)z=E[b],z.width+=ue,z.x-=ue;else for(b=0;b<E.length;b++)z=E[b],z.x>ue&&(z.width+=z.x-ue,z.x=ue);Mn.free(ne)}for(re=z=ne=b=0;re<E.length;re++)oe=E[re],b=Math.min(b,oe.x),ne=Math.min(ne,oe.y),z=Math.max(z,oe.x+oe.width);this.arrangement===md?this.commitLayers(E,new st(b+y/2-(z+b),ne-x/2)):this.commitLayers(E,new st(b-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Rl.prototype.commitLayers=function(){};function cx(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Qe.Object.defineProperties(Rl.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!==M0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==L0&&a!==md||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==py&&a!==N0&&a!==dm&&a!==A0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var M0=new Cn(Rl,"Position",0),cm=new Cn(Rl,"Location",1),L0=new Cn(Rl,"LeftToRight",2),md=new Cn(Rl,"RightToLeft",3),py=new Cn(Rl,"Forward",4),N0=new Cn(Rl,"Reverse",5),dm=new Cn(Rl,"Ascending",6),A0=new Cn(Rl,"Descending",7);Rl.className="GridLayout",Rl.standardComparer=cx,Rl.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Rl.Position=M0,Rl.Location=cm,Rl.LeftToRight=L0,Rl.RightToLeft=md,Rl.Forward=py,Rl.Reverse=N0,Rl.Ascending=dm,Rl.Descending=A0;function ja(){this.On=new Yn,this.Dn=new Yn,this.Pa=new Yn,this.cf=new Ki,this.bf=new Ki,this.aj=new Ki,this.H=null,this.tp=!1}Ne=ja.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 Ni){if(this.On.add(a),a instanceof ho){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 fi?this.Dn.add(a):a instanceof pa||this.Pa.add(a);y=a.data,y===null||a instanceof pa||(a instanceof fi?this.bf.add(y,a):this.cf.add(y,a))},Ne.pc=function(a){if(a.Ej(),a instanceof Ni){if(this.On.remove(a),a instanceof ho){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 fi?this.Dn.remove(a):a instanceof pa||this.Pa.remove(a);y=a.data,y===null||a instanceof pa||(a instanceof fi?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,E=y.key;(!x.Zc()||x instanceof ho)&&Et('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof ho||Et('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof fi||Et('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=vi(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=vi(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=vi(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);Ti(y),Ti(x),Ti(a)}},ja.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},ja.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&dx(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&xh(this.diagram,!1)};function dx(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=hx(a,y,E);if(b!==null&&(Zc(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break e}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}ja.prototype.insertLink=function(){return null},ja.prototype.resolveReferencesForData=function(){},ja.prototype.Ro=function(a){return this.H.model.Ro(a)};function hx(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(px||(px=!0,Ei('No Group template found for category "'+x+'"'),Ei(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(gx||(gx=!0,Ei('No Node template found for category "'+x+'"'),Ei(" Using default node template")),y=a.ny))),y}ja.prototype.getLinkCategoryForData=function(){return""},ja.prototype.setLinkCategoryForData=function(){},ja.prototype.setFromNodeForLink=function(){},ja.prototype.setToNodeForLink=function(){},ja.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mx||(mx=!0,Ei('No Link template found for category "'+a+'"'),Ei(" Using default link template")),x=y.my)),x},ja.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},ja.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},ja.prototype.ip=function(a){a=this.Lc(a),a!==null&&(vh(this.diagram,a,!1),this.unresolveReferencesForPart(a))},ja.prototype.unresolveReferencesForPart=function(){},ja.prototype.removeDataForLink=function(){},ja.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},ja.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Ni?a:null)},ja.prototype.findLinkForKey=function(){return null},Ne=ja.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 Ni?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 Yn;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var ne=arguments[z];if(tn(ne)&&my(this,b,ne)){y.add(E);break}}}return y.iterator},Ne.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Yn;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var ne=arguments[z];if(tn(ne)&&my(this,b,ne)){y.add(E);break}}}return y.iterator};function my(a,y,x){for(var E in x){var b=y[E],z=x[E];if(sn(z)){if(!sn(b)||b.length<z.length)return!1;for(var ne=0;ne<b.length;ne++){var re=z[ne];if(re!==void 0&&!fx(a,b[ne],re))return!1}}else if(!fx(a,b,z))return!1}return!0}function fx(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}ja.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var E=a.modelChange;if(E!=="")if(x===_o){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===xa){var ne=a.newValue;E==="nodeDataArray"&&tn(ne)&&dx(this,ne),y.isModified=!0}else if(x===Wa){var re=a.oldValue;E==="nodeDataArray"&&tn(re)&&this.ip(re),y.isModified=!0}else x===Aa&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===_o){var oe=a.propertyName,ue=a.object;ue===y.model?(oe==="nodeKeyProperty"||oe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(ue,oe),y.isModified=!0}else if(x===xa||x===Wa){var ce=a.change===xa,me=ce?a.newParam:a.oldParam,we=ce?a.newValue:a.oldValue,Fe=this.aj.I(a.object);if(Array.isArray(Fe))for(a=0;a<Fe.length;a++){var De=Fe[a];if(ce)Xm(De,we,me,!0);else if(!(0>me)){var _e=me+Kp(De);De.pc(_e,!0),Nv(De,_e,me)}}y.isModified=!0}}finally{y.aa=!0}}}}},ja.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)},ja.prototype.rp=function(){for(var a=this.H.model,y=new Yn,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||b.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||b.push(ne.data)}),b.forEach(function(ne){bx(a,ne,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&Ex(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()},ja.prototype.refreshDataBoundLinks=function(){},ja.prototype.updateRelationshipsFromData=function(){},ja.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var ne=b[z].sx(a);ne!==null&&(x===null&&(x=vi()),x.push(ne))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Ti(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function vy(a,y){var x=y.Hh;if(sn(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function yy(a,y,x){Jf(y,function(ne){ne=ne.O.s;for(var re=ne.length,oe=0;oe<re;oe++)vg(x,ne[oe])});var E=y.Hh;if(sn(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}ja.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new Ki;if(sn(a))for(var b=0;b<a.length;b++)D0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)D0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new Yn;for(var z=new Ki,ne=E.iterator;ne.next();){var re=ne.value;if(re instanceof fi)a||re.fromNode!==null&&re.toNode!==null||b.add(re);else if(re instanceof Ni&&re.data!==null&&x.Tl()){var oe=re;re=ne.key;var ue=re.pg();ue!==null&&(ue=E.I(ue),ue!==null?(x.qe(oe.data,x.wa(ue.data)),oe=y.Kc(oe.data),re=re.kh(),re!==null&&oe!==null&&z.add(re,oe)):x.qe(oe.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ce=new Ki;E.each(function(me){me.key.data!==null&&ce.add(me.key.data,me.value.data)}),x(ce,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function D0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof xr))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof Ni){for(var ne=y.linksConnected;ne.next();){var re=ne.value;if(re.fromNode===y){var oe=E.I(re);oe!==null&&(oe.fromNode=z)}re.toNode===y&&(re=E.I(re),re!==null&&(re.toNode=z))}if(y instanceof ho&&z instanceof ho)for(y=y.memberParts;y.next();)ne=D0(a,y.value,x,E,b),ne instanceof fi||ne===null||(ne.containingGroup=z)}else if(y instanceof fi&&z instanceof fi)for(ne=y.fromNode,ne!==null&&(ne=E.I(ne),ne!==null&&(z.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=E.I(ne),ne!==null&&(z.toNode=ne)),y=y.labelNodes;y.next();)ne=D0(a,y.value,x,E,b),ne!==null&&ne instanceof Ni&&(ne.labeledLink=z);return z}ja.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof fi||(E=b.copyNodeData(E),tn(E)&&(b.xf(E),x=y.Lc(E)))}else Zc(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof fi||(b=y.copyNodeData(E)),tn(b)&&(x.data=b)));return x},Qe.Object.defineProperties(ja.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}}}),ja.prototype.updateAllRelationshipsFromData=ja.prototype.rp,ja.prototype.findLinksByExample=ja.prototype.ls,ja.prototype.findNodesByExample=ja.prototype.ms,ja.prototype.findLinkForData=ja.prototype.Kc,ja.prototype.findNodeForData=ja.prototype.ii,ja.prototype.findPartForData=ja.prototype.Lc,ja.prototype.findNodeForKey=ja.prototype.Vb,ja.prototype.removeModeledPart=ja.prototype.ip,ja.prototype.removeModeledParts=ja.prototype.Gs,ja.prototype.rebuildParts=ja.prototype.Wd;var gx=!1,px=!1,mx=!1;ja.className="PartManager";function Ll(a){ja.apply(this,arguments)}$t(Ll,ja),Ll.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vx(this,a.linkDataArray)},Ll.prototype.addModeledParts=function(a){for(ja.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)mp(a.value);xh(this.diagram,!1)};function vx(a,y){y.forEach(function(x){yx(a,x)}),xh(a.diagram,!1)}function yx(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){Zc(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=k0(x,y,!0);z!==""&&(b.fromPortId=z),z=bc(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Ni&&(b.fromNode=z)),z=k0(x,y,!1),z!==""&&(b.toPortId=z),z=bc(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Ni&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}Ll.prototype.removeAllModeledParts=function(){var a=this.diagram.model;xx(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function xx(a,y){y.forEach(function(x){a.ip(x)})}Ll.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Ll.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Ll.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Ll.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Ll.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Ll.prototype.findPartForKey=function(a){var y=ja.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Ll.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Ll.prototype.doModelChanged=function(a){var y=this;if(ja.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===_o){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var ne=this.Vb(a.newValue);z.fromNode=ne}}else if(b==="linkToKey"){var re=this.Kc(a.object);if(re!==null){var oe=this.Vb(a.newValue);re.toNode=oe}}else if(b==="linkFromPortId"){var ue=this.Kc(a.object);if(ue!==null){var ce=a.newValue;typeof ce=="string"&&(ue.fromPortId=ce)}}else if(b==="linkToPortId"){var me=this.Kc(a.object);if(me!==null){var we=a.newValue;typeof we=="string"&&(me.toPortId=we)}}else if(b==="nodeGroupKey"){var Fe=this.Lc(a.object);if(Fe!==null){var De=a.newValue;if(De!==void 0){var _e=this.Vb(De);_e instanceof ho?Fe.containingGroup=_e:Fe.containingGroup=null}else Fe.containingGroup=null}}else if(b==="linkLabelKeys"){var pt=this.Kc(a.object);if(pt!==null){var it=a.oldValue,bt=a.newValue;Array.isArray(it)&&it.forEach(function(ti){0<=bt.indexOf(ti)||(ti=y.Vb(ti),ti!==null&&(ti.labeledLink=null))}),Array.isArray(bt)&&bt.forEach(function(ti){ti=y.Vb(ti),ti!==null&&(ti.labeledLink=pt)})}}else if(b==="linkCategory"){var It=this.Kc(a.object),Rt=a.newValue;It!==null&&typeof Rt=="string"&&(It.category=Rt)}else b==="linkDataArray"&&(xx(this,a.oldValue),vx(this,a.newValue));x.isModified=!0}else if(E===xa){var Kt=a.newValue;if(b==="linkDataArray"&&typeof Kt=="object"&&Kt!==null)yx(this,Kt);else if(b==="linkLabelKeys"&&Ff(Kt)){var hn=this.Kc(a.object),bi=this.Vb(Kt);hn!==null&&bi!==null&&(bi.labeledLink=hn)}x.isModified=!0}else if(E===Wa){var Xi=a.oldValue;if(b==="linkDataArray"&&typeof Xi=="object"&&Xi!==null)this.ip(Xi);else if(b==="linkLabelKeys"&&Ff(Xi)){var zi=this.Vb(Xi);zi!==null&&(zi.labeledLink=null)}x.isModified=!0}}else if(E===_o){var hi=a.propertyName;a.object!==x.model||hi!=="linkFromKeyProperty"&&hi!=="linkToKeyProperty"&&hi!=="linkFromPortIdProperty"&&hi!=="linkToPortIdProperty"&&hi!=="linkLabelKeysProperty"&&hi!=="nodeIsGroupProperty"&&hi!=="nodeGroupKeyProperty"&&hi!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Ll.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Yn,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){Ax(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&Nx(y,z,!1)})},Ll.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof fi){var b=bc(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=bc(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new Yn().addAll(y);var ne=new Yn;a.labelNodes.each(function(re){re.data!==null&&(re=E.wa(re.data),re!==void 0&&ne.add(re))}),y=ne.copy(),y.hp(b),b=b.copy(),b.hp(ne),(0<y.count||0<b.count)&&(y.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink===a&&(re.labeledLink=null)}),b.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink!==a&&(re.labeledLink=a)}))}}else!(a instanceof pa)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof ho)&&(a.containingGroup=y)}}},Ll.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=hm(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var ne=E.value;y.lb(ne)?b instanceof ho&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=b)):(z.link=this.Kc(ne),z.link!==null&&b instanceof Ni&&(bc(y,ne,!0)===x&&(z.link.fromNode=b),bc(y,ne,!1)===x&&(z.link.toNode=b),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(re){return function(oe){return oe===x?(b.labeledLink=re.link,!0):!1}}(z)))),z={link:z.link}}yd(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof ho&&(b.containingGroup=a))}},Ll.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Ni){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)vd(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&vd(y,x,E.data)),a instanceof ho)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&vd(y,x,E)}}},Ll.prototype.copyPartData=function(a,y){var x=ja.prototype.copyPartData.call(this,a,y);if(a instanceof fi)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},Ll.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,ne=b.toolManager.findTool("Linking"),re="";if(a!==null&&(y===null&&(y=a),re=y.portId,re===null&&(re="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=ne.archetypeLinkData,E instanceof fi){if(Zc(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=re,z.toNode=x,z.toPortId=y,b.add(z),a=ne.archetypeLabelNodeData,a instanceof Ni&&(Zc(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&wp(z,E,z.wa(a.data),!0),Cp(z,E,re,!0),x!==null&&wp(z,E,z.wa(x.data),!1),Cp(z,E,y,!1),z.fi(E),a=ne.archetypeLabelNodeData,a===null||a instanceof Ni||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},Ll.prototype.findLinkForKey=Ll.prototype.findLinkForKey,Ll.prototype.findPartForKey=Ll.prototype.findPartForKey,Ll.prototype.removeAllModeledParts=Ll.prototype.removeAllModeledParts,Ll.prototype.addModeledParts=Ll.prototype.addModeledParts,Ll.prototype.addAllModeledParts=Ll.prototype.addAllModeledParts,Ll.className="GraphLinksPartManager";function Dc(){ja.apply(this,arguments),this.Sg=null}$t(Dc,ja);function I0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!jn(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Zc(E),E=E.copy(),E!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}Dc.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Dc.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Dc.prototype.setFromNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},Dc.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.wa(y))},Dc.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Dc.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Dc.prototype.doModelChanged=function(a){if(ja.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var E=a.modelChange;if(E!==""){if(x===_o){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),ne=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(ne!==null){var re=ne.kh();re!==null?z===null?y.remove(re):y.isTreePathToChildren?re.fromNode=z:re.toNode=z:I0(this,z,ne)}}else if(E==="parentLinkCategory"){var oe=this.ii(a.object),ue=a.newValue;if(oe!==null&&typeof ue=="string"){var ce=oe.kh();ce!==null&&(ce.category=ue)}}y.isModified=!0}}else if(x===_o){var me=a.propertyName;a.object===y.model&&me==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Dc.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof Ni&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:I0(this,y,a):E!==null&&vh(x,E,!1)))}}},Dc.prototype.updateDataBindings=function(a,y){ja.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Dc.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=hm(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof Ni&&y.mh(z)===x&&I0(this,b,this.ii(z))}yd(y,x)}a=y.mh(a),a!==void 0&&b instanceof Ni&&(a=this.Vb(a),I0(this,a,b))}},Dc.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Ni){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(Wa,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&vd(y,x,b)}},Dc.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},Dc.prototype.findLinkForKey=Dc.prototype.findLinkForKey,Dc.className="TreePartManager";function ar(a,y){this.kl=new Yn,this.il=new Yn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,Ao(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Ki,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 Ki,this.Lt=new Un,this.Wg=!1,this.o=null,this.undoManager=new Oa,a!==void 0&&(sn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ar.prototype.cloneProtected=function(a){a.xa=this.xa,a.Sm=this.Sm,a.Gg=this.Gg,a.Th=this.Th,a.bl=this.bl,a.Bk=this.Bk,a.Km=this.Km,a.Jm=this.Jm,a.Mm=this.Mm,a.xm=this.xm,a.lj=this.lj},ar.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ar.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ar.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+sr(b)}}return y},ar.prototype.xA=function(a){a.change!==Aa&&Et("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof wo?(Px(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ar.prototype.Qv=function(a,y){var x=this,E=!1,b=new Yn,z=new Yn,ne=new Yn,re=this.vh;a.changes.each(function(me){me.model===x&&(me.modelChange==="nodeDataArray"?me.change===xa?b.add(me.newValue):me.change===Wa&&ne.add(me.oldValue):x.lb(me.object)?z.add(me.object):me.change!==_o||x.modelData!==me.object&&me.propertyName!=="modelData"?me.object!==null&&(re&&re.contains(me.object)?re.get(me.object).each(function(we){x.lb(we)&&z.add(we)}):me.object instanceof ar||x.ri()&&x.Jc(me.object)||wx(x,me.object).each(function(we){z.add(we)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(me){oe.add(x.wa(me)),y||z.add(me)});var ue=this.kl;ue.clear(),ne.each(function(me){ue.add(x.wa(me)),y&&z.add(me)}),a=x.cloneDeep(z.Fa());var ce=null;return E&&(ce===null&&(ce={}),ce.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(ce===null&&(ce={}),y?ce.removedNodeKeys=oe.Fa():ce.insertedNodeKeys=oe.Fa()),0<a.length&&(ce===null&&(ce={}),ce.modifiedNodeData=a),0<ue.count&&(ce===null&&(ce={}),y?ce.insertedNodeKeys=ue.Fa():ce.removedNodeKeys=ue.Fa()),ue.clear(),oe.clear(),ce},ar.prototype.cloneDeep=function(a){return Pp(this,a,!0)};function Pp(a,y,x,E,b,z){function ne(me,we){re?(me.__gohashid===void 0&&z.push(me),E.set(me,we)):(me=qo++,E.set(me,we),b.set(me,y))}if(!tn(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(E||(E=new Ki),re){var oe=E.get(y);if(oe)return oe}else for(b||(b=new Ki),oe=b.iterator;oe.next();){var ue=oe.key;if(oe.value===y&&(ue=E.get(ue)))return ue}if(Array.isArray(y)){oe=[],ne(y,oe);for(var ce=0;ce<y.length;ce++)oe.push(Pp(a,y[ce],!1,E,b,z))}else if(y instanceof st||y instanceof pi||y instanceof Mn||y instanceof hr||y instanceof Ji)oe=y.copy(),ne(y,oe);else{if(y instanceof ha||y instanceof Qt||y instanceof Cn)return y;if(y instanceof Un)oe=new Un().addAll(Pp(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Yn)oe=new Yn().addAll(Pp(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Ki)oe=new Ki().addAll(Pp(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Date)oe=new Date(y.getTime()),ne(y,oe);else if(y instanceof RegExp)oe=new RegExp(y),ne(y,oe),oe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")oe=y.copy(),ne(y,oe);else for(ce in oe={},ne(y,oe),y)ce!=="__gohashid"&&(oe[ce]=Pp(a,y[ce],!1,E,b,z))}return x&&z.forEach(function(me){delete me.__gohashid}),oe}Ne=ar.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 Sx(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(!Cx(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+xy(this,this.modelData)),a+`,
"nodeDataArray": `+bf(this,this.nodeDataArray,!0)},Ne.kv=function(a){Sx(this,a),a=a.nodeDataArray,sn(a)&&(this.dm(a),this.nodeDataArray=a)};function Px(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var ne=E.get(b);ne===null?(ne=new Yn,ne.add(z),E.add(b,ne)):ne.add(z)}}var E=a.vh;E===null&&(E=new Ki,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===_o?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===xa||z===Wa)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function wx(a,y){for(var x=new Yn,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];O0(a,y,b,b,x)}return x}function O0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var ne=x[z];if(ne===y)return b.add(E),!0;if(O0(a,y,ne,E,b))return!0}else if(tn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(ne=x[z],ne===y)return b.add(E),!0;if(O0(a,y,ne,E,b))return!0}return!1}Ne.Pv=function(a,y){var x=this,E=!1,b=new Yn,z=new Yn,ne=new Yn,re=this.vh;a.changes.each(function(ce){ce.model===x&&(ce.modelChange==="nodeDataArray"?ce.change===xa?b.add(ce.newValue):ce.change===Wa&&ne.add(ce.oldValue):x.lb(ce.object)?z.add(ce.object):ce.change!==_o||x.modelData!==ce.object&&ce.propertyName!=="modelData"?ce.object!==null&&(re&&re.contains(ce.object)?re.get(ce.object).each(function(me){x.lb(me)&&z.add(me)}):ce.object instanceof ar||x.ri()&&x.Jc(ce.object)||wx(x,ce.object).each(function(me){z.add(me)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(ce){oe.add(x.wa(ce)),y||z.add(ce)});var ue=this.kl;return ue.clear(),ne.each(function(ce){ue.add(x.wa(ce)),y&&z.add(ce)}),a="",E&&(a+=`,
"modelData": `+xy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+bf(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+bf(this,z.Fa(),!0)),0<ue.count&&(a+=(y?this.Wv:this.Yv)+bf(this,ue.Fa(),!0)),ue.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)&&Et("applyIncrementalJson cannot change Model properties"),Sx(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new Ki;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],ne=this.wa(z);ne!=null&&E.set(ne,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){ne=y[z];var re=this.hc(ne);re===null&&(re=(re=E.get(ne))?re:this.copyNodeData({}),this.km(re,ne),this.xf(re))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var oe in b)oe==="__gohashid"||oe===this.nodeKeyProperty||this.Wj()&&oe===this.nodeIsGroupProperty||this.setDataProperty(z,oe,b[oe]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,oe=0;oe<x;oe++)y=this.hc(a[oe]),y!==null&&this.cm(y)},Ne.$x=function(a,y){a.change!==Aa&&Et("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof wo?(y===void 0&&(y=fm(this,this)),Px(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=ht.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:Et("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Et("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)},ar.constructGraphLinksModel=function(){return new ar},Ne=ar.prototype,Ne.dm=function(a){if(sn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(tn(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:Et("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}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(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new Un,E=0;E<x.length/2;E++)b.add(new st(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return AS(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()):sn(a)?bf(this,a):tn(a)?xy(this,a):typeof a=="function"?"null":a.toString()};function bf(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Yi;b.add("["),x&&1<E&&b.add(`
`);for(var z=0;z<E;z++){var ne=y[z];ne!==void 0&&(0<z&&(b.add(","),x&&b.add(`
`)),b.add(a.sm(ne)))}return x&&1<E&&b.add(`
`),b.add("]"),b.toString()}function Cx(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function bu(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function xy(a,y){var x=y;if(x instanceof st)y={class:"go.Point",x:bu(x.x),y:bu(x.y)};else if(x instanceof pi)y={class:"go.Size",width:bu(x.width),height:bu(x.height)};else if(x instanceof Mn)y={class:"go.Rect",x:bu(x.x),y:bu(x.y),width:bu(x.width),height:bu(x.height)};else if(x instanceof hr)y={class:"go.Margin",top:bu(x.top),right:bu(x.right),bottom:bu(x.bottom),left:bu(x.left)};else if(x instanceof Ji)x.sb()?y={class:"go.Spot",x:bu(x.x),y:bu(x.y),offsetX:bu(x.offsetX),offsetY:bu(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof ha){if(y={class:"go.Brush",type:x.type.name},x.type===Gh?y.color=x.color:(x.type===Bh||x.type===Nc)&&(y.start=x.start,y.end=x.end,x.type===Nc&&(x.startRadius!==0&&(y.startRadius=bu(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=bu(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof Qt?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=bu(x.startX)),x.startY!==0&&(y.startY=bu(x.startY)),x.endX!==0&&(y.endX=bu(x.endX)),x.endY!==0&&(y.endY=bu(x.endY)),x.spot1.D(Us)||(y.spot1=x.spot1),x.spot2.D(Nn)||(y.spot2=x.spot2),x.type===Qt.o&&(y.path=Qt.ia(x))):x instanceof Cn&&(y={class:"go.EnumValue",classType:fm(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Qs(y,b);if(!Cx(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof Un){var ne="[";for(z=z.iterator;z.next();){var re=z.value;1<ne.length&&(ne+=","),ne+=a.sm(re.x),ne+=",",ne+=a.sm(re.y)}ne+="]",E+=ne}else E+=a.sm(z)}return E+"}"}function Fu(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function AS(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 st(Fu(a.x),Fu(a.y));else if(y==="Size")x=new pi(Fu(a.width),Fu(a.height));else if(y==="Rect")x=new Mn(Fu(a.x),Fu(a.y),Fu(a.width),Fu(a.height));else if(y==="Margin")x=new hr(Fu(a.top),Fu(a.right),Fu(a.bottom),Fu(a.left));else if(y==="Spot")typeof a.enum=="string"?x=fl(a.enum):x=new Ji(Fu(a.x),Fu(a.y),Fu(a.offsetX),Fu(a.offsetY));else if(y==="Brush"){if(x=new ha,x.type=ri(ha,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Ji&&(x.start=a.start),a.end instanceof Ji&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Fu(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Fu(a.endRadius)),a=a.colorStops,tn(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Qt.parse(a.path):x=new Qt,x.type=ri(Qt,a.type),typeof a.startX=="number"&&(x.startX=Fu(a.startX)),typeof a.startY=="number"&&(x.startY=Fu(a.startY)),typeof a.endX=="number"&&(x.endX=Fu(a.endX)),typeof a.endY=="number"&&(x.endY=Fu(a.endY)),a.spot1 instanceof Ji&&(x.spot1=a.spot1),a.spot2 instanceof Ji&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Py(E),typeof E=="function"&&(x=ri(E,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,E=0;E<x;E++)y.M(E)(a)},Ne.cb=function(a,y,x,E,b,z,ne){al(this,"",a,y,x,E,b,z,ne)},Ne.g=function(a,y,x,E,b){al(this,"",_o,a,this,y,x,E,b)},Ne.Fs=function(a,y,x,E,b,z){al(this,"",_o,y,a,x,E,b,z)};function al(a,y,x,E,b,z,ne,re,oe){re===void 0&&(re=null),oe===void 0&&(oe=null);var ue=new gr;ue.model=a,ue.change=x,ue.modelChange=y,ue.propertyName=E,ue.object=b,ue.oldValue=z,ue.oldParam=re,ue.newValue=ne,ue.newParam=oe,a.ds(ue)}ar.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===_o){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),vs(x,E,b)}else a.change===xa?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,tn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&Di(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&Oi(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!sn(E)&&a.propertyName&&(E=Qs(a.object,a.propertyName)),sn(E)&&typeof x=="number"&&(a=a.newValue,y?Di(E,x):Oi(E,x,a))):Et("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Wa?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,tn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&Oi(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&Di(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!sn(E)&&a.propertyName&&(E=Qs(a.object,a.propertyName)),sn(E)&&typeof x=="number"&&(a=a.oldValue,y?Oi(E,x,a):Di(E,x))):Et("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Aa&&Et("unknown ChangedEvent: "+a.toString())},ar.prototype.Ea=function(a){return this.undoManager.Ea(a)},ar.prototype.eb=function(a){return this.undoManager.eb(a)},ar.prototype.Kf=function(){return this.undoManager.Kf()},ar.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Ne=ar.prototype,Ne.La=function(a,y){y===void 0&&(y=""),al(this,"SourceChanged",Aa,y,a,null,null)},Ne.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Et("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 E=Qs(a,x);E!==y&&this.hc(y)===null&&(vs(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),al(this,"nodeKey",_o,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else vs(a,x,y)}};function Ff(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&&Et("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Ff(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 E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){vs(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;vs(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;vs(a,y,x)}}}}},Ne.xf=function(a){a!==null&&(Qo(a),this.lb(a)||Ex(this,a,!0))};function Ex(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&Et("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,Oi(a.Tc,E,y)),al(a,"nodeDataArray",xa,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Ne.Fy=function(a){if(sn(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&&bx(this,a,!0)};function bx(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){e:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break e}E=-1}if(0>E)return;Di(a.Tc,E)}al(a,"nodeDataArray",Wa,"nodeDataArray",a,y,null,E,null),a.qp(y)}Ne.nA=function(a){if(sn(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&&sn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],ne=this.wa(z);if(ne!==void 0){x.add(ne);var re=this.hc(ne);re!==z&&(re!==null?(this.Do(re,z),this.lm(z,re)):(z=this.cloneDeep(z),this.km(z,ne),this.xf(z)))}else ne=this.cloneDeep(z),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Ne.jp=function(a,y){y!==void 0&&(a=hm(this,a),a instanceof Yn&&this.Vf.add(y,a))},Ne.Lv=function(){},Ne.fm=function(){},Ne.em=function(){},Ne.qp=function(){};function vd(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Yn,a.Vf.add(y,E)),E.add(x)}}function yd(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Yn&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function hm(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Yn?a:null)}Ne.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ar.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):T0(this,a,!0),tn(a)&&Ao(a),a};function T0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=T0(a,y[x],a.copiesArrayObjects);E.push(b)}return Ao(E),E}if(x&&tn(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=Qs(y,E),ne=fm(a,z);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||z instanceof ar||z instanceof Oa||z instanceof wo||z instanceof gr||(z=T0(a,z,!1)),vs(x,E,z)}return Ao(x),x}return y instanceof st||y instanceof pi||y instanceof Mn||y instanceof Ji||y instanceof hr?y.copy():y}ar.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!Fx&&a instanceof Vt&&(Fx=!0,Ei('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Ei(" Is that really your intent?"));var E=Qs(a,y);E!==x&&(vs(a,y,x),this.Fs(a,y,E,x))},Ne=ar.prototype,Ne.set=function(a,y,x){this.setDataProperty(a,y,x)},Ne.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Ne.Ay=function(a,y){this.ts(a,-1,y)},Ne.ts=function(a,y,x){0>y&&(y=a.length),Oi(a,y,x),al(this,"",xa,"",a,null,x,null,y)},Ne.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Et("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Di(a,y),al(this,"",Wa,"",a,x,null,y,null)},Ne.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Qs(a,y),y===void 0))return"";if(typeof y=="string")return y;Et("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 E=Qs(a,x);E===void 0&&(E=""),E!==y&&(vs(a,x,y),al(this,"nodeCategory",_o,x,a,E,y))}else vs(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 Sy(){return new ar}function fm(a,y){if(typeof y=="function"){if(y.className)return y.className;if(y.name)return y.name}else if(typeof y=="object"&&y!==null&&y.constructor)return fm(a,y.constructor);return typeof y}function Py(a){return ed[a]?ed[a]:ht.go!==void 0&&ht.go[a]?ht.go[a]:null}function Qs(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(E){}return x}function vs(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(E){}}Qe.Object.defineProperties(ar.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&Et("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Et("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,E=0;E<x;E++){var b=a[E];tn(b)||Et("Model.nodeDataArray must only contain Objects, not: "+b),Qo(b)}for(this.Tc=a,E=new Un,b=0;b<x;b++){var z=a[b],ne=this.wa(z);ne===void 0||this.kb.I(ne)!==null?E.add(z):this.kb.add(ne,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(al(this,"nodeDataArray",_o,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),ar.prototype.setCategoryForNodeData=ar.prototype.jm,ar.prototype.getCategoryForNodeData=ar.prototype.Ro,ar.prototype.removeArrayItem=ar.prototype.ov,ar.prototype.insertArrayItem=ar.prototype.ts,ar.prototype.addArrayItem=ar.prototype.Ay,ar.prototype.assignAllDataProperties=ar.prototype.Do,ar.prototype.set=ar.prototype.set,ar.prototype.clearUnresolvedReferences=ar.prototype.Qy,ar.prototype.mergeNodeDataArray=ar.prototype.$z,ar.prototype.removeNodeDataCollection=ar.prototype.nA,ar.prototype.removeNodeData=ar.prototype.cm,ar.prototype.addNodeDataCollection=ar.prototype.Fy,ar.prototype.addNodeData=ar.prototype.xf,ar.prototype.makeNodeDataKeyUnique=ar.prototype.$u,ar.prototype.findNodeDataForKey=ar.prototype.hc,ar.prototype.containsNodeData=ar.prototype.lb,ar.prototype.setKeyForNodeData=ar.prototype.km,ar.prototype.getKeyForNodeData=ar.prototype.wa,ar.prototype.updateTargetBindings=ar.prototype.La,ar.prototype.commit=ar.prototype.commit,ar.prototype.rollbackTransaction=ar.prototype.Kf,ar.prototype.commitTransaction=ar.prototype.eb,ar.prototype.startTransaction=ar.prototype.Ea,ar.prototype.raiseDataChanged=ar.prototype.Fs,ar.prototype.raiseChanged=ar.prototype.g,ar.prototype.raiseChangedEvent=ar.prototype.cb,ar.prototype.removeChangedListener=ar.prototype.ik,ar.prototype.addChangedListener=ar.prototype.Pe,ar.prototype.writeJsonValue=ar.prototype.sm,ar.prototype.replaceJsonObjects=ar.prototype.dm,ar.prototype.applyIncrementalJSON=ar.prototype.Ky,ar.prototype.applyIncrementalJson=ar.prototype.Zw,ar.prototype.toJSON=ar.prototype.toJSON,ar.prototype.toJson=ar.prototype.np,ar.prototype.toIncrementalJSON=ar.prototype.yA,ar.prototype.toIncrementalJson=ar.prototype.$x,ar.prototype.toIncrementalData=ar.prototype.xA,ar.prototype.clear=ar.prototype.clear;var Fx=!1,ed={};ar.className="Model",ar.fromJSON=ar.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=ht.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Et("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=Py(E)):(b=Py(E),b===null&&(b=ht[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof ar?y=a:Et("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ar.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ar.safePropertyValue=Qs,ar.safePropertySet=vs,ed.Brush=ha,ed.ChangedEvent=gr,ed.Geometry=Qt,ed.Margin=hr,ed.Panel=ui,ed.Point=st,ed.Rect=Mn,ed.Size=pi,ed.Spot=Ji,ed.Transaction=wo,ed.UndoManager=Oa;function tl(a,y,x,E){Ao(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,E===void 0?(this.el=Mx,this.wk=null):(this.el=gm,this.wk=E),this.st=new Yn}tl.prototype.copy=function(){var a=new tl;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=tl.prototype,Ne.qb=function(a){a.classType===tl&&(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 Bx(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 E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")Ei("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Qs(y,E)),z!==void 0)if(b===null)x!==""&&vs(a,x,z);else try{if(x!==""){var ne=b(z,a);vs(a,x,ne)}else b(z,a)}catch(re){}}}},Ne.sp=function(a,y,x,E){if(this.el===gm){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,ne=a;if(b!==""&&(ne=Qs(a,b)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var re=E!==null?E.diagram:null,oe=re!==null?re.model:null;if(z===null){if(x!=="")oe!==null?oe.setDataProperty(y,x,ne):vs(y,x,ne);else if(oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var ue=E.itemIndex,ce=E.panel.itemArray;oe.ov(ce,ue),oe.ts(ce,ue,ne)}}else try{if(x!==""){var me=z(ne,y,oe);oe!==null?oe.setDataProperty(y,x,me):vs(y,x,me)}else{var we=z(ne,y,oe);if(we!==void 0&&oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var Fe=E.itemIndex,De=E.panel.itemArray;oe.ov(De,Fe),oe.ts(De,Fe,we)}}}catch(_e){}}finally{this.st.remove(a)}}}},Qe.Object.defineProperties(tl.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&wn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&wn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&wn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&wn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&wn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&wn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&wn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&wn(this),this.el=a}}}),tl.prototype.updateSource=tl.prototype.sp,tl.prototype.updateTarget=tl.prototype.Mv,tl.prototype.ofModel=tl.prototype.dA,tl.prototype.ofObject=tl.prototype.cp,tl.prototype.makeTwoWay=tl.prototype.Kx;var DS="Binding",Mx=new Cn(tl,"OneWay",1),gm=new Cn(tl,"TwoWay",2);tl.className="Binding",tl.parseEnum=function(a,y){return function(x){return x=ri(a,x),x===null?y:x}},tl.toString=sr,tl.OneWay=Mx,tl.TwoWay=gm;function ia(a,y,x){ar.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new Yn,this.wb=new Ki,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&&(sn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}$t(ia,ar),ia.constructGraphLinksModel=ar.constructGraphLinksModel,ia.prototype.cloneProtected=function(a){ar.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},Ne=ia.prototype,Ne.clear=function(){ar.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,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+sr(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+bc(this,b,!0)+"-->"+bc(this,b,!1)}return y},Ne.Qv=function(a,y){this.linkKeyProperty===""&&Et("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ar.prototype.Qv.call(this,a,y),E=this,b=new Yn,z=new Yn,ne=new Yn,re=this.vh;a.changes.each(function(ce){ce.model===E&&(ce.modelChange==="linkDataArray"?ce.change===xa?b.add(ce.newValue):ce.change===Wa&&ne.add(ce.oldValue):E.Jc(ce.object)?z.add(ce.object):ce.object!==null&&(ce.object!==null&&re&&re.contains(ce.object)?re.get(ce.object).each(function(me){E.Jc(me)&&z.add(me)}):ce.object instanceof ar||E.lb(ce.object)||Lx(E,ce.object).each(function(me){z.add(me)})))});var oe=this.il;oe.clear(),b.each(function(ce){oe.add(E.Ac(ce)),y||z.add(ce)});var ue=this.kl;return ue.clear(),ne.each(function(ce){ue.add(E.Ac(ce)),y&&z.add(ce)}),a=E.cloneDeep(z.Fa()),0<oe.count&&(x===null&&(x={}),y?x.removedLinkKeys=oe.Fa():x.insertedLinkKeys=oe.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<ue.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ue.Fa():x.removedLinkKeys=ue.Fa()),ue.clear(),oe.clear(),x},Ne.rm=function(){var a=ar.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},Ne.gp=function(a){ar.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},Ne.Rv=function(){var a=ar.prototype.Rv.call(this),y=`,
"linkDataArray": `+bf(this,this.linkDataArray,!0);return a+y},Ne.kv=function(a){ar.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function Lx(a,y){for(var x=new Yn,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];O0(a,y,b,b,x)}return x}Ne.Pv=function(a,y){this.linkKeyProperty===""&&Et("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ar.prototype.Pv.call(this,a,y),E=this,b=new Yn,z=new Yn,ne=new Yn,re=this.vh;a.changes.each(function(ce){ce.model===E&&(ce.modelChange==="linkDataArray"?ce.change===xa?b.add(ce.newValue):ce.change===Wa&&ne.add(ce.oldValue):E.Jc(ce.object)?z.add(ce.object):ce.object!==null&&(ce.object!==null&&re&&re.contains(ce.object)?re.get(ce.object).each(function(me){E.Jc(me)&&z.add(me)}):ce.object instanceof ar||E.lb(ce.object)||Lx(E,ce.object).each(function(me){z.add(me)})))});var oe=this.il;oe.clear(),b.each(function(ce){oe.add(E.Ac(ce)),y||z.add(ce)});var ue=this.kl;return ue.clear(),ne.each(function(ce){ue.add(E.Ac(ce)),y&&z.add(ce)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+bf(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+bf(this,z.Fa(),!0)),0<ue.count&&(a+=(y?this.Vv:this.Xv)+bf(this,ue.Fa(),!0)),ue.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)&&Et("applyIncrementalJson cannot change Model properties"),ar.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var ne in b)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(z,ne,b[ne]);Dx(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},ia.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===_o){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),vs(x,E,b);return}}else if(a.change===xa){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,tn(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===Wa){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,tn(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}ar.prototype.changeState.call(this,a,y)}},Ne=ia.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),vs(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Ne.yx=function(a){return bc(this,a,!0)},Ne.wv=function(a,y){wp(this,a,y,!0)},Ne.Bx=function(a){return bc(this,a,!1)},Ne.Bv=function(a,y){wp(this,a,y,!1)};function bc(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Qs(y,a),a!==void 0))){if(Ff(a))return a;Et((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function wp(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=Qs(y,b);z!==x&&(yd(a,z,y),vs(y,b,x),a.hc(x)===null&&vd(a,x,y),al(a,E?"linkFromKey":"linkToKey",_o,b,y,z,x),typeof b=="string"&&a.La(y,b))}else vs(y,b,x)}}Ne.zx=function(a){return k0(this,a,!0)},Ne.xv=function(a,y){Cp(this,a,y,!0)},Ne.Cx=function(a){return k0(this,a,!1)},Ne.Cv=function(a,y){Cp(this,a,y,!1)};function k0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Qs(y,a),y===void 0?"":y)}function Cp(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Qs(y,b);z===void 0&&(z=""),z!==x&&(vs(y,b,x),al(a,E?"linkFromPortId":"linkToPortId",_o,b,y,z,x),typeof b=="string"&&a.La(y,b))}else vs(y,b,x)}}Ne.Ef=function(a){if(a===null)return R0;var y=this.je;return y===""?R0:(a=Qs(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 E=Qs(a,x);if(E===void 0&&(E=R0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)yd(this,E[z],a);for(vs(a,x,y),b=y.length,z=0;z<b;z++){var ne=y[z];this.hc(ne)===null&&vd(this,ne,a)}al(this,"linkLabelKeys",_o,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else vs(a,x,y)}},Ne.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Qs(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&vd(this,y,a),al(this,"linkLabelKeys",xa,x,a,null,y,null,b)))}else Et(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 E=Qs(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(yd(this,y,a),al(this,"linkLabelKeys",Wa,x,a,y,null,b,null)))}else E!==void 0&&Et(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Ne.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Et("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 E=Qs(a,x);E!==y&&this.jh(y)===null&&(vs(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),al(this,"linkKey",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else vs(a,x,y)}},Ne.jh=function(a){return a===null&&Et("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Ff(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 E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){vs(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;vs(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;vs(a,y,x)}}}}},Ne.Jc=function(a){return a===null?!1:this.$f.contains(a)},Ne.fi=function(a){a!==null&&(Qo(a),this.Jc(a)||Nx(this,a,!0))};function Nx(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&Et("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),al(a,"linkDataArray",xa,"linkDataArray",a,null,y,null,E),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&&Ax(this,a,!0)};function Ax(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(al(a,"linkDataArray",Wa,"linkDataArray",a,y,null,E,null),x=bc(a,y,!0),yd(a,x,y),x=bc(a,y,!1),yd(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],yd(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===""&&Et("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&sn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],ne=this.Ac(z);if(ne!==void 0){x.add(ne);var re=this.jh(ne);re!==z&&(re!==null?(this.Do(re,z),Dx(this,z,re)):(z=this.cloneDeep(z),this.Ks(z,ne),this.fi(z)))}else ne=this.cloneDeep(z),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function wy(a,y){var x=bc(a,y,!0);x=a.Vl(x),a.hc(x)===null&&vd(a,x,y),x=bc(a,y,!1),x=a.Vl(x),a.hc(x)===null&&vd(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&vd(a,x,y)}Ne.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):T0(this,a,!0),tn(a)&&(Ao(a),this.lf!==""&&vs(a,this.lf,void 0),this.mf!==""&&vs(a,this.mf,void 0),this.je!==""&&vs(a,this.je,[])),a},Ne.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Qs(a,y)},Ne.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Et("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 E=Qs(a,x);E!==y&&(yd(this,E,a),vs(a,x,y),this.hc(y)===null&&vd(this,y,a),al(this,"nodeGroupKey",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else vs(a,x,y)}},ia.prototype.copyNodeData=function(a){return a===null?null:(a=ar.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Qs(a,this.Je)===void 0||vs(a,this.Je,void 0),a)},ia.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 E=Qs(a,y);E!==x&&(vs(a,y,x),this.Fs(a,y,E,x))},Ne=ia.prototype,Ne.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&Qs(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Ne.jp=function(a,y){ar.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var E=x.value,b=a,z=y;if(bc(this,E,!0)===b){var ne=this.lf;vs(E,ne,z),al(this,"linkFromKey",_o,ne,E,b,z),typeof ne=="string"&&this.La(E,ne)}if(bc(this,E,!1)===b&&(ne=this.mf,vs(E,ne,z),al(this,"linkToKey",_o,ne,E,b,z),typeof ne=="string"&&this.La(E,ne)),ne=this.Ef(E),Array.isArray(ne))for(var re=ne.length,oe=this.je,ue=0;ue<re;ue++)ne[ue]===b&&(ne[ue]=z,al(this,"linkLabelKeys",xa,oe,E,b,z,ue,ue))}},Ne.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;vs(a,E,x),al(this,"nodeGroupKey",_o,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Ne.Lv=function(){ar.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){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=vi();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;al(this,"nodeGroupKey",_o,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(bc(this,E,!0)===a&&(b=this.lf,al(this,"linkFromKey",_o,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),bc(this,E,!1)===a&&(b=this.mf,al(this,"linkToKey",_o,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,ne=this.je,re=0;re<z;re++)b[re]===a&&(al(this,"linkLabelKeys",xa,ne,E,a,a,re,re),x.push(E))}for(y=0;y<x.length;y++)yd(this,a,x[y]);Ti(x)}},Ne.em=function(a){ar.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&vd(this,y,a)},Ne.qp=function(a){ar.prototype.qp.call(this,a);var y=this.lh(a);yd(this,y,a)},Ne.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Qs(a,y),y===void 0))return"";if(typeof y=="string")return y;Et("getCategoryForLinkData found a non-string category for "+a+": "+y)},ia.prototype.getLinkCategoryForData=function(a){return this.ps(a)},ia.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Qs(a,x);E===void 0&&(E=""),E!==y&&(vs(a,x,y),al(this,"linkCategory",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else vs(a,x,y)}},ia.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Ne=ia.prototype,Ne.lm=function(a,y){ar.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function Dx(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},Qe.Object.defineProperties(ia.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,E=0;E<x;E++){var b=a[E];tn(b)||Et("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Qo(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new Un,b=0;b<x;b++){var z=a[b],ne=this.Ac(z);ne===void 0||this.wb.I(ne)!==null?E.add(z):this.wb.add(ne,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new Yn,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,al(this,"linkDataArray",_o,"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,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),ia.prototype.setCategoryForLinkData=ia.prototype.lp,ia.prototype.getCategoryForLinkData=ia.prototype.ps,ia.prototype.assignAllDataProperties=ia.prototype.Do,ia.prototype.setGroupKeyForNodeData=ia.prototype.mp,ia.prototype.getGroupKeyForNodeData=ia.prototype.lh,ia.prototype.isGroupForNodeData=ia.prototype.Yu,ia.prototype.copyLinkData=ia.prototype.Jo,ia.prototype.mergeLinkDataArray=ia.prototype.Zz,ia.prototype.removeLinkDataCollection=ia.prototype.lA,ia.prototype.removeLinkData=ia.prototype.bm,ia.prototype.addLinkDataCollection=ia.prototype.Ey,ia.prototype.addLinkData=ia.prototype.fi,ia.prototype.containsLinkData=ia.prototype.Jc,ia.prototype.makeLinkDataKeyUnique=ia.prototype.Bs,ia.prototype.findLinkDataForKey=ia.prototype.jh,ia.prototype.setKeyForLinkData=ia.prototype.Ks,ia.prototype.getKeyForLinkData=ia.prototype.Ac,ia.prototype.removeLabelKeyForLinkData=ia.prototype.Qx,ia.prototype.addLabelKeyForLinkData=ia.prototype.Bu,ia.prototype.setLabelKeysForLinkData=ia.prototype.Ls,ia.prototype.getLabelKeysForLinkData=ia.prototype.Ef,ia.prototype.setToPortIdForLinkData=ia.prototype.Cv,ia.prototype.getToPortIdForLinkData=ia.prototype.Cx,ia.prototype.setFromPortIdForLinkData=ia.prototype.xv,ia.prototype.getFromPortIdForLinkData=ia.prototype.zx,ia.prototype.setToKeyForLinkData=ia.prototype.Bv,ia.prototype.getToKeyForLinkData=ia.prototype.Bx,ia.prototype.setFromKeyForLinkData=ia.prototype.wv,ia.prototype.getFromKeyForLinkData=ia.prototype.yx,ia.prototype.clear=ia.prototype.clear;var R0=Object.freeze([]);ia.className="GraphLinksModel",ed.GraphLinksModel=ia,ar.constructGraphLinksModel=ar.constructGraphLinksModel=function(){return new ia},ar.initDiagramModel=Sy=function(){return new ia};function Bu(a,y){ar.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(sn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}$t(Bu,ar),Bu.constructGraphLinksModel=ar.constructGraphLinksModel,Bu.prototype.cloneProtected=function(a){ar.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Ne=Bu.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,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+sr(b)}}return y},Ne.rm=function(){var a=ar.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Ne.gp=function(a){ar.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Ne.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Et("applyIncrementalJson cannot change Model properties"),ar.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=Qs(a,y),y!==void 0)){if(Ff(y))return y;Et("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 E=Qs(a,x);E!==y&&(yd(this,E,a),vs(a,x,y),this.hc(y)===null&&vd(this,y,a),al(this,"nodeParentKey",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else vs(a,x,y)}},Ne.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Qs(a,y),y===void 0)?"":typeof y=="string"?y:(Et("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Bu.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Bu.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Qs(a,x);E===void 0&&(E=""),E!==y&&(vs(a,x,y),al(this,"parentLinkCategory",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else vs(a,x,y)}},Bu.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Bu.prototype.copyNodeData=function(a){return a===null?null:(a=ar.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Qs(a,this.Ke)===void 0||vs(a,this.Ke,void 0),a)},Bu.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var E=Qs(a,y);E!==x&&(vs(a,y,x),this.Fs(a,y,E,x))},Ne=Bu.prototype,Ne.jp=function(a,y){ar.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Ne.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;vs(a,E,x),al(this,"nodeParentKey",_o,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Ne.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=vi();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;al(this,"nodeParentKey",_o,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)yd(this,a,x[y]);Ti(x)}},Ne.em=function(a){ar.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&vd(this,y,a)},Ne.qp=function(a){ar.prototype.qp.call(this,a);var y=this.mh(a);yd(this,y,a)},Ne.lm=function(a,y){ar.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},Qe.Object.defineProperties(Bu.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"}}}),Bu.prototype.setParentLinkCategoryForNodeData=Bu.prototype.Ms,Bu.prototype.getParentLinkCategoryForNodeData=Bu.prototype.ss,Bu.prototype.setParentKeyForNodeData=Bu.prototype.qe,Bu.prototype.getParentKeyForNodeData=Bu.prototype.mh,Bu.className="TreeModel",ed.TreeModel=Bu;function Os(a){xs.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=td,this.Ti=0,this.Zv=new st,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=td,this.K=Mu,this.nd=bp,this.hd=gy,this.tf=6,this.Nn=G0,a&&Object.assign(this,a)}$t(Os,xs),Os.prototype.cloneProtected=function(a){xs.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},Os.prototype.qb=function(a){a.classType===Os?a===H0||a===W0||a===z0||a===Z0||a===bp?this.sorting=a:a===ig||a===Ep||a===Mu||a===Mf?this.direction=a:a===Qh||a===Bf||a===td||a===nd?this.arrangement=a:(a===_g||a===G0)&&(this.nodeDiameterFormula=a):xs.prototype.qb.call(this,a)},Os.prototype.createNetwork=function(){return new Fp(this)},Os.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 Un;y.addAll(a.iterator),a=new Un;var x=new Un,E=this.sort(y),b,z,ne=this.Jp,re=this.arrangement,oe=this.nodeDiameterFormula,ue=this.radius;(!isFinite(ue)||0>=ue)&&(ue=NaN);var ce=this.aspectRatio;(!isFinite(ce)||0>=ce)&&(ce=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===nd&&oe===_g?re=td:re===nd&&oe!==_g&&(re=this.arrangement),(this.direction===ig||this.direction===Ep)&&this.sorting!==bp){for(oe=0;!(oe>=E.length)&&(a.add(E.M(oe)),!(oe+1>=E.length));oe+=2)x.add(E.M(oe+1));this.direction===ig?(this.arrangement===nd&&a.reverse(),E=new Un,E.addAll(a),E.addAll(x)):(this.arrangement===nd&&x.reverse(),E=new Un,E.addAll(x),E.addAll(a))}oe=E.length;for(var Fe=z=b=0;Fe<E.length;Fe++){var De=me+we*z*(this.direction===Mu?1:-1)/oe,_e=E.M(Fe).diameter;isNaN(_e)&&(_e=Lf(E.M(Fe),De)),360>we&&(Fe===0||Fe===E.length-1)&&(_e/=2),b+=_e,z++}if(isNaN(ue)||re===nd){if(isNaN(y)&&(y=6),re!==td&&re!==nd){for(z=-1/0,ne=0;ne<oe;ne++)Fe=E.M(ne),b=E.M(ne===oe-1?0:ne+1),isNaN(Fe.diameter)&&Lf(Fe,0),isNaN(b.diameter)&&Lf(b,0),z=Math.max(z,(Fe.diameter+b.diameter)/2);ne=z+y,re===Qh?ue=(z+y)/(2*Math.PI/oe):ue=_0(this,ne*(360<=we?oe:oe-1),ce,me*Math.PI/180,we*Math.PI/180)}else ue=_0(this,b+(360<=we?oe:oe-1)*(re!==nd?y:1.6*y),ce,me*Math.PI/180,we*Math.PI/180);z=ue*ce}else if(z=ue*ce,Fe=Cy(this,ue,z,me*Math.PI/180,we*Math.PI/180),isNaN(y))(re===td||re===nd)&&(y=(Fe-b)/(360<=we?oe:oe-1));else if(re===td||re===nd)Fe=(Fe-b)/(360<=we?oe:oe-1),Fe<y?(ue=_0(this,b+y*(360<=we?oe:oe-1),ce,me*Math.PI/180,we*Math.PI/180),z=ue*ce):y=Fe;else{for(ne=-1/0,b=0;b<oe;b++)De=E.M(b),_e=E.M(b===oe-1?0:b+1),isNaN(De.diameter)&&Lf(De,0),isNaN(_e.diameter)&&Lf(_e,0),ne=Math.max(ne,(De.diameter+_e.diameter)/2);ne+=y,b=_0(this,ne*(360<=we?oe:oe-1),ce,me*Math.PI/180,we*Math.PI/180),b>ue?(ue=b,z=ue*ce):ne=Fe/(360<=we?oe:oe-1)}if(this.kw=re,this.lc=ue,this.Zm=ce,this.lw=me,this.Wp=we,this.Ti=y,this.me=z,this.Jp=ne,y=E,E=this.kw,re=this.lc,ue=this.lw,ce=this.Wp,me=this.Ti,we=this.me,oe=this.Jp,this.direction!==ig&&this.direction!==Ep||E!==nd)if(this.direction===ig||this.direction===Ep){switch(ne=0,E){case Bf:ne=180*j0(this,re,we,ue,oe)/Math.PI;break;case td:oe=y=0,ne=a.first(),ne!==null&&(y=Lf(ne,Math.PI/2)),ne=x.first(),ne!==null&&(oe=Lf(ne,Math.PI/2)),ne=180*j0(this,re,we,ue,me+(y+oe)/2)/Math.PI;break;case Qh:ne=ce/y.length}if(this.direction===ig){switch(E){case Bf:vm(this,a,ue,Mf);break;case td:mm(this,a,ue,Mf);break;case Qh:pm(this,a,ce/2,ue,Mf)}switch(E){case Bf:vm(this,x,ue+ne,Mu);break;case td:mm(this,x,ue+ne,Mu);break;case Qh:pm(this,x,ce/2,ue+ne,Mu)}}else{switch(E){case Bf:vm(this,x,ue,Mf);break;case td:mm(this,x,ue,Mf);break;case Qh:pm(this,x,ce/2,ue,Mf)}switch(E){case Bf:vm(this,a,ue+ne,Mu);break;case td:mm(this,a,ue+ne,Mu);break;case Qh:pm(this,a,ce/2,ue+ne,Mu)}}}else switch(E){case Bf:vm(this,y,ue,this.direction);break;case td:mm(this,y,ue,this.direction);break;case Qh:pm(this,y,ce,ue,this.direction);break;case nd:Ix(this,y,ce,ue,this.direction)}else Ix(this,y,ce,ue-ce/2,Mu)}this.updateParts(),this.network=null,this.isValidLayout=!0};function pm(a,y,x,E,b){var z=a.Wp,ne=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var ue=E+(b===Mu?oe*x/(360<=z?re:re-1):-(oe*x)/re),ce=y.M(oe),me=ne*Math.tan(ue)/a;me=Math.sqrt((ne*ne+a*a*me*me)/(1+me*me)),ce.centerX=me*Math.cos(ue),ce.centerY=me*Math.sin(ue),ce.actualAngle=180*ue/Math.PI}}function mm(a,y,x,E){var b=a.lc,z=a.me,ne=a.Ti;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var ue=y.M(oe),ce=y.M(oe===re-1?0:oe+1),me=z*Math.sin(x);ue.centerX=b*Math.cos(x),ue.centerY=me,ue.actualAngle=180*x/Math.PI,isNaN(ue.diameter)&&Lf(ue,0),isNaN(ce.diameter)&&Lf(ce,0),ue=j0(a,b,z,E===Mu?x:-x,(ue.diameter+ce.diameter)/2+ne),x+=E===Mu?ue:-ue}}function vm(a,y,x,E){var b=a.lc,z=a.me,ne=a.Jp;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var ue=y.M(oe);ue.centerX=b*Math.cos(x),ue.centerY=z*Math.sin(x),ue.actualAngle=180*x/Math.PI,ue=j0(a,b,z,E===Mu?x:-x,ne),x+=E===Mu?ue:-ue}}function Ix(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new ym,360>x){for(z=E+(b===Mu?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,Tx(a,y,x,E,b)}else Ox(a,y,x,E,b);a.Xr.commit(y)}function Ox(a,y,x,E,b){var z=a.lc,ne=a.Ti,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),ue=a.me*Math.sin(E*Math.PI/180),ce=y.Fa();if(ce.length===3)ce[0].centerX=z,ce[0].centerY=0,ce[1].centerX=ce[0].centerX-ce[0].width/2-ce[1].width/2-ne,ce[1].y=ce[0].y,ce[2].centerX=(ce[0].centerX+ce[1].centerX)/2,ce[2].y=ce[0].y-ce[2].height-ne;else if(ce.length===4)ce[0].centerX=z,ce[0].centerY=0,ce[2].centerX=-ce[0].centerX,ce[2].centerY=ce[0].centerY,ce[1].centerX=0,ce[1].y=Math.min(ce[0].y,ce[2].y)-ce[1].height-ne,ce[3].centerX=0,ce[3].y=Math.max(ce[0].y+ce[0].height+ne,ce[2].y+ce[2].height+ne);else{z=st.alloc();for(var me=0;me<ce.length&&(ce[me].centerX=oe,ce[me].centerY=ue,!(me>=ce.length-1));me++)kx(a,oe,ue,ce,me,b,z)||Rx(a,oe,ue,ce,me,b,z),oe=z.x,ue=z.y;if(st.free(z),a.mj++,!(23<a.mj)){oe=ce[0].centerX,ue=ce[0].centerY,z=ce[ce.length-1].centerX,me=ce[ce.length-1].centerY;var we=Math.abs(oe-z)-((ce[0].width+ce[ce.length-1].width)/2+ne),Fe=Math.abs(ue-me)-((ce[0].height+ce[ce.length-1].height)/2+ne);ne=0,1>Math.abs(Fe)?Math.abs(oe-z)<(ce[0].width+ce[ce.length-1].width)/2&&(ne=0):ne=0<Fe?Fe:1>Math.abs(we)?0:we,oe=Math.abs(z)>Math.abs(me)?0<z!=ue>me:0<me!=oe<z,(oe=b===Mu?oe:!oe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ce[ce.length-1].width),ne=Math.min(ne,-ce[ce.length-1].height)),a.Xr.compare(ne,ce),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ce.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*re,Ox(a,y,x,E,b))}}}function Tx(a,y,x,E,b){for(var z=a.lc,ne=a.me,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),ue=ne*Math.sin(E*Math.PI/180),ce=st.alloc(),me=y.Fa(),we=0;we<me.length&&(me[we].centerX=oe,me[we].centerY=ue,!(we>=me.length-1));we++)kx(a,oe,ue,me,we,b,ce)||Rx(a,oe,ue,me,we,b,ce),oe=ce.x,ue=ce.y;if(st.free(ce),a.mj++,!(23<a.mj)){if(oe=Math.atan2(ue,oe),oe=b===Mu?a.gt-oe:oe-a.gt,oe=Math.abs(oe)<Math.abs(oe-2*Math.PI)?oe:oe-2*Math.PI,z=oe*(z+ne)/2,ne=a.Xr,Math.abs(z)<Math.abs(ne.Pl))for(ne.Pl=z,ne.mk=[],ne.tm=[],oe=0;oe<me.length;oe++)ne.mk[oe]=me[oe].bounds.x,ne.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,Tx(a,y,x,E,b))}}function kx(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,ue=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ce=!1;if(0<=x!=(z===Mu)){if(z=y+a,z>re){if(z=y-a,z<-re)return ne.x=z,ne.y=ue,!1;ce=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ne.x=z,ne.y=ue,!1;ce=!0}return ue=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==ce&&(ue=-ue),Math.abs(x-ue)>(E[b].height+E[b+1].height)/2?(ne.x=z,ne.y=ue,!1):(ne.x=z,ne.y=ue,!0)}function Rx(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,ue=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Mu)){if(z=x-a,z<-oe){if(z=x+a,z>oe){ne.x=ue,ne.y=z;return}E=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){ne.x=ue,ne.y=z;return}E=!0}ue=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==E&&(ue=-ue),ne.x=ue,ne.y=z}Os.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Os.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 st(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},Os.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function Cy(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,re=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),oe=0,ue=0;ue<=z;ue++){E!==void 0&&b!==void 0?oe=E+ue*b/z:oe=ue*Math.PI/(2*z);var ce=Math.sin(oe);ne+=Math.sqrt(1-a*a*ce*ce)*re}return E!==void 0&&b!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function _0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?Cy(a,1,x,E,b):Cy(a,1,x))}function j0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var re=0;;re++){var oe=Math.sin(E+re*a);if(ne+=(y>x?y:x)*Math.sqrt(1-z*z*oe*oe)*a,ne>=b)return re*a}}Os.prototype.sort=function(a){switch(this.sorting){case z0:break;case Z0:a.reverse();break;case H0:a.sort(this.comparer);break;case W0:a.sort(this.comparer),a.reverse();break;case bp:return this.ak(IS(a));default:Et("Invalid sorting type.")}return a};function IS(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Un;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var ne=0;ne<a.length;ne++){var re=a.M(ne).edgesCount;re>b&&(b=re,z=ne)}else for(ne=0;ne<a.length;ne++)re=y[ne],re>b&&(b=re,z=ne);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),ne=z.sourceEdges;ne.next();)b=a.indexOf(ne.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}Os.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var ne=[],re=[];E=[],b=new Un;for(var oe=0,ue=0;ue<y.length;ue++){var ce=y[ue].length;if(ce===1)E.push(ue);else if(ce===0)b.add(a.M(ue));else{if(oe===0)x.push(ue);else{for(var me=ce=1/0,we=-1,Fe=[],De=0;De<x.length;De++)0>y[x[De]].indexOf(x[De===x.length-1?0:De+1])&&Fe.push(De===x.length-1?0:De+1);if(Fe.length===0)for(De=0;De<x.length;De++)Fe.push(De);for(De=0;De<Fe.length;De++){for(var _e=Fe[De],pt=y[ue],it=0,bt=0;bt<ne.length;bt++){var It=z[ne[bt]],Rt=z[re[bt]];if(It<Rt){var Kt=It;It=Rt}else Kt=Rt;if(Kt<_e&&_e<=It)for(Rt=0;Rt<pt.length;Rt++){var hn=pt[Rt];0>x.indexOf(hn)||Kt<z[hn]&&z[hn]<It||Kt===z[hn]||It===z[hn]||it++}else for(Rt=0;Rt<pt.length;Rt++)hn=pt[Rt],0>x.indexOf(hn)||Kt<z[hn]&&z[hn]<It&&Kt!==z[hn]&&It!==z[hn]&&it++}for(pt=it,bt=it=0;bt<y[ue].length;bt++)Kt=x.indexOf(y[ue][bt]),0<=Kt&&(Kt=Math.abs(_e-(Kt>=_e?Kt+1:Kt)),it+=Kt<x.length+1-Kt?Kt:x.length+1-Kt);for(bt=0;bt<ne.length;bt++)Kt=z[ne[bt]],It=z[re[bt]],Kt>=_e&&Kt++,It>=_e&&It++,Kt>It&&(Rt=It,It=Kt,Kt=Rt),It-Kt<(x.length+2)/2==(Kt<_e&&_e<=It)&&it++;(pt<ce||pt===ce&&it<me)&&(ce=pt,me=it,we=_e)}for(x.splice(we,0,ue),ce=0;ce<x.length;ce++)z[x[ce]]=ce;for(ce=0;ce<y[ue].length;ce++)me=y[ue][ce],0<=x.indexOf(me)&&(ne.push(ue),re.push(me))}oe++}}for(ne=x.length;;){for(z=!0,re=0;re<E.length;re++)if(oe=E[re],ue=y[oe][0],ce=x.indexOf(ue),0<=ce){for(we=me=0;we<y[ue].length;we++)Fe=x.indexOf(y[ue][we]),0>Fe||Fe===ce||(De=Fe>ce?Fe-ce:ce-Fe,me+=Fe<ce!=De>ne-De?1:-1);x.splice(0>me?ce:ce+1,0,oe),E.splice(re,1),re--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},Qe.Object.defineProperties(Os.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!==nd&&a!==td&&a!==Bf&&a!==Qh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Mu&&a!==Mf&&a!==ig&&a!==Ep||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==z0&&a!==Z0&&a!==H0&&!W0&&a!==bp||(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!==G0&&a!==_g||(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 td=new Cn(Os,"ConstantSpacing",0),Bf=new Cn(Os,"ConstantDistance",1),Qh=new Cn(Os,"ConstantAngle",2),nd=new Cn(Os,"Packed",3),Mu=new Cn(Os,"Clockwise",4),Mf=new Cn(Os,"Counterclockwise",5),ig=new Cn(Os,"BidirectionalLeft",6),Ep=new Cn(Os,"BidirectionalRight",7),z0=new Cn(Os,"Forwards",8),Z0=new Cn(Os,"Reverse",9),H0=new Cn(Os,"Ascending",10),W0=new Cn(Os,"Descending",11),bp=new Cn(Os,"Optimized",12),G0=new Cn(Os,"Pythagorean",13),_g=new Cn(Os,"Circular",14);Os.className="CircularLayout",Os.ConstantSpacing=td,Os.ConstantDistance=Bf,Os.ConstantAngle=Qh,Os.Packed=nd,Os.Clockwise=Mu,Os.Counterclockwise=Mf,Os.BidirectionalLeft=ig,Os.BidirectionalRight=Ep,Os.Forwards=z0,Os.Reverse=Z0,Os.Ascending=H0,Os.Descending=W0,Os.Optimized=bp,Os.Pythagorean=G0,Os.Circular=_g;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 Fp(a){ts.call(this,a)}$t(Fp,ts),Fp.prototype.createVertex=function(){return new xm(this)},Fp.prototype.createEdge=function(){return new $0(this)},Fp.className="CircularNetwork";function xm(a){ul.call(this,a),this.u=this.Si=NaN}$t(xm,ul);function Lf(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===nd)if(x.nodeDiameterFormula===_g)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===_g?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Qe.Object.defineProperties(xm.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)}}}),xm.className="CircularVertex";function $0(a){hc.call(this,a)}$t($0,hc),$0.className="CircularEdge";function ql(a){xs.call(this),this.ah=null,this.An=0,this.$d=new pi(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}$t(ql,xs),ql.prototype.cloneProtected=function(a){xs.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},ql.prototype.createNetwork=function(){return new jg(this)},ql.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}_x(this,0,a)}this.network=y;var ne=E=x.iterator;E=this.arrangementSpacing;var re=ne.count,oe=!0;z=b=0;for(var ue=vi(),ce=0;ce<re+y.vertexes.count+2;ce++)ue[ce]=null;re=0,ne.reset();for(var me=Mn.alloc();ne.next();)if(ce=ne.value,this.computeBounds(ce,me),oe)oe=!1,b=me.x+me.width/2,z=me.y+me.height/2,ue[0]=new st(me.x+me.width+E.width,me.y),ue[1]=new st(me.x,me.y+me.height+E.height),re=2;else{var we=jx(ue,re,b,z,me.width,me.height,E),Fe=ue[we],De=new st(Fe.x+me.width+E.width,Fe.y),_e=new st(Fe.x,Fe.y+me.height+E.height);for(we+1<re&&ue.splice(we+1,0,null),ue[we]=De,ue[we+1]=_e,re++,we=Fe.x-me.x,Fe=Fe.y-me.y,ce=ce.vertexes.iterator;ce.next();)De=ce.value,De.centerX+=we,De.centerY+=Fe}for(Mn.free(me),ce=y.vertexes.iterator;ce.next();)ne=ce.value,we=ne.bounds,2>re?(b=we.x+we.width/2,z=we.y+we.height/2,ue[0]=new st(we.x+we.width+E.width,we.y),ue[1]=new st(we.x,we.y+we.height+E.height),re=2):(oe=jx(ue,re,b,z,we.width,we.height,E),me=ue[oe],Fe=new st(me.x+we.width+E.width,me.y),we=new st(me.x,me.y+we.height+E.height),oe+1<re&&ue.splice(oe+1,0,null),ue[oe]=Fe,ue[oe+1]=we,re++,ne.centerX=me.x+ne.width/2,ne.centerY=me.y+ne.height/2);for(Ti(ue),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}Zx(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},ql.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},ql.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function _x(a,y,x){if(OS(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=TS(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,_x(a,y+1,x),Zx(a,z),kS(a,b),y=b.vertexes.Fa(),y.sort(function(ne,re){return ne===null||re===null||ne===re?0:re.Vd-ne.Vd}),x=0;x<y.length;x++)RS(a,y[x]);a.Zf=E}}function OS(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function TS(a,y){for(var x=a.network,E=new jg(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var ne=new Hx;ne.Rs=z.Vd,ne.Ss=z.width,ne.Qs=z.height,ne.Sv=z.focus.x,ne.Tv=z.focus.y,z.We===null&&(z.We=new Un),z.We.add(ne),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var re=z.value;b=re.fromVertex,ne=re.toVertex,b.network===E&&ne.network===E?E.Bo(re):b.network===E?(re=b.Hj,re===null&&(re=new Un,b.Hj=re),re.add(ne),b.Vd--,b.sh+=ne.sh):ne.network===E&&(re=ne.Hj,re===null&&(re=new Un,ne.Hj=re),re.add(b),ne.Vd--,ne.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,nt.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var oe=b.Hj;if(oe!==null&&0<oe.count&&(ne=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=ne))){for(var ue=re=0,ce=oe.count-ne;ce<oe.count;ce++){var me=oe.M(ce),we=null;for(z=me.edges.iterator;z.next();){var Fe=z.value;if(Fe.Ax(me)===b){we=Fe;break}}we!==null&&(ue+=we.length,re+=me.width*me.height)}z=b.centerX,oe=b.centerY,ce=b.width,me=b.height,we=b.focus,Fe=ce*me,1>Fe&&(Fe=1),re=nt.sqrt((re+Fe+ue*ue*4/(ne*ne))/Fe),ne=(re-1)*ce/2,re=(re-1)*me/2,b.bounds=new Mn(z-we.x-ne,oe-we.y-re,ce+2*ne,me+2*re),b.focus=new st(we.x+ne,we.y+re)}}return a.network=E,x}function kS(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,ne=b.Tv;E.bounds=new Mn(E.centerX-z,E.centerY-ne,b.Ss,b.Qs),E.focus=new st(z,ne),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function RS(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),z=ne.Ss,ne=ne.Qs),z=nt.sqrt(z*z+ne*ne)/2;for(var re=!1,oe=ne=0,ue=0,ce=y.vertexes.iterator;ce.next();){var me=ce.value;1>=me.Vd?oe++:(re=!0,ue++,ne+=Math.atan2(y.centerY-me.centerY,y.centerX-me.centerX))}if(oe!==0){for(0<ue&&(ne/=ue),ue=y=0,y=re?2*Math.PI/(oe+1):2*Math.PI/oe,oe%2===0&&(ue=y/2),1<x.count&&x.sort(function(Fe,De){return Fe===null||De===null||Fe===De?0:De.width*De.height-Fe.width*Fe.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(ce=null,me=oe.edges.iterator;me.next();){ce=me.value;break}me=oe.width;var we=oe.height;me=nt.sqrt(me*me+we*we)/2,ce=z+ce.length+me,me=ne+(y*(re/2>>1)+ue)*(re%2===0?1:-1),oe.centerX=E+ce*Math.cos(me),oe.centerY=b+ce*Math.sin(me),re++}}}}function jx(a,y,x,E,b,z,ne){var re=9e19,oe=-1,ue=0;e:for(;ue<y;ue++){var ce=a[ue],me=ce.x-x,we=ce.y-E;if(me=me*me+we*we,me<re){for(we=ue-1;0<=we;we--)if(a[we].y>ce.y&&a[we].x-ce.x<b+ne.width)continue e;for(we=ue+1;we<y;we++)if(a[we].x>ce.x&&a[we].y-ce.y<z+ne.height)continue e;oe=ue,re=me}}return oe}ql.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},ql.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function zx(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,ne=z.x;y=z.y;var re=z.width;return z=z.height,E+b<ne?a>y+z?(x=E+b-ne,a=a-y-z,nt.sqrt(x*x+a*a)):a+x<y?(E=E+b-ne,a=a+x-y,nt.sqrt(E*E+a*a)):ne-(E+b):E>ne+re?a>y+z?(x=E-ne-re,a=a-y-z,nt.sqrt(x*x+a*a)):a+x<y?(E=E-ne-re,a=a+x-y,nt.sqrt(E*E+a*a)):E-(ne+re):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function Zx(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,_S(a)););a.ah=null}function _S(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var E=x.centerX,b=E,z=x=x.centerY,ne=1;ne<y.length;ne++){var re=y[ne];re.forceX=0,re.forceY=0;var oe=re.centerX;re=re.centerY,E=Math.min(E,oe),b=Math.max(b,oe),x=Math.min(x,re),z=Math.max(z,re)}(b=b-E>z-x)?y.sort(function(_e,pt){return _e===null||pt===null||_e===pt?0:_e.centerX-pt.centerX}):y.sort(function(_e,pt){return _e===null||pt===null||_e===pt?0:_e.centerY-pt.centerY}),x=a.Zf;var ue=E=re=0;for(z=0;z<y.length;z++){ne=y[z],E=ne.bounds,re=ne.focus,oe=E.x+re.x;var ce=E.y+re.y;E=ne.charge*a.electricalFieldX(oe,ce),ue=ne.charge*a.electricalFieldY(oe,ce),E+=ne.mass*a.gravitationalFieldX(oe,ce),ue+=ne.mass*a.gravitationalFieldY(oe,ce),ne.forceX+=E,ne.forceY+=ue;for(var me=z+1;me<y.length;me++){var we=y[me];if(we!==ne){E=we.bounds,re=we.focus,ue=E.x+re.x;var Fe=E.y+re.y;if(oe-ue>x||ue-oe>x){if(b)break}else if(ce-Fe>x||Fe-ce>x){if(!b)break}else{var De=zx(ne,we);1>De?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new K0),De=E.random(),re=E.random(),oe>ue?(E=Math.abs(we.bounds.right-ne.bounds.x),E=(1+E)*De):oe<ue?(E=Math.abs(we.bounds.x-ne.bounds.right),E=-(1+E)*De):(E=Math.max(we.width,ne.width),E=(1+E)*De-E/2),ce>Fe?(ue=Math.abs(we.bounds.bottom-ne.bounds.y),ue=(1+ue)*re):oe<ue?(ue=Math.abs(we.bounds.y-ne.bounds.bottom),ue=-(1+ue)*re):(ue=Math.max(we.height,ne.height),ue=(1+ue)*re-ue/2)):(re=-(ne.charge*we.charge)/(De*De),E=(ue-oe)/De*re,ue=(Fe-ce)/De*re),ne.forceX+=E,ne.forceY+=ue,we.forceX-=E,we.forceY-=ue}}}}for(b=a.network.edges.iterator;b.next();)re=b.value,x=re.fromVertex,z=re.toVertex,ne=x.bounds,oe=x.focus,E=ne.x+oe.x,ne=ne.y+oe.y,ce=z.bounds,me=z.focus,oe=ce.x+me.x,ce=ce.y+me.y,me=zx(x,z),1>me?(me=a.randomNumberGenerator,me===null&&(a.randomNumberGenerator=me=new K0),re=me.random(),me=me.random(),E=(E>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,ue=(ne>ce?1:-1)*(1+(z.height>x.height?z.height:x.height))*me):(re=re.stiffness*(me-re.length),E=(oe-E)/me*re,ue=(ce-ne)/me*re),x.forceX+=E,x.forceY+=ue,z.forceX-=E,z.forceY-=ue;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}ql.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},ql.prototype.moveFixedVertex=function(){},ql.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},ql.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Fi,y.toSpot=Fi)}},ql.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Mn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Mn.free(x)}x=Mn.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}Mn.free(x)},ql.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},ql.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},ql.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},ql.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},ql.prototype.electricalFieldX=function(){return 0},ql.prototype.electricalFieldY=function(){return 0},ql.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},ql.prototype.gravitationalFieldX=function(){return 0},ql.prototype.gravitationalFieldY=function(){return 0},ql.prototype.isFixed=function(a){return a.isFixed},Qe.Object.defineProperties(ql.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"&&Et('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())}}}),ql.className="ForceDirectedLayout";function Hx(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}Hx.className="ForceDirectedSubnet";function jg(a){ts.call(this,a)}$t(jg,ts),jg.prototype.createVertex=function(){return new Sm(this)},jg.prototype.createEdge=function(){return new Pm(this)},jg.className="ForceDirectedNetwork";function Sm(a){ul.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}$t(Sm,ul),Qe.Object.defineProperties(Sm.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)}}}),Sm.className="ForceDirectedVertex";function Pm(a){hc.call(this,a),this.j=this.o=NaN}$t(Pm,hc),Qe.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 K0(){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()}K0.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},K0.className="RandomNumberGenerator";function za(a){xs.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 st,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}$t(za,xs),za.prototype.cloneProtected=function(a){xs.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},za.prototype.qb=function(a){a.classType===za?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:Et("Unknown enum value: "+a):xs.prototype.qb.call(this,a)},za.prototype.createNetwork=function(){return new Mp(this)},za.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 E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var ne=0,re=0,oe=0,ue=0;if(E.link!==null){if(re=E.link,re===null)continue;var ce=b.node;if(ne=z.node,ce===null||ne===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(E.rev){ue=me;var Fe=we;me=oe,we=re,oe=ue,re=Fe}var De=b.focus;ue=z.focus;var _e=E.rev?z.bounds:b.bounds;Fe=st.alloc(),ce!==me?_e.w()&&me.isVisible()?me.actualBounds.w()?(Vh(me,we,Oo,Fe),Fe.x+=me.actualBounds.x-_e.x,Fe.y+=me.actualBounds.y-_e.y):(Vh(me,we,Oo,Fe),Fe.w()||Fe.assign(De)):Fe.assign(De):_e.w()?(Vh(me,we,Oo,Fe),Fe.w()||Fe.assign(De)):Fe.assign(De),me=E.rev?b.bounds:z.bounds,ce=st.alloc(),ne!==oe?me.w()&&oe.isVisible()?oe.actualBounds.w()?(Vh(oe,re,Oo,ce),ce.x+=oe.actualBounds.x-me.x,ce.y+=oe.actualBounds.y-me.y):(Vh(oe,re,Oo,ce),ce.w()||ce.assign(ue)):ce.assign(ue):me.w()?(Vh(oe,re,Oo,ce),ce.w()||ce.assign(ue)):ce.assign(ue),this.K===90||this.K===270?(ne=Math.round((Fe.x-De.x)/this.kc),oe=Fe.x,re=Math.round((ce.x-ue.x)/this.kc),ue=ce.x):(ne=Math.round((Fe.y-De.y)/this.kc),oe=Fe.y,re=Math.round((ce.y-ue.y)/this.kc),ue=ce.y),st.free(Fe),st.free(ce),E.portFromColOffset=ne,E.portFromPos=oe,E.portToColOffset=re,E.portToPos=ue}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(Fe=b.layer,ce=z.layer,me=0,_e=E.link,_e!==null){var pt=_e.fromPort,it=_e.toPort;if(pt!==null&&it!==null){var bt=_e.fromNode;if(we=_e.toNode,bt!==null&&we!==null){var It=X0(this,!0),Rt=X0(this,!1),Kt=this.setsPortSpots?It:_e.computeSpot(!0,pt);De=this.setsPortSpots?Rt:_e.computeSpot(!1,it);var hn=_e.isOrthogonal;Kt.$c()&&Kt.Hf(Rt)&&De.$c()&&De.Hf(It)?me=0:(It=_e.getLinkPoint(bt,pt,Kt,!0,hn,we,it,st.alloc()),Rt=_e.getLinkDirection(bt,pt,It,Kt,!0,hn,we,it),st.free(It),Kt.ys()||Rt!==Jx(this,E,!0)?this.setsPortSpots&&bt!==null&&bt.ports.count===1&&E.rev&&(me+=1):me+=1,Kt=_e.getLinkPoint(we,it,De,!1,hn,bt,pt,st.alloc()),_e=_e.getLinkDirection(we,it,Kt,De,!1,hn,bt,pt),st.free(Kt),De.ys()||_e!==Jx(this,E,!1)?this.setsPortSpots&&we!==null&&we.ports.count===1&&E.rev&&(me+=2):me+=2)}}}if(we=me,me=we===1||we===3,(we=we===2||we===3)&&(De=a.createVertex(),De.node=null,De.Dj=1,De.layer=Fe,De.near=b,a.dh(De),b=a.Zj(b,De,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=ne,b.portToColOffset=0,b.portFromPos=oe,b.portToPos=0,b=De),_e=1,me&&_e--,Fe-ce>_e&&0<Fe){for(E.valid=!1,De=a.createVertex(),De.node=null,De.Dj=2,De.layer=Fe-1,a.dh(De),b=a.Zj(b,De,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=we?0:ne,b.portToColOffset=0,b.portFromPos=we?0:oe,b.portToPos=0,b=De,Fe--;Fe-ce>_e&&0<Fe;)De=a.createVertex(),De.node=null,De.Dj=3,De.layer=Fe-1,a.dh(De),b=a.Zj(b,De,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=De,Fe--;b=a.Zj(De,z,E.link),b.valid=!me,me&&(De.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=re,b.portFromPos=0,b.portToPos=ue}else E.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=Nf(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),Af(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},za.prototype.linkMinLength=function(){return 1};function Ey(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}za.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},za.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 Hu(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function Ic(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function Wx(a,y,x){var E=Nf(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,ne=0;ne<b;ne++){var re=0,oe=E[ne],ue=oe.near;if(ue!==null&&ue.layer===oe.layer)if(oe=ue.index,oe>ne)for(var ce=ne+1;ce<oe;ce++){var me=E[ce];me.near===ue&&me.Dj===ue.Dj||re++}else for(ce=ne-1;ce>oe;ce--)me=E[ce],me.near===ue&&me.Dj===ue.Dj||re++;var we;if(0<=x)for(oe=E[ne].sourceEdgesArrayAccess,ue=0;ue<oe.length;ue++){var Fe=oe[ue];if(Fe.valid&&Fe.fromVertex.layer!==y)for(me=Fe.fromVertex.index,ce=Fe.portToPos,Fe=Fe.portFromPos,we=ue+1;we<oe.length;we++){var De=oe[we];if(De.valid&&De.fromVertex.layer!==y){var _e=De.fromVertex.index,pt=De.portToPos;De=De.portFromPos,ce<pt&&(me>_e||me===_e&&Fe>De)&&re++,pt<ce&&(_e>me||_e===me&&De>Fe)&&re++}}}if(0>=x){for(oe=E[ne].destinationEdgesArrayAccess,ue=0;ue<oe.length;ue++)if(Fe=oe[ue],Fe.valid&&Fe.toVertex.layer!==y)for(me=Fe.toVertex.index,ce=Fe.portToPos,Fe=Fe.portFromPos,we=ue+1;we<oe.length;we++)De=oe[we],De.valid&&De.toVertex.layer!==y&&(_e=De.toVertex.index,pt=De.portToPos,De=De.portFromPos,Fe<De&&(me>_e||me===_e&&ce>pt)&&re++,De<Fe&&(_e>me||_e===me&&pt>ce)&&re++)}for(z[ne*b+ne]=re,oe=ne+1;oe<b;oe++){var it=0,bt=0;if(0<=x){re=E[ne].sourceEdgesArrayAccess;var It=E[oe].sourceEdgesArrayAccess;for(ue=0;ue<re.length;ue++)if(Fe=re[ue],Fe.valid&&Fe.fromVertex.layer!==y)for(me=Fe.fromVertex.index,Fe=Fe.portFromPos,we=0;we<It.length;we++)De=It[we],De.valid&&De.fromVertex.layer!==y&&(_e=De.fromVertex.index,De=De.portFromPos,(me<_e||me===_e&&Fe<De)&&bt++,(_e<me||_e===me&&De<Fe)&&it++)}if(0>=x){for(re=E[ne].destinationEdgesArrayAccess,It=E[oe].destinationEdgesArrayAccess,ue=0;ue<re.length;ue++)if(Fe=re[ue],Fe.valid&&Fe.toVertex.layer!==y)for(me=Fe.toVertex.index,ce=Fe.portToPos,we=0;we<It.length;we++)De=It[we],De.valid&&De.toVertex.layer!==y&&(_e=De.toVertex.index,pt=De.portToPos,(me<_e||me===_e&&ce<pt)&&bt++,(_e<me||_e===me&&pt<ce)&&it++)}z[ne*b+oe]=it,z[oe*b+ne]=bt}}return Af(a,y,E),z}za.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=Wx(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function V0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Nf(E,b),ne=E.tc[b],re=0,oe=0;oe<ne;oe++){var ue=z[oe].destinationEdgesArrayAccess;if(ue!==null)for(var ce=0;ce<ue.length;ce++){var me=ue[ce];if(me.valid&&me.toVertex.layer!==b){var we=me.fromVertex.column+me.portFromColOffset,Fe=me.toVertex.column+me.portToColOffset;re+=(Math.abs(we-Fe)+1)*Ey(me)}}}Af(E,b,z),y+=re}return y}za.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 by(a,y,x){for(var E=Nf(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var ue=null;0<=x&&(ue=re.destinationEdgesArrayAccess);var ce=0,me=0,we=re.near;if(we!==null&&we.layer===re.layer&&(ce+=we.column-1,me++),oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Fe=re.fromVertex;re.valid&&!re.rev&&Fe.layer!==y&&(ce+=Fe.column,me++)}if(ue!==null)for(oe=0;oe<ue.length;oe++)re=ue[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(ce+=we.column,me++);z[ne]=me===0?-1:ce/me}return Af(a,y,E),z}function Gx(a,y,x){for(var E=Nf(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var ue=null;0<=x&&(ue=re.destinationEdgesArrayAccess);var ce=0,me=[],we=re.near;if(we!==null&&we.layer===re.layer&&(me[ce]=we.column-1,ce++),re=void 0,oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Fe=re.fromVertex;re.valid&&!re.rev&&Fe.layer!==y&&(me[ce]=Fe.column+re.portFromColOffset,ce++)}if(ue!==null)for(oe=0;oe<ue.length;oe++)re=ue[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(me[ce]=we.column+re.portToColOffset,ce++);ce===0?z[ne]=-1:(me.sort(function(De,_e){return De-_e}),ue=ce>>1,z[ne]=ce&1?me[ue]:me[ue-1]+me[ue]>>1)}return Af(a,y,E),z}function wm(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();){var re=ne.value,oe=re.toVertex,ue=y.layer-oe.layer;re=a.linkMinLength(re),ue===re&&wm(a,oe,x,E,b,z)}if(z)for(ne=y.sourceEdges;ne.next();)re=ne.value,oe=re.fromVertex,ue=oe.layer-y.layer,re=a.linkMinLength(re),ue===re&&wm(a,oe,x,E,b,z)}}function Fy(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();)Fy(a,ne.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)Fy(a,y.value.fromVertex,x,E,b,z)}}za.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Ly:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;jS(a)!==null;){for(b=$x(a);b!==null;)E[x]=b,x--,b.valid=!1,b=$x(a);for(b=Kx(a);b!==null;)E[y]=b,y++,b.valid=!1,b=Kx(a);b=null;for(var z=0,ne=this.network.vertexes.iterator;ne.next();){var re=ne.value;if(re.valid){for(var oe=0,ue=re.destinationEdges;ue.next();)ue.value.toVertex.valid&&oe++;ue=0;for(var ce=re.sourceEdges;ce.next();)ce.value.fromVertex.valid&&ue++;(b===null||z<oe-ue)&&(b=re,z=oe-ue)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case J0:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&By(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&By(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Cm:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function jS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function $x(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function Kx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function By(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,By(a,b))}y.finish=a.Kn,a.Kn++}za.prototype.assignLayers=function(){switch(this.Zk){case Ny:Vx(this);break;case Ay:for(var a,y=this.network.vertexes.iterator;y.next();)a=Yx(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(Vx(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&Xx(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 Vx(a){for(var y=a.network.vertexes.iterator;y.next();){var x=Ux(a,y.value);a.Ia=Math.max(x,a.Ia)}}function Ux(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,Ux(a,z)+b)}y.layer=x}else x=y.layer;return x}function Yx(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,Yx(a,z)+b)}y.layer=x}else x=y.layer;return x}function Xx(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)Xx(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var ne=E[z],re=ne.fromVertex,oe=ne.toVertex;ne=a.linkMinLength(ne),re.layer-oe.layer>ne&&wm(a,re,0,-1,!0,!1)}for(wm(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,re=0,oe=null,ne=a.network.vertexes.iterator;ne.next();){var ue=ne.value;if(ue.component===1){var ce=0,me=!1,we=ue.sourceEdgesArrayAccess;b=we.length;for(var Fe=0;Fe<b;Fe++){var De=we[Fe],_e=De.fromVertex;ce+=1,_e.component!==1&&(z+=1,_e=_e.layer-ue.layer,De=a.linkMinLength(De),E=Math.min(E,_e-De))}for(we=ue.destinationEdgesArrayAccess,b=we.length,Fe=0;Fe<b;Fe++)De=we[Fe].toVertex,--ce,De.component!==1?--z:me=!0;(oe===null||ce<re)&&!me&&(oe=ue,re=ce)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else oe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(wm(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,re=null,oe=a.network.vertexes.iterator;oe.next();)if(ne=oe.value,ne.component===1){for(ue=0,ce=!1,we=ne.sourceEdgesArrayAccess,me=we.length,Fe=0;Fe<me;Fe++)De=we[Fe].fromVertex,ue+=1,De.component!==1?E+=1:ce=!0;for(we=ne.destinationEdgesArrayAccess,me=we.length,Fe=0;Fe<me;Fe++)De=we[Fe],_e=De.toVertex,--ue,_e.component!==1&&(--E,_e=ne.layer-_e.layer,De=a.linkMinLength(De),b=Math.min(b,_e-De));(re===null||ue>z)&&!ce&&(re=ne,z=ue)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else re.component=0}}}function Jx(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}za.prototype.initializeIndices=function(){switch(this.Qk){default:case Iy: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&&Qx(this,x);break;case Dy: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&&qx(this,x)}};function Qx(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&Qx(a,E))}function qx(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&qx(a,E))}za.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Hu(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)U0(this,E,1),Hc(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=Hu(this)),E=this.Ia;0<=E;E--)U0(this,E,-1),Hc(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=Hu(this))}for(Ic(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)U0(this,E,0),Hc(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=Hu(this)),E=this.Ia;0<=E;E--)U0(this,E,0),Hc(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=Hu(this))}Ic(this,y);var z,ne,re;switch(this.rk){case Oy:break;case Ty:for(re=a+1;(E=this.countCrossings())<re;)for(re=E,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,-1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,0)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,0)||z;b>=a?Ic(this,y):(a=b,y=Hu(this))}break;default:case ev:for(x=this.Ia,ne=0,re=a+1;(E=this.countCrossings())<re;){for(re=E,z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,-1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,0)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,0)||z;b>=a?Ic(this,y):(a=b,y=Hu(this))}}Ic(this,y)};function U0(a,y,x){var E=Nf(a,y),b=a.tc[y],z=Gx(a,y,x),ne=by(a,y,x);for(x=0;x<b;x++)ne[x]===-1&&(ne[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var re=!0,oe;re;)for(re=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&ne[x+1]<ne[x])&&(re=!0,oe=z[x],z[x]=z[x+1],z[x+1]=oe,oe=ne[x],ne[x]=ne[x+1],ne[x+1]=oe,oe=E[x],E[x]=E[x+1],E[x+1]=oe);for(x=z=0;x<b;x++)oe=E[x],oe.index=x,z+=a.nodeMinColumnSpace(oe,!0),oe.column=z,z+=1,z+=a.nodeMinColumnSpace(oe,!1);Af(a,y,E)}function Hc(a,y,x){var E=Nf(a,y),b=a.tc[y];x=Wx(a,y,x);var z,ne=[];for(z=0;z<b;z++)ne[z]=-1;var re=[];for(z=0;z<b;z++)re[z]=-1;for(var oe=!1,ue=!0;ue;)for(ue=!1,z=0;z<b-1;z++){var ce=x[E[z].index*b+E[z+1].index],me=x[E[z+1].index*b+E[z].index],we=0,Fe=0,De=E[z].column,_e=E[z+1].column,pt=a.nodeMinColumnSpace(E[z],!0),it=a.nodeMinColumnSpace(E[z],!1),bt=a.nodeMinColumnSpace(E[z+1],!0),It=a.nodeMinColumnSpace(E[z+1],!1);pt=De-pt+bt,it=_e-it+It;var Rt=E[z].sourceEdges.iterator;for(Rt.reset();Rt.next();)if(bt=Rt.value,It=bt.fromVertex,bt.valid&&It.layer===y){for(bt=0;E[bt]!==It;)bt++;bt<z&&(we+=2*(z-bt),Fe+=2*(z+1-bt)),bt===z+1&&(we+=1),bt>z+1&&(we+=4*(bt-z),Fe+=4*(bt-(z+1)))}for(Rt=E[z].destinationEdges.iterator,Rt.reset();Rt.next();)if(bt=Rt.value,It=bt.toVertex,bt.valid&&It.layer===y){for(bt=0;E[bt]!==It;)bt++;bt===z+1&&(Fe+=1)}for(Rt=E[z+1].sourceEdges.iterator,Rt.reset();Rt.next();)if(bt=Rt.value,It=bt.fromVertex,bt.valid&&It.layer===y){for(bt=0;E[bt]!==It;)bt++;bt<z&&(we+=2*(z+1-bt),Fe+=2*(z-bt)),bt===z&&(Fe+=1),bt>z+1&&(we+=4*(bt-(z+1)),Fe+=4*(bt-z))}for(Rt=E[z+1].destinationEdges.iterator,Rt.reset();Rt.next();)if(bt=Rt.value,It=bt.toVertex,bt.valid&&It.layer===y){for(bt=0;E[bt]!==It;)bt++;bt===z&&(we+=1)}bt=It=0,Rt=ne[E[z].index];var Kt=re[E[z].index],hn=ne[E[z+1].index],bi=re[E[z+1].index];Rt!==-1&&(It+=Math.abs(Rt-De),bt+=Math.abs(Rt-it)),Kt!==-1&&(It+=Math.abs(Kt-De),bt+=Math.abs(Kt-it)),hn!==-1&&(It+=Math.abs(hn-_e),bt+=Math.abs(hn-pt)),bi!==-1&&(It+=Math.abs(bi-_e),bt+=Math.abs(bi-pt)),(Fe<we-.5||Fe===we&&me<ce-.5||Fe===we&&me===ce&&bt<It-.5)&&(ue=oe=!0,E[z].column=it,E[z+1].column=pt,ce=E[z],E[z]=E[z+1],E[z+1]=ce)}for(z=0;z<b;z++)E[z].index=z;return Af(a,y,E),oe}za.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&VS)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Bp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Bp(this,y,-1)||x;x=Bp(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)My(this,y,1);for(y=this.Md-1;0<=y;y--)My(this,y,-1);My(this,this.Md,0)}if(a&&(eS(this,-1),eS(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Bp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Bp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Bp(this,y,0)||x}}else WS(this)};function Bp(a,y,x){for(var E=!1;zS(a,y,x);)E=!0;return E}function zS(a,y,x){var E,b=Nf(a,y),z=a.tc[y],ne=by(a,y,-1);if(0<x)for(E=0;E<z;E++)ne[E]=-1;var re=by(a,y,1);if(0>x)for(E=0;E<z;E++)re[E]=-1;for(var oe=!1,ue=!0;ue;)for(ue=!1,E=0;E<z;E++){var ce=b[E].column,me=a.nodeMinColumnSpace(b[E],!0),we=a.nodeMinColumnSpace(b[E],!1),Fe=0;0>E-1||ce-b[E-1].column-1>me+a.nodeMinColumnSpace(b[E-1],!1)?Fe=ce-1:Fe=ce,me=E+1>=z||b[E+1].column-ce-1>we+a.nodeMinColumnSpace(b[E+1],!0)?ce+1:ce;var De=we=0,_e=0;if(0>=x)for(var pt=b[E].sourceEdges.iterator;pt.next();){var it=pt.value,bt=it.fromVertex;if(it.valid&&bt.layer!==y){var It=Ey(it),Rt=it.portFromColOffset;it=it.portToColOffset,bt=bt.column,we+=(Math.abs(ce+it-(bt+Rt))+1)*It,De+=(Math.abs(Fe+it-(bt+Rt))+1)*It,_e+=(Math.abs(me+it-(bt+Rt))+1)*It}}if(0<=x)for(pt=b[E].destinationEdges.iterator;pt.next();)it=pt.value,bt=it.toVertex,it.valid&&bt.layer!==y&&(It=Ey(it),Rt=it.portFromColOffset,it=it.portToColOffset,bt=bt.column,we+=(Math.abs(ce+Rt-(bt+it))+1)*It,De+=(Math.abs(Fe+Rt-(bt+it))+1)*It,_e+=(Math.abs(me+Rt-(bt+it))+1)*It);it=Rt=It=0,pt=ne[b[E].index],bt=re[b[E].index],pt!==-1&&(It+=Math.abs(pt-ce),Rt+=Math.abs(pt-Fe),it+=Math.abs(pt-me)),bt!==-1&&(It+=Math.abs(bt-ce),Rt+=Math.abs(bt-Fe),it+=Math.abs(bt-me)),De<we||De===we&&Rt<It?(ue=oe=!0,b[E].column=Fe):(_e<we||_e===we&&it<It)&&(ue=oe=!0,b[E].column=me)}return Af(a,y,b),a.normalize(),oe}function My(a,y,x){var E=Nf(a,y),b=a.tc[y],z=Gx(a,y,x),ne=[];for(x=0;x<b;x++)ne[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var re=E[x].column,oe=a.nodeMinColumnSpace(E[x],!0),ue=a.nodeMinColumnSpace(E[x],!1),ce=0;if(ne[x]===-1)if(x===0&&x===b-1)ce=re;else if(x===0){var me=E[x+1].column;me-re===ue+a.nodeMinColumnSpace(E[x+1],!0)?ce=re-1:ce=re}else x===b-1?(me=E[x-1].column,ce=re-me===oe+a.nodeMinColumnSpace(E[x-1],!1)?re+1:re):(me=E[x-1].column,oe=me+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,me=E[x+1].column,ue=me-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,ce=(oe+ue)/2|0);else x===0&&x===b-1?ce=ne[x]:x===0?(me=E[x+1].column,ue=me-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,ce=Math.min(ne[x],ue)):x===b-1?(me=E[x-1].column,oe=me+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,ce=Math.max(ne[x],oe)):(me=E[x-1].column,oe=me+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,me=E[x+1].column,ue=me-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,oe<ne[x]&&ne[x]<ue?ce=ne[x]:oe>=ne[x]?ce=oe:ue<=ne[x]&&(ce=ue));ce!==re&&(z=!0,E[x].column=ce)}Af(a,y,E),a.normalize()}function ZS(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),ne=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+ne>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function HS(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){E=ne.value;var re=E.column-a.nodeMinColumnSpace(E,!0),oe=E.column+a.nodeMinColumnSpace(E,!1);re<=y&&oe>=y&&(b[E.layer]=!0),re<=x&&oe>=x&&(z[E.layer]=!0)}for(re=!0,x=!1,E=0;E<=a.Ia;E++)re=re&&!(b[E]&&z[E]);if(re)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function eS(a,y){for(var x=0;x<=a.Ra;x++)for(;ZS(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;HS(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=Hu(a),z=V0(a);for(E=z+1;z<E;){E=z,tS(a,x,1);var ne=V0(a);ne>z?Ic(a,b):ne<z&&(z=ne,b=Hu(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=Hu(a),z=V0(a),E=z+1;z<E;)E=z,tS(a,x,-1),ne=V0(a),ne>z?Ic(a,b):ne<z&&(z=ne,b=Hu(a));a.normalize()}function tS(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(Fy(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var ne=z.layer,re=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),oe=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));re<=oe;re++)b[ne*(a.Ra+1)+re]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(ne=0;ne<a.Ra;ne++)b[z*(a.Ra+1)+ne]!==-1&&b[z*(a.Ra+1)+ne+1]!==-1&&b[z*(a.Ra+1)+ne]!==b[z*(a.Ra+1)+ne+1]&&(y[b[z*(a.Ra+1)+ne]*a.le+b[z*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)b[z*(a.Ra+1)+ne]!==-1&&b[z*(a.Ra+1)+ne-1]!==-1&&b[z*(a.Ra+1)+ne]!==b[z*(a.Ra+1)+ne-1]&&(y[b[z*(a.Ra+1)+ne]*a.le+b[z*(a.Ra+1)+ne-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(oe=ne[ne.length-1],ne.pop(),b[oe])for(b[oe]=!1,z=0;z<a.le;z++)y[oe*a.le+z]&&ne.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function WS(a){for(var y=vi(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new Yn,GS(y,x);var z=null,ne=null,re=null,oe=null,ue=(a.ve&1)!==0,ce=(a.ve&2)!==0,me=(a.ve&4)!==0,we=(a.ve&8)!==0;for(ue&&(a.verticalAlignment(y,x,!0),z=Y0(a,y,!0,!1)),y.reverse(),me&&(a.verticalAlignment(y,x,!1),re=Y0(a,y,!1,!1)),E=wr(y),b=E.next();!b.done;b=E.next())b.value.reverse();we&&(a.verticalAlignment(y,x,!1),oe=Y0(a,y,!1,!0)),y.reverse(),ce&&(a.verticalAlignment(y,x,!0),ne=Y0(a,y,!0,!0)),Ti(y),a.u(z,ne,re,oe),a.network.vertexes.each(function(Fe){var De=vi();ue&&De.push(z.get(Fe)),ce&&De.push(ne.get(Fe)),me&&De.push(re.get(Fe)),we&&De.push(oe.get(Fe)),De.sort(function(pt,it){return pt-it});var _e=De.length;_e=(De[Math.floor((_e-1)/2)]+De[Math.ceil((_e-1)/2)])/2,Ti(De),Fe.zc=_e})}function GS(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,ne=a[E],re=a[E+1],oe=0;z<re.length;oe++){var ue=re[oe];e:{if(ue.node===null){var ce=ky(ue);if(0<ce.length){ce=ce[0].node===null;break e}}ce=!1}var me=ce;if(oe===re.length-1||me){for(ce=ne.length-1,me&&(ce=ky(ue)[0].index);z<=oe;){if(ue=re[z],!ue.bo){me=[];for(var we=wr(ue.sourceEdgesArrayAccess),Fe=we.next();!Fe.done;Fe=we.next())Fe=Fe.value,Fe.valid&&me.push(Fe);ue.bo=me}for(ue=wr(ue.bo),me=ue.next();!me.done;me=ue.next())me=me.value,we=me.fromVertex.index,(we<b||we>ce)&&y.add(me);z++}b=ce}}}za.prototype.verticalAlignment=function(a,y,x){$S(a),a=wr(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=wr(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var ne=x?ky(z):US(z),re=ne.length;if(0<re){ne.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 ue=ne[re],ce=void 0;ce=x?tv(ue,z):tv(z,ue),!y.contains(ce)&&b<ue.vi&&(ue.align=z,z.root=ue.root,z.align=ue.root,b=ue.vi)}}}}};function $S(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function Y0(a,y,x,E){for(var b=a.K===90||a.K===270,z=wr(y),ne=z.next();!ne.done;ne=z.next()){var re=wr(ne.value);for(ne=re.next();!ne.done;ne=re.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,z=wr(y),re=z.next();!re.done;re=z.next()){re=wr(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var ue=0,ce=oe;ce.align!==oe;){var me=ce.align,we=ne?ce.width:ce.height,Fe=ne?me.width:me.height;if(x){var De=tv(ce,me),_e=De.portFromPos,pt=De.portToPos;De.link!==null&&(ce.node&&ce.node!==De.link.fromNode&&(_e=ne?ce.focusX:ce.focusY),me.node&&me.node!==De.link.toNode&&(pt=ne?me.focusX:me.focusY))}else De=tv(me,ce),_e=De.portToPos,pt=De.portFromPos,De.link!==null&&(ce.node&&ce.node!==De.link.toNode&&(_e=ne?ce.focusX:ce.focusY),me.node&&me.node!==De.link.fromNode&&(pt=ne?me.focusX:me.focusY));we=E?ce.qg+(we-_e)-(Fe-pt):ce.qg+_e-pt,me.qg=we,ue=Math.min(ue,we),ce=ce.align}ce=oe;do ce.qg=ce.qg-ue,ce=ce.align;while(ce!==oe)}}for(x=wr(y),ne=x.next();!ne.done;ne=x.next())for(z=wr(ne.value),ne=z.next();!ne.done;ne=z.next())ne=ne.value,ne.root===ne&&nS(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,re=0;do{for(z=y[ne][re];z.align!==z.root;)z=z.align,ne++,0<z.vi&&(re=iS(z,y),re.sd.shift=Math.min(re.sd.shift,z.sd.shift+z.zc+z.qg-(re.zc+re.qg+(b?re.width:re.height)+a.columnSpacing)));re=z.vi+1}while(ne<y.length&&re<y[ne].length&&z.sd===y[ne][re].sd)}for(a=new Ki,y=wr(y),ne=y.next();!ne.done;ne=y.next())for(x=wr(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,z=b?ne.width:ne.height,a.add(ne,E?-ne.zc-z:ne.zc);return a}function nS(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=iS(E,x),z=b.root;nS(a,z,x),y.sd===y&&(y.sd=z.sd);var ne=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+ne-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function iS(a,y){var x=a.Tz;return a=a.vi,1>a&&Et("Could not determine previous vertex in layer"),y[x][a-1]}za.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=vi(),b=vi(),z=1/0,ne=0;4>ne;ne++)if(y[ne]){var re=KS(this,y[ne],E,b,ne);re<z&&(x=ne,z=re)}for(z={},ne=0;4>ne;z={delta:z.delta},ne++)y[ne]&&(z.delta=ne===0||ne===2?E[x]-E[ne]:b[x]-b[ne],z.delta!==0&&y[ne].each(function(oe){return function(ue){ue.value+=oe.delta}}(z)));Ti(E),Ti(b)};function KS(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,ne=-1/0;return y.each(function(re){var oe=re.key;re=re.value,oe=a.K===90||a.K===270?oe.width:oe.height,re<z&&(z=re),re+oe>ne&&(ne=re+oe)}),x[b]=z,E[b]=ne,ne-z}za.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=X0(this,!0),y=X0(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function X0(a,y){return a.K===270?y?bo:Dr:a.K===90?y?Dr:bo:a.K===180?y?oa:Io:y?Io:oa}za.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,ne=b=1/0,re=-1/0;a.next();){var oe=a.value,ue=oe.layer,ce=oe.column|0;E?(ne=y.x+this.kc*ce,ue=this.Kd[ue]):(ne=this.Kd[ue],ue=y.y+this.kc*ce),oe.centerX=ne,oe.centerY=ue,x&&isFinite(oe.zc)&&(E?oe.node?oe.x=y.x+oe.zc:oe.centerX=y.x+oe.zc:oe.node?oe.y=y.y+oe.zc:oe.centerY=y.y+oe.zc),z=Math.min(oe.x,z),b=Math.min(oe.y,b),E?(ne=z,re=Math.max(re,oe.bounds.right)):(ne=b,re=Math.max(re,oe.bounds.bottom))}for(this.xw=re-ne,z=y.x-z,y=y.y-b,this.Rf=new st(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},za.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new Mn(0,0,x,Math.abs(this.Ta[0]))):y.push(new Mn(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Mn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Mn(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Mn(0,0,Math.abs(this.Ta[0]),x)):y.push(new Mn(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Mn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Mn(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},za.prototype.commitLayers=function(){},za.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var E=y,b=E.fromNode,z=E.toNode,ne=E.fromPort,re=E.toPort;if(b!==null){var oe=b.findVisibleNode();oe!==null&&oe!==b&&(b=oe,ne=oe.port)}z!==null&&(oe=z.findVisibleNode(),oe!==null&&oe!==z&&(z=oe,re=oe.port));var ue=y.computeSpot(!0,ne);oe=y.computeSpot(!1,re);var ce=x.fromVertex,me=x.toVertex;if(x.valid)y.curve===Ec&&y.pointsCount===4&&(ce.column===me.column&&this.alignOption===0?(x=y.getLinkPoint(b,ne,ue,!0,!1,z,re),re=y.getLinkPoint(z,re,oe,!1,!1,b,ne),x.w()||x.set(b.actualBounds.center),re.w()||re.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+re.x)/3,(2*x.y+re.y)/3),y.yf((x.x+2*re.x)/3,(x.y+2*re.y)/3),y.yf(re.x,re.y)):(x=E=!1,ne!==null&&ue===Cs&&(E=!0),re!==null&&oe===Cs&&(x=!0),(E||x)&&(oe=null,E&&(oe=y.getLinkPointFromPoint(b,ne,ne.ga(Oo),y.i(3),!0),oe.w()||oe.set(b.actualBounds.center),y.L(0,oe.x,oe.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,re,re.ga(Oo),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),oe&&(z=y.i(2),y.L(1,(2*oe.x+z.x)/3,(2*oe.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(ce.layer===me.layer)y.zf();else{var we=!1,Fe=!1,De=this.ie,_e=y.firstPickIndex+1;if(y.isOrthogonal){Fe=!0;var pt=y.pointsCount;4<pt&&y.points.removeRange(2,pt-3)}else if(y.curve===Ec)we=!0,pt=y.pointsCount,4<pt&&y.points.removeRange(2,pt-3),pt===4&&(_e=2);else{pt=y.pointsCount;var it=ue===Cs,bt=oe===Cs;2<pt&&it&&bt?y.points.removeRange(1,pt-2):3<pt&&it&&!bt?y.points.removeRange(1,pt-3):3<pt&&!it&&bt?y.points.removeRange(2,pt-2):4<pt&&!it&&!bt&&y.points.removeRange(2,pt-3)}if(x.rev){for(;me!==null&&ce!==me;){var It=pt=null;for(it=me.sourceEdges.iterator;it.next()&&(bt=it.value,bt.link!==x.link||(pt=bt.fromVertex,It=bt.toVertex,pt.node!==null)););if(pt===null)break;if(pt!==ce){it=y.i(_e-1).x,bt=y.i(_e-1).y;var Rt=pt.centerX,Kt=pt.centerY;if(Fe)this.K===180||this.K===0?_e===y.firstPickIndex+1?(y.m(_e++,it,bt),y.m(_e++,it,Kt)):(It!==null?It.centerY:bt)!==Kt&&(It=this.Ta[pt.layer-1]+this.Rf.x,y.m(_e++,It,bt),y.m(_e++,It,Kt)):_e===y.firstPickIndex+1?(y.m(_e++,it,bt),y.m(_e++,Rt,bt)):(It!==null?It.centerX:it)!==Rt&&(It=this.Ta[pt.layer-1]+this.Rf.y,y.m(_e++,it,It),y.m(_e++,Rt,It));else if(_e===y.firstPickIndex+1){It=Math.max(10,this.he[me.layer]);var hn=Math.max(10,this.Ld[me.layer]);if(we)this.K===180?Rt<=me.bounds.x?(me=me.bounds.x,y.m(_e++,me-It,Kt),y.m(_e++,me,Kt),y.m(_e++,me+hn,Kt)):(y.m(_e++,Rt-It,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt+hn,Kt)):this.K===90?Kt>=me.bounds.bottom?(me=me.bounds.y+me.bounds.height,y.m(_e++,Rt,me+hn),y.m(_e++,Rt,me),y.m(_e++,Rt,me-It)):(y.m(_e++,Rt,Kt+hn),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt-It)):this.K===270?Kt<=me.bounds.y?(me=me.bounds.y,y.m(_e++,Rt,me-It),y.m(_e++,Rt,me),y.m(_e++,Rt,me+hn)):(y.m(_e++,Rt,Kt-It),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt+hn)):this.K===0&&(Rt>=me.bounds.right?(me=me.bounds.x+me.bounds.width,y.m(_e++,me+hn,Kt),y.m(_e++,me,Kt),y.m(_e++,me-It,Kt)):(y.m(_e++,Rt+hn,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt-It,Kt)));else{y.m(_e++,it,bt);var bi=0;this.K===180||this.K===0?((this.K===180?Rt>=me.bounds.right:Rt<=me.bounds.x)&&(bi=(this.K===0?-It:hn)/2),y.m(_e++,it+bi,Kt)):((this.K===270?Kt>=me.bounds.bottom:Kt<=me.bounds.y)&&(bi=(this.K===90?-It:hn)/2),y.m(_e++,Rt,bt+bi)),y.m(_e++,Rt,Kt)}}else It=Math.max(10,this.he[pt.layer]),hn=Math.max(10,this.Ld[pt.layer]),we?this.K===180?(y.m(_e++,Rt-It-De,Kt),y.m(_e++,Math.min(Rt-It+De/2,Rt),Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Math.max(Rt+hn-De/2,Rt),Kt),y.m(_e++,Rt+hn+De,Kt)):this.K===90?(y.m(_e++,Rt,Kt+hn+De),y.m(_e++,Rt,Math.max(Kt+hn-De/2,Kt)),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Math.min(Kt-It+De/2,Kt)),y.m(_e++,Rt,Kt-It-De)):this.K===270?(y.m(_e++,Rt,Kt-It-De),y.m(_e++,Rt,Math.min(Kt-It+De/2,Kt)),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Math.max(Kt+hn-De/2,Kt)),y.m(_e++,Rt,Kt+hn+De)):(y.m(_e++,Rt+hn+De,Kt),y.m(_e++,Math.max(Rt+hn-De/2,Rt),Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Math.min(Rt-It+De/2,Rt),Kt),y.m(_e++,Rt-It-De,Kt)):y.m(_e++,Rt,Kt)}me=pt}(re===null||ue!==Cs||Fe)&&(it=y.i(_e-1).x,bt=y.i(_e-1).y,Rt=y.i(_e).x,Kt=y.i(_e).y,Fe?(De=this.Ld[ce.layer],this.K===180||this.K===0?(Fe=bt,Fe>=ce.bounds.y&&Fe<=ce.bounds.bottom&&(this.K===180?Rt>=ce.bounds.x:Rt<=ce.bounds.right)&&(me=ce.centerX+(this.K===180?-De:De),Fe<ce.bounds.y+ce.bounds.height/2?Fe=ce.bounds.y-this.kc/2:Fe=ce.bounds.bottom+this.kc/2,y.m(_e++,me,bt),y.m(_e++,me,Fe)),y.m(_e++,Rt,Fe)):(Fe=it,Fe>=ce.bounds.x&&Fe<=ce.bounds.right&&(this.K===270?Kt>=ce.bounds.y:Kt<=ce.bounds.bottom)&&(me=ce.centerY+(this.K===270?-De:De),Fe<ce.bounds.x+ce.bounds.width/2?Fe=ce.bounds.x-this.kc/2:Fe=ce.bounds.right+this.kc/2,y.m(_e++,it,me),y.m(_e++,Fe,me)),y.m(_e++,Fe,Kt)),y.m(_e++,Rt,Kt)):we?(It=Math.max(10,this.he[ce.layer]),hn=Math.max(10,this.Ld[ce.layer]),this.K===180&&Rt>=ce.bounds.x?(me=ce.bounds.x+ce.bounds.width,y.L(_e-2,me,bt),y.L(_e-1,me+hn,bt)):this.K===90&&Kt<=ce.bounds.bottom?(me=ce.bounds.y,y.L(_e-2,it,me),y.L(_e-1,it,me-It)):this.K===270&&Kt>=ce.bounds.y?(me=ce.bounds.y+ce.bounds.height,y.L(_e-2,it,me),y.L(_e-1,it,me+hn)):this.K===0&&Rt<=ce.bounds.right&&(me=ce.bounds.x,y.L(_e-2,me,bt),y.L(_e-1,me-It,bt))):(It=Math.max(10,this.he[ce.layer]),hn=Math.max(10,this.Ld[ce.layer]),Fe=0,this.K===180||this.K===0?((this.K===180?Rt<=ce.bounds.x:Rt>=ce.bounds.right)&&(Fe=(this.K===0?hn:-It)/2),y.m(_e++,Rt+Fe,bt)):((this.K===270?Kt<=ce.bounds.y:Kt>=ce.bounds.bottom)&&(Fe=(this.K===90?hn:-It)/2),y.m(_e++,it,Kt+Fe)),y.m(_e++,Rt,Kt)))}else{for(;ce!==null&&ce!==me;){for(It=pt=null,ce=ce.destinationEdges.iterator;ce.next()&&(it=ce.value,it.link!==x.link||(pt=it.toVertex,It=it.fromVertex,It.node!==null&&(It=null),pt.node!==null)););if(pt===null)break;pt!==me&&(it=y.i(_e-1).x,bt=y.i(_e-1).y,Rt=pt.centerX,Kt=pt.centerY,Fe?this.K===180||this.K===0?(It!==null?It.centerY:bt)!==Kt&&(It=this.Ta[pt.layer]+this.Rf.x,_e===y.firstPickIndex+1&&(It=this.K===0?Math.max(It,it):Math.min(It,it)),y.m(_e++,It,bt),y.m(_e++,It,Kt)):(It!==null?It.centerX:it)!==Rt&&(It=this.Ta[pt.layer]+this.Rf.y,_e===y.firstPickIndex+1&&(It=this.K===90?Math.max(It,bt):Math.min(It,bt)),y.m(_e++,it,It),y.m(_e++,Rt,It)):(It=Math.max(10,this.he[pt.layer]),hn=Math.max(10,this.Ld[pt.layer]),we?this.K===180?(y.m(_e++,Rt+hn+De,Kt),y.m(_e++,Math.max(Rt+hn-De/2,Rt),Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Math.min(Rt-It+De/2,Rt),Kt),y.m(_e++,Rt-It-De,Kt)):this.K===90?(y.m(_e++,Rt,Kt-It-De),y.m(_e++,Rt,Math.min(Kt-It+De/2,Kt)),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Math.max(Kt+hn-De/2,Kt)),y.m(_e++,Rt,Kt+hn+De)):this.K===270?(y.m(_e++,Rt,Kt+hn+De),y.m(_e++,Rt,Math.max(Kt+hn-De/2,Kt)),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Math.min(Kt-It+De/2,Kt)),y.m(_e++,Rt,Kt-It-De)):(y.m(_e++,Rt-It-De,Kt),y.m(_e++,Math.min(Rt-It+De/2,Rt),Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Math.max(Rt+hn-De/2,Rt),Kt),y.m(_e++,Rt+hn+De,Kt)):this.K===180?(y.m(_e++,Rt+hn,Kt),y.m(_e++,Rt-It,Kt)):this.K===90?(y.m(_e++,Rt,Kt-It),y.m(_e++,Rt,Kt+hn)):this.K===270?(y.m(_e++,Rt,Kt+hn),y.m(_e++,Rt,Kt-It)):(y.m(_e++,Rt-It,Kt),y.m(_e++,Rt+hn,Kt)))),ce=pt}Fe&&(it=y.i(_e-1).x,bt=y.i(_e-1).y,Rt=y.i(_e).x,Kt=y.i(_e).y,this.K===180||this.K===0?bt!==Kt&&(It=this.K===0?Math.min(Math.max((Rt+it)/2,this.Ta[me.layer]+this.Rf.x),Rt):Math.max(Math.min((Rt+it)/2,this.Ta[me.layer]+this.Rf.x),Rt),y.m(_e++,It,bt),y.m(_e++,It,Kt)):it!==Rt&&(It=this.K===90?Math.min(Math.max((Kt+bt)/2,this.Ta[me.layer]+this.Rf.y),Kt):Math.max(Math.min((Kt+bt)/2,this.Ta[me.layer]+this.Rf.y),Kt),y.m(_e++,it,It),y.m(_e++,Rt,It)))}E!==null&&we&&4<=y.pointsCount&&(ne!==null&&(ne=ue===Cs?y.getLinkPointFromPoint(b,ne,ne.ga(Oo),y.i(3),!0):y.i(0),ue===Cs&&(ue=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+ue.x)/2,ue.y),y.L(2,E.x,(ue.y+E.y)/2)):(y.L(1,ue.x,(ne.y+ue.y)/2),y.L(2,(ue.x+E.x)/2,E.y))),ne.w()||ne.set(b.actualBounds.center),y.L(0,ne.x,ne.y)),re!==null&&(b=oe===Cs?y.getLinkPointFromPoint(z,re,re.ga(Oo),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===Cs&&(re=y.i(y.pointsCount-3),oe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+re.x)/2,re.y),y.L(y.pointsCount-2,oe.x,(re.y+oe.y)/2)):(y.L(y.pointsCount-2,re.x,(b.y+re.y)/2),y.L(y.pointsCount-3,(re.x+oe.x)/2,oe.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},za.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Un,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),ne=E.i(b+1);if(this.B(z.y,ne.y)&&!this.B(z.x,ne.x)){var re=new Df;re.layer=Math.floor(z.y/2);var oe=E.i(0),ue=E.i(E.pointsCount-1);if(re.first=oe.x*oe.x+oe.y,re.jc=ue.x*ue.x+ue.y,re.rd=Math.min(z.x,ne.x),re.Ic=Math.max(z.x,ne.x),re.index=b,re.link=E,b+2<E.pointsCount){oe=E.i(b-1),ue=E.i(b+2);var ce=0;oe.y<z.y?ce=ue.y<z.y?3:z.x<ne.x?2:1:oe.y>z.y&&(ce=ue.y>z.y?0:ne.x<z.x?2:1),re.j=ce}x.push(re)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(ne=x[z].Ic,b=a+1;b<E&&x[b].rd<ne;)ne=Math.max(ne,x[b].Ic),b++;if(ne=b-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ce=1,re=x[z].jc,oe=z;oe<b;oe++)ue=x[oe],ue.jc!==re&&(ce++,re=ue.jc);this.zi(x,this.Ux,z,z+ne);var me=1;for(re=x[z].first,oe=z;oe<b;oe++)ue=x[oe],ue.first!==re&&(me++,re=ue.first);for(oe=!0,ue=me,ce<me?(oe=!1,ue=ce,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ce=0,me=z;me<b;me++){var we=x[me];(oe?we.first:we.jc)!==re&&(ce++,re=oe?we.first:we.jc);var Fe=we.link;z=Fe.i(we.index),ne=Fe.i(we.index+1);var De=this.linkSpacing*(ce-(ue-1)/2);y++,Fe.uh(),Fe.L(we.index,z.x,z.y+De),Fe.L(we.index+1,ne.x,ne.y+De),Fe.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),ne=E.i(b+1),this.B(z.x,ne.x)&&!this.B(z.y,ne.y)&&(re=new Df,re.layer=Math.floor(z.x/2),oe=E.i(0),ue=E.i(E.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=ue.x+ue.y*ue.y,re.rd=Math.min(z.y,ne.y),re.Ic=Math.max(z.y,ne.y),re.index=b,re.link=E,b+2<E.pointsCount&&(oe=E.i(b-1),ue=E.i(b+2),ce=0,oe.x<z.x?ce=ue.x<z.x?3:z.y<ne.y?2:1:oe.x>z.x&&(ce=ue.x>z.x?0:ne.y<z.y?2:1),re.j=ce),x.push(re));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(ne=x[z].Ic,b=a+1;b<E&&x[b].rd<ne;)ne=Math.max(ne,x[b].Ic),b++;if(ne=b-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ce=1,re=x[z].jc,oe=z;oe<b;oe++)ue=x[oe],ue.jc!==re&&(ce++,re=ue.jc);for(this.zi(x,this.Ux,z,z+ne),me=1,re=x[z].first,oe=z;oe<b;oe++)ue=x[oe],ue.first!==re&&(me++,re=ue.first);for(oe=!0,ue=me,ce<me?(oe=!1,ue=ce,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ce=0,me=z;me<b;me++)we=x[me],(oe?we.first:we.jc)!==re&&(ce++,re=oe?we.first:we.jc),Fe=we.link,z=Fe.i(we.index),ne=Fe.i(we.index+1),De=this.linkSpacing*(ce-(ue-1)/2),y++,Fe.uh(),Fe.L(we.index,z.x+De,z.y),Fe.L(we.index+1,ne.x+De,ne.y),Fe.zf()}z=b}a=E}}}},Ne=za.prototype,Ne.Vx=function(a,y){return a instanceof Df&&y instanceof Df&&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 Df&&y instanceof Df&&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 Df&&y instanceof Df&&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,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&Et("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function Nf(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function Af(a,y,x){a.He[a.tc[y]]=x}Qe.Object.defineProperties(za.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()):Et("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Ly&&a!==J0&&a!==Cm||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==Q0&&a!==Ny&&a!==Ay||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==q0&&a!==Dy&&a!==Iy||(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!==Oy&&a!==ev&&a!==Ty||(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 Cn(za,"CycleDepthFirst",0),Ly=new Cn(za,"CycleGreedy",1),Cm=new Cn(za,"CycleFromLayers",2),Q0=new Cn(za,"LayerOptimalLinkLength",0),Ny=new Cn(za,"LayerLongestPathSink",1),Ay=new Cn(za,"LayerLongestPathSource",2),q0=new Cn(za,"InitDepthFirstOut",0),Dy=new Cn(za,"InitDepthFirstIn",1),Iy=new Cn(za,"InitNaive",2),Oy=new Cn(za,"AggressiveNone",0),ev=new Cn(za,"AggressiveLess",1),Ty=new Cn(za,"AggressiveMore",2),VS=8;za.className="LayeredDigraphLayout",za.CycleDepthFirst=J0,za.CycleGreedy=Ly,za.CycleFromLayers=Cm,za.LayerOptimalLinkLength=Q0,za.LayerLongestPathSink=Ny,za.LayerLongestPathSource=Ay,za.InitDepthFirstOut=q0,za.InitDepthFirstIn=Dy,za.InitNaive=Iy,za.AggressiveNone=Oy,za.AggressiveLess=ev,za.AggressiveMore=Ty,za.PackNone=0,za.PackExpand=1,za.PackStraighten=2,za.PackMedian=4,za.PackAll=15,za.AlignNone=0,za.AlignUpperLeft=1,za.AlignUpperRight=2,za.AlignLowerLeft=4,za.AlignLowerRight=8,za.AlignAll=15;function Df(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Df.className="SegInfo";function Mp(a){ts.call(this,a)}$t(Mp,ts),Mp.prototype.createVertex=function(){return new Oc(this)},Mp.prototype.createEdge=function(){return new Em(this)},Mp.className="LayeredDigraphNetwork";function Oc(a){ul.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}$t(Oc,ul);function rS(a,y){return a.index-y.index}function tv(a,y){if(!a.$n){for(var x=[],E=wr(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=wr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Et("Unable to find destination edge to given vertex")}function ky(a){if(!a.co){for(var y=[],x=wr(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(rS),a.co=y}return a.co}function US(a){if(!a.ao){for(var y=[],x=wr(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(rS),a.ao=y}return a.ao}Oc.prototype.Cl=function(a){ul.prototype.Cl.call(this,a),this.bo=this.co=null},Oc.prototype.Kl=function(a){ul.prototype.Kl.call(this,a),this.bo=this.co=null},Oc.prototype.zl=function(a){ul.prototype.zl.call(this,a),this.$n=this.ao=null},Oc.prototype.Jl=function(a){ul.prototype.Jl.call(this,a),this.$n=this.ao=null},Qe.Object.defineProperties(Oc.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)}}}),Oc.prototype.deleteDestinationEdge=Oc.prototype.Jl,Oc.prototype.addDestinationEdge=Oc.prototype.zl,Oc.prototype.deleteSourceEdge=Oc.prototype.Kl,Oc.prototype.addSourceEdge=Oc.prototype.Cl,Oc.className="LayeredDigraphVertex";function Em(a){hc.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}$t(Em,hc),Qe.Object.defineProperties(Em.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)}}}),Em.className="LayeredDigraphEdge";function Ro(a){xs.call(this),this.Ub=new Yn,this.Wn=ov,this.ud=ih,this.vo=sv,this.Bq=Vy,this.$v=[],this.td=!0,this.Rb=lv,this.$d=new pi(10,10).freeze();var y=new Wg(this);this.W=new Wc(y),this.Y=new Wc(y),this.ru=[],a&&Object.assign(this,a)}$t(Ro,xs),Ro.prototype.cloneProtected=function(a){xs.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},Ro.prototype.qb=function(a){a.classType===Ro?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:Et("Unknown enum value: "+a):xs.prototype.qb.call(this,a)},Ro.prototype.createNetwork=function(){return new Wg(this)},Ro.prototype.makeNetwork=function(a){function y(E){if(E instanceof Ni)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof fi){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof dn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof ho?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ro.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==uv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof dn&&(y=a),this.path===ov&&y!==null?this.ud=y.isTreePathToChildren?ih:Zg:this.ud=this.path===ov?ih:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new Yn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Ni?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Wc&&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=YS(y),0<a.count;)y=oS(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 Wc&&sS(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Wc&&lS(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Wc&&uS(this,y);if(this.Cu(),this.layerStyle===cv){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===Uy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Wc&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Yn,this.isValidLayout=!0};function YS(a){var y=new Yn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Ro.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case ih:x.sourceEdges.count===0&&this.Ub.add(x);break;case Zg:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Et("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=oS(this,a),a!==null&&this.Ub.add(a))};function oS(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case ih:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Zg:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:Et("Unhandled path value "+a.ud.toString())}}return E}function Ry(a,y){if(y!==null){switch(a.ud){case ih:if(0<y.destinationEdges.count){for(var x=new Un,E=y.destinationVertexes;E.next();){var b=E.value;aS(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Zg:if(0<y.sourceEdges.count){for(x=new Un,E=y.sourceVertexes;E.next();)b=E.value,aS(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:Et("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)Ry(a,x[y])}}function aS(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}Ro.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function sS(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===ah&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,ne=z.length,re=0;re<ne;re++){var oe=z[re];sS(a,oe),x+=oe.descendantCount+1,E=Math.max(E,oe.maxChildrenCount),b=Math.max(b,oe.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function XS(a,y){switch(a.vo){default:case sv:return y.parent!==null?y.parent:a.W;case $y:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Gy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Wy:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Ro.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(XS(this,a)),a.parent!==null&&a.parent.alignment===ah){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function lS(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)lS(a,y[E])}}Ro.prototype.assignTreeVertexValues=function(){};function uS(a,y){if(y!==null){y.alignment!==ah&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)uS(a,y[E])}}Ro.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Lp:break;case Fm:a.children.reverse();break;case Bm:a.children.sort(a.comparer);break;case Mm:a.children.sort(a.comparer),a.children.reverse();break;default:Et("Unhandled sorting value "+a.sorting.toString())}},Ro.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ro.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=If(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,ne=0,re=0,oe=a.commentSpacing;if(a.node!==null)for(var ue=a.node.Mu();ue.next();){var ce=ue.value;ce.category==="Comment"&&ce.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ce),ce.Va(),ce=ce.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ce.width),ne+=ce.height+Math.abs(re)):(z+=ce.width+Math.abs(re),ne=Math.max(ne,ce.height)),re=oe)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=Mn.allocAt(0,0,a.bounds.width+z,a.bounds.height+ne),a.bounds=b,Mn.free(b))};function If(a){return a===qh||a===ah||a===ef||a===Nh}function bm(a){return a===qh||a===ah}function _y(a){var y=a.parent;if(y!==null){var x=y.alignment;if(If(x)){if(bm(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===ef)return!0}}return!1}Ro.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=If(z)),E=E===90||E===270,x=b===90||b===270;for(var ne=a.childrenCount===0,re=_y(a),oe=0,ue=a.comments,ce=ue.length,me=st.alloc(),we=0;we<ce;we++){var Fe=ue[we],De=Fe.measuredBounds;if(E&&!ne||!z&&!x&&ne||z&&x&&ne){if(135<b&&!z||x&&re)if(0<=a.commentMargin)for(me.h(a.bounds.x-a.commentMargin-De.width,a.bounds.y+oe),Fe.move(me),Fe=Fe.Sd();Fe.next();){var _e=Fe.value;_e.fromSpot=oa,_e.toSpot=Io}else for(me.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=Io,_e.toSpot=oa;else if(0<=a.commentMargin)for(me.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=Io,_e.toSpot=oa;else for(me.h(a.bounds.x+a.commentMargin-De.width,a.bounds.y+oe),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=oa,_e.toSpot=Io;oe=0<=a.commentSpacing?oe+(De.height+a.commentSpacing):oe+(a.commentSpacing-De.height)}else{if(135<b&&!z||!x&&re)if(0<=a.commentMargin)for(me.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-De.height),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=bo,_e.toSpot=Dr;else for(me.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=Dr,_e.toSpot=bo;else if(0<=a.commentMargin)for(me.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=Dr,_e.toSpot=bo;else for(me.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-De.height),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=bo,_e.toSpot=Dr;oe=0<=a.commentSpacing?oe+(De.width+a.commentSpacing):oe+(a.commentSpacing-De.width)}}if(st.free(me),y=oe-a.commentSpacing-(E?y.height:y.width),this.ud===ih)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},Ro.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case av:cS(this,a);break;case Lm:if(a.alignment===ah)cS(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=If(x)),E=_y(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var b=id(a);y=b===90||b===270;var z=0,ne=a.children,re=ne.length;for(x=0;x<re;x++)E=ne[x],z=Math.max(z,y?E.Da.width:E.Da.height);var oe=a.alignment;E=oe===rh;var ue=oe===oh,ce=If(oe),me=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var we=a.nodeSpacing,Fe=this.computeNodeIndent(a),De=a.rowSpacing,_e=0;(E||ue||a.hm||a.im&&a.maxGenerationCount===1)&&(_e=Math.max(0,a.rowIndent)),E=a.width;var pt=a.height,it=0,bt=0,It=0,Rt=null,Kt=null,hn=0,bi=0,Xi=0,zi=0,hi=0,ti=0,lo=0,$r=0;if(ce&&!bm(oe)&&135<b&&ne.reverse(),bm(oe))if(1<re)for(var Fa=0;Fa<re;Fa++)Fa%2===0&&Fa!==re-1&&($r=Math.max($r,y?ne[Fa].Da.width:ne[Fa].Da.height));else re===1&&($r=y?ne[0].Da.width:ne[0].Da.height);if(ce){switch(oe){case qh:bt=135>b?dS(this,a,ne,$r,it,bt):hS(this,a,ne,$r,it,bt),$r=bt.x,it=bt.width,bt=bt.height;break;case ef:for(Rt=0;Rt<re;Rt++)Kt=ne[Rt],me=Kt.Da,It=ti===0?0:De,y?(Kt.S.h(z-me.width,zi+It),it=Math.max(it,me.width),bt=Math.max(bt,zi+It+me.height),zi+=It+me.height):(Kt.S.h(Xi+It,z-me.height),it=Math.max(it,Xi+It+me.width),bt=Math.max(bt,me.height),Xi+=It+me.width),ti++;break;case Nh:for(Rt=0;Rt<re;Rt++)Kt=ne[Rt],z=Kt.Da,me=ti===0?0:De,y?(Kt.S.h(we/2+a.focus.x,zi+me),it=Math.max(it,z.width),bt=Math.max(bt,zi+me+z.height),zi+=me+z.height):(Kt.S.h(Xi+me,we/2+a.focus.y),it=Math.max(it,Xi+me+z.width),bt=Math.max(bt,z.height),Xi+=me+z.width),ti++}Rt=Qu(this,2),Kt=Qu(this,2),y?(Rt[0].h(0,0),Rt[1].h(0,bt),Kt[0].h(it,0)):(Rt[0].h(0,0),Rt[1].h(it,0),Kt[0].h(0,bt)),Kt[1].h(it,bt)}else for(Fa=0;Fa<re;Fa++){var qa=ne[Fa],wl=qa.Da;if(y){0<me&&0<ti&&Xi+we+wl.width>me&&(Xi<z&&rg(a,oe,z-Xi,0,lo,Fa-1),hi++,ti=0,lo=Fa,It=bt,Xi=0,zi=135<b?-bt-De:bt+De),iv(this,qa,0,zi);var Nl=0;if(ti===0)Rt=qa.Yo,Kt=qa.kp,hn=wl.width,bi=wl.height,(Rt===null||Kt===null||b!==id(qa))&&(Rt=Qu(this,2),Kt=Qu(this,2),Rt[0].h(0,0),Rt[1].h(0,bi),Kt[0].h(hn,0),Kt[1].h(hn,bi));else{var pu=vi();bi=fS(this,a,qa,Rt,Kt,hn,bi,pu),Nl=bi.x,Rt=pu[0],Kt=pu[1],hn=bi.width,bi=bi.height,Ti(pu),Xi<wl.width&&0>Nl&&(zg(a,-Nl,0,lo,Fa-1),rv(Rt,-Nl,0),rv(Kt,-Nl,0),Nl=0)}qa.S.h(Nl,zi),it=Math.max(it,hn),bt=Math.max(bt,It+(hi===0?0:De)+wl.height),Xi=hn}else 0<me&&0<ti&&zi+we+wl.height>me&&(zi<z&&rg(a,oe,0,z-zi,lo,Fa-1),hi++,ti=0,lo=Fa,It=it,zi=0,Xi=135<b?-it-De:it+De),iv(this,qa,Xi,0),Nl=0,ti===0?(Rt=qa.Yo,Kt=qa.kp,hn=wl.width,bi=wl.height,(Rt===null||Kt===null||b!==id(qa))&&(Rt=Qu(this,2),Kt=Qu(this,2),Rt[0].h(0,0),Rt[1].h(hn,0),Kt[0].h(0,bi),Kt[1].h(hn,bi))):(pu=vi(),bi=fS(this,a,qa,Rt,Kt,hn,bi,pu),Nl=bi.x,Rt=pu[0],Kt=pu[1],hn=bi.width,bi=bi.height,Ti(pu),zi<wl.height&&0>Nl&&(zg(a,0,-Nl,lo,Fa-1),rv(Rt,0,-Nl),rv(Kt,0,-Nl),Nl=0)),qa.S.h(Xi,Nl),bt=Math.max(bt,bi),it=Math.max(it,It+(hi===0?0:De)+wl.width),zi=bi;ti++}switch(0<hi&&(y?(bt+=Math.max(0,x),Xi<it&&rg(a,oe,it-Xi,0,lo,re-1),0<_e&&(ue||zg(a,_e,0,0,re-1),it+=_e)):(it+=Math.max(0,x),zi<bt&&rg(a,oe,0,bt-zi,lo,re-1),0<_e&&(ue||zg(a,0,_e,0,re-1),bt+=_e))),_e=ue=0,oe){case Np:y?ue+=it/2-a.focus.x-Fe/2:_e+=bt/2-a.focus.y-Fe/2;break;case Hg:0<hi?y?ue+=it/2-a.focus.x-Fe/2:_e+=bt/2-a.focus.y-Fe/2:y?($r=ne[0].S.x+ne[0].la.x,ue+=$r+(ne[re-1].S.x+ne[re-1].la.x+2*ne[re-1].focus.x-$r)/2-a.focus.x-Fe/2):($r=ne[0].S.y+ne[0].la.y,_e+=$r+(ne[re-1].S.y+ne[re-1].la.y+2*ne[re-1].focus.y-$r)/2-a.focus.y-Fe/2);break;case rh:y?(ue-=Fe,it+=Fe):(_e-=Fe,bt+=Fe);break;case oh:y?(ue+=it-a.width+Fe,it+=Fe):(_e+=bt-a.height+Fe,bt+=Fe);break;case qh:y?1<re?ue+=$r+we/2-a.focus.x:ue+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<re?_e+=$r+we/2-a.focus.y:_e+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case ef:y?ue+=it+we/2-a.focus.x:_e+=bt+we/2-a.focus.y;break;case Nh:break;default:bt=this.customAlignment(a,ue,_e,it,bt),ue=bt[0],_e=bt[1],it=bt[2],bt=bt[3]}for(Fe=0;Fe<re;Fe++)$r=ne[Fe],y?$r.S.h($r.S.x+$r.la.x-ue,$r.S.y+(135<b?(ce?-bt:-$r.Da.height)+$r.la.y-x:pt+x+$r.la.y)):$r.S.h($r.S.x+(135<b?(ce?-it:-$r.Da.width)+$r.la.x-x:E+x+$r.la.x),$r.S.y+$r.la.y-_e);if(re=ne=0,ce?y?(it=jy(a,it,ue),0>ue&&(ue=0),135<b&&(_e+=bt+x),bt+=pt+x,oe===Nh&&(ne+=we/2+a.focus.x),re+=pt+x):(135<b&&(ue+=it+x),it+=E+x,bt=zy(a,bt,_e),0>_e&&(_e=0),oe===Nh&&(re+=we/2+a.focus.y),ne+=E+x):y?(a.comments===null?E>it&&(it=Zy(oe,E-it,0),ne=it.x,re=it.y,it=E,ue=0):it=jy(a,it,ue),0>ue&&(ne-=ue,ue=0),135<b&&(_e+=bt+x),bt=Math.max(Math.max(bt,pt),bt+pt+x),re+=pt+x):(135<b&&(ue+=it+x),it=Math.max(Math.max(it,E),it+E+x),a.comments===null?pt>bt&&(bt=Zy(oe,0,pt-bt),ne=bt.x,re=bt.y,bt=pt,_e=0):bt=zy(a,bt,_e),0>_e&&(re-=_e,_e=0),ne+=E+x),0<hi)b=Qu(this,4),hi=Qu(this,4),y?(b[2].h(0,pt+x),b[3].h(b[2].x,bt),hi[2].h(it,b[2].y),hi[3].h(hi[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(it,b[2].y),hi[2].h(b[2].x,bt),hi[3].h(b[3].x,hi[2].y));else{for(b=Qu(this,Rt.length+2),hi=Qu(this,Kt.length+2),oe=0;oe<Rt.length;oe++)ce=Rt[oe],b[oe+2].h(ce.x+ne,ce.y+re);for(oe=0;oe<Kt.length;oe++)ce=Kt[oe],hi[oe+2].h(ce.x+ne,ce.y+re)}y?(b[0].h(ue,0),b[1].h(b[0].x,pt),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),hi[0].h(ue+E,0),hi[1].h(hi[0].x,pt),hi[2].y<hi[1].y&&(hi[2].x<hi[0].x?hi[2].assign(hi[1]):hi[1].assign(hi[2])),hi[3].y<hi[2].y&&(hi[3].x<hi[0].x?hi[3].assign(hi[2]):hi[2].assign(hi[3])),b[2].y-=x/2,hi[2].y-=x/2):(b[0].h(0,_e),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),hi[0].h(0,_e+pt),hi[1].h(E,hi[0].y),hi[2].x<hi[1].x&&(hi[2].y<hi[0].y?hi[2].assign(hi[1]):hi[1].assign(hi[2])),hi[3].x<hi[2].x&&(hi[3].y<hi[0].y?hi[3].assign(hi[2]):hi[2].assign(hi[3])),b[2].x-=x/2,hi[2].x-=x/2),xd(this,Rt),xd(this,Kt),a.Yo=b,a.kp=hi,a.la.h(ue,_e),a.Da.h(it,bt)}break;default:Et("Unhandled compaction value "+a.compaction.toString())}}};function cS(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=If(x));var b=_y(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=id(y),x=E===90||E===270;var z=0;b=y.children;for(var ne=b.length,re=0;re<ne;re++){var oe=b[re];z=Math.max(z,x?oe.Da.width:oe.Da.height)}var ue=y.alignment,ce=ue===rh,me=ue===oh;re=If(ue);var we=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var Fe=y.nodeSpacing,De=a.computeNodeIndent(y),_e=ce||me?0:De/2,pt=y.rowSpacing,it=0;(ce||me||y.hm||y.im&&y.maxGenerationCount===1)&&(it=Math.max(0,y.rowIndent)),ce=y.width;var bt=y.height,It=0,Rt=0,Kt=0,hn=0,bi=0,Xi=0,zi=0,hi=0,ti=0,lo=0;if(re&&!bm(ue)&&135<E&&b.reverse(),bm(ue))if(1<ne)for(var $r=0;$r<ne;$r++){var Fa=b[$r],qa=Fa.Da;$r%2===0&&$r!==ne-1?ti=Math.max(ti,(x?qa.width:qa.height)+a.computeBusNodeSpacing(Fa)-Fe):$r%2!==0&&(lo=Math.max(lo,(x?qa.width:qa.height)+a.computeBusNodeSpacing(Fa)-Fe))}else ne===1&&(ti=x?b[0].Da.width:b[0].Da.height);if(re)switch(ue){case qh:case ah:Rt=135>E?dS(a,y,b,ti,It,Rt):hS(a,y,b,ti,It,Rt),ti=Rt.x,It=Rt.width,Rt=Rt.height;break;case ef:for(we=0;we<ne;we++)_e=b[we],Kt=_e.Da,lo=zi===0?0:pt,x?(_e.S.h(z-Kt.width,bi+lo),It=Math.max(It,Kt.width),Rt=Math.max(Rt,bi+lo+Kt.height),bi+=lo+Kt.height):(_e.S.h(hn+lo,z-Kt.height),It=Math.max(It,hn+lo+Kt.width),Rt=Math.max(Rt,Kt.height),hn+=lo+Kt.width),zi++;break;case Nh:for(z=0;z<ne;z++)we=b[z],_e=we.Da,Kt=zi===0?0:pt,x?(we.S.h(Fe/2+y.focus.x,bi+Kt),It=Math.max(It,_e.width),Rt=Math.max(Rt,bi+Kt+_e.height),bi+=Kt+_e.height):(we.S.h(hn+Kt,Fe/2+y.focus.y),It=Math.max(It,hn+Kt+_e.width),Rt=Math.max(Rt,_e.height),hn+=Kt+_e.width),zi++}else for(lo=0;lo<ne;lo++)$r=b[lo],Fa=$r.Da,x?(0<we&&0<zi&&hn+Fe+Fa.width>we&&(hn<z&&rg(y,ue,z-hn,0,hi,lo-1),Xi++,zi=0,hi=lo,Kt=Rt,hn=0,bi=135<E?-Rt-pt:Rt+pt),qa=zi===0?_e:Fe,iv(a,$r,0,bi),$r.S.h(hn+qa,bi),It=Math.max(It,hn+qa+Fa.width),Rt=Math.max(Rt,Kt+(Xi===0?0:pt)+Fa.height),hn+=qa+Fa.width):(0<we&&0<zi&&bi+Fe+Fa.height>we&&(bi<z&&rg(y,ue,0,z-bi,hi,lo-1),Xi++,zi=0,hi=lo,Kt=It,bi=0,hn=135<E?-It-pt:It+pt),qa=zi===0?_e:Fe,iv(a,$r,hn,0),$r.S.h(hn,bi+qa),Rt=Math.max(Rt,bi+qa+Fa.height),It=Math.max(It,Kt+(Xi===0?0:pt)+Fa.width),bi+=qa+Fa.height),zi++;switch(0<Xi&&(x?(Rt+=Math.max(0,oe),hn<It&&rg(y,ue,It-hn,0,hi,ne-1),0<it&&(me||zg(y,it,0,0,ne-1),It+=it)):(It+=Math.max(0,oe),bi<Rt&&rg(y,ue,0,Rt-bi,hi,ne-1),0<it&&(me||zg(y,0,it,0,ne-1),Rt+=it))),it=me=0,ue){case Np:x?me+=It/2-y.focus.x-De/2:it+=Rt/2-y.focus.y-De/2;break;case Hg:0<Xi?x?me+=It/2-y.focus.x-De/2:it+=Rt/2-y.focus.y-De/2:x?(a=b[0].S.x+b[0].la.x,me+=a+(b[ne-1].S.x+b[ne-1].la.x+2*b[ne-1].focus.x-a)/2-y.focus.x-De/2):(a=b[0].S.y+b[0].la.y,it+=a+(b[ne-1].S.y+b[ne-1].la.y+2*b[ne-1].focus.y-a)/2-y.focus.y-De/2);break;case rh:x?(me-=De,It+=De):(it-=De,Rt+=De);break;case oh:x?(me+=It-y.width+De,It+=De):(it+=Rt-y.height+De,Rt+=De);break;case qh:case ah:x?1<ne?me+=ti+Fe/2-y.focus.x:me+=b[0].focus.x-y.focus.x+b[0].la.x:1<ne?it+=ti+Fe/2-y.focus.y:it+=b[0].focus.y-y.focus.y+b[0].la.y;break;case ef:x?me+=It+Fe/2-y.focus.x:it+=Rt+Fe/2-y.focus.y;break;case Nh:break;default:a=a.customAlignment(y,me,it,It,Rt),me=a[0],it=a[1],It=a[2],Rt=a[3]}for(a=0;a<ne;a++)De=b[a],x?De.S.h(De.S.x+De.la.x-me,De.S.y+(135<E?(re?-Rt:-De.Da.height)+De.la.y-oe:bt+oe+De.la.y)):De.S.h(De.S.x+(135<E?(re?-It:-De.Da.width)+De.la.x-oe:ce+oe+De.la.x),De.S.y+De.la.y-it);x?(It=jy(y,It,me),0>me&&(me=0),135<E&&(it+=Rt+oe),Rt=Math.max(Math.max(Rt,bt),Rt+bt+oe)):(135<E&&(me+=It+oe),It=Math.max(Math.max(It,ce),It+ce+oe),Rt=zy(y,Rt,it),0>it&&(it=0)),y.la.h(me,it),y.Da.h(It,Rt)}}Ro.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function dS(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new Mn(E,0,b,z);if(ne===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Mn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,ue=id(y)===90,ce=0,me=0,we=0,Fe=0;Fe<ne;Fe++)if(!(Fe%2!==0||1<ne&&Fe===ne-1)){var De=x[Fe],_e=De.Da,pt=ce===0?0:oe;if(ue){var it=a.computeBusNodeSpacing(De)-re;De.S.h(E-(_e.width+it),we+pt),b=Math.max(b,_e.width+it),z=Math.max(z,we+pt+_e.height),we+=pt+_e.height}else it=a.computeBusNodeSpacing(De)-re,De.S.h(me+pt,E-(_e.height+it)),z=Math.max(z,_e.height+it),b=Math.max(b,me+pt+_e.width),me+=pt+_e.width;ce++}for(ce=0,De=me,Fe=we,ue?(me=E+re,we=0):(me=0,we=E+re),_e=0;_e<ne;_e++)if(_e%2!==0){pt=x[_e],it=pt.Da;var bt=ce===0?0:oe;if(ue){var It=a.computeBusNodeSpacing(pt)-re;pt.S.h(me+It,we+bt),b=Math.max(b,me+it.width+It),z=Math.max(z,we+bt+it.height),we+=bt+it.height}else It=a.computeBusNodeSpacing(pt)-re,pt.S.h(me+bt,we+It),b=Math.max(b,me+bt+it.width),z=Math.max(z,we+it.height+It),me+=bt+it.width;ce++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ue?Math.max(Math.abs(Fe),Math.abs(we)):Math.max(Math.abs(De),Math.abs(me))),ue?(x.S.h(E+re/2-x.focus.x-x.la.x,z+a),ue=E+re/2-x.focus.x-x.la.x,b=Math.max(b,ue+ne.width),0>ue&&(b-=ue),z=Math.max(z,Math.max(Fe,we)+a+ne.height),0>x.S.x&&(E=nv(y,x.S.x,!1,E,re))):(x.S.h(b+a,E+re/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(De,me)+a+ne.width),we=E+re/2-x.focus.y-x.la.y,z=Math.max(z,we+ne.height),0>we&&(z-=we),0>x.S.y&&(E=nv(y,x.S.y,!0,E,re)))),new Mn(E,0,b,z)}function hS(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new Mn(E,0,b,z);if(ne===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Mn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,ue=id(y)===270,ce=0,me=0,we=0,Fe=0;Fe<ne;Fe++)if(!(Fe%2!==0||1<ne&&Fe===ne-1)){var De=x[Fe],_e=De.Da,pt=ce===0?0:oe;if(ue){var it=a.computeBusNodeSpacing(De)-re;we-=pt+_e.height,De.S.h(E-(_e.width+it),we),b=Math.max(b,_e.width+it),z=Math.max(z,Math.abs(we))}else it=a.computeBusNodeSpacing(De)-re,me-=pt+_e.width,De.S.h(me,E-(_e.height+it)),z=Math.max(z,_e.height+it),b=Math.max(b,Math.abs(me));ce++}for(ce=0,De=me,Fe=we,ue?(me=E+re,we=0):(me=0,we=E+re),_e=0;_e<ne;_e++)if(_e%2!==0){pt=x[_e],it=pt.Da;var bt=ce===0?0:oe;if(ue){var It=a.computeBusNodeSpacing(pt)-re;we-=bt+it.height,pt.S.h(me+It,we),b=Math.max(b,me+it.width+It),z=Math.max(z,Math.abs(we))}else It=a.computeBusNodeSpacing(pt)-re,me-=bt+it.width,pt.S.h(me,we+It),z=Math.max(z,we+it.height+It),b=Math.max(b,Math.abs(me));ce++}for(1<ne&&ne%2===1&&(oe=x[ne-1],ce=oe.Da,a=a.computeBusLastRowSpacing(oe,ue?Math.max(Math.abs(Fe),Math.abs(we)):Math.max(Math.abs(De),Math.abs(me))),ue?(oe.S.h(E+re/2-oe.focus.x-oe.la.x,-z-ce.height-a),me=E+re/2-oe.focus.x-oe.la.x,b=Math.max(b,me+ce.width),0>me&&(b-=me),z=Math.max(z,Math.abs(Math.min(Fe,we))+a+ce.height),0>oe.S.x&&(E=nv(y,oe.S.x,!1,E,re))):(oe.S.h(-b-ce.width-a,E+re/2-oe.focus.y-oe.la.y),b=Math.max(b,Math.abs(Math.min(De,me))+a+ce.width),we=E+re/2-oe.focus.y-oe.la.y,z=Math.max(z,we+ce.height),0>we&&(z-=we),0>oe.S.y&&(E=nv(y,oe.S.y,!0,E,re)))),y=0;y<ne;y++)re=x[y],ue?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+b,re.S.y);return new Mn(E,0,b,z)}Ro.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ro.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function nv(a,y,x,E,b){a=a.children;for(var z=a.length,ne=0;ne<z;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function jy(a,y,x){switch(a.alignment){case Hg:case Np:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case rh:return a.width>y?a.width:y;case oh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case qh:case ah:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case ef:return a.width-a.focus.x+a.nodeSpacing/2+y;case Nh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function zy(a,y,x){switch(a.alignment){case Hg:case Np:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case rh:return a.height>y?a.height:y;case oh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case qh:case ah:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case ef:return a.height-a.focus.y+a.nodeSpacing/2+y;case Nh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Zy(a,y,x){switch(a){case Np:y/=2,x/=2;break;case Hg:y/=2,x/=2;break;case rh:x=y=0;break;case oh:break;default:Et("Unhandled alignment value "+a.toString())}return new st(y,x)}function rg(a,y,x,E,b,z){y=Zy(y,x,E),zg(a,y.x,y.y,b,z)}function zg(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function iv(a,y,x,E){var b=y.parent;switch(a.ud){case ih:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Zg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:Et("Unhandled path value "+a.ud.toString())}}function rv(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function fS(a,y,x,E,b,z,ne,re){var oe=id(y),ue=oe===90||oe===270,ce=y.nodeSpacing;y=E;var me=b;E=z;var we=ne,Fe=x.Yo,De=x.kp;ne=x.Da;var _e=ue?Math.max(we,ne.height):Math.max(E,ne.width);if((Fe===null||oe!==id(x))&&(Fe=Qu(a,2),De=Qu(a,2),ue?(Fe[0].h(0,0),Fe[1].h(0,ne.height),De[0].h(ne.width,0),De[1].h(De[0].x,Fe[1].y)):(Fe[0].h(0,0),Fe[1].h(ne.width,0),De[0].h(0,ne.height),De[1].h(Fe[1].x,De[0].y))),ue){if(we=9999999,!(me===null||2>me.length||Fe===null||2>Fe.length))for(b=x=0;x<me.length&&b<Fe.length;){z=me[x];var pt=Fe[b];oe=pt.x,ue=pt.y,oe+=E;var it=z;x+1<me.length&&(it=me[x+1]);var bt=pt;pt=bt.x,bt=bt.y,b+1<Fe.length&&(bt=Fe[b+1],pt=bt.x,bt=bt.y,pt+=E);var It=we;z.y===ue?It=oe-z.x:z.y>ue&&z.y<bt?It=oe+(z.y-ue)/(bt-ue)*(pt-oe)-z.x:ue>z.y&&ue<it.y&&(It=oe-(z.x+(ue-z.y)/(it.y-z.y)*(it.x-z.x))),It<we&&(we=It),it.y<=z.y?x++:bt<=ue?b++:(it.y<=bt&&x++,bt<=it.y&&b++)}if(we=E-we,we+=ce,x=Fe,b=we,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ce=Qu(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].y<y[0].y;)ue=x[z++],ce[E++].h(ue.x+b,ue.y);for(;oe<y.length;)ue=y[oe++],ce[E++].h(ue.x,ue.y);for(oe=y[y.length-1].y;z<x.length&&x[z].y<=oe;)z++;for(;z<x.length&&x[z].y>oe;)ue=x[z++],ce[E++].h(ue.x+b,ue.y);for(x=Qu(a,E),oe=0;oe<E;oe++)x[oe].assign(ce[oe]);xd(a,ce),E=x}if(z=De,oe=we,me===null||2>me.length||z===null||2>z.length)b=null;else{for(ce=Qu(a,me.length+z.length),b=ue=x=0;x<me.length&&me[x].y<z[0].y;)it=me[x++],ce[b++].h(it.x,it.y);for(;ue<z.length;)it=z[ue++],ce[b++].h(it.x+oe,it.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++],ce[b++].h(oe.x,oe.y);for(z=Qu(a,b),x=0;x<b;x++)z[x].assign(ce[x]);xd(a,ce),b=z}return z=Math.max(0,we)+ne.width,ne=_e,xd(a,y),xd(a,Fe),xd(a,me),xd(a,De),re[0]=E,re[1]=b,new Mn(we,0,z,ne)}if(E=9999999,!(me===null||2>me.length||Fe===null||2>Fe.length))for(b=x=0;x<me.length&&b<Fe.length;)z=me[x],pt=Fe[b],oe=pt.x,ue=pt.y,ue+=we,it=z,x+1<me.length&&(it=me[x+1]),bt=pt,pt=bt.x,bt=bt.y,b+1<Fe.length&&(bt=Fe[b+1],pt=bt.x,bt=bt.y,bt+=we),It=E,z.x===oe?It=ue-z.y:z.x>oe&&z.x<pt?It=ue+(z.x-oe)/(pt-oe)*(bt-ue)-z.y:oe>z.x&&oe<it.x&&(It=ue-(z.y+(oe-z.x)/(it.x-z.x)*(it.y-z.y))),It<E&&(E=It),it.x<=z.x?x++:pt<=oe?b++:(it.x<=pt&&x++,pt<=it.x&&b++);if(we-=E,we+=ce,x=Fe,b=we,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ce=Qu(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].x<y[0].x;)ue=x[z++],ce[E++].h(ue.x,ue.y+b);for(;oe<y.length;)ue=y[oe++],ce[E++].h(ue.x,ue.y);for(oe=y[y.length-1].x;z<x.length&&x[z].x<=oe;)z++;for(;z<x.length&&x[z].x>oe;)ue=x[z++],ce[E++].h(ue.x,ue.y+b);for(x=Qu(a,E),oe=0;oe<E;oe++)x[oe].assign(ce[oe]);xd(a,ce),E=x}if(z=De,oe=we,me===null||2>me.length||z===null||2>z.length)b=null;else{for(ce=Qu(a,me.length+z.length),b=ue=x=0;x<me.length&&me[x].x<z[0].x;)it=me[x++],ce[b++].h(it.x,it.y);for(;ue<z.length;)it=z[ue++],ce[b++].h(it.x,it.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++],ce[b++].h(oe.x,oe.y);for(z=Qu(a,b),x=0;x<b;x++)z[x].assign(ce[x]);xd(a,ce),b=z}return z=_e,ne=Math.max(0,we)+ne.height,xd(a,y),xd(a,Fe),xd(a,me),xd(a,De),re[0]=E,re[1]=b,new Mn(we,0,z,ne)}function Qu(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 st;return a}function xd(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Ro.prototype.arrangeTrees=function(){if(this.Rb===uv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Wc){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),Hy(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Wc&&a.push(x);switch(this.sorting){case Lp:break;case Fm:a.reverse();break;case Bm:a.sort(this.comparer);break;case Mm:a.sort(this.comparer),a.reverse();break;default:Et("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(Hy(this,b,y+b.la.x,x+b.la.y),this.Rb){case lv:x+=b.Da.height+this.$d.height;break;case Ky:y+=b.Da.width+this.$d.width;break;default:Et("Unhandled arrangement value "+this.Rb.toString())}}}};function Hy(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var ne=y[z];Hy(a,ne,x+ne.S.x,E+ne.S.y)}}}Ro.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ro.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ro.prototype.Gu=function(){if(this.layerStyle===cv){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new st(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new st(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)z+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var re=a[ne]+y[ne];this.angle===270?(z-=re,b.push(new Mn(0,z,x,re))):this.angle===90?(b.push(new Mn(0,z,x,re)),z+=re):this.angle===180?(z-=re,b.push(new Mn(z,0,re,x))):(b.push(new Mn(z,0,re,x)),z+=re)}this.commitLayers(b,E)}},Ro.prototype.commitLayers=function(){},Ro.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ro.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Wc&&gS(this,y)}};function gS(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)gS(a,y[E])}}Ro.prototype.setPortSpots=function(a){var y=a.alignment;if(If(y)){var x=this.ud===ih,E=id(a);switch(E){case 0:var b=Io;break;case 90:b=Dr;break;case 180:b=oa;break;default:b=bo}var z=a.children,ne=z.length;switch(y){case qh:case ah:for(y=0;y<ne;y++){var re=z[y];if(re=(x?re.sourceEdges:re.destinationEdges).first(),re!==null&&(re=re.link,re!==null)){var oe=E===90||E===270?oa:bo;if(ne===1||y===ne-1&&ne%2===1)switch(E){case 0:oe=oa;break;case 90:oe=bo;break;case 180:oe=Io;break;default:oe=Dr}else y%2===0&&(oe=E===90||E===270?Io:Dr);x?(a.setsPortSpot&&(re.fromSpot=b),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=b))}}break;case ef:for(E=E===90||E===270?Io:Dr,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)):(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)));break;case Nh:for(E=E===90||E===270?oa:bo,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)):(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)))}}else if(x=id(a),this.ud===ih){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=Io;break;case 90:E.fromSpot=Dr;break;case 180:E.fromSpot=oa;break;default:E.fromSpot=bo}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=oa;break;case 90:E.toSpot=bo;break;case 180:E.toSpot=Io;break;default:E.toSpot=Dr}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=Io;break;case 90:E.toSpot=Dr;break;case 180:E.toSpot=oa;break;default:E.toSpot=bo}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=oa;break;case 90:E.fromSpot=bo;break;case 180:E.fromSpot=Io;break;default:E.fromSpot=Dr}else E.fromSpot=a.childPortSpot}};function id(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Ro.prototype.computeLayerSpacing=function(a){var y=id(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},Ro.prototype.computeNodeIndent=function(a){var y=id(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},Qe.Object.defineProperties(Ro.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==sv&&a!==Gy&&a!==Wy&&a!==$y||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Vy&&a!==Uy&&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!==Ky&&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!==Lp&&a!==Fm&&a!==Bm&&!Mm||(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()):Et("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!==Lm||(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!==Lp&&a!==Fm&&a!==Bm&&!Mm||(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!==Lm||(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 Cn(Ro,"PathDefault",-1),ih=new Cn(Ro,"PathDestination",0),Zg=new Cn(Ro,"PathSource",1),Lp=new Cn(Ro,"SortingForwards",10),Fm=new Cn(Ro,"SortingReverse",11),Bm=new Cn(Ro,"SortingAscending",12),Mm=new Cn(Ro,"SortingDescending",13),Np=new Cn(Ro,"AlignmentCenterSubtrees",20),Hg=new Cn(Ro,"AlignmentCenterChildren",21),rh=new Cn(Ro,"AlignmentStart",22),oh=new Cn(Ro,"AlignmentEnd",23),qh=new Cn(Ro,"AlignmentBus",24),ah=new Cn(Ro,"AlignmentBusBranching",25),ef=new Cn(Ro,"AlignmentTopLeftBus",26),Nh=new Cn(Ro,"AlignmentBottomRightBus",27),av=new Cn(Ro,"CompactionNone",30),Lm=new Cn(Ro,"CompactionBlock",31),sv=new Cn(Ro,"StyleLayered",40),Wy=new Cn(Ro,"StyleLastParents",41),Gy=new Cn(Ro,"StyleAlternating",42),$y=new Cn(Ro,"StyleRootOnly",43),lv=new Cn(Ro,"ArrangementVertical",50),Ky=new Cn(Ro,"ArrangementHorizontal",51),uv=new Cn(Ro,"ArrangementFixedRoots",52),Vy=new Cn(Ro,"LayerIndividual",60),Uy=new Cn(Ro,"LayerSiblings",61),cv=new Cn(Ro,"LayerUniform",62);Ro.className="TreeLayout",Ro.PathDefault=ov,Ro.PathDestination=ih,Ro.PathSource=Zg,Ro.SortingForwards=Lp,Ro.SortingReverse=Fm,Ro.SortingAscending=Bm,Ro.SortingDescending=Mm,Ro.AlignmentCenterSubtrees=Np,Ro.AlignmentCenterChildren=Hg,Ro.AlignmentStart=rh,Ro.AlignmentEnd=oh,Ro.AlignmentBus=qh,Ro.AlignmentBusBranching=ah,Ro.AlignmentTopLeftBus=ef,Ro.AlignmentBottomRightBus=Nh,Ro.CompactionNone=av,Ro.CompactionBlock=Lm,Ro.StyleLayered=sv,Ro.StyleLastParents=Wy,Ro.StyleAlternating=Gy,Ro.StyleRootOnly=$y,Ro.ArrangementVertical=lv,Ro.ArrangementHorizontal=Ky,Ro.ArrangementFixedRoots=uv,Ro.LayerIndividual=Vy,Ro.LayerSiblings=Uy,Ro.LayerUniform=cv;function Wg(a){ts.call(this,a)}$t(Wg,ts),Wg.prototype.createVertex=function(){return new Wc(this)},Wg.prototype.createEdge=function(){return new Ap(this)},Wg.className="TreeNetwork";function Wc(a){ul.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 st(0,0),this.Da=new pi(0,0),this.la=new st(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Lp,this.hd=gy,this.Kb=0,this.Jb=Hg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Lm,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Fi,this.wr=!0,this.Dp=Fi}$t(Wc,ul),Wc.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)},Qe.Object.defineProperties(Wc.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)}}}),Wc.className="TreeVertex";function Ap(a){hc.call(this,a),this.$t=new st(0,0)}$t(Ap,hc),Ap.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case ih:x=this.fromVertex,E=this.toVertex;break;case Zg:x=this.toVertex,E=this.fromVertex;break;default:Et("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=id(x),ne=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===Ec,ue=a.isOrthogonal,ce;if(a.uh(),ue||oe){for(ce=2;4<a.pointsCount;)a.pv(2);var me=a.i(1),we=a.i(2)}else{for(ce=1;3<a.pointsCount;)a.pv(1);me=a.i(0),we=a.i(a.pointsCount-1)}var Fe=a.i(a.pointsCount-1);z===0?(x.alignment===oh?(z=E.bottom+b.y,b.y===0&&me.y>Fe.y+x.rowIndent&&(z=Math.min(z,Math.max(me.y,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.top+b.y,b.y===0&&me.y<Fe.y-x.rowIndent&&(z=Math.max(z,Math.min(me.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,oe?(a.m(ce,me.x,z),ce++,a.m(ce,E.right+ne,z),ce++,a.m(ce,E.right+ne+(b.x-re)/3,z),ce++,a.m(ce,E.right+ne+2*(b.x-re)/3,z),ce++,a.m(ce,E.right+ne+(b.x-re),z),ce++,a.m(ce,we.x,z)):(ue&&(a.m(ce,E.right+ne/2,me.y),ce++),a.m(ce,E.right+ne/2,z),ce++,a.m(ce,E.right+ne+b.x-(ue?re/2:re),z),ce++,ue&&a.m(ce,a.i(ce-1).x,we.y))):z===90?(x.alignment===oh?(z=E.right+b.x,b.x===0&&me.x>Fe.x+x.rowIndent&&(z=Math.min(z,Math.max(me.x,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.left+b.x,b.x===0&&me.x<Fe.x-x.rowIndent&&(z=Math.max(z,Math.min(me.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,oe?(a.m(ce,z,me.y),ce++,a.m(ce,z,E.bottom+ne),ce++,a.m(ce,z,E.bottom+ne+(b.y-re)/3),ce++,a.m(ce,z,E.bottom+ne+2*(b.y-re)/3),ce++,a.m(ce,z,E.bottom+ne+(b.y-re)),ce++,a.m(ce,z,we.y)):(ue&&(a.m(ce,me.x,E.bottom+ne/2),ce++),a.m(ce,z,E.bottom+ne/2),ce++,a.m(ce,z,E.bottom+ne+b.y-(ue?re/2:re)),ce++,ue&&a.m(ce,we.x,a.i(ce-1).y))):z===180?(x.alignment===oh?(z=E.bottom+b.y,b.y===0&&me.y>Fe.y+x.rowIndent&&(z=Math.min(z,Math.max(me.y,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.top+b.y,b.y===0&&me.y<Fe.y-x.rowIndent&&(z=Math.max(z,Math.min(me.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,oe?(a.m(ce,me.x,z),ce++,a.m(ce,E.left-ne,z),ce++,a.m(ce,E.left-ne+(b.x+re)/3,z),ce++,a.m(ce,E.left-ne+2*(b.x+re)/3,z),ce++,a.m(ce,E.left-ne+(b.x+re),z),ce++,a.m(ce,we.x,z)):(ue&&(a.m(ce,E.left-ne/2,me.y),ce++),a.m(ce,E.left-ne/2,z),ce++,a.m(ce,E.left-ne+b.x+(ue?re/2:re),z),ce++,ue&&a.m(ce,a.i(ce-1).x,we.y))):z===270?(x.alignment===oh?(z=E.right+b.x,b.x===0&&me.x>Fe.x+x.rowIndent&&(z=Math.min(z,Math.max(me.x,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.left+b.x,b.x===0&&me.x<Fe.x-x.rowIndent&&(z=Math.max(z,Math.min(me.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,oe?(a.m(ce,z,me.y),ce++,a.m(ce,z,E.top-ne),ce++,a.m(ce,z,E.top-ne+(b.y+re)/3),ce++,a.m(ce,z,E.top-ne+2*(b.y+re)/3),ce++,a.m(ce,z,E.top-ne+(b.y+re)),ce++,a.m(ce,z,we.y)):(ue&&(a.m(ce,me.x,E.top-ne/2),ce++),a.m(ce,z,E.top-ne/2),ce++,a.m(ce,z,E.top-ne+b.y+(ue?re/2:re)),ce++,ue&&a.m(ce,we.x,a.i(ce-1).y))):Et("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=id(x),y!==id(b)&&(ne=E.computeLayerSpacing(x),re=x.bounds,x=b.bounds,y===0&&x.left-re.right<ne+1||y===90&&x.top-re.bottom<ne+1||y===180&&re.left-x.right<ne+1||y===270&&re.top-x.bottom<ne+1||(a.vg(),x=a.curve===Ec,b=a.isOrthogonal,E=If(this.fromVertex.alignment),a.uh(),y===0?(y=re.right+ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=re.bottom+ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=re.left-ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=re.top-ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},Qe.Object.defineProperties(Ap.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)}}}),Ap.className="TreeEdge",jo.prototype.initializeStandardTools=function(){this.gb("Action",new uo,this.mouseDownTools),this.gb("Relinking",new Ui,this.mouseDownTools),this.gb("LinkReshaping",new ir,this.mouseDownTools),this.gb("Rotating",new Wo,this.mouseDownTools),this.gb("Resizing",new oo,this.mouseDownTools),this.gb("Linking",new Jn,this.mouseMoveTools),this.gb("Dragging",new as,this.mouseMoveTools),this.gb("DragSelecting",new co,this.mouseMoveTools),this.gb("Panning",new Ar,this.mouseMoveTools),this.gb("ContextMenu",new Sa,this.mouseUpTools),this.gb("TextEditing",new aa,this.mouseUpTools),this.gb("ClickCreating",new To,this.mouseUpTools),this.gb("ClickSelecting",new Ta,this.mouseUpTools)},Ad("Horizontal",new jm),Ad("Spot",new Zm),Ad("Table",new Wm),Ad("Viewbox",new Km),Ad("TableRow",new Gm),Ad("TableColumn",new $m),Ad("Graduated",new $p),Ad("Grid",new Gp),Uf.add("GraphLinksModel",Ll),Uf.add("TreeModel",Dc);var dv=ht.go,Yy={get licenseKey(){return dn.licenseKey},set licenseKey(a){dn.licenseKey=a},get version(){return dn.version},Group:ho,EnumValue:Cn,List:Un,Set:Yn,Map:Ki,Point:st,Size:pi,Rect:Mn,Margin:hr,Spot:Ji,Geometry:Qt,PathFigure:So,PathSegment:fr,InputEvent:Or,DiagramEvent:kr,ChangedEvent:gr,Model:ar,GraphLinksModel:ia,TreeModel:Bu,Binding:tl,Transaction:wo,UndoManager:Oa,CommandHandler:gt,Tool:Nr,DraggingTool:as,DraggingInfo:dd,DraggingOptions:ae,LinkingBaseTool:nn,LinkingTool:Jn,RelinkingTool:Ui,LinkReshapingTool:ir,ResizingTool:oo,RotatingTool:Wo,ClickSelectingTool:Ta,ActionTool:uo,ClickCreatingTool:To,HTMLInfo:Fo,ContextMenuTool:Sa,DragSelectingTool:co,PanningTool:Ar,TextEditingTool:aa,ToolManager:jo,Animation:Ns,AnimationManager:Fs,AnimationTrigger:Tu,Layer:ms,Diagram:dn,Palette:ge,Overview:ye,Brush:ha,GraphObject:Vt,Panel:ui,RowColumnDefinition:ol,Shape:Co,TextBlock:es,Picture:zu,Part:xr,Adornment:pa,Node:Ni,Link:fi,Placeholder:Cu,Layout:xs,LayoutNetwork:ts,LayoutVertex:ul,LayoutEdge:hc,GridLayout:Rl,PanelLayout:ll,CircularLayout:Os,CircularNetwork:Fp,CircularVertex:xm,CircularEdge:$0,ForceDirectedLayout:ql,ForceDirectedNetwork:jg,ForceDirectedVertex:Sm,ForceDirectedEdge:Pm,LayeredDigraphLayout:za,LayeredDigraphNetwork:Mp,LayeredDigraphVertex:Oc,LayeredDigraphEdge:Em,TreeLayout:Ro,TreeNetwork:Wg,TreeVertex:Wc,TreeEdge:Ap};typeof dv=="object"&&dv.version&&Ei("WARNING: a `go` object on the root object is already defined. "+("Debug"in dv?"debug ":"")+"version: "+dv.version+", replaced with version: "+Yy.version),dn.prototype.go=Yy,ht.go=Yy,typeof On.exports=="object"&&(On.exports=typeof pe.g!="undefined"?pe.g.go:self.go)}();var le=typeof pe.g!="undefined"?pe.g.go:self.go;const ke=typeof pe.g!="undefined"?pe.g.go:self.go,We=ke.Group,ut=ke.EnumValue,Ge=ke.List,Ue=ke.Set,Me=ke.Map,Ct=ke.Point,wt=ke.Size,$e=ke.Rect,Ft=ke.Margin,lt=ke.Spot,vt=ke.Geometry,Ie=ke.PathFigure,te=ke.PathSegment,ee=ke.InputEvent,de=ke.DiagramEvent,se=ke.ChangedEvent,he=ke.Model,ve=ke.GraphLinksModel,Ee=ke.TreeModel,Be=ke.Binding,Le=ke.Transaction,ze=ke.UndoManager,je=ke.CommandHandler,Xe=ke.Tool,Ye=ke.DraggingTool,dt=ke.DraggingInfo,He=ke.LinkingBaseTool,Nt=ke.LinkingTool,ot=ke.RelinkingTool,Tt=ke.LinkReshapingTool,xt=ke.ResizingTool,Ot=ke.RotatingTool,Wt=ke.ClickSelectingTool,Dt=ke.ActionTool,tt=ke.ClickCreatingTool,Ve=ke.HTMLInfo,_t=ke.ContextMenuTool,vn=ke.DragSelectingTool,yn=ke.PanningTool,zt=ke.TextEditingTool,qt=ke.ToolManager,ln=ke.Animation,Gn=ke.AnimationManager,un=ke.AnimationTrigger,_n=ke.Layer,St=ke.Diagram,Zn=ke.Palette,ci=ke.Overview,Ze=ke.Brush,be=ke.GraphObject,Pe=ke.Panel,Ae=ke.RowColumnDefinition,Oe=ke.Shape,xe=ke.TextBlock,ct=ke.TextBlockMetrics,Mt=ke.Picture,at=ke.Part,qe=ke.Adornment,Lt=ke.Node,Bt=ke.Link,ft=ke.Placeholder,Gt=ke.Layout,Sn=ke.LayoutNetwork,an=ke.LayoutVertex,rn=ke.LayoutEdge,zn=ke.GridLayout,kn=ke.PanelLayout,mn=ke.CircularLayout,ei=ke.CircularNetwork,Pi=ke.CircularVertex,Hn=ke.CircularEdge,bn=ke.ForceDirectedLayout,wi=ke.ForceDirectedNetwork,Zi=ke.ForceDirectedVertex,Hi=ke.ForceDirectedEdge,rr=ke.LayeredDigraphLayout,_r=ke.LayeredDigraphNetwork,gi=ke.LayeredDigraphVertex,di=ke.LayeredDigraphEdge,xi=ke.TreeLayout,$i=ke.TreeNetwork,Ri=ke.TreeVertex,Kr=ke.TreeEdge,Sr=ke.version},24334:function(On,pn,pe){var le,ke;(function(We,ut){On.exports=ut(We)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof pe.g!="undefined"?pe.g:this,function(We){"use strict";We=We||{};var ut=We.Base64,Ge="2.6.4",Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Me=function(ot){for(var Tt={},xt=0,Ot=ot.length;xt<Ot;xt++)Tt[ot.charAt(xt)]=xt;return Tt}(Ue),Ct=String.fromCharCode,wt=function(ot){if(ot.length<2){var Tt=ot.charCodeAt(0);return Tt<128?ot:Tt<2048?Ct(192|Tt>>>6)+Ct(128|Tt&63):Ct(224|Tt>>>12&15)+Ct(128|Tt>>>6&63)+Ct(128|Tt&63)}else{var Tt=65536+(ot.charCodeAt(0)-55296)*1024+(ot.charCodeAt(1)-56320);return Ct(240|Tt>>>18&7)+Ct(128|Tt>>>12&63)+Ct(128|Tt>>>6&63)+Ct(128|Tt&63)}},$e=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ft=function(ot){return ot.replace($e,wt)},lt=function(ot){var Tt=[0,2,1][ot.length%3],xt=ot.charCodeAt(0)<<16|(ot.length>1?ot.charCodeAt(1):0)<<8|(ot.length>2?ot.charCodeAt(2):0),Ot=[Ue.charAt(xt>>>18),Ue.charAt(xt>>>12&63),Tt>=2?"=":Ue.charAt(xt>>>6&63),Tt>=1?"=":Ue.charAt(xt&63)];return Ot.join("")},vt=We.btoa&&typeof We.btoa=="function"?function(ot){return We.btoa(ot)}:function(ot){if(ot.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ot.replace(/[\s\S]{1,3}/g,lt)},Ie=function(ot){return vt(Ft(String(ot)))},te=function(ot){return ot.replace(/[+\/]/g,function(Tt){return Tt=="+"?"-":"_"}).replace(/=/g,"")},ee=function(ot,Tt){return Tt?te(Ie(ot)):Ie(ot)},de=function(ot){return ee(ot,!0)},se;We.Uint8Array&&(se=function(ot,Tt){for(var xt="",Ot=0,Wt=ot.length;Ot<Wt;Ot+=3){var Dt=ot[Ot],tt=ot[Ot+1],Ve=ot[Ot+2],_t=Dt<<16|tt<<8|Ve;xt+=Ue.charAt(_t>>>18)+Ue.charAt(_t>>>12&63)+(typeof tt!="undefined"?Ue.charAt(_t>>>6&63):"=")+(typeof Ve!="undefined"?Ue.charAt(_t&63):"=")}return Tt?te(xt):xt});var he=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ve=function(ot){switch(ot.length){case 4:var Tt=(7&ot.charCodeAt(0))<<18|(63&ot.charCodeAt(1))<<12|(63&ot.charCodeAt(2))<<6|63&ot.charCodeAt(3),xt=Tt-65536;return Ct((xt>>>10)+55296)+Ct((xt&1023)+56320);case 3:return Ct((15&ot.charCodeAt(0))<<12|(63&ot.charCodeAt(1))<<6|63&ot.charCodeAt(2));default:return Ct((31&ot.charCodeAt(0))<<6|63&ot.charCodeAt(1))}},Ee=function(ot){return ot.replace(he,ve)},Be=function(ot){var Tt=ot.length,xt=Tt%4,Ot=(Tt>0?Me[ot.charAt(0)]<<18:0)|(Tt>1?Me[ot.charAt(1)]<<12:0)|(Tt>2?Me[ot.charAt(2)]<<6:0)|(Tt>3?Me[ot.charAt(3)]:0),Wt=[Ct(Ot>>>16),Ct(Ot>>>8&255),Ct(Ot&255)];return Wt.length-=[0,0,2,1][xt],Wt.join("")},Le=We.atob&&typeof We.atob=="function"?function(ot){return We.atob(ot)}:function(ot){return ot.replace(/\S{1,4}/g,Be)},ze=function(ot){return Le(String(ot).replace(/[^A-Za-z0-9\+\/]/g,""))},je=function(ot){return Ee(Le(ot))},Xe=function(ot){return String(ot).replace(/[-_]/g,function(Tt){return Tt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ye=function(ot){return je(Xe(ot))},dt;We.Uint8Array&&(dt=function(ot){return Uint8Array.from(ze(Xe(ot)),function(Tt){return Tt.charCodeAt(0)})});var He=function(){var ot=We.Base64;return We.Base64=ut,ot};if(We.Base64={VERSION:Ge,atob:ze,btoa:vt,fromBase64:Ye,toBase64:ee,utob:Ft,encode:ee,encodeURI:de,btou:Ee,decode:Ye,noConflict:He,fromUint8Array:se,toUint8Array:dt},typeof Object.defineProperty=="function"){var Nt=function(ot){return{value:ot,enumerable:!1,writable:!0,configurable:!0}};We.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Nt(function(){return Ye(this)})),Object.defineProperty(String.prototype,"toBase64",Nt(function(ot){return ee(this,ot)})),Object.defineProperty(String.prototype,"toBase64URI",Nt(function(){return ee(this,!0)}))}}return We.Meteor&&(Base64=We.Base64),On.exports?On.exports.Base64=We.Base64:(le=[],ke=function(){return We.Base64}.apply(pn,le),ke!==void 0&&(On.exports=ke)),{Base64:We.Base64}})},2859:function(On,pn,pe){"use strict";pe.d(pn,{hP:function(){return ci}});var le=function(Ze,be){return(le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Pe,Ae){Pe.__proto__=Ae}||function(Pe,Ae){for(var Oe in Ae)Object.prototype.hasOwnProperty.call(Ae,Oe)&&(Pe[Oe]=Ae[Oe])})(Ze,be)};function ke(Ze,be){function Pe(){this.constructor=Ze}le(Ze,be),Ze.prototype=be===null?Object.create(be):(Pe.prototype=be.prototype,new Pe)}function We(Ze,be,Pe,Ae){return new(Pe||(Pe=Promise))(function(Oe,xe){function ct(qe){try{at(Ae.next(qe))}catch(Lt){xe(Lt)}}function Mt(qe){try{at(Ae.throw(qe))}catch(Lt){xe(Lt)}}function at(qe){var Lt;qe.done?Oe(qe.value):(Lt=qe.value,Lt instanceof Pe?Lt:new Pe(function(Bt){Bt(Lt)})).then(ct,Mt)}at((Ae=Ae.apply(Ze,be||[])).next())})}function ut(Ze,be){var Pe,Ae,Oe,xe,ct={label:0,sent:function(){if(1&Oe[0])throw Oe[1];return Oe[1]},trys:[],ops:[]};return xe={next:Mt(0),throw:Mt(1),return:Mt(2)},typeof Symbol=="function"&&(xe[Symbol.iterator]=function(){return this}),xe;function Mt(at){return function(qe){return function(Lt){if(Pe)throw new TypeError("Generator is already executing.");for(;ct;)try{if(Pe=1,Ae&&(Oe=2&Lt[0]?Ae.return:Lt[0]?Ae.throw||((Oe=Ae.return)&&Oe.call(Ae),0):Ae.next)&&!(Oe=Oe.call(Ae,Lt[1])).done)return Oe;switch(Ae=0,Oe&&(Lt=[2&Lt[0],Oe.value]),Lt[0]){case 0:case 1:Oe=Lt;break;case 4:return ct.label++,{value:Lt[1],done:!1};case 5:ct.label++,Ae=Lt[1],Lt=[0];continue;case 7:Lt=ct.ops.pop(),ct.trys.pop();continue;default:if(Oe=ct.trys,!((Oe=Oe.length>0&&Oe[Oe.length-1])||Lt[0]!==6&&Lt[0]!==2)){ct=0;continue}if(Lt[0]===3&&(!Oe||Lt[1]>Oe[0]&&Lt[1]<Oe[3])){ct.label=Lt[1];break}if(Lt[0]===6&&ct.label<Oe[1]){ct.label=Oe[1],Oe=Lt;break}if(Oe&&ct.label<Oe[2]){ct.label=Oe[2],ct.ops.push(Lt);break}Oe[2]&&ct.ops.pop(),ct.trys.pop();continue}Lt=be.call(Ze,ct)}catch(Bt){Lt=[6,Bt],Ae=0}finally{Pe=Oe=0}if(5&Lt[0])throw Lt[1];return{value:Lt[0]?Lt[1]:void 0,done:!0}}([at,qe])}}}function Ge(){for(var Ze=0,be=0,Pe=arguments.length;be<Pe;be++)Ze+=arguments[be].length;var Ae=Array(Ze),Oe=0;for(be=0;be<Pe;be++)for(var xe=arguments[be],ct=0,Mt=xe.length;ct<Mt;ct++,Oe++)Ae[Oe]=xe[ct];return Ae}var Ue=function(){function Ze(){}return Ze.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ze.setAttributes=function(be,Pe){for(var Ae=0,Oe=Pe;Ae<Oe.length;Ae++){var xe=Oe[Ae],ct=xe[0],Mt=xe[1];be.setAttribute(ct,Mt)}},Ze.createRect=function(be,Pe,Ae){var Oe=document.createElementNS("http://www.w3.org/2000/svg","rect");return Oe.setAttribute("width",be.toString()),Oe.setAttribute("height",Pe.toString()),Ae&&Ze.setAttributes(Oe,Ae),Oe},Ze.createLine=function(be,Pe,Ae,Oe,xe){var ct=document.createElementNS("http://www.w3.org/2000/svg","line");return ct.setAttribute("x1",be.toString()),ct.setAttribute("y1",Pe.toString()),ct.setAttribute("x2",Ae.toString()),ct.setAttribute("y2",Oe.toString()),xe&&Ze.setAttributes(ct,xe),ct},Ze.createPolygon=function(be,Pe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ae.setAttribute("points",be),Pe&&Ze.setAttributes(Ae,Pe),Ae},Ze.createCircle=function(be,Pe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ae.setAttribute("cx",(be/2).toString()),Ae.setAttribute("cy",(be/2).toString()),Ae.setAttribute("r",be.toString()),Pe&&Ze.setAttributes(Ae,Pe),Ae},Ze.createEllipse=function(be,Pe,Ae){var Oe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Oe.setAttribute("cx",(be/2).toString()),Oe.setAttribute("cy",(Pe/2).toString()),Oe.setAttribute("rx",(be/2).toString()),Oe.setAttribute("ry",(Pe/2).toString()),Ae&&Ze.setAttributes(Oe,Ae),Oe},Ze.createGroup=function(be){var Pe=document.createElementNS("http://www.w3.org/2000/svg","g");return be&&Ze.setAttributes(Pe,be),Pe},Ze.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ze.createMarker=function(be,Pe,Ae,Oe,xe,ct,Mt){var at=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ze.setAttributes(at,[["id",be],["orient",Pe],["markerWidth",Ae.toString()],["markerHeight",Oe.toString()],["refX",xe.toString()],["refY",ct.toString()]]),at.appendChild(Mt),at},Ze.createText=function(be){var Pe=document.createElementNS("http://www.w3.org/2000/svg","text");return Pe.setAttribute("x","0"),Pe.setAttribute("y","0"),be&&Ze.setAttributes(Pe,be),Pe},Ze.createTSpan=function(be,Pe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ae.textContent=be,Pe&&Ze.setAttributes(Ae,Pe),Ae},Ze.createImage=function(be){var Pe=document.createElementNS("http://www.w3.org/2000/svg","image");return be&&Ze.setAttributes(Pe,be),Pe},Ze.createPoint=function(be,Pe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ae.x=be,Ae.y=Pe,Ae},Ze.createPath=function(be,Pe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","path");return Ae.setAttribute("d",be),Pe&&Ze.setAttributes(Ae,Pe),Ae},Ze}(),Me=function(){function Ze(){}return Ze.addKey=function(be){Ze.key=be},Object.defineProperty(Ze,"isLicensed",{get:function(){return!!Ze.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ze.key)},enumerable:!1,configurable:!0}),Ze}(),Ct=function(){function Ze(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ze.prototype.rasterize=function(be,Pe,Ae){var Oe=this;return new Promise(function(xe){var ct=Ae!==void 0?Ae:document.createElement("canvas");be===null&&(Oe.markersOnly=!0,Oe.naturalSize=!1);var Mt=document.createElementNS("http://www.w3.org/2000/svg","svg");Mt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Mt.setAttribute("width",Pe.width.baseVal.valueAsString),Mt.setAttribute("height",Pe.height.baseVal.valueAsString),Mt.setAttribute("viewBox","0 0 "+Pe.viewBox.baseVal.width.toString()+" "+Pe.viewBox.baseVal.height.toString()),Mt.innerHTML=Pe.innerHTML,Oe.naturalSize===!0?(Mt.width.baseVal.value=be.naturalWidth,Mt.height.baseVal.value=be.naturalHeight):Oe.width!==void 0&&Oe.height!==void 0&&(Mt.width.baseVal.value=Oe.width,Mt.height.baseVal.value=Oe.height),ct.width=Mt.width.baseVal.value,ct.height=Mt.height.baseVal.value;var at=Mt.outerHTML,qe=ct.getContext("2d");Oe.markersOnly!==!0&&qe.drawImage(be,0,0,ct.width,ct.height);var Lt=window.URL,Bt=new Image(ct.width,ct.height);Bt.setAttribute("crossOrigin","anonymous");var ft=new Blob([at],{type:"image/svg+xml"}),Gt=Lt.createObjectURL(ft);Bt.onload=function(){qe.drawImage(Bt,0,0),Lt.revokeObjectURL(Gt);var Sn=ct.toDataURL(Oe.imageType,Oe.imageQuality);xe(Sn)},Bt.src=Gt})},Ze}(),wt=function(){},$e=function(){function Ze(be){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+be+"_"}return Object.defineProperty(Ze.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.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(Ze.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ze.prototype.addClass=function(be){return this.styleSheet===void 0&&this.addStyleSheet(),be.name=""+this.classNamePrefix+be.localName,this.classes.push(be),this.styleSheet.sheet.insertRule("."+be.name+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length),be},Ze.prototype.addRule=function(be){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(be),this.styleSheet.sheet.insertRule(be.selector+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length)},Ze.prototype.addStyleSheet=function(){var be;this.styleSheet=document.createElement("style"),((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).appendChild(this.styleSheet),this.addRule(new Ft("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new lt("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new lt("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Ze.prototype.removeStyleSheet=function(){var be;this.styleSheet&&(((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ze}(),Ft=function(Ze,be){this.selector=Ze,this.style=be},lt=function(Ze,be){this.localName=Ze,this.style=be},vt=function(){function Ze(be,Pe,Ae,Oe,xe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=be,this.displayMode=Pe,this.markerItems=Ae,this.uiStyleSettings=Oe,this.styles=xe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ze.prototype.show=function(be){var Pe=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ae=document.createElement("div");Ae.className=this.toolbarBlockStyleClass.name,Ae.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ae),this.addActionButton(Ae,'<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(Ae,'<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(Ae,'<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(Ae,'<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(Ae,'<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(Ae,'<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(Ae,'<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(Ae,'<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(xe){var ct=document.createElement("div");ct.className=""+Pe.toolbarButtonStyleClass.name,ct.setAttribute("data-type-name",xe.typeName),ct.innerHTML=xe.icon,ct.addEventListener("click",function(){Pe.markerToolbarButtonClicked(ct,xe)}),Pe.buttons.push(ct),Pe.markerButtons.push(ct)}),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 Oe=document.createElement("div");Oe.className=this.toolbarBlockStyleClass.name,Oe.style.whiteSpace="nowrap",Oe.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Oe),this.addActionButton(Oe,'<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(Oe,'<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()},Ze.prototype.addButtonClickListener=function(be){this.buttonClickListeners.push(be)},Ze.prototype.removeButtonClickListener=function(be){this.buttonClickListeners.indexOf(be)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(be),1)},Ze.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ze.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var be=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<be||Pe===be&&this.markerButtons.length-1===be?this.markerButtonBlock.appendChild(this.markerButtons[Pe]):(Pe===be&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Pe]))}},Ze.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")},Ze.prototype.resetButtonStyles=function(){var be=this;this.buttons.forEach(function(Pe){Pe.className=Pe.className.replace(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name,"").trim(),Pe.className=Pe.className.replace(be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:be.toolbarActiveButtonStyleColorsClass.name,"").trim(),Pe.className+=" "+(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name)})},Ze.prototype.addActionButton=function(be,Pe,Ae){var Oe=this,xe=document.createElement("div");switch(xe.className=""+this.toolbarButtonStyleClass.name,xe.innerHTML=Pe,xe.setAttribute("data-action",Ae),xe.addEventListener("click",function(){Oe.actionToolbarButtonClicked(xe,Ae)}),Ae){case"select":xe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":xe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":xe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":xe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":xe.style.fill=this.uiStyleSettings.closeButtonColor}be.appendChild(xe),this.buttons.push(xe)},Ze.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new lt("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 lt("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new lt("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new lt("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 lt("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var be=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new lt("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
padding: `+be+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new lt("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new lt("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ft("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ft("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Ze.prototype.markerToolbarButtonClicked=function(be,Pe){this.setActiveButton(be),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ae){return Ae("marker",Pe)}),this.markerButtonOverflowBlock.style.display="none"},Ze.prototype.actionToolbarButtonClicked=function(be,Pe){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ae){return Ae("action",Pe)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ze.prototype.setActiveButton=function(be){this.resetButtonStyles(),be.className=be.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),be.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ze.prototype.setActiveMarkerButton=function(be){var Pe=this.markerButtons.find(function(Ae){return Ae.getAttribute("data-type-name")===be});Pe&&this.setActiveButton(Pe)},Ze.prototype.setCurrentMarker=function(be){var Pe=this;this.currentMarker=be,this.buttons.filter(function(Ae){return/delete|notes/.test(Ae.getAttribute("data-action"))}).forEach(function(Ae){Pe.currentMarker===void 0?(Ae.style.fillOpacity="0.4",Ae.style.pointerEvents="none"):(Ae.style.fillOpacity="1",Ae.style.pointerEvents="all")})},Ze}(),Ie=function(){function Ze(be,Pe,Ae,Oe){this.panels=[],this.panelButtons=[],this.markerjsContainer=be,this.displayMode=Pe,this.uiStyleSettings=Ae,this.styles=Oe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ze.prototype.addStyles=function(){var be;this.toolboxStyleClass=this.styles.addClass(new lt("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 lt("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Pe=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new lt("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new lt("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new lt("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 lt("toolbox-panel-row_colors",`
background-color: `+((be=this.uiStyleSettings.toolboxBackgroundColor)!==null&&be!==void 0?be:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new lt("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 lt("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new lt("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ft("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ft("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Ze.prototype.show=function(be){var Pe;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ze.prototype.setPanelButtons=function(be){var Pe,Ae,Oe=this;this.panels=be,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+" "+((Ae=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ae!==void 0?Ae:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(xe){var ct;xe.uiStyleSettings=Oe.uiStyleSettings;var Mt=document.createElement("div");Mt.className=Oe.toolboxButtonStyleClass.name+" "+((ct=Oe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ct!==void 0?ct:Oe.toolboxButtonStyleColorsClass.name),Mt.innerHTML=xe.icon,Mt.title=xe.title,Mt.addEventListener("click",function(){Oe.panelButtonClick(xe)}),Oe.panelButtons.push(Mt),Oe.buttonRow.appendChild(Mt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ze.prototype.panelButtonClick=function(be){var Pe=this,Ae=-1;if(be!==this.activePanel){Ae=this.panels.indexOf(be),this.panelRow.innerHTML="";var Oe=be.getUi();Oe.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Oe),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=be}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(xe,ct){var Mt,at;xe.className=Pe.toolboxButtonStyleClass.name+" "+(ct===Ae?""+((Mt=Pe.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Mt!==void 0?Mt:Pe.toolboxActiveButtonStyleColorsClass.name):""+((at=Pe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&at!==void 0?at:Pe.toolboxButtonStyleColorsClass.name))})},Ze}(),te=function(Ze,be){this.title=Ze,this.icon=be},ee=function(Ze){function be(Pe,Ae,Oe,xe){var ct=Ze.call(this,Pe,xe||'<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 ct.colors=[],ct.addTransparent=!1,ct.colorBoxes=[],ct.colors=Ae,ct.currentColor=Oe,ct.setCurrentColor=ct.setCurrentColor.bind(ct),ct.getColorBox=ct.getColorBox.bind(ct),ct}return ke(be,Ze),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");return Ae.style.overflow="hidden",Ae.style.whiteSpace="nowrap",this.colors.forEach(function(Oe){var xe=Pe.getColorBox(Oe);Ae.appendChild(xe),Pe.colorBoxes.push(xe)}),Ae},be.prototype.getColorBox=function(Pe){var Ae=this,Oe=this.uiStyleSettings.toolbarHeight/4,xe=this.uiStyleSettings.toolbarHeight-Oe,ct=document.createElement("div");ct.style.display="inline-block",ct.style.boxSizing="content-box",ct.style.width=xe-2+"px",ct.style.height=xe-2+"px",ct.style.padding="1px",ct.style.marginRight="2px",ct.style.marginBottom="2px",ct.style.borderWidth="2px",ct.style.borderStyle="solid",ct.style.borderRadius=(xe+2)/2+"px",ct.style.borderColor=Pe===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ct.addEventListener("click",function(){Ae.setCurrentColor(Pe,ct)});var Mt=document.createElement("div");return Mt.style.display="inline-block",Mt.style.width=xe-2+"px",Mt.style.height=xe-2+"px",Mt.style.backgroundColor=Pe,Mt.style.borderRadius=xe/2+"px",Pe==="transparent"&&(Mt.style.fill=this.uiStyleSettings.toolboxAccentColor,Mt.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>`),ct.appendChild(Mt),ct},be.prototype.setCurrentColor=function(Pe,Ae){var Oe=this;this.currentColor=Pe,this.colorBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Oe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Pe)},be}(te),de=function(){function Ze(be,Pe,Ae){this._state="new",this._isSelected=!1,this._container=be,this._overlayContainer=Pe,this.globalSettings=Ae,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ze.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ze.prototype.ownsTarget=function(be){return!1},Object.defineProperty(Ze.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ze.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ze.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ze.prototype.pointerDown=function(be,Pe){},Ze.prototype.dblClick=function(be,Pe){},Ze.prototype.manipulate=function(be){},Ze.prototype.pointerUp=function(be){this.stateChanged()},Ze.prototype.dispose=function(){},Ze.prototype.addMarkerVisualToContainer=function(be){this.container.childNodes.length>0?this.container.insertBefore(be,this.container.childNodes[0]):this.container.appendChild(be)},Ze.prototype.getState=function(){return{typeName:Ze.typeName,state:this.state,notes:this.notes}},Ze.prototype.restoreState=function(be){this._state=be.state,this.notes=be.notes},Ze.prototype.scale=function(be,Pe){},Ze.prototype.colorChanged=function(be){this.onColorChanged&&this.onColorChanged(be),this.stateChanged()},Ze.prototype.fillColorChanged=function(be){this.onFillColorChanged&&this.onFillColorChanged(be),this.stateChanged()},Ze.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var be=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),be.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(be)&&this.onStateChanged(this)}},Ze.typeName="MarkerBase",Ze}(),se=function(){function Ze(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ze.prototype.findGripByVisual=function(be){return this.topLeft.ownsTarget(be)?this.topLeft:this.topCenter.ownsTarget(be)?this.topCenter:this.topRight.ownsTarget(be)?this.topRight:this.centerLeft.ownsTarget(be)?this.centerLeft:this.centerRight.ownsTarget(be)?this.centerRight:this.bottomLeft.ownsTarget(be)?this.bottomLeft:this.bottomCenter.ownsTarget(be)?this.bottomCenter:this.bottomRight.ownsTarget(be)?this.bottomRight:void 0},Ze}(),he=function(){function Ze(){this.GRIP_SIZE=10,this.visual=Ue.createGroup(),this.visual.appendChild(Ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ze.prototype.ownsTarget=function(be){return be===this.visual||be===this.visual.childNodes[0]||be===this.visual.childNodes[1]},Ze}(),ve=function(){function Ze(){}return Ze.toITransformMatrix=function(be){return{a:be.a,b:be.b,c:be.c,d:be.d,e:be.e,f:be.f}},Ze.toSVGMatrix=function(be,Pe){return be.a=Pe.a,be.b=Pe.b,be.c=Pe.c,be.d=Pe.d,be.e=Pe.e,be.f=Pe.f,be},Ze}(),Ee=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.left=0,xe.top=0,xe.width=0,xe.height=0,xe.defaultSize={x:50,y:20},xe.offsetX=0,xe.offsetY=0,xe.rotationAngle=0,xe.CB_DISTANCE=10,xe._suppressMarkerCreateEvent=!1,xe.container.transform.baseVal.appendItem(Ue.createTransform()),xe.setupControlBox(),xe}return ke(be,Ze),Object.defineProperty(be.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"visual",{get:function(){return this._visual},set:function(Pe){this._visual=Pe;var Ae=Ue.createTransform();this._visual.transform.baseVal.appendItem(Ae)},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Pe){return!!Ze.prototype.ownsTarget.call(this,Pe)||!!(this.controlGrips.findGripByVisual(Pe)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Pe))},be.prototype.pointerDown=function(Pe,Ae){Ze.prototype.pointerDown.call(this,Pe,Ae),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 Oe=this.unrotatePoint(Pe);if(this.manipulationStartX=Oe.x,this.manipulationStartY=Oe.y,this.offsetX=Oe.x-this.left,this.offsetY=Oe.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ae),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ae)){this.activeGrip=this.rotatorGrip;var xe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=xe.x-this.width/2,this.top=xe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ct=this.container.transform.baseVal.getItem(0);ct.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ct,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},be.prototype.pointerUp=function(Pe){var Ae=this.state;Ze.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",Ae==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},be.prototype.moveVisual=function(Pe){this.visual.style.transform="translate("+Pe.x+"px, "+Pe.y+"px)"},be.prototype.manipulate=function(Pe){var Ae=this.unrotatePoint(Pe);this.state==="creating"?this.resize(Pe):this.state==="move"?(this.left=this.manipulationStartLeft+(Ae.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ae.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ae):this.state==="rotate"&&this.rotate(Pe)},be.prototype.resize=function(Pe){var Ae=this.manipulationStartLeft,Oe=this.manipulationStartWidth,xe=this.manipulationStartTop,ct=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ae=this.manipulationStartLeft+Pe.x-this.manipulationStartX,Oe=this.manipulationStartWidth+this.manipulationStartLeft-Ae;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Oe=this.manipulationStartWidth+Pe.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:xe=this.manipulationStartTop+Pe.y-this.manipulationStartY,ct=this.manipulationStartHeight+this.manipulationStartTop-xe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ct=this.manipulationStartHeight+Pe.y-this.manipulationStartY}Oe>=0?(this.left=Ae,this.width=Oe):(this.left=Ae+Oe,this.width=-Oe),ct>=0?(this.top=xe,this.height=ct):(this.top=xe+ct,this.height=-ct),this.setSize()},be.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},be.prototype.rotate=function(Pe){if(Math.abs(Pe.x-this.centerX)>.1){var Ae=Math.sign(Pe.x-this.centerX);this.rotationAngle=180*Math.atan((Pe.y-this.centerY)/(Pe.x-this.centerX))/Math.PI+90*Ae,this.applyRotation()}},be.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)},be.prototype.rotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Ae=this.container.getCTM(),Oe=Ue.createPoint(Pe.x,Pe.y);return{x:(Oe=Oe.matrixTransform(Ae)).x,y:Oe.y}},be.prototype.unrotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Ae=this.container.getCTM();Ae=Ae.inverse();var Oe=Ue.createPoint(Pe.x,Pe.y);return{x:(Oe=Oe.matrixTransform(Ae)).x,y:Oe.y}},be.prototype.select=function(){Ze.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){Ze.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=Ue.createGroup();var Pe=Ue.createTransform();Pe.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Pe),this.container.appendChild(this.controlBox),this.controlRect=Ue.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=Ue.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"},be.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()},be.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()},be.prototype.createGrip=function(){var Pe=new he;return Pe.visual.transform.baseVal.appendItem(Ue.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},be.prototype.positionGrips=function(){var Pe=this.controlGrips.topLeft.GRIP_SIZE,Ae=-Pe/2,Oe=Ae,xe=(this.width+this.CB_DISTANCE)/2-Pe/2,ct=(this.height+this.CB_DISTANCE)/2-Pe/2,Mt=this.height+this.CB_DISTANCE-Pe/2,at=this.width+this.CB_DISTANCE-Pe/2;this.positionGrip(this.controlGrips.topLeft.visual,Ae,Oe),this.positionGrip(this.controlGrips.topCenter.visual,xe,Oe),this.positionGrip(this.controlGrips.topRight.visual,at,Oe),this.positionGrip(this.controlGrips.centerLeft.visual,Ae,ct),this.positionGrip(this.controlGrips.centerRight.visual,at,ct),this.positionGrip(this.controlGrips.bottomLeft.visual,Ae,Mt),this.positionGrip(this.controlGrips.bottomCenter.visual,xe,Mt),this.positionGrip(this.controlGrips.bottomRight.visual,at,Mt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,xe,Oe-3*this.CB_DISTANCE)},be.prototype.positionGrip=function(Pe,Ae,Oe){var xe=Pe.transform.baseVal.getItem(0);xe.setTranslate(Ae,Oe),Pe.transform.baseVal.replaceItem(xe,0)},be.prototype.hideControlBox=function(){this.controlBox.style.display="none"},be.prototype.showControlBox=function(){this.controlBox.style.display=""},be.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)},Ze.prototype.getState.call(this))},be.prototype.restoreState=function(Pe){Ze.prototype.restoreState.call(this,Pe);var Ae=Pe;this.left=Ae.left,this.top=Ae.top,this.width=Ae.width,this.height=Ae.height,this.rotationAngle=Ae.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ae.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ae.containerTransformMatrix))},be.prototype.scale=function(Pe,Ae){Ze.prototype.scale.call(this,Pe,Ae);var Oe=this.rotatePoint({x:this.left,y:this.top}),xe=this.unrotatePoint({x:Oe.x*Pe,y:Oe.y*Ae});this.left=xe.x,this.top=xe.y,this.width=this.width*Pe,this.height=this.height*Ae,this.adjustControlBox()},be}(de),Be=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.fillColor="transparent",xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.opacity=1,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setFillColor=xe.setFillColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.createVisual=xe.createVisual.bind(xe),xe}return ke(be,Ze),be.prototype.ownsTarget=function(Pe){return!(!Ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},be.prototype.createVisual=function(){this.visual=Ue.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)},be.prototype.pointerDown=function(Pe,Ae){Ze.prototype.pointerDown.call(this,Pe,Ae),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.prototype.manipulate=function(Pe){Ze.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){Ze.prototype.resize.call(this,Pe),this.setSize()},be.prototype.setSize=function(){Ze.prototype.setSize.call(this),Ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Pe){Ze.prototype.pointerUp.call(this,Pe),this.setSize()},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},be.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ze.prototype.getState.call(this))},be.prototype.restoreState=function(Pe){var Ae=Pe;this.fillColor=Ae.fillColor,this.strokeColor=Ae.strokeColor,this.strokeWidth=Ae.strokeWidth,this.strokeDasharray=Ae.strokeDasharray,this.opacity=Ae.opacity,this.createVisual(),Ze.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ae){Ze.prototype.scale.call(this,Pe,Ae),this.setSize()},be.title="Rectangle marker",be}(Ee),Le=function(Ze){function be(Pe,Ae,Oe,xe){var ct=Ze.call(this,Pe,xe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ct.widths=[],ct.widthBoxes=[],ct.widths=Ae,ct.currentWidth=Oe,ct.setCurrentWidth=ct.setCurrentWidth.bind(ct),ct}return ke(be,Ze),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");return Ae.style.display="flex",Ae.style.overflow="hidden",Ae.style.flexGrow="2",this.widths.forEach(function(Oe){var xe=document.createElement("div");xe.style.display="flex",xe.style.flexGrow="2",xe.style.alignItems="center",xe.style.justifyContent="space-between",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.borderColor=Oe===Pe.currentWidth?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentWidth(Oe,xe)}),Ae.appendChild(xe);var ct=document.createElement("div");ct.innerText=Oe.toString(),ct.style.marginRight="5px",xe.appendChild(ct);var Mt=document.createElement("div");Mt.style.minHeight="20px",Mt.style.flexGrow="2",Mt.style.display="flex",Mt.style.alignItems="center";var at=document.createElement("hr");at.style.minWidth="20px",at.style.border="0px",at.style.borderTop=Oe+"px solid "+Pe.uiStyleSettings.toolboxColor,at.style.flexGrow="2",Mt.appendChild(at),xe.appendChild(Mt),Pe.widthBoxes.push(xe)}),Ae},be.prototype.setCurrentWidth=function(Pe,Ae){var Oe=this;this.currentWidth=Pe,this.widthBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Oe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},be}(te),ze=function(Ze){function be(Pe,Ae,Oe,xe){var ct=Ze.call(this,Pe,xe||'<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 ct.styles=[],ct.styleBoxes=[],ct.styles=Ae,ct.currentStyle=Oe,ct.setCurrentStyle=ct.setCurrentStyle.bind(ct),ct}return ke(be,Ze),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");return Ae.style.display="flex",Ae.style.overflow="hidden",Ae.style.flexGrow="2",this.styles.forEach(function(Oe){var xe=document.createElement("div");xe.style.display="flex",xe.style.alignItems="center",xe.style.justifyContent="space-between",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.overflow="hidden",xe.style.maxWidth=100/Pe.styles.length-5+"%",xe.style.borderColor=Oe===Pe.currentStyle?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentStyle(Oe,xe)}),Ae.appendChild(xe);var ct=document.createElement("div");ct.style.minHeight="20px",ct.style.flexGrow="2",ct.style.overflow="hidden";var Mt=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Pe.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Oe!==""?'stroke-dasharray="'+Oe+'"':"")+` />
</svg>`;ct.innerHTML=Mt,xe.appendChild(ct),Pe.styleBoxes.push(xe)}),Ae},be.prototype.setCurrentStyle=function(Pe,Ae){var Oe=this;this.currentStyle=Pe,this.styleBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Oe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},be}(te),je=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.strokeColor=Oe.defaultColor,xe.strokeWidth=Oe.defaultStrokeWidth,xe.strokeDasharray=Oe.defaultStrokeDasharray,xe.strokePanel=new ee("Line color",Oe.defaultColorSet,Oe.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.strokeWidthPanel=new Le("Line width",Oe.defaultStrokeWidths,Oe.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new ze("Line style",Oe.defaultStrokeDasharrays,Oe.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe}return ke(be,Ze),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ze.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="FrameMarker",be.title="Frame marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',be}(Be),Xe=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"},Ye=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.x1=0,xe.y1=0,xe.x2=0,xe.y2=0,xe.defaultLength=50,xe.manipulationStartX=0,xe.manipulationStartY=0,xe.manipulationStartX1=0,xe.manipulationStartY1=0,xe.manipulationStartX2=0,xe.manipulationStartY2=0,xe.setupControlBox(),xe}return ke(be,Ze),be.prototype.ownsTarget=function(Pe){return!!Ze.prototype.ownsTarget.call(this,Pe)||!(!this.grip1.ownsTarget(Pe)&&!this.grip2.ownsTarget(Pe))},be.prototype.pointerDown=function(Pe,Ae){Ze.prototype.pointerDown.call(this,Pe,Ae),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(Ae)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ae)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},be.prototype.pointerUp=function(Pe){var Ae=this.state;Ze.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",Ae==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},be.prototype.adjustVisual=function(){},be.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)},be.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()},be.prototype.select=function(){Ze.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){Ze.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=Ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},be.prototype.adjustControlBox=function(){this.positionGrips()},be.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},be.prototype.createGrip=function(){var Pe=new he;return Pe.visual.transform.baseVal.appendItem(Ue.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},be.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)},be.prototype.positionGrip=function(Pe,Ae,Oe){var xe=Pe.transform.baseVal.getItem(0);xe.setTranslate(Ae,Oe),Pe.transform.baseVal.replaceItem(xe,0)},be.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ze.prototype.getState.call(this))},be.prototype.restoreState=function(Pe){Ze.prototype.restoreState.call(this,Pe);var Ae=Pe;this.x1=Ae.x1,this.y1=Ae.y1,this.x2=Ae.x2,this.y2=Ae.y2},be.prototype.scale=function(Pe,Ae){Ze.prototype.scale.call(this,Pe,Ae),this.x1=this.x1*Pe,this.y1=this.y1*Ae,this.x2=this.x2*Pe,this.y2=this.y2*Ae,this.adjustVisual(),this.adjustControlBox()},be}(de),dt=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.strokeColor=Oe.defaultColor,xe.strokeWidth=Oe.defaultStrokeWidth,xe.strokeDasharray=Oe.defaultStrokeDasharray,xe.strokePanel=new ee("Line color",Oe.defaultColorSet,Oe.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.strokeWidthPanel=new Le("Line width",Oe.defaultStrokeWidths,Oe.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new ze("Line style",Oe.defaultStrokeDasharrays,Oe.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe}return ke(be,Ze),be.prototype.ownsTarget=function(Pe){return!(!Ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorLine&&Pe!==this.visibleLine)},be.prototype.createVisual=function(){this.visual=Ue.createGroup(),this.selectorLine=Ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ue.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)},be.prototype.pointerDown=function(Pe,Ae){Ze.prototype.pointerDown.call(this,Pe,Ae),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},be.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()),Ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ze.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ze.prototype.restoreState.call(this,Pe);var Ae=Pe;this.strokeColor=Ae.strokeColor,this.strokeWidth=Ae.strokeWidth,this.strokeDasharray=Ae.strokeDasharray,this.createVisual(),this.adjustVisual()},be.typeName="LineMarker",be.title="Line marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',be}(Ye),He=function(Ze){function be(Pe,Ae,Oe,xe){var ct=Ze.call(this,Pe,xe||'<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 ct.fonts=[],ct.fontBoxes=[],ct.fonts=Ae,ct.currentFont=Oe,ct.setCurrentFont=ct.setCurrentFont.bind(ct),ct}return ke(be,Ze),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");return Ae.style.overflow="hidden",Ae.style.flexGrow="2",this.fonts.forEach(function(Oe){var xe=document.createElement("div");xe.style.display="inline-block",xe.style.alignItems="center",xe.style.justifyContent="space-between",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.overflow="hidden",xe.style.maxWidth=100/Pe.fonts.length-5+"%",xe.style.borderColor=Oe===Pe.currentFont?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentFont(Oe,xe)}),Ae.appendChild(xe);var ct=document.createElement("div");ct.style.display="flex",ct.style.minHeight="20px",ct.style.flexGrow="2",ct.style.fontFamily=Oe,ct.style.overflow="hidden";var Mt=document.createElement("div");Mt.style.whiteSpace="nowrap",Mt.style.overflow="hidden",Mt.style.textOverflow="ellipsis",Mt.innerHTML="The quick brown fox jumps over the lazy dog",ct.appendChild(Mt),xe.appendChild(ct),Pe.fontBoxes.push(xe)}),Ae},be.prototype.setCurrentFont=function(Pe,Ae){var Oe=this;this.currentFont=Pe,this.fontBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Oe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},be}(te),Nt=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.color="transparent",xe.padding=5,xe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",xe.text=xe.DEFAULT_TEXT,xe.isMoved=!1,xe.color=Oe.defaultColor,xe.fontFamily=Oe.defaultFontFamily,xe.defaultSize={x:100,y:30},xe.setColor=xe.setColor.bind(xe),xe.setFont=xe.setFont.bind(xe),xe.renderText=xe.renderText.bind(xe),xe.sizeText=xe.sizeText.bind(xe),xe.textEditDivClicked=xe.textEditDivClicked.bind(xe),xe.showTextEditor=xe.showTextEditor.bind(xe),xe.setSize=xe.setSize.bind(xe),xe.positionTextEditor=xe.positionTextEditor.bind(xe),xe.colorPanel=new ee("Color",Oe.defaultColorSet,Oe.defaultColor),xe.colorPanel.onColorChanged=xe.setColor,xe.fontFamilyPanel=new He("Font",Oe.defaultFontFamilies,Oe.defaultFontFamily),xe.fontFamilyPanel.onFontChanged=xe.setFont,xe}return ke(be,Ze),be.prototype.ownsTarget=function(Pe){if(Ze.prototype.ownsTarget.call(this,Pe)||Pe===this.visual||Pe===this.textElement||Pe===this.bgRectangle)return!0;var Ae=!1;return this.textElement.childNodes.forEach(function(Oe){Oe===Pe&&(Ae=!0)}),Ae},be.prototype.createVisual=function(){this.visual=Ue.createGroup(),this.bgRectangle=Ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ue.createTransform()),this.textElement.transform.baseVal.appendItem(Ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},be.prototype.pointerDown=function(Pe,Ae){Ze.prototype.pointerDown.call(this,Pe,Ae),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.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(Ae){Pe.textElement.appendChild(Ue.createTSpan(Ae.trim()===""?" ":Ae.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},be.prototype.getTextScale=function(){var Pe=this.textElement.getBBox(),Ae=1;if(Pe.width>0&&Pe.height>0){var Oe=(1*this.width-this.width*this.padding*2/100)/Pe.width,xe=(1*this.height-this.height*this.padding*2/100)/Pe.height;Ae=Math.min(Oe,xe)}return Ae},be.prototype.getTextPosition=function(Pe){var Ae=this.textElement.getBBox(),Oe=0,xe=0;return Ae.width>0&&Ae.height>0&&(Oe=(this.width-Ae.width*Pe)/2,xe=this.height/2-Ae.height*Pe/2),{x:Oe,y:xe}},be.prototype.sizeText=function(){var Pe=this.textElement.getBBox(),Ae=this.getTextScale(),Oe=this.getTextPosition(Ae);Oe.y-=Pe.y*Ae,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Oe.x+"px, "+Oe.y+"px) scale("+Ae+", "+Ae+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Oe.x,Oe.y),this.textElement.transform.baseVal.getItem(1).setScale(Ae,Ae))},be.prototype.manipulate=function(Pe){Ze.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)},be.prototype.resize=function(Pe){Ze.prototype.resize.call(this,Pe),this.isMoved=!0,this.setSize(),this.sizeText()},be.prototype.setSize=function(){Ze.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},be.prototype.pointerUp=function(Pe){var Ae=this.state;Ae==="creating"&&(this._suppressMarkerCreateEvent=!0),Ze.prototype.pointerUp.call(this,Pe),this.setSize(),(Ae==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},be.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(Ae){Ae.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ae=Number.parseFloat(Pe.textEditor.style.fontSize);Pe.textEditor.clientWidth>=Number.parseInt(Pe.textEditor.style.maxWidth)&&Ae>.9;)Ae-=.1,Pe.textEditor.style.fontSize=Math.max(Ae,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ae){Ae.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ae){if(Ae.clipboardData){var Oe=Ae.clipboardData.getData("text"),xe=window.getSelection();if(!xe.rangeCount)return!1;xe.deleteFromDocument(),xe.getRangeAt(0).insertNode(document.createTextNode(Oe)),Ae.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")},be.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Pe=this.getTextScale(),Ae=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Oe=this.textElement.getBBox(),xe={x:Oe.width*Pe,y:Oe.height*Pe};Ae.x-=xe.x/2,Ae.y-=xe.y/2,this.textEditor.style.top=Ae.y+"px",this.textEditor.style.left=Ae.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ae.x+"px",this.textEditor.style.fontSize=Math.max(16*Pe,12)+"px",this.textElement.style.display="none"}},be.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()},be.prototype.select=function(){Ze.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},be.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ze.prototype.deselect.call(this)},be.prototype.dblClick=function(Pe,Ae){Ze.prototype.dblClick.call(this,Pe,Ae),this.showTextEditor()},be.prototype.setColor=function(Pe){this.textElement&&Ue.setAttributes(this.textElement,[["fill",Pe]]),this.color=Pe,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Pe)},be.prototype.setFont=function(Pe){this.textElement&&Ue.setAttributes(this.textElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},be.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},be.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ze.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){var Ae=Pe;this.color=Ae.color,this.fontFamily=Ae.fontFamily,this.padding=Ae.padding,this.text=Ae.text,this.createVisual(),Ze.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ae){Ze.prototype.scale.call(this,Pe,Ae),this.setSize(),this.sizeText(),this.positionTextEditor()},be.typeName="TextMarker",be.title="Text marker",be.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>',be}(Ee),ot=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.color="transparent",xe.lineWidth=3,xe.drawing=!1,xe.pixelRatio=1,xe.color=Oe.defaultColor,xe.lineWidth=Oe.defaultStrokeWidth,xe.pixelRatio=Oe.freehandPixelRatio,xe.setColor=xe.setColor.bind(xe),xe.addCanvas=xe.addCanvas.bind(xe),xe.finishCreation=xe.finishCreation.bind(xe),xe.setLineWidth=xe.setLineWidth.bind(xe),xe.colorPanel=new ee("Color",Oe.defaultColorSet,Oe.defaultColor),xe.colorPanel.onColorChanged=xe.setColor,xe.lineWidthPanel=new Le("Line width",Oe.defaultStrokeWidths,Oe.defaultStrokeWidth),xe.lineWidthPanel.onWidthChanged=xe.setLineWidth,xe}return ke(be,Ze),be.prototype.ownsTarget=function(Pe){return!(!Ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.drawingImage)},be.prototype.createVisual=function(){this.visual=Ue.createGroup(),this.drawingImage=Ue.createImage(),this.visual.appendChild(this.drawingImage);var Pe=Ue.createTransform();this.visual.transform.baseVal.appendItem(Pe),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Pe,Ae){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):Ze.prototype.pointerDown.call(this,Pe,Ae)},be.prototype.manipulate=function(Pe){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Pe.x,Pe.y),this.canvasContext.stroke()):Ze.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){Ze.prototype.resize.call(this,Pe),Ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Pe){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ze.prototype.pointerUp.call(this,Pe)},be.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)},be.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ze.prototype.select.call(this)},be.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ze.prototype.deselect.call(this)},be.prototype.finishCreation=function(){for(var Pe=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ae=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Oe=Ae[0],xe=Ae[1],ct=Ae[2],Mt=Ae[3],at=!1,qe=0;qe<this.canvasElement.height;qe++)for(var Lt=0;Lt<this.canvasElement.width;Lt++)Pe.data[qe*this.canvasElement.width*4+4*Lt+3]>0&&(at=!0,qe<xe&&(xe=qe),Lt<Oe&&(Oe=Lt),qe>Mt&&(Mt=qe),Lt>ct&&(ct=Lt));if(at){this.left=Oe/this.pixelRatio,this.top=xe/this.pixelRatio,this.width=(ct-Oe)/this.pixelRatio,this.height=(Mt-xe)/this.pixelRatio;var Bt=document.createElement("canvas");Bt.width=ct-Oe,Bt.height=Mt-xe,Bt.getContext("2d").putImageData(this.canvasContext.getImageData(Oe,xe,ct-Oe,Mt-xe),0,0),this.drawingImgUrl=Bt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},be.prototype.setDrawingImage=function(){Ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},be.prototype.setColor=function(Pe){this.color=Pe,this.colorChanged(Pe)},be.prototype.setLineWidth=function(Pe){this.lineWidth=Pe},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({drawingImgUrl:this.drawingImgUrl},Ze.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){this.createVisual(),Ze.prototype.restoreState.call(this,Pe),this.drawingImgUrl=Pe.drawingImgUrl,this.setDrawingImage()},be.prototype.scale=function(Pe,Ae){Ze.prototype.scale.call(this,Pe,Ae),this.setDrawingImage()},be.typeName="FreehandMarker",be.title="Freehand marker",be.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>',be}(Ee),Tt=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Oe||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return xe.typeBoxes=[],xe.currentType=Ae,xe.setCurrentType=xe.setCurrentType.bind(xe),xe}return ke(be,Ze),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");Ae.style.display="flex",Ae.style.overflow="hidden",Ae.style.flexGrow="2";for(var Oe=function(Mt){var at="both";switch(Mt){case 0:at="both";break;case 1:at="start";break;case 2:at="end";break;case 3:at="none"}var qe=document.createElement("div");if(qe.style.display="flex",qe.style.flexGrow="2",qe.style.alignItems="center",qe.style.justifyContent="space-between",qe.style.padding="5px",qe.style.borderWidth="2px",qe.style.borderStyle="solid",qe.style.borderColor=at===xe.currentType?xe.uiStyleSettings.toolboxAccentColor:"transparent",qe.addEventListener("click",function(){Pe.setCurrentType(at,qe)}),Ae.appendChild(qe),at==="both"||at==="start"){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.alignItems="center",Lt.style.minHeight="20px",Lt.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="`+(xe.uiStyleSettings!==void 0?xe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Lt.style.marginLeft="5px",qe.appendChild(Lt)}var Bt=document.createElement("div");Bt.style.display="flex",Bt.style.alignItems="center",Bt.style.minHeight="20px",Bt.style.flexGrow="2";var ft=document.createElement("hr");if(ft.style.minWidth="20px",ft.style.border="0px",ft.style.borderTop="3px solid "+(xe.uiStyleSettings!==void 0?xe.uiStyleSettings.toolboxColor:"#eeeeee"),ft.style.flexGrow="2",Bt.appendChild(ft),qe.appendChild(Bt),at==="both"||at==="end"){var Gt=document.createElement("div");Gt.style.display="flex",Gt.style.alignItems="center",Gt.style.minHeight="20px",Gt.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="`+(xe.uiStyleSettings!==void 0?xe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Gt.style.marginRight="5px",qe.appendChild(Gt)}xe.typeBoxes.push(qe)},xe=this,ct=0;ct<4;ct++)Oe(ct);return Ae},be.prototype.setCurrentType=function(Pe,Ae){var Oe=this;this.currentType=Pe,this.typeBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Oe.uiStyleSettings!==void 0?Oe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},be}(te),xt=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.arrowType="end",xe.arrowBaseHeight=10,xe.arrowBaseWidth=10,xe.getArrowPoints=xe.getArrowPoints.bind(xe),xe.setArrowType=xe.setArrowType.bind(xe),xe.arrowTypePanel=new Tt("Arrow type","end"),xe.arrowTypePanel.onArrowTypeChanged=xe.setArrowType,xe}return ke(be,Ze),be.prototype.ownsTarget=function(Pe){return!(!Ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.arrow1&&Pe!==this.arrow2)},be.prototype.getArrowPoints=function(Pe,Ae){var Oe=this.arrowBaseWidth+2*this.strokeWidth,xe=this.arrowBaseHeight+2*this.strokeWidth;return Pe-Oe/2+","+(Ae+xe/2)+" "+Pe+","+(Ae-xe/2)+" "+(Pe+Oe/2)+","+(Ae+xe/2)},be.prototype.createTips=function(){this.arrow1=Ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ue.createTransform()),this.visual.appendChild(this.arrow2)},be.prototype.pointerDown=function(Pe,Ae){Ze.prototype.pointerDown.call(this,Pe,Ae),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(Ze.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",Ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ue.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 Ae=this.arrow1.transform.baseVal.getItem(0);Ae.setRotate(Pe,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ae,0);var Oe=this.arrow2.transform.baseVal.getItem(0);Oe.setRotate(Pe+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Oe,0)}},be.prototype.setArrowType=function(Pe){this.arrowType=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({arrowType:this.arrowType},Ze.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ze.prototype.restoreState.call(this,Pe);var Ae=Pe;this.arrowType=Ae.arrowType,this.createTips(),this.adjustVisual()},be.typeName="ArrowMarker",be.title="Arrow marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',be}(dt),Ot=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.fillColor=Oe.defaultFillColor,xe.strokeWidth=0,xe.fillPanel=new ee("Color",Oe.defaultColorSet,Oe.defaultFillColor),xe.fillPanel.onColorChanged=xe.setFillColor,xe}return ke(be,Ze),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ze.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="CoverMarker",be.title="Cover marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',be}(Be),Wt=function(Ze){function be(Pe,Ae,Oe,xe){var ct=Ze.call(this,Pe,xe||'<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 ct.opacities=[],ct.opacityBoxes=[],ct.opacities=Ae,ct.currentOpacity=Oe,ct.setCurrentOpacity=ct.setCurrentOpacity.bind(ct),ct}return ke(be,Ze),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");return Ae.style.display="flex",Ae.style.overflow="hidden",Ae.style.flexGrow="2",Ae.style.justifyContent="space-between",this.opacities.forEach(function(Oe){var xe=document.createElement("div");xe.style.display="flex",xe.style.alignItems="center",xe.style.justifyContent="center",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.borderColor=Oe===Pe.currentOpacity?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentOpacity(Oe,xe)}),Ae.appendChild(xe);var ct=document.createElement("div");ct.innerText=100*Oe+"%",xe.appendChild(ct),Pe.opacityBoxes.push(xe)}),Ae},be.prototype.setCurrentOpacity=function(Pe,Ae){var Oe=this;this.currentOpacity=Pe,this.opacityBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Oe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},be}(te),Dt=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.setOpacity=xe.setOpacity.bind(xe),xe.fillColor=Oe.defaultHighlightColor,xe.strokeWidth=0,xe.opacity=Oe.defaultHighlightOpacity,xe.fillPanel=new ee("Color",Oe.defaultColorSet,xe.fillColor),xe.fillPanel.onColorChanged=xe.setFillColor,xe.opacityPanel=new Wt("Opacity",Oe.defaultOpacitySteps,xe.opacity),xe.opacityPanel.onOpacityChanged=xe.setOpacity,xe}return ke(be,Ze),be.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ze.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="HighlightMarker",be.title="Highlight marker",be.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>',be}(Ot),tt='<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>',_t=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.bgColor="transparent",xe.tipPosition={x:0,y:0},xe.tipBase1Position={x:0,y:0},xe.tipBase2Position={x:0,y:0},xe.tipMoving=!1,xe.color=Oe.defaultStrokeColor,xe.bgColor=Oe.defaultFillColor,xe.fontFamily=Oe.defaultFontFamily,xe.defaultSize={x:100,y:30},xe.setBgColor=xe.setBgColor.bind(xe),xe.getTipPoints=xe.getTipPoints.bind(xe),xe.positionTip=xe.positionTip.bind(xe),xe.setTipPoints=xe.setTipPoints.bind(xe),xe.colorPanel=new ee("Text color",Oe.defaultColorSet,xe.color,tt),xe.colorPanel.onColorChanged=xe.setColor,xe.bgColorPanel=new ee("Fill color",Oe.defaultColorSet,xe.bgColor,Ve),xe.bgColorPanel.onColorChanged=xe.setBgColor,xe.fontFamilyPanel=new He("Font",Oe.defaultFontFamilies,Oe.defaultFontFamily),xe.fontFamilyPanel.onFontChanged=xe.setFont,xe.tipGrip=new he,xe.tipGrip.visual.transform.baseVal.appendItem(Ue.createTransform()),xe.controlBox.appendChild(xe.tipGrip.visual),xe}return ke(be,Ze),be.prototype.ownsTarget=function(Pe){return Ze.prototype.ownsTarget.call(this,Pe)||this.tipGrip.ownsTarget(Pe)||this.tip===Pe},be.prototype.createTip=function(){Ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},be.prototype.pointerDown=function(Pe,Ae){this.state==="new"&&Ze.prototype.pointerDown.call(this,Pe,Ae),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ae)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ze.prototype.pointerDown.call(this,Pe,Ae)},be.prototype.pointerUp=function(Pe){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ze.prototype.pointerUp.call(this,Pe);else{var Ae=this.state==="creating";Ze.prototype.pointerUp.call(this,Pe),this.setTipPoints(Ae),this.positionTip()}},be.prototype.manipulate=function(Pe){if(this.tipMoving){var Ae=this.unrotatePoint(Pe);this.tipPosition={x:Ae.x-this.manipulationStartLeft,y:Ae.y-this.manipulationStartTop},this.positionTip()}else Ze.prototype.manipulate.call(this,Pe)},be.prototype.setBgColor=function(Pe){this.bgRectangle&&this.tip&&(Ue.setAttributes(this.bgRectangle,[["fill",Pe]]),Ue.setAttributes(this.tip,[["fill",Pe]])),this.bgColor=Pe,this.fillColorChanged(Pe)},be.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},be.prototype.setTipPoints=function(Pe){Pe===void 0&&(Pe=!1);var Ae=Math.min(this.height/2,15),Oe=this.height/5;Pe&&(this.tipPosition={x:Ae+Oe/2,y:this.height+20});var xe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?xe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Oe=this.width/5,Ae=Math.min(this.width/2,15),this.tipBase1Position={x:Ae,y:0},this.tipBase2Position={x:Ae+Oe,y:0}):(this.tipBase1Position={x:0,y:Ae},this.tipBase2Position={x:0,y:Ae+Oe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?xe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Oe=this.width/5,Ae=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ae-Oe,y:0},this.tipBase2Position={x:this.width-Ae,y:0}):(this.tipBase1Position={x:this.width,y:Ae},this.tipBase2Position={x:this.width,y:Ae+Oe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?xe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Oe=this.width/5,Ae=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ae-Oe,y:this.height},this.tipBase2Position={x:this.width-Ae,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ae-Oe},this.tipBase2Position={x:this.width,y:this.height-Ae}):xe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Oe=this.width/5,Ae=Math.min(this.width/2,15),this.tipBase1Position={x:Ae,y:this.height},this.tipBase2Position={x:Ae+Oe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ae},this.tipBase2Position={x:0,y:this.height-Ae-Oe})},be.prototype.resize=function(Pe){Ze.prototype.resize.call(this,Pe),this.positionTip()},be.prototype.positionTip=function(){Ue.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(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.select=function(){this.positionTip(),Ze.prototype.select.call(this)},be.prototype.getState=function(){var Pe=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ze.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){var Ae=Pe;this.bgColor=Ae.bgColor,this.tipPosition=Ae.tipPosition,Ze.prototype.restoreState.call(this,Pe),this.createTip(),this.setTipPoints()},be.prototype.scale=function(Pe,Ae){Ze.prototype.scale.call(this,Pe,Ae),this.tipPosition={x:this.tipPosition.x*Pe,y:this.tipPosition.y*Ae},this.positionTip()},be.typeName="CalloutMarker",be.title="Callout marker",be.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>',be}(Nt),vn=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.fillColor="transparent",xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.opacity=1,xe.strokeColor=Oe.defaultColor,xe.strokeWidth=Oe.defaultStrokeWidth,xe.strokeDasharray=Oe.defaultStrokeDasharray,xe.fillColor=Oe.defaultFillColor,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setFillColor=xe.setFillColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.setOpacity=xe.setOpacity.bind(xe),xe.createVisual=xe.createVisual.bind(xe),xe.strokePanel=new ee("Line color",Ge(Oe.defaultColorSet,["transparent"]),Oe.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.fillPanel=new ee("Fill color",Ge(Oe.defaultColorSet,["transparent"]),xe.fillColor,Ve),xe.fillPanel.onColorChanged=xe.setFillColor,xe.strokeWidthPanel=new Le("Line width",Oe.defaultStrokeWidths,Oe.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new ze("Line style",Oe.defaultStrokeDasharrays,Oe.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe.opacityPanel=new Wt("Opacity",Oe.defaultOpacitySteps,xe.opacity),xe.opacityPanel.onOpacityChanged=xe.setOpacity,xe}return ke(be,Ze),be.prototype.ownsTarget=function(Pe){return!(!Ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},be.prototype.createVisual=function(){this.visual=Ue.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)},be.prototype.pointerDown=function(Pe,Ae){Ze.prototype.pointerDown.call(this,Pe,Ae),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.prototype.manipulate=function(Pe){Ze.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){Ze.prototype.resize.call(this,Pe),this.setSize()},be.prototype.setSize=function(){Ze.prototype.setSize.call(this),Ue.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},be.prototype.pointerUp=function(Pe){Ze.prototype.pointerUp.call(this,Pe),this.setSize()},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},be.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ze.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){var Ae=Pe;this.fillColor=Ae.fillColor,this.strokeColor=Ae.strokeColor,this.strokeWidth=Ae.strokeWidth,this.strokeDasharray=Ae.strokeDasharray,this.opacity=Ae.opacity,this.createVisual(),Ze.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ae){Ze.prototype.scale.call(this,Pe,Ae),this.setSize()},be.typeName="EllipseMarker",be.title="Ellipse marker",be.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>',be}(Ee),yn=function(Ze){function be(Pe,Ae,Oe){return Ze.call(this,Pe,Ae,Oe)||this}return ke(be,Ze),Object.defineProperty(be.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Pe){return!(!Ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.tip1&&Pe!==this.tip2)},be.prototype.createTips=function(){this.tip1=Ue.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(Ue.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ue.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(Ue.createTransform()),this.visual.appendChild(this.tip2)},be.prototype.pointerDown=function(Pe,Ae){Ze.prototype.pointerDown.call(this,Pe,Ae),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(Ze.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ue.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()]]),Ue.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),Ae=this.tip1.transform.baseVal.getItem(0);Ae.setRotate(Pe,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ae,0);var Oe=this.tip2.transform.baseVal.getItem(0);Oe.setRotate(Pe+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Oe,0)}},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ze.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ze.prototype.restoreState.call(this,Pe),this.createTips(),this.adjustVisual()},be.typeName="MeasurementMarker",be.title="Measurement marker",be.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>',be}(dt),zt=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.strokePanel.colors=Oe.defaultColorSet,xe.fillColor="transparent",xe}return ke(be,Ze),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ze.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="EllipseFrameMarker",be.title="Ellipse frame marker",be.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>',be}(vn),qt=function(){function Ze(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ze.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ze.prototype.addUndoStep=function(be){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(be)||(this.undoStack.push(be),JSON.stringify(this.lastRedoStep)!==JSON.stringify(be)&&this.redoStack.splice(0,this.redoStack.length))},Ze.prototype.replaceLastUndoStep=function(be){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=be)},Ze.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ze.prototype.undo=function(){if(this.undoStack.length>1){var be=this.undoStack.pop();return be!==void 0&&this.redoStack.push(be),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ze.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ze}(),ln=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.curveX=0,xe.curveY=0,xe.manipulationStartCurveX=0,xe.manipulationStartCurveY=0,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.positionGrips=xe.positionGrips.bind(xe),xe.addControlGrips=xe.addControlGrips.bind(xe),xe.adjustVisual=xe.adjustVisual.bind(xe),xe.setupControlBox=xe.setupControlBox.bind(xe),xe.resize=xe.resize.bind(xe),xe.strokeColor=Oe.defaultColor,xe.strokeWidth=Oe.defaultStrokeWidth,xe.strokeDasharray=Oe.defaultStrokeDasharray,xe.strokePanel=new ee("Line color",Oe.defaultColorSet,Oe.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.strokeWidthPanel=new Le("Line width",Oe.defaultStrokeWidths,Oe.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new ze("Line style",Oe.defaultStrokeDasharrays,Oe.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe}return ke(be,Ze),be.prototype.ownsTarget=function(Pe){return!(!Ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorCurve&&Pe!==this.visibleCurve&&!this.curveGrip.ownsTarget(Pe))},be.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},be.prototype.createVisual=function(){this.visual=Ue.createGroup(),this.selectorCurve=Ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ue.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)},be.prototype.pointerDown=function(Pe,Ae){Ze.prototype.pointerDown.call(this,Pe,Ae),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(Ae)&&(this.activeGrip=this.curveGrip,this._state="resize")},be.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setupControlBox=function(){Ze.prototype.setupControlBox.call(this),this.curveControlLine1=Ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ue.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)},be.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ze.prototype.addControlGrips.call(this)},be.prototype.positionGrips=function(){Ze.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()))},be.prototype.manipulate=function(Pe){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Pe.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Pe.y-this.manipulationStartY),Ze.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){this.activeGrip===this.curveGrip&&(this.curveX=Pe.x,this.curveY=Pe.y),Ze.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)},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual()},be.prototype.scale=function(Pe,Ae){this.curveX=this.curveX*Pe,this.curveY=this.curveY*Ae,Ze.prototype.scale.call(this,Pe,Ae)},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ze.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ze.prototype.restoreState.call(this,Pe);var Ae=Pe;this.strokeColor=Ae.strokeColor,this.strokeWidth=Ae.strokeWidth,this.strokeDasharray=Ae.strokeDasharray,this.curveX=Ae.curveX,this.curveY=Ae.curveY,this.createVisual(),this.adjustVisual()},be.typeName="CurveMarker",be.title="Curve marker",be.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>',be}(Ye),Gn=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,Ae,Oe)||this;return xe.fillColor="transparent",xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.textColor="transparent",xe.fontSize="1rem",xe.isMoved=!1,xe.captionText="Caption",xe.PADDING=5,xe.captionBoxWidth=0,xe.captionBoxHeight=0,xe.strokeColor=Oe.defaultColor,xe.strokeWidth=Oe.defaultStrokeWidth,xe.strokeDasharray=Oe.defaultStrokeDasharray,xe.fillColor=Oe.defaultFillColor,xe.textColor=Oe.defaultStrokeColor,xe.fontFamily=Oe.defaultFontFamily,xe.fontSize=Oe.defaultCaptionFontSize,xe.captionText=Oe.defaultCaptionText,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setFillColor=xe.setFillColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.createVisual=xe.createVisual.bind(xe),xe.sizeCaption=xe.sizeCaption.bind(xe),xe.setCaptionText=xe.setCaptionText.bind(xe),xe.showTextEditor=xe.showTextEditor.bind(xe),xe.positionTextEditor=xe.positionTextEditor.bind(xe),xe.finishTextEditing=xe.finishTextEditing.bind(xe),xe.setFont=xe.setFont.bind(xe),xe.setTextColor=xe.setTextColor.bind(xe),xe.strokePanel=new ee("Line color",Ge(Oe.defaultColorSet,["transparent"]),xe.strokeColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.fillPanel=new ee("Fill color",Ge(Oe.defaultColorSet,["transparent"]),xe.fillColor,Ve),xe.fillPanel.onColorChanged=xe.setFillColor,xe.strokeWidthPanel=new Le("Line width",Oe.defaultStrokeWidths,Oe.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new ze("Line style",Oe.defaultStrokeDasharrays,Oe.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe.fontFamilyPanel=new He("Font",Oe.defaultFontFamilies,Oe.defaultFontFamily),xe.fontFamilyPanel.onFontChanged=xe.setFont,xe.textColorPanel=new ee("Text color",Oe.defaultColorSet,xe.textColor,tt),xe.textColorPanel.onColorChanged=xe.setTextColor,xe}return ke(be,Ze),be.prototype.ownsTarget=function(Pe){return!(!Ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.frame&&Pe!==this.captionBg&&Pe!==this.captionElement)},be.prototype.createVisual=function(){this.visual=Ue.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ue.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ue.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=Ue.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()},be.prototype.setCaptionText=function(Pe){this.captionText=Pe,this.captionElement.textContent=this.captionText,this.sizeCaption()},be.prototype.pointerDown=function(Pe,Ae){Ze.prototype.pointerDown.call(this,Pe,Ae),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.prototype.manipulate=function(Pe){Ze.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)},be.prototype.resize=function(Pe){Ze.prototype.resize.call(this,Pe),this.setSize()},be.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),Ue.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')"]]),Ue.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')"]])},be.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(Ae){Ae.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ae){Ae.key==="Enter"&&Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ae){Ae.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()},be.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"))},be.prototype.finishTextEditing=function(Pe){this.setCaptionText(Pe.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},be.prototype.setFont=function(Pe){this.captionElement&&Ue.setAttributes(this.captionElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},be.prototype.setTextColor=function(Pe){this.captionElement&&Ue.setAttributes(this.captionElement,[["fill",Pe]]),this.textColor=Pe,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},be.prototype.setSize=function(){Ze.prototype.setSize.call(this),Ue.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},be.prototype.pointerUp=function(Pe){Ze.prototype.pointerUp.call(this,Pe),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},be.prototype.dblClick=function(Pe,Ae){Ze.prototype.dblClick.call(this,Pe,Ae),this.showTextEditor()},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.frame&&Ue.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},be.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.captionBg&&Ue.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.frame&&Ue.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.frame&&Ue.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),be.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},Ze.prototype.getState.call(this));return Pe.typeName=this.typeName,Pe},be.prototype.restoreState=function(Pe){var Ae=Pe;this.fillColor=Ae.fillColor,this.strokeColor=Ae.strokeColor,this.strokeWidth=Ae.strokeWidth,this.strokeDasharray=Ae.strokeDasharray,this.textColor=Ae.textColor,this.fontFamily=Ae.fontFamily,this.captionText=Ae.captionText,this.fontSize=Ae.fontSize,this.createVisual(),Ze.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ae){Ze.prototype.scale.call(this,Pe,Ae),this.setSize()},be.typeName="CaptionFrameMarker",be.title="Caption frame marker",be.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>',be}(Ee),un=function(){function Ze(be,Pe){Pe===void 0&&(Pe=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=be,this.cancelable=Pe}return Object.defineProperty(Ze.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ze.prototype.preventDefault=function(){this._defaultPrevented=!0},Ze}(),_n=function(Ze){function be(Pe,Ae,Oe){var xe=Ze.call(this,Pe,!1)||this;return xe.dataUrl=Ae,xe.state=Oe,xe}return ke(be,Ze),be}(un),St=function(Ze){function be(Pe,Ae,Oe){Oe===void 0&&(Oe=!1);var xe=Ze.call(this,Pe,Oe)||this;return xe.marker=Ae,xe}return ke(be,Ze),be}(un),Zn=function(){function Ze(){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 Ze.prototype.addEventListener=function(be,Pe){this[be].push(Pe)},Ze.prototype.removeEventListener=function(be,Pe){var Ae=this[be].indexOf(Pe);Ae>-1&&this[be].splice(Ae,1)},Ze}(),ci=function(){function Ze(be){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Xe,this._isOpen=!1,this.undoRedoManager=new qt,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 Zn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ze.instanceCounter++,this.styles=new $e(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=be,this.targetRoot=document.body,this.width=be.clientWidth,this.height=be.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(Ze.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,ot,xt,Nt,zt,vn,Dt,_t,yn,Ot,dt,ln,Gn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,ot,xt,Nt,vn,Dt,_t]},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,ot,xt,Nt,Dt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(be){var Pe=this;this._availableMarkerTypes.splice(0),be.forEach(function(Ae){if(typeof Ae=="string"){var Oe=Pe.ALL_MARKER_TYPES.find(function(xe){return xe.typeName===Ae});Oe!==void 0&&Pe._availableMarkerTypes.push(Oe)}else Pe._availableMarkerTypes.push(Ae)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(be){this._zoomLevel=be,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(Ze.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ze.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ze.prototype.show=function(){var be=this;this.styles.styleSheetRoot===void 0&&wt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=wt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Pe){return Pe(new un(be))})},Ze.prototype.render=function(){return We(this,void 0,void 0,function(){var be;return ut(this,function(Pe){switch(Pe.label){case 0:return this.setCurrentMarker(),(be=new Ct).naturalSize=this.renderAtNaturalSize,be.imageType=this.renderImageType,be.imageQuality=this.renderImageQuality,be.markersOnly=this.renderMarkersOnly,be.width=this.renderWidth,be.height=this.renderHeight,[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Pe.sent(),[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Pe.sent()]}})})},Ze.prototype.close=function(be){var Pe=this;if(be===void 0&&(be=!1),this.isOpen){var Ae=!1;be||this.eventListeners.beforeclose.forEach(function(Oe){var xe=new un(Pe,!0);Oe(xe),xe.defaultPrevented&&(Ae=!0)}),Ae||(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(Oe){return Oe(new un(Pe))}),this.detachEvents(),this._isOpen=!1)}},Ze.prototype.addMarkersToToolbar=function(){for(var be,Pe=[],Ae=0;Ae<arguments.length;Ae++)Pe[Ae]=arguments[Ae];(be=this._availableMarkerTypes).push.apply(be,Pe)},Ze.prototype.addRenderEventListener=function(be){this.addEventListener("render",function(Pe){be(Pe.dataUrl,Pe.state)})},Ze.prototype.removeRenderEventListener=function(be){},Ze.prototype.addCloseEventListener=function(be){this.addEventListener("close",function(){be()})},Ze.prototype.removeCloseEventListener=function(be){},Ze.prototype.setupResizeObserver=function(){var be=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){be.resize(be.target.clientWidth,be.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return be.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ze.prototype.onPopupTargetResize=function(){var be=1*this.target.clientWidth/this.target.clientHeight,Pe=this.editorCanvas.clientWidth/be>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*be:this.editorCanvas.clientWidth,Ae=Pe<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/be;this.resize(Pe,Ae)},Ze.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ze.prototype.resize=function(be,Pe){this._isResizing=!0;var Ae=be/this.imageWidth,Oe=Pe/this.imageHeight;this.imageWidth=Math.round(be),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(Ae,Oe),this._isResizing=!1},Ze.prototype.scaleMarkers=function(be,Pe){var Ae,Oe=this;this._currentMarker&&this._currentMarker instanceof Nt?this._currentMarker.scale(be,Pe):(Ae=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(xe){xe!==Oe._currentMarker&&xe.scale(be,Pe)}),Ae!==void 0&&this.setCurrentMarker(Ae)},Ze.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"},Ze.prototype.setTopLeft=function(){var be=this.editingTarget.getBoundingClientRect(),Pe=this.editorCanvas.getBoundingClientRect();this.left=be.left-Pe.left,this.top=be.top-Pe.top},Ze.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)},Ze.prototype.addDefs=function(){for(var be,Pe=[],Ae=0;Ae<arguments.length;Ae++)Pe[Ae]=arguments[Ae];this.defs=Ue.createDefs(),this.addDefsToImage(),(be=this.defs).append.apply(be,Pe)},Ze.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ze.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)},Ze.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ze.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ze.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)},Ze.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ze.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)},Ze.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 be=document.createElement("a");be.href="https://markerjs.com/",be.target="_blank",be.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>',be.title="Powered by marker.js",be.style.display="grid",be.style.alignItems="center",be.style.justifyItems="center",be.style.padding="3px",be.style.width="20px",be.style.height="20px",this.logoUI.appendChild(be),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ze.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")},Ze.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"},Ze.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ze.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 be=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=be+"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 vt(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 Ie(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ze.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ze.prototype.removeMarker=function(be){this.markerImage.removeChild(be.container),this.markers.indexOf(be)>-1&&this.markers.splice(this.markers.indexOf(be),1),be.dispose()},Ze.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())},Ze.prototype.toolbarButtonClicked=function(be,Pe){if(be==="marker"&&Pe!==void 0)this.createNewMarker(Pe);else if(be==="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()}},Ze.prototype.deleteSelectedMarker=function(){var be=this;if(this._currentMarker!==void 0){var Pe=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Oe){var xe=new St(be,be._currentMarker,!0);Oe(xe),xe.defaultPrevented&&(Pe=!0)}),!Pe){var Ae=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(Oe){return Oe(new St(be,Ae))})}}},Ze.prototype.clear=function(){var be=this,Pe=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ct){var Mt=new St(be,void 0,!0);ct(Mt),Mt.defaultPrevented&&(Pe=!0)}),!Pe)){this.setCurrentMarker();for(var Ae=function(ct){var Mt=Oe.markers[ct];Oe.setCurrentMarker(Oe.markers[ct]),Oe._currentMarker.dispose(),Oe.markerImage.removeChild(Oe._currentMarker.container),Oe.markers.splice(Oe.markers.indexOf(Oe._currentMarker),1),Oe.eventListeners.markerdelete.forEach(function(at){return at(new St(be,Mt))})},Oe=this,xe=this.markers.length-1;xe>=0;xe--)Ae(xe);this.addUndoStep()}},Object.defineProperty(Ze.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ze.prototype.showNotesEditor=function(){var be;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=(be=this._currentMarker.notes)!==null&&be!==void 0?be:"",this.overlayContainer.appendChild(this.notesArea))},Ze.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)},Ze.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ze.prototype.addUndoStep=function(){var be=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Pe=this.getState(),Ae=this.undoRedoManager.getLastUndoStep();if(!Ae||Ae.width===Pe.width&&Ae.height===Pe.height){var Oe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Pe),Oe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(xe){return xe(new un(be))})}else this.undoRedoManager.replaceLastUndoStep(Pe),this.eventListeners.statechange.forEach(function(xe){return xe(new un(be))})}},Ze.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ze.prototype.undoStep=function(){var be=this,Pe=this.undoRedoManager.undo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ae){return Ae(new un(be))}))},Ze.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ze.prototype.redoStep=function(){var be=this,Pe=this.undoRedoManager.redo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ae){return Ae(new un(be))}))},Ze.prototype.stepZoom=function(){var be=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=be<this.zoomSteps.length-1?this.zoomSteps[be+1]:this.zoomSteps[0]},Ze.prototype.panTo=function(be){this.contentDiv.scrollBy({left:this.prevPanPoint.x-be.x,top:this.prevPanPoint.y-be.y}),this.prevPanPoint=be},Ze.prototype.startRenderAndClose=function(){return We(this,void 0,void 0,function(){var be,Pe,Ae=this;return ut(this,function(Oe){switch(Oe.label){case 0:return[4,this.render()];case 1:return be=Oe.sent(),Pe=this.getState(),this.eventListeners.render.forEach(function(xe){return xe(new _n(Ae,be,Pe))}),this.close(!0),[2]}})})},Ze.prototype.getState=function(be){be===!0&&this.setCurrentMarker();var Pe={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ae){return Pe.markers.push(Ae.getState())}),Pe},Ze.prototype.restoreState=function(be){var Pe=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);be.markers.forEach(function(Ae){var Oe=Pe._availableMarkerTypes.find(function(ct){return ct.typeName===Ae.typeName});if(Oe!==void 0){var xe=Pe.addNewMarker(Oe);xe.restoreState(Ae),Pe.markers.push(xe)}}),be.width&&be.height&&(be.width!==this.imageWidth||be.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/be.width,this.imageHeight/be.height),this.eventListeners.restorestate.forEach(function(Ae){return Ae(new un(Pe))})},Ze.prototype.addNewMarker=function(be){var Pe=Ue.createGroup();return this.markerImage.appendChild(Pe),new be(Pe,this.overlayContainer,this.settings)},Ze.prototype.createNewMarker=function(be){var Pe,Ae=this;(Pe=typeof be=="string"?this._availableMarkerTypes.find(function(Oe){return Oe.typeName===be}):be)&&(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(Oe){return Oe(new St(Ae,Ae._currentMarker))}))},Ze.prototype.markerCreated=function(be){var Pe=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(be),this.setCurrentMarker(be),be instanceof ot&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ot):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ae){return Ae(new St(Pe,Pe._currentMarker))})},Ze.prototype.colorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=be,this.settings.defaultStrokeColor=be)},Ze.prototype.fillColorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=be)},Ze.prototype.markerStateChanged=function(be){var Pe=this;this.eventListeners.markerchange.forEach(function(Ae){return Ae(new St(Pe,be))})},Ze.prototype.setCurrentMarker=function(be){var Pe=this;this._currentMarker!==be&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ae){return Ae(new St(Pe,Pe._currentMarker))})),this._currentMarker=be,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(Ae){return Ae(new St(Pe,Pe._currentMarker))}))},Ze.prototype.onPointerDown=function(be){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||be.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(Ae){return Ae.ownsTarget(be.target)});Pe!==void 0?(this.setCurrentMarker(Pe),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:be.clientX,y:be.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY))},Ze.prototype.onDblClick=function(be){if(this._isFocused||this.focus(),this.mode==="select"){var Pe=this.markers.find(function(Ae){return Ae.ownsTarget(be.target)});Pe!==void 0&&Pe!==this._currentMarker&&this.setCurrentMarker(Pe),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target):this.setCurrentMarker()}},Ze.prototype.onPointerMove=function(be){this.touchPoints!==1&&be.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||be.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(be.clientX,be.clientY)):this.zoomLevel>1&&this.panTo({x:be.clientX,y:be.clientY}))},Ze.prototype.onPointerUp=function(be){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(be.clientX,be.clientY)),this.isDragging=!1,this.addUndoStep()},Ze.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ze.prototype.onKeyUp=function(be){this._currentMarker===void 0||this.notesArea!==void 0||be.key!=="Delete"&&be.key!=="Backspace"||this.deleteSelectedMarker()},Ze.prototype.clientToLocalCoordinates=function(be,Pe){var Ae=this.markerImage.getBoundingClientRect();return{x:(be-Ae.left)/this.zoomLevel,y:(Pe-Ae.top)/this.zoomLevel}},Ze.prototype.onWindowResize=function(){this.positionUI()},Ze.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var be=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=be+"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()},Ze.prototype.addLicenseKey=function(be){Me.addKey(be)},Ze.prototype.addEventListener=function(be,Pe){this.eventListeners.addEventListener(be,Pe)},Ze.prototype.removeEventListener=function(be,Pe){this.eventListeners.removeEventListener(be,Pe)},Ze.prototype.renderState=function(be){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(be),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ze.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ze.prototype.focus=function(){var be=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 un(be))}))},Ze.prototype.blur=function(){var be=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Pe){return Pe(new un(be))}))},Ze.instanceCounter=0,Ze}()},17115:function(On,pn,pe){"use strict";pe.d(pn,{ZP:function(){return Me}});var le=pe(72071),ke=pe(59301),We=pe(47273),ut=0,Ge=(0,We.Z)();function Ue(){var Ct;return Ge?(Ct=ut,ut+=1):Ct="TEST_OR_SSR",Ct}function Me(Ct){var wt=ke.useState(),$e=(0,le.Z)(wt,2),Ft=$e[0],lt=$e[1];return ke.useEffect(function(){lt("rc_select_".concat(Ue()))},[]),Ct||Ft}},77861:function(On,pn,pe){"use strict";pe.d(pn,{Ac:function(){return Gt},Xo:function(){return Hi},Wx:function(){return _r},ZP:function(){return cn},lk:function(){return Ee}});var le=pe(96663),ke=pe(19127),We=pe(90493),ut=pe(44127),Ge=pe(72071),Ue=pe(6620),Me=pe(20135),Ct=pe(18929),wt=pe(48736),$e=pe(59301),Ft=pe(92310),lt=pe.n(Ft),vt=pe(34280),Ie=pe(49658),te=pe(10228),ee=pe(8654),de=function(ht){var en=ht.className,fn=ht.customizeIcon,Rn=ht.customizeIconProps,Qn=ht.onMouseDown,Et=ht.onClick,wn=ht.children,Kn;return typeof fn=="function"?Kn=fn(Rn):Kn=fn,$e.createElement("span",{className:en,onMouseDown:function(tn){tn.preventDefault(),Qn&&Qn(tn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Et,"aria-hidden":!0},Kn!==void 0?Kn:$e.createElement("span",{className:lt()(en.split(/\s+/).map(function(Ei){return"".concat(Ei,"-icon")}))},wn))},se=de;function he(At,ht,en,fn,Rn){var Qn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Et=arguments.length>6?arguments[6]:void 0,wn=arguments.length>7?arguments[7]:void 0,Kn=$e.useMemo(function(){if((0,Me.Z)(fn)==="object")return fn.clearIcon;if(Rn)return Rn},[fn,Rn]),Ei=$e.useMemo(function(){return!!(!Qn&&fn&&(en.length||Et)&&!(wn==="combobox"&&Et===""))},[fn,Qn,en.length,Et,wn]);return{allowClear:Ei,clearIcon:$e.createElement(se,{className:"".concat(At,"-clear"),onMouseDown:ht,customizeIcon:Kn},"\xD7")}}var ve=$e.createContext(null);function Ee(){return $e.useContext(ve)}function Be(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ht=$e.useState(!1),en=(0,Ge.Z)(ht,2),fn=en[0],Rn=en[1],Qn=$e.useRef(null),Et=function(){window.clearTimeout(Qn.current)};$e.useEffect(function(){return Et},[]);var wn=function(Ei,tn){Et(),Qn.current=window.setTimeout(function(){Rn(Ei),tn&&tn()},At)};return[fn,wn,Et]}function Le(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ht=$e.useRef(null),en=$e.useRef(null);$e.useEffect(function(){return function(){window.clearTimeout(en.current)}},[]);function fn(Rn){(Rn||ht.current===null)&&(ht.current=Rn),window.clearTimeout(en.current),en.current=window.setTimeout(function(){ht.current=null},At)}return[function(){return ht.current},fn]}function ze(At,ht,en,fn){var Rn=$e.useRef(null);Rn.current={open:ht,triggerOpen:en,customizedTrigger:fn},$e.useEffect(function(){function Qn(Et){var wn;if(!((wn=Rn.current)!==null&&wn!==void 0&&wn.customizedTrigger)){var Kn=Et.target;Kn.shadowRoot&&Et.composed&&(Kn=Et.composedPath()[0]||Kn),Rn.current.open&&At().filter(function(Ei){return Ei}).every(function(Ei){return!Ei.contains(Kn)&&Ei!==Kn})&&Rn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Qn),function(){return window.removeEventListener("mousedown",Qn)}},[])}var je=pe(26112),Xe=pe(11780),Ye=function(ht,en){var fn,Rn,Qn=ht.prefixCls,Et=ht.id,wn=ht.inputElement,Kn=ht.disabled,Ei=ht.tabIndex,tn=ht.autoFocus,sn=ht.autoComplete,In=ht.editable,Oi=ht.activeDescendantId,Di=ht.value,vi=ht.maxLength,Ti=ht.onKeyDown,Li=ht.onMouseDown,sr=ht.onChange,Zr=ht.onPaste,Vr=ht.onCompositionStart,Tn=ht.onCompositionEnd,Po=ht.open,Xr=ht.attrs,Cr=wn||$e.createElement("input",null),Cn=Cr,ri=Cn.ref,Yi=Cn.props,yr=Yi.onKeyDown,er=Yi.onChange,Fr=Yi.onMouseDown,Ur=Yi.onCompositionStart,zr=Yi.onCompositionEnd,Tr=Yi.style;return(0,wt.Kp)(!("maxLength"in Cr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Cr=$e.cloneElement(Cr,(0,ut.Z)((0,ut.Z)((0,ut.Z)({type:"search"},Yi),{},{id:Et,ref:(0,ee.sQ)(en,ri),disabled:Kn,tabIndex:Ei,autoComplete:sn||"off",autoFocus:tn,className:lt()("".concat(Qn,"-selection-search-input"),(fn=Cr)===null||fn===void 0||(Rn=fn.props)===null||Rn===void 0?void 0:Rn.className),role:"combobox","aria-label":"Search","aria-expanded":Po||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Et,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Et,"_list"),"aria-activedescendant":Po?Oi:void 0},Xr),{},{value:In?Di:"",maxLength:vi,readOnly:!In,unselectable:In?null:"on",style:(0,ut.Z)((0,ut.Z)({},Tr),{},{opacity:In?null:0}),onKeyDown:function(Un){Ti(Un),yr&&yr(Un)},onMouseDown:function(Un){Li(Un),Fr&&Fr(Un)},onChange:function(Un){sr(Un),er&&er(Un)},onCompositionStart:function(Un){Vr(Un),Ur&&Ur(Un)},onCompositionEnd:function(Un){Tn(Un),zr&&zr(Un)},onPaste:Zr})),Cr},dt=$e.forwardRef(Ye);dt.displayName="Input";var He=dt;function Nt(At){return Array.isArray(At)?At:At!==void 0?[At]:[]}var ot=typeof window!="undefined"&&window.document&&window.document.documentElement,Tt=ot;function xt(At){return At!=null}function Ot(At){return!At&&At!==0}function Wt(At){return["string","number"].includes((0,Me.Z)(At))}function Dt(At){var ht=void 0;return At&&(Wt(At.title)?ht=At.title.toString():Wt(At.label)&&(ht=At.label.toString())),ht}function tt(At,ht){Tt?$e.useLayoutEffect(At,ht):$e.useEffect(At,ht)}function Ve(At){var ht;return(ht=At.key)!==null&&ht!==void 0?ht:At.value}var _t=function(ht){ht.preventDefault(),ht.stopPropagation()},vn=function(ht){var en=ht.id,fn=ht.prefixCls,Rn=ht.values,Qn=ht.open,Et=ht.searchValue,wn=ht.autoClearSearchValue,Kn=ht.inputRef,Ei=ht.placeholder,tn=ht.disabled,sn=ht.mode,In=ht.showSearch,Oi=ht.autoFocus,Di=ht.autoComplete,vi=ht.activeDescendantId,Ti=ht.tabIndex,Li=ht.removeIcon,sr=ht.maxTagCount,Zr=ht.maxTagTextLength,Vr=ht.maxTagPlaceholder,Tn=Vr===void 0?function(sa){return"+ ".concat(sa.length," ...")}:Vr,Po=ht.tagRender,Xr=ht.onToggleOpen,Cr=ht.onRemove,Cn=ht.onInputChange,ri=ht.onInputPaste,Yi=ht.onInputKeyDown,yr=ht.onInputMouseDown,er=ht.onInputCompositionStart,Fr=ht.onInputCompositionEnd,Ur=$e.useRef(null),zr=(0,$e.useState)(0),Tr=(0,Ge.Z)(zr,2),Yr=Tr[0],Un=Tr[1],Ho=(0,$e.useState)(!1),Yn=(0,Ge.Z)(Ho,2),Ao=Yn[0],Qo=Yn[1],nr="".concat(fn,"-selection"),qo=Qn||sn==="multiple"&&wn===!1||sn==="tags"?Et:"",Go=sn==="tags"||sn==="multiple"&&wn===!1||In&&(Qn||Ao);tt(function(){Un(Ur.current.scrollWidth)},[qo]);function Lr(sa,va,Ma,hs,Ga){return $e.createElement("span",{className:lt()("".concat(nr,"-item"),(0,We.Z)({},"".concat(nr,"-item-disabled"),Ma)),title:Dt(sa)},$e.createElement("span",{className:"".concat(nr,"-item-content")},va),hs&&$e.createElement(se,{className:"".concat(nr,"-item-remove"),onMouseDown:_t,onClick:Ga,customizeIcon:Li},"\xD7"))}function br(sa,va,Ma,hs,Ga){var Lo=function(la){_t(la),Xr(!Qn)};return $e.createElement("span",{onMouseDown:Lo},Po({label:va,value:sa,disabled:Ma,closable:hs,onClose:Ga}))}function mo(sa){var va=sa.disabled,Ma=sa.label,hs=sa.value,Ga=!tn&&!va,Lo=Ma;if(typeof Zr=="number"&&(typeof Ma=="string"||typeof Ma=="number")){var po=String(Lo);po.length>Zr&&(Lo="".concat(po.slice(0,Zr),"..."))}var la=function(Na){Na&&Na.stopPropagation(),Cr(sa)};return typeof Po=="function"?br(hs,Lo,va,Ga,la):Lr(sa,Lo,va,Ga,la)}function Yo(sa){var va=typeof Tn=="function"?Tn(sa):Tn;return Lr({title:va},va,!1)}var Ki=$e.createElement("div",{className:"".concat(nr,"-search"),style:{width:Yr},onFocus:function(){Qo(!0)},onBlur:function(){Qo(!1)}},$e.createElement(He,{ref:Kn,open:Qn,prefixCls:fn,id:en,inputElement:null,disabled:tn,autoFocus:Oi,autoComplete:Di,editable:Go,activeDescendantId:vi,value:qo,onKeyDown:Yi,onMouseDown:yr,onChange:Cn,onPaste:ri,onCompositionStart:er,onCompositionEnd:Fr,tabIndex:Ti,attrs:(0,je.Z)(ht,!0)}),$e.createElement("span",{ref:Ur,className:"".concat(nr,"-search-mirror"),"aria-hidden":!0},qo,"\xA0")),st=$e.createElement(Xe.Z,{prefixCls:"".concat(nr,"-overflow"),data:Rn,renderItem:mo,renderRest:Yo,suffix:Ki,itemKey:Ve,maxCount:sr});return $e.createElement($e.Fragment,null,st,!Rn.length&&!qo&&$e.createElement("span",{className:"".concat(nr,"-placeholder")},Ei))},yn=vn,zt=function(ht){var en=ht.inputElement,fn=ht.prefixCls,Rn=ht.id,Qn=ht.inputRef,Et=ht.disabled,wn=ht.autoFocus,Kn=ht.autoComplete,Ei=ht.activeDescendantId,tn=ht.mode,sn=ht.open,In=ht.values,Oi=ht.placeholder,Di=ht.tabIndex,vi=ht.showSearch,Ti=ht.searchValue,Li=ht.activeValue,sr=ht.maxLength,Zr=ht.onInputKeyDown,Vr=ht.onInputMouseDown,Tn=ht.onInputChange,Po=ht.onInputPaste,Xr=ht.onInputCompositionStart,Cr=ht.onInputCompositionEnd,Cn=ht.title,ri=$e.useState(!1),Yi=(0,Ge.Z)(ri,2),yr=Yi[0],er=Yi[1],Fr=tn==="combobox",Ur=Fr||vi,zr=In[0],Tr=Ti||"";Fr&&Li&&!yr&&(Tr=Li),$e.useEffect(function(){Fr&&er(!1)},[Fr,Li]);var Yr=tn!=="combobox"&&!sn&&!vi?!1:!!Tr,Un=Cn===void 0?Dt(zr):Cn,Ho=function(){if(zr)return null;var Ao=Yr?{visibility:"hidden"}:void 0;return $e.createElement("span",{className:"".concat(fn,"-selection-placeholder"),style:Ao},Oi)};return $e.createElement($e.Fragment,null,$e.createElement("span",{className:"".concat(fn,"-selection-search")},$e.createElement(He,{ref:Qn,prefixCls:fn,id:Rn,open:sn,inputElement:en,disabled:Et,autoFocus:wn,autoComplete:Kn,editable:Ur,activeDescendantId:Ei,value:Tr,onKeyDown:Zr,onMouseDown:Vr,onChange:function(Ao){er(!0),Tn(Ao)},onPaste:Po,onCompositionStart:Xr,onCompositionEnd:Cr,tabIndex:Di,attrs:(0,je.Z)(ht,!0),maxLength:Fr?sr:void 0})),!Fr&&zr?$e.createElement("span",{className:"".concat(fn,"-selection-item"),title:Un,style:Yr?{visibility:"hidden"}:void 0},zr.label):null,Ho())},qt=zt;function ln(At){return![te.Z.ESC,te.Z.SHIFT,te.Z.BACKSPACE,te.Z.TAB,te.Z.WIN_KEY,te.Z.ALT,te.Z.META,te.Z.WIN_KEY_RIGHT,te.Z.CTRL,te.Z.SEMICOLON,te.Z.EQUALS,te.Z.CAPS_LOCK,te.Z.CONTEXT_MENU,te.Z.F1,te.Z.F2,te.Z.F3,te.Z.F4,te.Z.F5,te.Z.F6,te.Z.F7,te.Z.F8,te.Z.F9,te.Z.F10,te.Z.F11,te.Z.F12].includes(At)}var Gn=function(ht,en){var fn=(0,$e.useRef)(null),Rn=(0,$e.useRef)(!1),Qn=ht.prefixCls,Et=ht.open,wn=ht.mode,Kn=ht.showSearch,Ei=ht.tokenWithEnter,tn=ht.autoClearSearchValue,sn=ht.onSearch,In=ht.onSearchSubmit,Oi=ht.onToggleOpen,Di=ht.onInputKeyDown,vi=ht.domRef;$e.useImperativeHandle(en,function(){return{focus:function(){fn.current.focus()},blur:function(){fn.current.blur()}}});var Ti=Le(0),Li=(0,Ge.Z)(Ti,2),sr=Li[0],Zr=Li[1],Vr=function(Tr){var Yr=Tr.which;(Yr===te.Z.UP||Yr===te.Z.DOWN)&&Tr.preventDefault(),Di&&Di(Tr),Yr===te.Z.ENTER&&wn==="tags"&&!Rn.current&&!Et&&(In==null||In(Tr.target.value)),ln(Yr)&&Oi(!0)},Tn=function(){Zr(!0)},Po=(0,$e.useRef)(null),Xr=function(Tr){sn(Tr,!0,Rn.current)!==!1&&Oi(!0)},Cr=function(){Rn.current=!0},Cn=function(Tr){Rn.current=!1,wn!=="combobox"&&Xr(Tr.target.value)},ri=function(Tr){var Yr=Tr.target.value;if(Ei&&Po.current&&/[\r\n]/.test(Po.current)){var Un=Po.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Yr=Yr.replace(Un,Po.current)}Po.current=null,Xr(Yr)},Yi=function(Tr){var Yr=Tr.clipboardData,Un=Yr.getData("text");Po.current=Un},yr=function(Tr){var Yr=Tr.target;if(Yr!==fn.current){var Un=document.body.style.msTouchAction!==void 0;Un?setTimeout(function(){fn.current.focus()}):fn.current.focus()}},er=function(Tr){var Yr=sr();Tr.target!==fn.current&&!Yr&&wn!=="combobox"&&Tr.preventDefault(),(wn!=="combobox"&&(!Kn||!Yr)||!Et)&&(Et&&tn!==!1&&sn("",!0,!1),Oi())},Fr={inputRef:fn,onInputKeyDown:Vr,onInputMouseDown:Tn,onInputChange:ri,onInputPaste:Yi,onInputCompositionStart:Cr,onInputCompositionEnd:Cn},Ur=wn==="multiple"||wn==="tags"?$e.createElement(yn,(0,le.Z)({},ht,Fr)):$e.createElement(qt,(0,le.Z)({},ht,Fr));return $e.createElement("div",{ref:vi,className:"".concat(Qn,"-selector"),onClick:yr,onMouseDown:er},Ur)},un=$e.forwardRef(Gn);un.displayName="Selector";var _n=un,St=pe(35593),Zn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ci=function(ht){var en=ht===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:en,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:en,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:en,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:en,adjustY:1},htmlRegion:"scroll"}}},Ze=function(ht,en){var fn=ht.prefixCls,Rn=ht.disabled,Qn=ht.visible,Et=ht.children,wn=ht.popupElement,Kn=ht.animation,Ei=ht.transitionName,tn=ht.dropdownStyle,sn=ht.dropdownClassName,In=ht.direction,Oi=In===void 0?"ltr":In,Di=ht.placement,vi=ht.builtinPlacements,Ti=ht.dropdownMatchSelectWidth,Li=ht.dropdownRender,sr=ht.dropdownAlign,Zr=ht.getPopupContainer,Vr=ht.empty,Tn=ht.getTriggerDOMNode,Po=ht.onPopupVisibleChange,Xr=ht.onPopupMouseEnter,Cr=(0,Ue.Z)(ht,Zn),Cn="".concat(fn,"-dropdown"),ri=wn;Li&&(ri=Li(wn));var Yi=$e.useMemo(function(){return vi||ci(Ti)},[vi,Ti]),yr=Kn?"".concat(Cn,"-").concat(Kn):Ei,er=typeof Ti=="number",Fr=$e.useMemo(function(){return er?null:Ti===!1?"minWidth":"width"},[Ti,er]),Ur=tn;er&&(Ur=(0,ut.Z)((0,ut.Z)({},Ur),{},{width:Ti}));var zr=$e.useRef(null);return $e.useImperativeHandle(en,function(){return{getPopupElement:function(){return zr.current}}}),$e.createElement(St.Z,(0,le.Z)({},Cr,{showAction:Po?["click"]:[],hideAction:Po?["click"]:[],popupPlacement:Di||(Oi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Yi,prefixCls:Cn,popupTransitionName:yr,popup:$e.createElement("div",{ref:zr,onMouseEnter:Xr},ri),stretch:Fr,popupAlign:sr,popupVisible:Qn,getPopupContainer:Zr,popupClassName:lt()(sn,(0,We.Z)({},"".concat(Cn,"-empty"),Vr)),popupStyle:Ur,getTriggerDOMNode:Tn,onPopupVisibleChange:Po}),Et)},be=$e.forwardRef(Ze);be.displayName="SelectTrigger";var Pe=be,Ae=pe(4537);function Oe(At,ht){var en=At.key,fn;return"value"in At&&(fn=At.value),en!=null?en:fn!==void 0?fn:"rc-index-key-".concat(ht)}function xe(At,ht){var en=At||{},fn=en.label,Rn=en.value,Qn=en.options,Et=en.groupLabel,wn=fn||(ht?"children":"label");return{label:wn,value:Rn||"value",options:Qn||"options",groupLabel:Et||wn}}function ct(At){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},en=ht.fieldNames,fn=ht.childrenAsData,Rn=[],Qn=xe(en,!1),Et=Qn.label,wn=Qn.value,Kn=Qn.options,Ei=Qn.groupLabel;function tn(sn,In){sn.forEach(function(Oi){if(In||!(Kn in Oi)){var Di=Oi[wn];Rn.push({key:Oe(Oi,Rn.length),groupOption:In,data:Oi,label:Oi[Et],value:Di})}else{var vi=Oi[Ei];vi===void 0&&fn&&(vi=Oi.label),Rn.push({key:Oe(Oi,Rn.length),group:!0,data:Oi,label:vi}),tn(Oi[Kn],!0)}})}return tn(At,!1),Rn}function Mt(At){var ht=(0,ut.Z)({},At);return"props"in ht||Object.defineProperty(ht,"props",{get:function(){return(0,wt.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),ht}}),ht}function at(At,ht){if(!ht||!ht.length)return null;var en=!1;function fn(Qn,Et){var wn=(0,Ae.Z)(Et),Kn=wn[0],Ei=wn.slice(1);if(!Kn)return[Qn];var tn=Qn.split(Kn);return en=en||tn.length>1,tn.reduce(function(sn,In){return[].concat((0,ke.Z)(sn),(0,ke.Z)(fn(In,Ei)))},[]).filter(function(sn){return sn})}var Rn=fn(At,ht);return en?Rn:null}var qe=["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"],Lt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Bt(At){return At==="tags"||At==="multiple"}var ft=$e.forwardRef(function(At,ht){var en,fn,Rn=At.id,Qn=At.prefixCls,Et=At.className,wn=At.showSearch,Kn=At.tagRender,Ei=At.direction,tn=At.omitDomProps,sn=At.displayValues,In=At.onDisplayValuesChange,Oi=At.emptyOptions,Di=At.notFoundContent,vi=Di===void 0?"Not Found":Di,Ti=At.onClear,Li=At.mode,sr=At.disabled,Zr=At.loading,Vr=At.getInputElement,Tn=At.getRawInputElement,Po=At.open,Xr=At.defaultOpen,Cr=At.onDropdownVisibleChange,Cn=At.activeValue,ri=At.onActiveValueChange,Yi=At.activeDescendantId,yr=At.searchValue,er=At.autoClearSearchValue,Fr=At.onSearch,Ur=At.onSearchSplit,zr=At.tokenSeparators,Tr=At.allowClear,Yr=At.suffixIcon,Un=At.clearIcon,Ho=At.OptionList,Yn=At.animation,Ao=At.transitionName,Qo=At.dropdownStyle,nr=At.dropdownClassName,qo=At.dropdownMatchSelectWidth,Go=At.dropdownRender,Lr=At.dropdownAlign,br=At.placement,mo=At.builtinPlacements,Yo=At.getPopupContainer,Ki=At.showAction,st=Ki===void 0?[]:Ki,sa=At.onFocus,va=At.onBlur,Ma=At.onKeyUp,hs=At.onKeyDown,Ga=At.onMouseDown,Lo=(0,Ue.Z)(At,qe),po=Bt(Li),la=(wn!==void 0?wn:po)||Li==="combobox",Eo=(0,ut.Z)({},Lo);Lt.forEach(function(Fi){delete Eo[Fi]}),tn==null||tn.forEach(function(Fi){delete Eo[Fi]});var Na=$e.useState(!1),os=(0,Ge.Z)(Na,2),xo=os[0],Qr=os[1];$e.useEffect(function(){Qr((0,Ie.Z)())},[]);var pi=$e.useRef(null),io=$e.useRef(null),ro=$e.useRef(null),Ja=$e.useRef(null),Ca=$e.useRef(null),fa=Be(),$a=(0,Ge.Z)(fa,3),Qa=$a[0],Es=$a[1],ys=$a[2];$e.useImperativeHandle(ht,function(){var Fi,eo;return{focus:(Fi=Ja.current)===null||Fi===void 0?void 0:Fi.focus,blur:(eo=Ja.current)===null||eo===void 0?void 0:eo.blur,scrollTo:function(ma){var ya;return(ya=Ca.current)===null||ya===void 0?void 0:ya.scrollTo(ma)}}});var Zs=$e.useMemo(function(){var Fi;if(Li!=="combobox")return yr;var eo=(Fi=sn[0])===null||Fi===void 0?void 0:Fi.value;return typeof eo=="string"||typeof eo=="number"?String(eo):""},[yr,Li,sn]),Mn=Li==="combobox"&&typeof Vr=="function"&&Vr()||null,Ss=typeof Tn=="function"&&Tn(),ra=(0,ee.x1)(io,Ss==null||(en=Ss.props)===null||en===void 0?void 0:en.ref),hl=$e.useState(!1),Ol=(0,Ge.Z)(hl,2),ns=Ol[0],yu=Ol[1];(0,vt.Z)(function(){yu(!0)},[]);var eu=(0,Ct.Z)(!1,{defaultValue:Xr,value:Po}),ps=(0,Ge.Z)(eu,2),Ba=ps[0],tu=ps[1],Do=ns?Ba:!1,Ea=!vi&&Oi;(sr||Ea&&Do&&Li==="combobox")&&(Do=!1);var ca=Ea?!1:Do,hr=$e.useCallback(function(Fi){var eo=Fi!==void 0?Fi:!Do;sr||(tu(eo),Do!==eo&&(Cr==null||Cr(eo)))},[sr,Do,tu,Cr]),Rs=$e.useMemo(function(){return(zr||[]).some(function(Fi){return[`
`,`\r
`].includes(Fi)})},[zr]),ls=function(eo,Ko,ma){var ya=!0,bo=eo;ri==null||ri(null);var oa=ma?null:at(eo,zr);return Li!=="combobox"&&oa&&(bo="",Ur==null||Ur(oa),hr(!1),ya=!1),Fr&&Zs!==bo&&Fr(bo,{source:Ko?"typing":"effect"}),ya},sl=function(eo){!eo||!eo.trim()||Fr(eo,{source:"submit"})};$e.useEffect(function(){!Do&&!po&&Li!=="combobox"&&ls("",!1,!1)},[Do]),$e.useEffect(function(){Ba&&sr&&tu(!1),sr&&Es(!1)},[sr]);var jl=Le(),ou=(0,Ge.Z)(jl,2),Ji=ou[0],Cs=ou[1],Us=function(eo){var Ko=Ji(),ma=eo.which;if(ma===te.Z.ENTER&&(Li!=="combobox"&&eo.preventDefault(),Do||hr(!0)),Cs(!!Zs),ma===te.Z.BACKSPACE&&!Ko&&po&&!Zs&&sn.length){for(var ya=(0,ke.Z)(sn),bo=null,oa=ya.length-1;oa>=0;oa-=1){var Io=ya[oa];if(!Io.disabled){ya.splice(oa,1),bo=Io;break}}bo&&In(ya,{type:"remove",values:[bo]})}for(var Dr=arguments.length,Da=new Array(Dr>1?Dr-1:0),Ha=1;Ha<Dr;Ha++)Da[Ha-1]=arguments[Ha];if(Do&&Ca.current){var La;(La=Ca.current).onKeyDown.apply(La,[eo].concat(Da))}hs==null||hs.apply(void 0,[eo].concat(Da))},$l=function(eo){for(var Ko=arguments.length,ma=new Array(Ko>1?Ko-1:0),ya=1;ya<Ko;ya++)ma[ya-1]=arguments[ya];if(Do&&Ca.current){var bo;(bo=Ca.current).onKeyUp.apply(bo,[eo].concat(ma))}Ma==null||Ma.apply(void 0,[eo].concat(ma))},Tl=function(eo){var Ko=sn.filter(function(ma){return ma!==eo});In(Ko,{type:"remove",values:[eo]})},Kl=$e.useRef(!1),Oo=function(){Es(!0),sr||(sa&&!Kl.current&&sa.apply(void 0,arguments),st.includes("focus")&&hr(!0)),Kl.current=!0},ic=function(){Es(!1,function(){Kl.current=!1,hr(!1)}),!sr&&(Zs&&(Li==="tags"?Fr(Zs,{source:"submit"}):Li==="multiple"&&Fr("",{source:"blur"})),va&&va.apply(void 0,arguments))},zl=[];$e.useEffect(function(){return function(){zl.forEach(function(Fi){return clearTimeout(Fi)}),zl.splice(0,zl.length)}},[]);var En=function(eo){var Ko,ma=eo.target,ya=(Ko=ro.current)===null||Ko===void 0?void 0:Ko.getPopupElement();if(ya&&ya.contains(ma)){var bo=setTimeout(function(){var Da=zl.indexOf(bo);if(Da!==-1&&zl.splice(Da,1),ys(),!xo&&!ya.contains(document.activeElement)){var Ha;(Ha=Ja.current)===null||Ha===void 0||Ha.focus()}});zl.push(bo)}for(var oa=arguments.length,Io=new Array(oa>1?oa-1:0),Dr=1;Dr<oa;Dr++)Io[Dr-1]=arguments[Dr];Ga==null||Ga.apply(void 0,[eo].concat(Io))},Nn=$e.useState({}),ai=(0,Ge.Z)(Nn,2),Qi=ai[1];function Gi(){Qi({})}var ki;Ss&&(ki=function(eo){hr(eo)}),ze(function(){var Fi;return[pi.current,(Fi=ro.current)===null||Fi===void 0?void 0:Fi.getPopupElement()]},ca,hr,!!Ss);var _i=$e.useMemo(function(){return(0,ut.Z)((0,ut.Z)({},At),{},{notFoundContent:vi,open:Do,triggerOpen:ca,id:Rn,showSearch:la,multiple:po,toggleOpen:hr})},[At,vi,ca,Do,Rn,la,po,hr]),oi=!!Yr||Zr,Mi;oi&&(Mi=$e.createElement(se,{className:lt()("".concat(Qn,"-arrow"),(0,We.Z)({},"".concat(Qn,"-arrow-loading"),Zr)),customizeIcon:Yr,customizeIconProps:{loading:Zr,searchValue:Zs,open:Do,focused:Qa,showSearch:la}}));var cr=function(){var eo;Ti==null||Ti(),(eo=Ja.current)===null||eo===void 0||eo.focus(),In([],{type:"clear",values:sn}),ls("",!1,!1)},Hr=he(Qn,cr,sn,Tr,Un,sr,Zs,Li),ga=Hr.allowClear,$o=Hr.clearIcon,Ua=$e.createElement(Ho,{ref:Ca}),Ka=lt()(Qn,Et,(fn={},(0,We.Z)(fn,"".concat(Qn,"-focused"),Qa),(0,We.Z)(fn,"".concat(Qn,"-multiple"),po),(0,We.Z)(fn,"".concat(Qn,"-single"),!po),(0,We.Z)(fn,"".concat(Qn,"-allow-clear"),Tr),(0,We.Z)(fn,"".concat(Qn,"-show-arrow"),oi),(0,We.Z)(fn,"".concat(Qn,"-disabled"),sr),(0,We.Z)(fn,"".concat(Qn,"-loading"),Zr),(0,We.Z)(fn,"".concat(Qn,"-open"),Do),(0,We.Z)(fn,"".concat(Qn,"-customize-input"),Mn),(0,We.Z)(fn,"".concat(Qn,"-show-search"),la),fn)),No=$e.createElement(Pe,{ref:ro,disabled:sr,prefixCls:Qn,visible:ca,popupElement:Ua,animation:Yn,transitionName:Ao,dropdownStyle:Qo,dropdownClassName:nr,direction:Ei,dropdownMatchSelectWidth:qo,dropdownRender:Go,dropdownAlign:Lr,placement:br,builtinPlacements:mo,getPopupContainer:Yo,empty:Oi,getTriggerDOMNode:function(){return io.current},onPopupVisibleChange:ki,onPopupMouseEnter:Gi},Ss?$e.cloneElement(Ss,{ref:ra}):$e.createElement(_n,(0,le.Z)({},At,{domRef:io,prefixCls:Qn,inputElement:Mn,ref:Ja,id:Rn,showSearch:la,autoClearSearchValue:er,mode:Li,activeDescendantId:Yi,tagRender:Kn,values:sn,open:Do,onToggleOpen:hr,activeValue:Cn,searchValue:Zs,onSearch:ls,onSearchSubmit:sl,onRemove:Tl,tokenWithEnter:Rs}))),qr;return Ss?qr=No:qr=$e.createElement("div",(0,le.Z)({className:Ka},Eo,{ref:pi,onMouseDown:En,onKeyDown:Us,onKeyUp:$l,onFocus:Oo,onBlur:ic}),Qa&&!Do&&$e.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(sn.map(function(Fi){var eo=Fi.label,Ko=Fi.value;return["number","string"].includes((0,Me.Z)(eo))?eo:Ko}).join(", "))),No,Mi,ga&&$o),$e.createElement(ve.Provider,{value:_i},qr)}),Gt=ft,Sn=function(At,ht){var en=$e.useRef({values:new Map,options:new Map}),fn=$e.useMemo(function(){var Qn=en.current,Et=Qn.values,wn=Qn.options,Kn=At.map(function(sn){if(sn.label===void 0){var In;return(0,ut.Z)((0,ut.Z)({},sn),{},{label:(In=Et.get(sn.value))===null||In===void 0?void 0:In.label})}return sn}),Ei=new Map,tn=new Map;return Kn.forEach(function(sn){Ei.set(sn.value,sn),tn.set(sn.value,ht.get(sn.value)||wn.get(sn.value))}),en.current.values=Ei,en.current.options=tn,Kn},[At,ht]),Rn=$e.useCallback(function(Qn){return ht.get(Qn)||en.current.options.get(Qn)},[ht]);return[fn,Rn]};function an(At,ht){return Nt(At).join("").toUpperCase().includes(ht)}var rn=function(At,ht,en,fn,Rn){return $e.useMemo(function(){if(!en||fn===!1)return At;var Qn=ht.options,Et=ht.label,wn=ht.value,Kn=[],Ei=typeof fn=="function",tn=en.toUpperCase(),sn=Ei?fn:function(Oi,Di){return Rn?an(Di[Rn],tn):Di[Qn]?an(Di[Et!=="children"?Et:"label"],tn):an(Di[wn],tn)},In=Ei?function(Oi){return Mt(Oi)}:function(Oi){return Oi};return At.forEach(function(Oi){if(Oi[Qn]){var Di=sn(en,In(Oi));if(Di)Kn.push(Oi);else{var vi=Oi[Qn].filter(function(Ti){return sn(en,In(Ti))});vi.length&&Kn.push((0,ut.Z)((0,ut.Z)({},Oi),{},(0,We.Z)({},Qn,vi)))}return}sn(en,In(Oi))&&Kn.push(Oi)}),Kn},[At,fn,Rn,en,ht])},zn=pe(17115),kn=pe(11592),mn=["children","value"],ei=["children"];function Pi(At){var ht=At,en=ht.key,fn=ht.props,Rn=fn.children,Qn=fn.value,Et=(0,Ue.Z)(fn,mn);return(0,ut.Z)({key:en,value:Qn!==void 0?Qn:en,children:Rn},Et)}function Hn(At){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,kn.Z)(At).map(function(en,fn){if(!$e.isValidElement(en)||!en.type)return null;var Rn=en,Qn=Rn.type.isSelectOptGroup,Et=Rn.key,wn=Rn.props,Kn=wn.children,Ei=(0,Ue.Z)(wn,ei);return ht||!Qn?Pi(en):(0,ut.Z)((0,ut.Z)({key:"__RC_SELECT_GRP__".concat(Et===null?fn:Et,"__"),label:Et},Ei),{},{options:Hn(Kn)})}).filter(function(en){return en})}function bn(At,ht,en,fn,Rn){return $e.useMemo(function(){var Qn=At,Et=!At;Et&&(Qn=Hn(ht));var wn=new Map,Kn=new Map,Ei=function(In,Oi,Di){Di&&typeof Di=="string"&&In.set(Oi[Di],Oi)};function tn(sn){for(var In=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oi=0;Oi<sn.length;Oi+=1){var Di=sn[Oi];!Di[en.options]||In?(wn.set(Di[en.value],Di),Ei(Kn,Di,en.label),Ei(Kn,Di,fn),Ei(Kn,Di,Rn)):tn(Di[en.options],!0)}}return tn(Qn),{options:Qn,valueOptions:wn,labelOptions:Kn}},[At,ht,en,fn,Rn])}function wi(At){var ht=$e.useRef();ht.current=At;var en=$e.useCallback(function(){return ht.current.apply(ht,arguments)},[]);return en}var Zi=function(){return null};Zi.isSelectOptGroup=!0;var Hi=Zi,rr=function(){return null};rr.isSelectOption=!0;var _r=rr,gi=pe(80547),di=pe(2738),xi=pe(24916),$i=$e.createContext(null),Ri=$i;function Kr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Sr=["disabled","title","children","style","className"];function Ne(At){return typeof At=="string"||typeof At=="number"}var Ci=function(ht,en){var fn=Ee(),Rn=fn.prefixCls,Qn=fn.id,Et=fn.open,wn=fn.multiple,Kn=fn.mode,Ei=fn.searchValue,tn=fn.toggleOpen,sn=fn.notFoundContent,In=fn.onPopupScroll,Oi=$e.useContext(Ri),Di=Oi.flattenOptions,vi=Oi.onActiveValue,Ti=Oi.defaultActiveFirstOption,Li=Oi.onSelect,sr=Oi.menuItemSelectedIcon,Zr=Oi.rawValues,Vr=Oi.fieldNames,Tn=Oi.virtual,Po=Oi.direction,Xr=Oi.listHeight,Cr=Oi.listItemHeight,Cn="".concat(Rn,"-item"),ri=(0,gi.Z)(function(){return Di},[Et,Di],function(Lr,br){return br[0]&&Lr[1]!==br[1]}),Yi=$e.useRef(null),yr=function(br){br.preventDefault()},er=function(br){Yi.current&&Yi.current.scrollTo(typeof br=="number"?{index:br}:br)},Fr=function(br){for(var mo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Yo=ri.length,Ki=0;Ki<Yo;Ki+=1){var st=(br+Ki*mo+Yo)%Yo,sa=ri[st],va=sa.group,Ma=sa.data;if(!va&&!Ma.disabled)return st}return-1},Ur=$e.useState(function(){return Fr(0)}),zr=(0,Ge.Z)(Ur,2),Tr=zr[0],Yr=zr[1],Un=function(br){var mo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Yr(br);var Yo={source:mo?"keyboard":"mouse"},Ki=ri[br];if(!Ki){vi(null,-1,Yo);return}vi(Ki.value,br,Yo)};(0,$e.useEffect)(function(){Un(Ti!==!1?Fr(0):-1)},[ri.length,Ei]);var Ho=$e.useCallback(function(Lr){return Zr.has(Lr)&&Kn!=="combobox"},[Kn,(0,ke.Z)(Zr).toString(),Zr.size]);(0,$e.useEffect)(function(){var Lr=setTimeout(function(){if(!wn&&Et&&Zr.size===1){var mo=Array.from(Zr)[0],Yo=ri.findIndex(function(Ki){var st=Ki.data;return st.value===mo});Yo!==-1&&(Un(Yo),er(Yo))}});if(Et){var br;(br=Yi.current)===null||br===void 0||br.scrollTo(void 0)}return function(){return clearTimeout(Lr)}},[Et,Ei,Di.length]);var Yn=function(br){br!==void 0&&Li(br,{selected:!Zr.has(br)}),wn||tn(!1)};if($e.useImperativeHandle(en,function(){return{onKeyDown:function(br){var mo=br.which,Yo=br.ctrlKey;switch(mo){case te.Z.N:case te.Z.P:case te.Z.UP:case te.Z.DOWN:{var Ki=0;if(mo===te.Z.UP?Ki=-1:mo===te.Z.DOWN?Ki=1:Kr()&&Yo&&(mo===te.Z.N?Ki=1:mo===te.Z.P&&(Ki=-1)),Ki!==0){var st=Fr(Tr+Ki,Ki);er(st),Un(st,!0)}break}case te.Z.ENTER:{var sa=ri[Tr];sa&&!sa.data.disabled?Yn(sa.value):Yn(void 0),Et&&br.preventDefault();break}case te.Z.ESC:tn(!1),Et&&br.stopPropagation()}},onKeyUp:function(){},scrollTo:function(br){er(br)}}}),ri.length===0)return $e.createElement("div",{role:"listbox",id:"".concat(Qn,"_list"),className:"".concat(Cn,"-empty"),onMouseDown:yr},sn);var Ao=Object.keys(Vr).map(function(Lr){return Vr[Lr]}),Qo=function(br){return br.label};function nr(Lr,br){var mo=Lr.group;return{role:mo?"presentation":"option",id:"".concat(Qn,"_list_").concat(br)}}var qo=function(br){var mo=ri[br];if(!mo)return null;var Yo=mo.data||{},Ki=Yo.value,st=mo.group,sa=(0,je.Z)(Yo,!0),va=Qo(mo);return mo?$e.createElement("div",(0,le.Z)({"aria-label":typeof va=="string"&&!st?va:null},sa,{key:br},nr(mo,br),{"aria-selected":Ho(Ki)}),Ki):null},Go={role:"listbox",id:"".concat(Qn,"_list")};return $e.createElement($e.Fragment,null,Tn&&$e.createElement("div",(0,le.Z)({},Go,{style:{height:0,width:0,overflow:"hidden"}}),qo(Tr-1),qo(Tr),qo(Tr+1)),$e.createElement(xi.Z,{itemKey:"key",ref:Yi,data:ri,height:Xr,itemHeight:Cr,fullHeight:!1,onMouseDown:yr,onScroll:In,virtual:Tn,direction:Po,innerProps:Tn?null:Go},function(Lr,br){var mo,Yo=Lr.group,Ki=Lr.groupOption,st=Lr.data,sa=Lr.label,va=Lr.value,Ma=st.key;if(Yo){var hs,Ga=(hs=st.title)!==null&&hs!==void 0?hs:Ne(sa)?sa.toString():void 0;return $e.createElement("div",{className:lt()(Cn,"".concat(Cn,"-group")),title:Ga},sa!==void 0?sa:Ma)}var Lo=st.disabled,po=st.title,la=st.children,Eo=st.style,Na=st.className,os=(0,Ue.Z)(st,Sr),xo=(0,di.Z)(os,Ao),Qr=Ho(va),pi="".concat(Cn,"-option"),io=lt()(Cn,pi,Na,(mo={},(0,We.Z)(mo,"".concat(pi,"-grouped"),Ki),(0,We.Z)(mo,"".concat(pi,"-active"),Tr===br&&!Lo),(0,We.Z)(mo,"".concat(pi,"-disabled"),Lo),(0,We.Z)(mo,"".concat(pi,"-selected"),Qr),mo)),ro=Qo(Lr),Ja=!sr||typeof sr=="function"||Qr,Ca=typeof ro=="number"?ro:ro||va,fa=Ne(Ca)?Ca.toString():void 0;return po!==void 0&&(fa=po),$e.createElement("div",(0,le.Z)({},(0,je.Z)(xo),Tn?{}:nr(Lr,br),{"aria-selected":Qr,className:io,title:fa,onMouseMove:function(){Tr===br||Lo||Un(br)},onClick:function(){Lo||Yn(va)},style:Eo}),$e.createElement("div",{className:"".concat(pi,"-content")},Ca),$e.isValidElement(sr)||Qr,Ja&&$e.createElement(se,{className:"".concat(Cn,"-option-state"),customizeIcon:sr,customizeIconProps:{isSelected:Qr}},Qr?"\u2713":null))}))},wr=$e.forwardRef(Ci);wr.displayName="OptionList";var Pn=wr;function Si(At){var ht=At.mode,en=At.options,fn=At.children,Rn=At.backfill,Qn=At.allowClear,Et=At.placeholder,wn=At.getInputElement,Kn=At.showSearch,Ei=At.onSearch,tn=At.defaultOpen,sn=At.autoFocus,In=At.labelInValue,Oi=At.value,Di=At.inputValue,vi=At.optionLabelProp,Ti=isMultiple(ht),Li=Kn!==void 0?Kn:Ti||ht==="combobox",sr=en||convertChildrenToData(fn);if(warning(ht!=="tags"||sr.every(function(Po){return!Po.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ht==="tags"||ht==="combobox"){var Zr=sr.some(function(Po){return Po.options?Po.options.some(function(Xr){return typeof("value"in Xr?Xr.value:Xr.key)=="number"}):typeof("value"in Po?Po.value:Po.key)=="number"});warning(!Zr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ht!=="combobox"||!vi,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ht==="combobox"||!Rn,"`backfill` only works with `combobox` mode."),warning(ht==="combobox"||!wn,"`getInputElement` only work with `combobox` mode."),noteOnce(ht!=="combobox"||!wn||!Qn||!Et,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ei&&!Li&&ht!=="combobox"&&ht!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!tn||sn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Oi!=null){var Vr=toArray(Oi);warning(!In||Vr.every(function(Po){return _typeof(Po)==="object"&&("key"in Po||"value"in Po)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ti||Array.isArray(Oi),"`value` should be array when `mode` is `multiple` or `tags`")}if(fn){var Tn=null;toNodeArray(fn).some(function(Po){if(!React.isValidElement(Po)||!Po.type)return!1;var Xr=Po,Cr=Xr.type;if(Cr.isSelectOption)return!1;if(Cr.isSelectOptGroup){var Cn=toNodeArray(Po.props.children).every(function(ri){return!React.isValidElement(ri)||!Po.type||ri.type.isSelectOption?!0:(Tn=ri.type,!1)});return!Cn}return Tn=Cr,!0}),Tn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Tn.displayName||Tn.name||Tn,"`.")),warning(Di===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Wi(At,ht){if(At){var en=function fn(Rn){for(var Qn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Et=0;Et<Rn.length;Et++){var wn=Rn[Et];if(wn[ht==null?void 0:ht.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Qn&&Array.isArray(wn[ht==null?void 0:ht.options])&&fn(wn[ht==null?void 0:ht.options],!0))break}};en(At)}}var qi=null,$n=["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"],qn=["inputValue"];function Zt(At){return!At||(0,Me.Z)(At)!=="object"}var $t=$e.forwardRef(function(At,ht){var en=At.id,fn=At.mode,Rn=At.prefixCls,Qn=Rn===void 0?"rc-select":Rn,Et=At.backfill,wn=At.fieldNames,Kn=At.inputValue,Ei=At.searchValue,tn=At.onSearch,sn=At.autoClearSearchValue,In=sn===void 0?!0:sn,Oi=At.onSelect,Di=At.onDeselect,vi=At.dropdownMatchSelectWidth,Ti=vi===void 0?!0:vi,Li=At.filterOption,sr=At.filterSort,Zr=At.optionFilterProp,Vr=At.optionLabelProp,Tn=At.options,Po=At.children,Xr=At.defaultActiveFirstOption,Cr=At.menuItemSelectedIcon,Cn=At.virtual,ri=At.direction,Yi=At.listHeight,yr=Yi===void 0?200:Yi,er=At.listItemHeight,Fr=er===void 0?20:er,Ur=At.value,zr=At.defaultValue,Tr=At.labelInValue,Yr=At.onChange,Un=(0,Ue.Z)(At,$n),Ho=(0,zn.ZP)(en),Yn=Bt(fn),Ao=!!(!Tn&&Po),Qo=$e.useMemo(function(){return Li===void 0&&fn==="combobox"?!1:Li},[Li,fn]),nr=$e.useMemo(function(){return xe(wn,Ao)},[JSON.stringify(wn),Ao]),qo=(0,Ct.Z)("",{value:Ei!==void 0?Ei:Kn,postState:function(Ea){return Ea||""}}),Go=(0,Ge.Z)(qo,2),Lr=Go[0],br=Go[1],mo=bn(Tn,Po,nr,Zr,Vr),Yo=mo.valueOptions,Ki=mo.labelOptions,st=mo.options,sa=$e.useCallback(function(Do){var Ea=Nt(Do);return Ea.map(function(ca){var hr,Rs,ls,sl,jl;if(Zt(ca))hr=ca;else{var ou;ls=ca.key,Rs=ca.label,hr=(ou=ca.value)!==null&&ou!==void 0?ou:ls}var Ji=Yo.get(hr);if(Ji){var Cs;if(Rs===void 0&&(Rs=Ji==null?void 0:Ji[Vr||nr.label]),ls===void 0&&(ls=(Cs=Ji==null?void 0:Ji.key)!==null&&Cs!==void 0?Cs:hr),sl=Ji==null?void 0:Ji.disabled,jl=Ji==null?void 0:Ji.title,0)var Us}return{label:Rs,value:hr,key:ls,disabled:sl,title:jl}})},[nr,Vr,Yo]),va=(0,Ct.Z)(zr,{value:Ur}),Ma=(0,Ge.Z)(va,2),hs=Ma[0],Ga=Ma[1],Lo=$e.useMemo(function(){var Do,Ea=sa(hs);return fn==="combobox"&&Ot((Do=Ea[0])===null||Do===void 0?void 0:Do.value)?[]:Ea},[hs,sa,fn]),po=Sn(Lo,Yo),la=(0,Ge.Z)(po,2),Eo=la[0],Na=la[1],os=$e.useMemo(function(){if(!fn&&Eo.length===1){var Do=Eo[0];if(Do.value===null&&(Do.label===null||Do.label===void 0))return[]}return Eo.map(function(Ea){var ca;return(0,ut.Z)((0,ut.Z)({},Ea),{},{label:(ca=Ea.label)!==null&&ca!==void 0?ca:Ea.value})})},[fn,Eo]),xo=$e.useMemo(function(){return new Set(Eo.map(function(Do){return Do.value}))},[Eo]);$e.useEffect(function(){if(fn==="combobox"){var Do,Ea=(Do=Eo[0])===null||Do===void 0?void 0:Do.value;br(xt(Ea)?String(Ea):"")}},[Eo]);var Qr=wi(function(Do,Ea){var ca,hr=Ea!=null?Ea:Do;return ca={},(0,We.Z)(ca,nr.value,Do),(0,We.Z)(ca,nr.label,hr),ca}),pi=$e.useMemo(function(){if(fn!=="tags")return st;var Do=(0,ke.Z)(st),Ea=function(hr){return Yo.has(hr)};return(0,ke.Z)(Eo).sort(function(ca,hr){return ca.value<hr.value?-1:1}).forEach(function(ca){var hr=ca.value;Ea(hr)||Do.push(Qr(hr,ca.label))}),Do},[Qr,st,Yo,Eo,fn]),io=rn(pi,nr,Lr,Qo,Zr),ro=$e.useMemo(function(){return fn!=="tags"||!Lr||io.some(function(Do){return Do[Zr||"value"]===Lr})||io.some(function(Do){return Do[nr.value]===Lr})?io:[Qr(Lr)].concat((0,ke.Z)(io))},[Qr,Zr,fn,io,Lr,nr]),Ja=$e.useMemo(function(){return sr?(0,ke.Z)(ro).sort(function(Do,Ea){return sr(Do,Ea)}):ro},[ro,sr]),Ca=$e.useMemo(function(){return ct(Ja,{fieldNames:nr,childrenAsData:Ao})},[Ja,nr,Ao]),fa=function(Ea){var ca=sa(Ea);if(Ga(ca),Yr&&(ca.length!==Eo.length||ca.some(function(ls,sl){var jl;return((jl=Eo[sl])===null||jl===void 0?void 0:jl.value)!==(ls==null?void 0:ls.value)}))){var hr=Tr?ca:ca.map(function(ls){return ls.value}),Rs=ca.map(function(ls){return Mt(Na(ls.value))});Yr(Yn?hr:hr[0],Yn?Rs:Rs[0])}},$a=$e.useState(null),Qa=(0,Ge.Z)($a,2),Es=Qa[0],ys=Qa[1],Zs=$e.useState(0),Mn=(0,Ge.Z)(Zs,2),Ss=Mn[0],ra=Mn[1],hl=Xr!==void 0?Xr:fn!=="combobox",Ol=$e.useCallback(function(Do,Ea){var ca=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},hr=ca.source,Rs=hr===void 0?"keyboard":hr;ra(Ea),Et&&fn==="combobox"&&Do!==null&&Rs==="keyboard"&&ys(String(Do))},[Et,fn]),ns=function(Ea,ca,hr){var Rs=function(){var Kl,Oo=Na(Ea);return[Tr?{label:Oo==null?void 0:Oo[nr.label],value:Ea,key:(Kl=Oo==null?void 0:Oo.key)!==null&&Kl!==void 0?Kl:Ea}:Ea,Mt(Oo)]};if(ca&&Oi){var ls=Rs(),sl=(0,Ge.Z)(ls,2),jl=sl[0],ou=sl[1];Oi(jl,ou)}else if(!ca&&Di&&hr!=="clear"){var Ji=Rs(),Cs=(0,Ge.Z)(Ji,2),Us=Cs[0],$l=Cs[1];Di(Us,$l)}},yu=wi(function(Do,Ea){var ca,hr=Yn?Ea.selected:!0;hr?ca=Yn?[].concat((0,ke.Z)(Eo),[Do]):[Do]:ca=Eo.filter(function(Rs){return Rs.value!==Do}),fa(ca),ns(Do,hr),fn==="combobox"?ys(""):(!Bt||In)&&(br(""),ys(""))}),eu=function(Ea,ca){fa(Ea);var hr=ca.type,Rs=ca.values;(hr==="remove"||hr==="clear")&&Rs.forEach(function(ls){ns(ls.value,!1,hr)})},ps=function(Ea,ca){if(br(Ea),ys(null),ca.source==="submit"){var hr=(Ea||"").trim();if(hr){var Rs=Array.from(new Set([].concat((0,ke.Z)(xo),[hr])));fa(Rs),ns(hr,!0),br("")}return}ca.source!=="blur"&&(fn==="combobox"&&fa(Ea),tn==null||tn(Ea))},Ba=function(Ea){var ca=Ea;fn!=="tags"&&(ca=Ea.map(function(Rs){var ls=Ki.get(Rs);return ls==null?void 0:ls.value}).filter(function(Rs){return Rs!==void 0}));var hr=Array.from(new Set([].concat((0,ke.Z)(xo),(0,ke.Z)(ca))));fa(hr),hr.forEach(function(Rs){ns(Rs,!0)})},tu=$e.useMemo(function(){var Do=Cn!==!1&&Ti!==!1;return(0,ut.Z)((0,ut.Z)({},mo),{},{flattenOptions:Ca,onActiveValue:Ol,defaultActiveFirstOption:hl,onSelect:yu,menuItemSelectedIcon:Cr,rawValues:xo,fieldNames:nr,virtual:Do,direction:ri,listHeight:yr,listItemHeight:Fr,childrenAsData:Ao})},[mo,Ca,Ol,hl,yu,Cr,xo,nr,Cn,Ti,yr,Fr,Ao]);return $e.createElement(Ri.Provider,{value:tu},$e.createElement(Gt,(0,le.Z)({},Un,{id:Ho,prefixCls:Qn,ref:ht,omitDomProps:qn,mode:fn,displayValues:os,onDisplayValuesChange:eu,direction:ri,searchValue:Lr,onSearch:ps,autoClearSearchValue:In,onSearchSplit:Ba,dropdownMatchSelectWidth:Ti,OptionList:Pn,emptyOptions:!Ca.length,activeValue:Es,activeDescendantId:"".concat(Ho,"_list_").concat(Ss)})))}),Qe=$t;Qe.Option=_r,Qe.OptGroup=Hi;var on=Qe,cn=on},9296:function(On,pn,pe){"use strict";pe.r(pn),pe.d(pn,{ResizableTextArea:function(){return dt},default:function(){return Ot}});var le=pe(96663),ke=pe(44127),We=pe(90493),ut=pe(20135),Ge=pe(72071),Ue=pe(6620),Me=pe(19127),Ct=pe(92310),wt=pe.n(Ct),$e=pe(93681),Ft=pe(5643),lt=pe(18929),vt=pe(59301),Ie=pe(29301),te=pe(34280),ee=pe(16089),de=`
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 Ee(Wt){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=Wt.getAttribute("id")||Wt.getAttribute("data-reactid")||Wt.getAttribute("name");if(Dt&&he[tt])return he[tt];var Ve=window.getComputedStyle(Wt),_t=Ve.getPropertyValue("box-sizing")||Ve.getPropertyValue("-moz-box-sizing")||Ve.getPropertyValue("-webkit-box-sizing"),vn=parseFloat(Ve.getPropertyValue("padding-bottom"))+parseFloat(Ve.getPropertyValue("padding-top")),yn=parseFloat(Ve.getPropertyValue("border-bottom-width"))+parseFloat(Ve.getPropertyValue("border-top-width")),zt=se.map(function(ln){return"".concat(ln,":").concat(Ve.getPropertyValue(ln))}).join(";"),qt={sizingStyle:zt,paddingSize:vn,borderSize:yn,boxSizing:_t};return Dt&&tt&&(he[tt]=qt),qt}function Be(Wt){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=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)),Wt.getAttribute("wrap")?ve.setAttribute("wrap",Wt.getAttribute("wrap")):ve.removeAttribute("wrap");var _t=Ee(Wt,Dt),vn=_t.paddingSize,yn=_t.borderSize,zt=_t.boxSizing,qt=_t.sizingStyle;ve.setAttribute("style","".concat(qt,";").concat(de)),ve.value=Wt.value||Wt.placeholder||"";var ln=void 0,Gn=void 0,un,_n=ve.scrollHeight;if(zt==="border-box"?_n+=yn:zt==="content-box"&&(_n-=vn),tt!==null||Ve!==null){ve.value=" ";var St=ve.scrollHeight-vn;tt!==null&&(ln=St*tt,zt==="border-box"&&(ln=ln+vn+yn),_n=Math.max(ln,_n)),Ve!==null&&(Gn=St*Ve,zt==="border-box"&&(Gn=Gn+vn+yn),un=_n>Gn?"":"hidden",_n=Math.min(Gn,_n))}var Zn={height:_n,overflowY:un,resize:"none"};return ln&&(Zn.minHeight=ln),Gn&&(Zn.maxHeight=Gn),Zn}var Le=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ze=0,je=1,Xe=2,Ye=vt.forwardRef(function(Wt,Dt){var tt=Wt,Ve=tt.prefixCls,_t=tt.onPressEnter,vn=tt.defaultValue,yn=tt.value,zt=tt.autoSize,qt=tt.onResize,ln=tt.className,Gn=tt.style,un=tt.disabled,_n=tt.onChange,St=tt.onInternalAutoSize,Zn=(0,Ue.Z)(tt,Le),ci=(0,lt.Z)(vn,{value:yn,postState:function(Hi){return Hi!=null?Hi:""}}),Ze=(0,Ge.Z)(ci,2),be=Ze[0],Pe=Ze[1],Ae=function(Hi){Pe(Hi.target.value),_n==null||_n(Hi)},Oe=vt.useRef();vt.useImperativeHandle(Dt,function(){return{textArea:Oe.current}});var xe=vt.useMemo(function(){return zt&&(0,ut.Z)(zt)==="object"?[zt.minRows,zt.maxRows]:[]},[zt]),ct=(0,Ge.Z)(xe,2),Mt=ct[0],at=ct[1],qe=!!zt,Lt=function(){try{if(document.activeElement===Oe.current){var Hi=Oe.current,rr=Hi.selectionStart,_r=Hi.selectionEnd,gi=Hi.scrollTop;Oe.current.setSelectionRange(rr,_r),Oe.current.scrollTop=gi}}catch(di){}},Bt=vt.useState(Xe),ft=(0,Ge.Z)(Bt,2),Gt=ft[0],Sn=ft[1],an=vt.useState(),rn=(0,Ge.Z)(an,2),zn=rn[0],kn=rn[1],mn=function(){Sn(ze)};(0,te.Z)(function(){qe&&mn()},[yn,Mt,at,qe]),(0,te.Z)(function(){if(Gt===ze)Sn(je);else if(Gt===je){var Zi=Be(Oe.current,!1,Mt,at);Sn(Xe),kn(Zi)}else Lt()},[Gt]);var ei=vt.useRef(),Pi=function(){ee.Z.cancel(ei.current)},Hn=function(Hi){Gt===Xe&&(qt==null||qt(Hi),zt&&(Pi(),ei.current=(0,ee.Z)(function(){mn()})))};vt.useEffect(function(){return Pi},[]);var bn=qe?zn:null,wi=(0,ke.Z)((0,ke.Z)({},Gn),bn);return(Gt===ze||Gt===je)&&(wi.overflowY="hidden",wi.overflowX="hidden"),vt.createElement(Ie.Z,{onResize:Hn,disabled:!(zt||qt)},vt.createElement("textarea",(0,le.Z)({},Zn,{ref:Oe,style:wi,className:wt()(Ve,ln,(0,We.Z)({},"".concat(Ve,"-disabled"),un)),disabled:un,value:be,onChange:Ae})))}),dt=Ye,He=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Nt(Wt,Dt){return(0,Me.Z)(Wt||"").slice(0,Dt).join("")}function ot(Wt,Dt,tt,Ve){var _t=tt;return Wt?_t=Nt(tt,Ve):(0,Me.Z)(Dt||"").length<tt.length&&(0,Me.Z)(tt||"").length>Ve&&(_t=Dt),_t}var Tt=vt.forwardRef(function(Wt,Dt){var tt,Ve=Wt.defaultValue,_t=Wt.value,vn=Wt.onFocus,yn=Wt.onBlur,zt=Wt.onChange,qt=Wt.allowClear,ln=Wt.maxLength,Gn=Wt.onCompositionStart,un=Wt.onCompositionEnd,_n=Wt.suffix,St=Wt.prefixCls,Zn=St===void 0?"rc-textarea":St,ci=Wt.classes,Ze=Wt.showCount,be=Wt.className,Pe=Wt.style,Ae=Wt.disabled,Oe=Wt.hidden,xe=Wt.classNames,ct=Wt.styles,Mt=Wt.onResize,at=(0,Ue.Z)(Wt,He),qe=(0,lt.Z)(Ve,{value:_t,defaultValue:Ve}),Lt=(0,Ge.Z)(qe,2),Bt=Lt[0],ft=Lt[1],Gt=(0,vt.useRef)(null),Sn=vt.useState(!1),an=(0,Ge.Z)(Sn,2),rn=an[0],zn=an[1],kn=vt.useState(!1),mn=(0,Ge.Z)(kn,2),ei=mn[0],Pi=mn[1],Hn=vt.useRef(),bn=vt.useRef(0),wi=vt.useState(null),Zi=(0,Ge.Z)(wi,2),Hi=Zi[0],rr=Zi[1],_r=function(){var Zt;(Zt=Gt.current)===null||Zt===void 0||Zt.textArea.focus()};(0,vt.useImperativeHandle)(Dt,function(){return{resizableTextArea:Gt.current,focus:_r,blur:function(){var Zt;(Zt=Gt.current)===null||Zt===void 0||Zt.textArea.blur()}}}),(0,vt.useEffect)(function(){zn(function(qn){return!Ae&&qn})},[Ae]);var gi=Number(ln)>0,di=function(Zt){Pi(!0),Hn.current=Bt,bn.current=Zt.currentTarget.selectionStart,Gn==null||Gn(Zt)},xi=function(Zt){Pi(!1);var $t=Zt.currentTarget.value;if(gi){var Qe,on=bn.current>=ln+1||bn.current===((Qe=Hn.current)===null||Qe===void 0?void 0:Qe.length);$t=ot(on,Hn.current,$t,ln)}$t!==Bt&&(ft($t),(0,Ft.rJ)(Zt.currentTarget,Zt,zt,$t)),un==null||un(Zt)},$i=function(Zt){var $t=Zt.target.value;if(!ei&&gi){var Qe=Zt.target.selectionStart>=ln+1||Zt.target.selectionStart===$t.length||!Zt.target.selectionStart;$t=ot(Qe,Bt,$t,ln)}ft($t),(0,Ft.rJ)(Zt.currentTarget,Zt,zt,$t)},Ri=function(Zt){var $t=at.onPressEnter,Qe=at.onKeyDown;Zt.key==="Enter"&&$t&&$t(Zt),Qe==null||Qe(Zt)},Kr=function(Zt){zn(!0),vn==null||vn(Zt)},Sr=function(Zt){zn(!1),yn==null||yn(Zt)},Ne=function(Zt){var $t;ft(""),_r(),(0,Ft.rJ)(($t=Gt.current)===null||$t===void 0?void 0:$t.textArea,Zt,zt)},Ci=(0,Ft.D7)(Bt);!ei&&gi&&_t==null&&(Ci=Nt(Ci,ln));var wr=_n,Pn;if(Ze){var Si=(0,Me.Z)(Ci).length;(0,ut.Z)(Ze)==="object"?Pn=Ze.formatter({value:Ci,count:Si,maxLength:ln}):Pn="".concat(Si).concat(gi?" / ".concat(ln):""),wr=vt.createElement(vt.Fragment,null,wr,vt.createElement("span",{className:wt()("".concat(Zn,"-data-count"),xe==null?void 0:xe.count),style:ct==null?void 0:ct.count},Pn))}var Wi=function(Zt){var $t;Mt==null||Mt(Zt),($t=Gt.current)!==null&&$t!==void 0&&$t.textArea.style.height&&rr(!0)},qi=!at.autoSize&&!Ze&&!qt,$n=vt.createElement($e.BaseInput,{value:Ci,allowClear:qt,handleReset:Ne,suffix:wr,prefixCls:Zn,classes:{affixWrapper:wt()(ci==null?void 0:ci.affixWrapper,(tt={},(0,We.Z)(tt,"".concat(Zn,"-show-count"),Ze),(0,We.Z)(tt,"".concat(Zn,"-textarea-allow-clear"),qt),tt))},disabled:Ae,focused:rn,className:be,style:(0,ke.Z)((0,ke.Z)({},Pe),Hi&&!qi?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Pn=="string"?Pn:void 0}},hidden:Oe,inputElement:vt.createElement(dt,(0,le.Z)({},at,{onKeyDown:Ri,onChange:$i,onFocus:Kr,onBlur:Sr,onCompositionStart:di,onCompositionEnd:xi,className:xe==null?void 0:xe.textarea,style:(0,ke.Z)((0,ke.Z)({},ct==null?void 0:ct.textarea),{},{resize:Pe==null?void 0:Pe.resize}),disabled:Ae,prefixCls:Zn,onResize:Wi,ref:Gt}))});return $n}),xt=Tt,Ot=xt},39417:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return je}});var le=pe(96663),ke=pe(90493),We=pe(6620),ut=pe(44127),Ge=pe(52884),Ue=pe(95727),Me=pe(89866),Ct=pe(65711),wt=pe(85745),$e=pe(92310),Ft=pe.n($e),lt=pe(26112),vt=pe(59301),Ie=pe(39378),te=function(Ye){for(var dt=Ye.prefixCls,He=Ye.level,Nt=Ye.isStart,ot=Ye.isEnd,Tt="".concat(dt,"-indent-unit"),xt=[],Ot=0;Ot<He;Ot+=1){var Wt;xt.push(vt.createElement("span",{key:Ot,className:Ft()(Tt,(Wt={},(0,ke.Z)(Wt,"".concat(Tt,"-start"),Nt[Ot]),(0,ke.Z)(Wt,"".concat(Tt,"-end"),ot[Ot]),Wt))}))}return vt.createElement("span",{"aria-hidden":"true",className:"".concat(dt,"-indent")},xt)},ee=vt.memo(te),de=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",Ee="close",Be="---",Le=function(Xe){(0,Ct.Z)(dt,Xe);var Ye=(0,wt.Z)(dt);function dt(){var He;(0,Ge.Z)(this,dt);for(var Nt=arguments.length,ot=new Array(Nt),Tt=0;Tt<Nt;Tt++)ot[Tt]=arguments[Tt];return He=Ye.call.apply(Ye,[this].concat(ot)),He.state={dragNodeHighlight:!1},He.selectHandle=void 0,He.cacheIndent=void 0,He.onSelectorClick=function(xt){var Ot=He.props.context.onNodeClick;Ot(xt,(0,se.F)(He.props)),He.isSelectable()?He.onSelect(xt):He.onCheck(xt)},He.onSelectorDoubleClick=function(xt){var Ot=He.props.context.onNodeDoubleClick;Ot(xt,(0,se.F)(He.props))},He.onSelect=function(xt){if(!He.isDisabled()){var Ot=He.props.context.onNodeSelect;Ot(xt,(0,se.F)(He.props))}},He.onCheck=function(xt){if(!He.isDisabled()){var Ot=He.props,Wt=Ot.disableCheckbox,Dt=Ot.checked,tt=He.props.context.onNodeCheck;if(!(!He.isCheckable()||Wt)){var Ve=!Dt;tt(xt,(0,se.F)(He.props),Ve)}}},He.onMouseEnter=function(xt){var Ot=He.props.context.onNodeMouseEnter;Ot(xt,(0,se.F)(He.props))},He.onMouseLeave=function(xt){var Ot=He.props.context.onNodeMouseLeave;Ot(xt,(0,se.F)(He.props))},He.onContextMenu=function(xt){var Ot=He.props.context.onNodeContextMenu;Ot(xt,(0,se.F)(He.props))},He.onDragStart=function(xt){var Ot=He.props.context.onNodeDragStart;xt.stopPropagation(),He.setState({dragNodeHighlight:!0}),Ot(xt,(0,Me.Z)(He));try{xt.dataTransfer.setData("text/plain","")}catch(Wt){}},He.onDragEnter=function(xt){var Ot=He.props.context.onNodeDragEnter;xt.preventDefault(),xt.stopPropagation(),Ot(xt,(0,Me.Z)(He))},He.onDragOver=function(xt){var Ot=He.props.context.onNodeDragOver;xt.preventDefault(),xt.stopPropagation(),Ot(xt,(0,Me.Z)(He))},He.onDragLeave=function(xt){var Ot=He.props.context.onNodeDragLeave;xt.stopPropagation(),Ot(xt,(0,Me.Z)(He))},He.onDragEnd=function(xt){var Ot=He.props.context.onNodeDragEnd;xt.stopPropagation(),He.setState({dragNodeHighlight:!1}),Ot(xt,(0,Me.Z)(He))},He.onDrop=function(xt){var Ot=He.props.context.onNodeDrop;xt.preventDefault(),xt.stopPropagation(),He.setState({dragNodeHighlight:!1}),Ot(xt,(0,Me.Z)(He))},He.onExpand=function(xt){var Ot=He.props,Wt=Ot.loading,Dt=Ot.context.onNodeExpand;Wt||Dt(xt,(0,se.F)(He.props))},He.setSelectHandle=function(xt){He.selectHandle=xt},He.getNodeState=function(){var xt=He.props.expanded;return He.isLeaf()?null:xt?ve:Ee},He.hasChildren=function(){var xt=He.props.eventKey,Ot=He.props.context.keyEntities,Wt=(0,de.Z)(Ot,xt)||{},Dt=Wt.children;return!!(Dt||[]).length},He.isLeaf=function(){var xt=He.props,Ot=xt.isLeaf,Wt=xt.loaded,Dt=He.props.context.loadData,tt=He.hasChildren();return Ot===!1?!1:Ot||!Dt&&!tt||Dt&&Wt&&!tt},He.isDisabled=function(){var xt=He.props.disabled,Ot=He.props.context.disabled;return!!(Ot||xt)},He.isCheckable=function(){var xt=He.props.checkable,Ot=He.props.context.checkable;return!Ot||xt===!1?!1:Ot},He.syncLoadData=function(xt){var Ot=xt.expanded,Wt=xt.loading,Dt=xt.loaded,tt=He.props.context,Ve=tt.loadData,_t=tt.onNodeLoad;Wt||Ve&&Ot&&!He.isLeaf()&&!He.hasChildren()&&!Dt&&_t((0,se.F)(He.props))},He.isDraggable=function(){var xt=He.props,Ot=xt.data,Wt=xt.context.draggable;return!!(Wt&&(!Wt.nodeDraggable||Wt.nodeDraggable(Ot)))},He.renderDragHandler=function(){var xt=He.props.context,Ot=xt.draggable,Wt=xt.prefixCls;return Ot!=null&&Ot.icon?vt.createElement("span",{className:"".concat(Wt,"-draggable-icon")},Ot.icon):null},He.renderSwitcherIconDom=function(xt){var Ot=He.props.switcherIcon,Wt=He.props.context.switcherIcon,Dt=Ot||Wt;return typeof Dt=="function"?Dt((0,ut.Z)((0,ut.Z)({},He.props),{},{isLeaf:xt})):Dt},He.renderSwitcher=function(){var xt=He.props.expanded,Ot=He.props.context.prefixCls;if(He.isLeaf()){var Wt=He.renderSwitcherIconDom(!0);return Wt!==!1?vt.createElement("span",{className:Ft()("".concat(Ot,"-switcher"),"".concat(Ot,"-switcher-noop"))},Wt):null}var Dt=Ft()("".concat(Ot,"-switcher"),"".concat(Ot,"-switcher_").concat(xt?ve:Ee)),tt=He.renderSwitcherIconDom(!1);return tt!==!1?vt.createElement("span",{onClick:He.onExpand,className:Dt},tt):null},He.renderCheckbox=function(){var xt=He.props,Ot=xt.checked,Wt=xt.halfChecked,Dt=xt.disableCheckbox,tt=He.props.context.prefixCls,Ve=He.isDisabled(),_t=He.isCheckable();if(!_t)return null;var vn=typeof _t!="boolean"?_t:null;return vt.createElement("span",{className:Ft()("".concat(tt,"-checkbox"),Ot&&"".concat(tt,"-checkbox-checked"),!Ot&&Wt&&"".concat(tt,"-checkbox-indeterminate"),(Ve||Dt)&&"".concat(tt,"-checkbox-disabled")),onClick:He.onCheck},vn)},He.renderIcon=function(){var xt=He.props.loading,Ot=He.props.context.prefixCls;return vt.createElement("span",{className:Ft()("".concat(Ot,"-iconEle"),"".concat(Ot,"-icon__").concat(He.getNodeState()||"docu"),xt&&"".concat(Ot,"-icon_loading"))})},He.renderSelector=function(){var xt=He.state.dragNodeHighlight,Ot=He.props,Wt=Ot.title,Dt=Wt===void 0?Be:Wt,tt=Ot.selected,Ve=Ot.icon,_t=Ot.loading,vn=Ot.data,yn=He.props.context,zt=yn.prefixCls,qt=yn.showIcon,ln=yn.icon,Gn=yn.loadData,un=yn.titleRender,_n=He.isDisabled(),St="".concat(zt,"-node-content-wrapper"),Zn;if(qt){var ci=Ve||ln;Zn=ci?vt.createElement("span",{className:Ft()("".concat(zt,"-iconEle"),"".concat(zt,"-icon__customize"))},typeof ci=="function"?ci(He.props):ci):He.renderIcon()}else Gn&&_t&&(Zn=He.renderIcon());var Ze;typeof Dt=="function"?Ze=Dt(vn):un?Ze=un(vn):Ze=Dt;var be=vt.createElement("span",{className:"".concat(zt,"-title")},Ze);return vt.createElement("span",{ref:He.setSelectHandle,title:typeof Dt=="string"?Dt:"",className:Ft()("".concat(St),"".concat(St,"-").concat(He.getNodeState()||"normal"),!_n&&(tt||xt)&&"".concat(zt,"-node-selected")),onMouseEnter:He.onMouseEnter,onMouseLeave:He.onMouseLeave,onContextMenu:He.onContextMenu,onClick:He.onSelectorClick,onDoubleClick:He.onSelectorDoubleClick},Zn,be,He.renderDropIndicator())},He.renderDropIndicator=function(){var xt=He.props,Ot=xt.disabled,Wt=xt.eventKey,Dt=He.props.context,tt=Dt.draggable,Ve=Dt.dropLevelOffset,_t=Dt.dropPosition,vn=Dt.prefixCls,yn=Dt.indent,zt=Dt.dropIndicatorRender,qt=Dt.dragOverNodeKey,ln=Dt.direction,Gn=!!tt,un=!Ot&&Gn&&qt===Wt,_n=yn!=null?yn:He.cacheIndent;return He.cacheIndent=yn,un?zt({dropPosition:_t,dropLevelOffset:Ve,indent:_n,prefixCls:vn,direction:ln}):null},He}return(0,Ue.Z)(dt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Nt=this.props.selectable,ot=this.props.context.selectable;return typeof Nt=="boolean"?Nt:ot}},{key:"render",value:function(){var Nt,ot=this.props,Tt=ot.eventKey,xt=ot.className,Ot=ot.style,Wt=ot.dragOver,Dt=ot.dragOverGapTop,tt=ot.dragOverGapBottom,Ve=ot.isLeaf,_t=ot.isStart,vn=ot.isEnd,yn=ot.expanded,zt=ot.selected,qt=ot.checked,ln=ot.halfChecked,Gn=ot.loading,un=ot.domRef,_n=ot.active,St=ot.data,Zn=ot.onMouseMove,ci=ot.selectable,Ze=(0,We.Z)(ot,he),be=this.props.context,Pe=be.prefixCls,Ae=be.filterTreeNode,Oe=be.keyEntities,xe=be.dropContainerKey,ct=be.dropTargetKey,Mt=be.draggingNodeKey,at=this.isDisabled(),qe=(0,lt.Z)(Ze,{aria:!0,data:!0}),Lt=(0,de.Z)(Oe,Tt)||{},Bt=Lt.level,ft=vn[vn.length-1],Gt=this.isDraggable(),Sn=!at&&Gt,an=Mt===Tt,rn=ci!==void 0?{"aria-selected":!!ci}:void 0;return vt.createElement("div",(0,le.Z)({ref:un,className:Ft()(xt,"".concat(Pe,"-treenode"),(Nt={},(0,ke.Z)(Nt,"".concat(Pe,"-treenode-disabled"),at),(0,ke.Z)(Nt,"".concat(Pe,"-treenode-switcher-").concat(yn?"open":"close"),!Ve),(0,ke.Z)(Nt,"".concat(Pe,"-treenode-checkbox-checked"),qt),(0,ke.Z)(Nt,"".concat(Pe,"-treenode-checkbox-indeterminate"),ln),(0,ke.Z)(Nt,"".concat(Pe,"-treenode-selected"),zt),(0,ke.Z)(Nt,"".concat(Pe,"-treenode-loading"),Gn),(0,ke.Z)(Nt,"".concat(Pe,"-treenode-active"),_n),(0,ke.Z)(Nt,"".concat(Pe,"-treenode-leaf-last"),ft),(0,ke.Z)(Nt,"".concat(Pe,"-treenode-draggable"),Gt),(0,ke.Z)(Nt,"dragging",an),(0,ke.Z)(Nt,"drop-target",ct===Tt),(0,ke.Z)(Nt,"drop-container",xe===Tt),(0,ke.Z)(Nt,"drag-over",!at&&Wt),(0,ke.Z)(Nt,"drag-over-gap-top",!at&&Dt),(0,ke.Z)(Nt,"drag-over-gap-bottom",!at&&tt),(0,ke.Z)(Nt,"filter-node",Ae&&Ae((0,se.F)(this.props))),Nt)),style:Ot,draggable:Sn,"aria-grabbed":an,onDragStart:Sn?this.onDragStart:void 0,onDragEnter:Gt?this.onDragEnter:void 0,onDragOver:Gt?this.onDragOver:void 0,onDragLeave:Gt?this.onDragLeave:void 0,onDrop:Gt?this.onDrop:void 0,onDragEnd:Gt?this.onDragEnd:void 0,onMouseMove:Zn},rn,qe),vt.createElement(ee,{prefixCls:Pe,level:Bt,isStart:_t,isEnd:vn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),dt}(vt.Component),ze=function(Ye){return vt.createElement(Ie.k.Consumer,null,function(dt){return vt.createElement(Le,(0,le.Z)({},Ye,{context:dt}))})};ze.displayName="TreeNode",ze.isTreeNode=1;var je=ze},39378:function(On,pn,pe){"use strict";pe.d(pn,{k:function(){return ke}});var le=pe(59301),ke=le.createContext(null)},43858:function(On,pn,pe){"use strict";pe.d(pn,{O:function(){return je.Z},Z:function(){return be}});var le=pe(96663),ke=pe(90493),We=pe(20135),ut=pe(44127),Ge=pe(19127),Ue=pe(52884),Me=pe(95727),Ct=pe(89866),wt=pe(65711),$e=pe(85745),Ft=pe(92310),lt=pe.n(Ft),vt=pe(10228),Ie=pe(26112),te=pe(48736),ee=pe(59301),de=pe(39378);function se(Pe){var Ae=Pe.dropPosition,Oe=Pe.dropLevelOffset,xe=Pe.indent,ct={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ae){case-1:ct.top=0,ct.left=-Oe*xe;break;case 1:ct.bottom=0,ct.left=-Oe*xe;break;case 0:ct.bottom=0,ct.left=xe;break}return ee.createElement("div",{style:ct})}function he(Pe){if(Pe==null)throw new TypeError("Cannot destructure "+Pe)}var ve=pe(72071),Ee=pe(6620),Be=pe(34280),Le=pe(24916),ze=pe(77900),je=pe(39417);function Xe(Pe,Ae){var Oe=ee.useState(!1),xe=(0,ve.Z)(Oe,2),ct=xe[0],Mt=xe[1];ee.useLayoutEffect(function(){if(ct)return Pe(),function(){Ae()}},[ct]),ee.useLayoutEffect(function(){return Mt(!0),function(){Mt(!1)}},[])}var Ye=pe(71430),dt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],He=function(Ae,Oe){var xe=Ae.className,ct=Ae.style,Mt=Ae.motion,at=Ae.motionNodes,qe=Ae.motionType,Lt=Ae.onMotionStart,Bt=Ae.onMotionEnd,ft=Ae.active,Gt=Ae.treeNodeRequiredProps,Sn=(0,Ee.Z)(Ae,dt),an=ee.useState(!0),rn=(0,ve.Z)(an,2),zn=rn[0],kn=rn[1],mn=ee.useContext(de.k),ei=mn.prefixCls,Pi=at&&qe!=="hide";(0,Be.Z)(function(){at&&Pi!==zn&&kn(Pi)},[at]);var Hn=function(){at&&Lt()},bn=ee.useRef(!1),wi=function(){at&&!bn.current&&(bn.current=!0,Bt())};Xe(Hn,wi);var Zi=function(rr){Pi===rr&&wi()};return at?ee.createElement(ze.default,(0,le.Z)({ref:Oe,visible:zn},Mt,{motionAppear:qe==="show",onVisibleChanged:Zi}),function(Hi,rr){var _r=Hi.className,gi=Hi.style;return ee.createElement("div",{ref:rr,className:lt()("".concat(ei,"-treenode-motion"),_r),style:gi},at.map(function(di){var xi=(0,le.Z)({},(he(di.data),di.data)),$i=di.title,Ri=di.key,Kr=di.isStart,Sr=di.isEnd;delete xi.children;var Ne=(0,Ye.H8)(Ri,Gt);return ee.createElement(je.Z,(0,le.Z)({},xi,Ne,{title:$i,active:ft,data:di.data,key:Ri,isStart:Kr,isEnd:Sr}))}))}):ee.createElement(je.Z,(0,le.Z)({domRef:Oe,className:xe,style:ct},Sn,{active:ft}))};He.displayName="MotionTreeNode";var Nt=ee.forwardRef(He),ot=Nt;function Tt(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Oe=Pe.length,xe=Ae.length;if(Math.abs(Oe-xe)!==1)return{add:!1,key:null};function ct(Mt,at){var qe=new Map;Mt.forEach(function(Bt){qe.set(Bt,!0)});var Lt=at.filter(function(Bt){return!qe.has(Bt)});return Lt.length===1?Lt[0]:null}return Oe<xe?{add:!0,key:ct(Pe,Ae)}:{add:!1,key:ct(Ae,Pe)}}function xt(Pe,Ae,Oe){var xe=Pe.findIndex(function(qe){return qe.key===Oe}),ct=Pe[xe+1],Mt=Ae.findIndex(function(qe){return qe.key===Oe});if(ct){var at=Ae.findIndex(function(qe){return qe.key===ct.key});return Ae.slice(Mt+1,at)}return Ae.slice(Mt+1)}var Ot=["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"],Wt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Dt=function(){},tt="RC_TREE_MOTION_".concat(Math.random()),Ve={key:tt},_t={key:tt,level:0,index:0,pos:"0",node:Ve,nodes:[Ve]},vn={parent:null,children:[],pos:_t.pos,data:Ve,title:null,key:tt,isStart:[],isEnd:[]};function yn(Pe,Ae,Oe,xe){return Ae===!1||!Oe?Pe:Pe.slice(0,Math.ceil(Oe/xe)+1)}function zt(Pe){var Ae=Pe.key,Oe=Pe.pos;return(0,Ye.km)(Ae,Oe)}function qt(Pe){for(var Ae=String(Pe.data.key),Oe=Pe;Oe.parent;)Oe=Oe.parent,Ae="".concat(Oe.data.key," > ").concat(Ae);return Ae}var ln=ee.forwardRef(function(Pe,Ae){var Oe=Pe.prefixCls,xe=Pe.data,ct=Pe.selectable,Mt=Pe.checkable,at=Pe.expandedKeys,qe=Pe.selectedKeys,Lt=Pe.checkedKeys,Bt=Pe.loadedKeys,ft=Pe.loadingKeys,Gt=Pe.halfCheckedKeys,Sn=Pe.keyEntities,an=Pe.disabled,rn=Pe.dragging,zn=Pe.dragOverNodeKey,kn=Pe.dropPosition,mn=Pe.motion,ei=Pe.height,Pi=Pe.itemHeight,Hn=Pe.virtual,bn=Pe.focusable,wi=Pe.activeItem,Zi=Pe.focused,Hi=Pe.tabIndex,rr=Pe.onKeyDown,_r=Pe.onFocus,gi=Pe.onBlur,di=Pe.onActiveChange,xi=Pe.onListChangeStart,$i=Pe.onListChangeEnd,Ri=(0,Ee.Z)(Pe,Ot),Kr=ee.useRef(null),Sr=ee.useRef(null);ee.useImperativeHandle(Ae,function(){return{scrollTo:function(sn){Kr.current.scrollTo(sn)},getIndentWidth:function(){return Sr.current.offsetWidth}}});var Ne=ee.useState(at),Ci=(0,ve.Z)(Ne,2),wr=Ci[0],Pn=Ci[1],Si=ee.useState(xe),Wi=(0,ve.Z)(Si,2),qi=Wi[0],$n=Wi[1],qn=ee.useState(xe),Zt=(0,ve.Z)(qn,2),$t=Zt[0],Qe=Zt[1],on=ee.useState([]),cn=(0,ve.Z)(on,2),At=cn[0],ht=cn[1],en=ee.useState(null),fn=(0,ve.Z)(en,2),Rn=fn[0],Qn=fn[1],Et=ee.useRef(xe);Et.current=xe;function wn(){var tn=Et.current;$n(tn),Qe(tn),ht([]),Qn(null),$i()}(0,Be.Z)(function(){Pn(at);var tn=Tt(wr,at);if(tn.key!==null)if(tn.add){var sn=qi.findIndex(function(Li){var sr=Li.key;return sr===tn.key}),In=yn(xt(qi,xe,tn.key),Hn,ei,Pi),Oi=qi.slice();Oi.splice(sn+1,0,vn),Qe(Oi),ht(In),Qn("show")}else{var Di=xe.findIndex(function(Li){var sr=Li.key;return sr===tn.key}),vi=yn(xt(xe,qi,tn.key),Hn,ei,Pi),Ti=xe.slice();Ti.splice(Di+1,0,vn),Qe(Ti),ht(vi),Qn("hide")}else qi!==xe&&($n(xe),Qe(xe))},[at,xe]),ee.useEffect(function(){rn||wn()},[rn]);var Kn=mn?$t:xe,Ei={expandedKeys:at,selectedKeys:qe,loadedKeys:Bt,loadingKeys:ft,checkedKeys:Lt,halfCheckedKeys:Gt,dragOverNodeKey:zn,dropPosition:kn,keyEntities:Sn};return ee.createElement(ee.Fragment,null,Zi&&wi&&ee.createElement("span",{style:Wt,"aria-live":"assertive"},qt(wi)),ee.createElement("div",null,ee.createElement("input",{style:Wt,disabled:bn===!1||an,tabIndex:bn!==!1?Hi:null,onKeyDown:rr,onFocus:_r,onBlur:gi,value:"",onChange:Dt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Oe,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Oe,"-indent")},ee.createElement("div",{ref:Sr,className:"".concat(Oe,"-indent-unit")}))),ee.createElement(Le.Z,(0,le.Z)({},Ri,{data:Kn,itemKey:zt,height:ei,fullHeight:!1,virtual:Hn,itemHeight:Pi,prefixCls:"".concat(Oe,"-list"),ref:Kr,onVisibleChange:function(sn,In){var Oi=new Set(sn),Di=In.filter(function(vi){return!Oi.has(vi)});Di.some(function(vi){return zt(vi)===tt})&&wn()}}),function(tn){var sn=tn.pos,In=(0,le.Z)({},(he(tn.data),tn.data)),Oi=tn.title,Di=tn.key,vi=tn.isStart,Ti=tn.isEnd,Li=(0,Ye.km)(Di,sn);delete In.key,delete In.children;var sr=(0,Ye.H8)(Li,Ei);return ee.createElement(ot,(0,le.Z)({},In,sr,{title:Oi,active:!!wi&&Di===wi.key,pos:sn,data:tn.data,isStart:vi,isEnd:Ti,motion:mn,motionNodes:Di===tt?At:null,motionType:Rn,onMotionStart:xi,onMotionEnd:wn,treeNodeRequiredProps:Ei,onMouseMove:function(){di(null)}}))}))});ln.displayName="NodeList";var Gn=ln,un=pe(35654),_n=pe(90782),St=pe(67841),Zn=10,ci=function(Pe){(0,wt.Z)(Oe,Pe);var Ae=(0,$e.Z)(Oe);function Oe(){var xe;(0,Ue.Z)(this,Oe);for(var ct=arguments.length,Mt=new Array(ct),at=0;at<ct;at++)Mt[at]=arguments[at];return xe=Ae.call.apply(Ae,[this].concat(Mt)),xe.destroyed=!1,xe.delayedDragEnterLogic=void 0,xe.loadingRetryTimes={},xe.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,Ye.w$)()},xe.dragStartMousePosition=null,xe.dragNode=void 0,xe.currentMouseOverDroppableNodeKey=null,xe.listRef=ee.createRef(),xe.onNodeDragStart=function(qe,Lt){var Bt=xe.state,ft=Bt.expandedKeys,Gt=Bt.keyEntities,Sn=xe.props.onDragStart,an=Lt.props.eventKey;xe.dragNode=Lt,xe.dragStartMousePosition={x:qe.clientX,y:qe.clientY};var rn=(0,un._5)(ft,an);xe.setState({draggingNodeKey:an,dragChildrenKeys:(0,un.wA)(an,Gt),indent:xe.listRef.current.getIndentWidth()}),xe.setExpandedKeys(rn),window.addEventListener("dragend",xe.onWindowDragEnd),Sn==null||Sn({event:qe,node:(0,Ye.F)(Lt.props)})},xe.onNodeDragEnter=function(qe,Lt){var Bt=xe.state,ft=Bt.expandedKeys,Gt=Bt.keyEntities,Sn=Bt.dragChildrenKeys,an=Bt.flattenNodes,rn=Bt.indent,zn=xe.props,kn=zn.onDragEnter,mn=zn.onExpand,ei=zn.allowDrop,Pi=zn.direction,Hn=Lt.props,bn=Hn.pos,wi=Hn.eventKey,Zi=(0,Ct.Z)(xe),Hi=Zi.dragNode;if(xe.currentMouseOverDroppableNodeKey!==wi&&(xe.currentMouseOverDroppableNodeKey=wi),!Hi){xe.resetDragState();return}var rr=(0,un.OM)(qe,Hi,Lt,rn,xe.dragStartMousePosition,ei,an,Gt,ft,Pi),_r=rr.dropPosition,gi=rr.dropLevelOffset,di=rr.dropTargetKey,xi=rr.dropContainerKey,$i=rr.dropTargetPos,Ri=rr.dropAllowed,Kr=rr.dragOverNodeKey;if(Sn.indexOf(di)!==-1||!Ri){xe.resetDragState();return}if(xe.delayedDragEnterLogic||(xe.delayedDragEnterLogic={}),Object.keys(xe.delayedDragEnterLogic).forEach(function(Sr){clearTimeout(xe.delayedDragEnterLogic[Sr])}),Hi.props.eventKey!==Lt.props.eventKey&&(qe.persist(),xe.delayedDragEnterLogic[bn]=window.setTimeout(function(){if(xe.state.draggingNodeKey!==null){var Sr=(0,Ge.Z)(ft),Ne=(0,St.Z)(Gt,Lt.props.eventKey);Ne&&(Ne.children||[]).length&&(Sr=(0,un.L0)(ft,Lt.props.eventKey)),"expandedKeys"in xe.props||xe.setExpandedKeys(Sr),mn==null||mn(Sr,{node:(0,Ye.F)(Lt.props),expanded:!0,nativeEvent:qe.nativeEvent})}},800)),Hi.props.eventKey===di&&gi===0){xe.resetDragState();return}xe.setState({dragOverNodeKey:Kr,dropPosition:_r,dropLevelOffset:gi,dropTargetKey:di,dropContainerKey:xi,dropTargetPos:$i,dropAllowed:Ri}),kn==null||kn({event:qe,node:(0,Ye.F)(Lt.props),expandedKeys:ft})},xe.onNodeDragOver=function(qe,Lt){var Bt=xe.state,ft=Bt.dragChildrenKeys,Gt=Bt.flattenNodes,Sn=Bt.keyEntities,an=Bt.expandedKeys,rn=Bt.indent,zn=xe.props,kn=zn.onDragOver,mn=zn.allowDrop,ei=zn.direction,Pi=(0,Ct.Z)(xe),Hn=Pi.dragNode;if(Hn){var bn=(0,un.OM)(qe,Hn,Lt,rn,xe.dragStartMousePosition,mn,Gt,Sn,an,ei),wi=bn.dropPosition,Zi=bn.dropLevelOffset,Hi=bn.dropTargetKey,rr=bn.dropContainerKey,_r=bn.dropAllowed,gi=bn.dropTargetPos,di=bn.dragOverNodeKey;ft.indexOf(Hi)!==-1||!_r||(Hn.props.eventKey===Hi&&Zi===0?xe.state.dropPosition===null&&xe.state.dropLevelOffset===null&&xe.state.dropTargetKey===null&&xe.state.dropContainerKey===null&&xe.state.dropTargetPos===null&&xe.state.dropAllowed===!1&&xe.state.dragOverNodeKey===null||xe.resetDragState():wi===xe.state.dropPosition&&Zi===xe.state.dropLevelOffset&&Hi===xe.state.dropTargetKey&&rr===xe.state.dropContainerKey&&gi===xe.state.dropTargetPos&&_r===xe.state.dropAllowed&&di===xe.state.dragOverNodeKey||xe.setState({dropPosition:wi,dropLevelOffset:Zi,dropTargetKey:Hi,dropContainerKey:rr,dropTargetPos:gi,dropAllowed:_r,dragOverNodeKey:di}),kn==null||kn({event:qe,node:(0,Ye.F)(Lt.props)}))}},xe.onNodeDragLeave=function(qe,Lt){xe.currentMouseOverDroppableNodeKey===Lt.props.eventKey&&!qe.currentTarget.contains(qe.relatedTarget)&&(xe.resetDragState(),xe.currentMouseOverDroppableNodeKey=null);var Bt=xe.props.onDragLeave;Bt==null||Bt({event:qe,node:(0,Ye.F)(Lt.props)})},xe.onWindowDragEnd=function(qe){xe.onNodeDragEnd(qe,null,!0),window.removeEventListener("dragend",xe.onWindowDragEnd)},xe.onNodeDragEnd=function(qe,Lt){var Bt=xe.props.onDragEnd;xe.setState({dragOverNodeKey:null}),xe.cleanDragState(),Bt==null||Bt({event:qe,node:(0,Ye.F)(Lt.props)}),xe.dragNode=null,window.removeEventListener("dragend",xe.onWindowDragEnd)},xe.onNodeDrop=function(qe,Lt){var Bt,ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Gt=xe.state,Sn=Gt.dragChildrenKeys,an=Gt.dropPosition,rn=Gt.dropTargetKey,zn=Gt.dropTargetPos,kn=Gt.dropAllowed;if(kn){var mn=xe.props.onDrop;if(xe.setState({dragOverNodeKey:null}),xe.cleanDragState(),rn!==null){var ei=(0,ut.Z)((0,ut.Z)({},(0,Ye.H8)(rn,xe.getTreeNodeRequiredProps())),{},{active:((Bt=xe.getActiveItem())===null||Bt===void 0?void 0:Bt.key)===rn,data:(0,St.Z)(xe.state.keyEntities,rn).node}),Pi=Sn.indexOf(rn)!==-1;(0,te.ZP)(!Pi,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Hn=(0,un.yx)(zn),bn={event:qe,node:(0,Ye.F)(ei),dragNode:xe.dragNode?(0,Ye.F)(xe.dragNode.props):null,dragNodesKeys:[xe.dragNode.props.eventKey].concat(Sn),dropToGap:an!==0,dropPosition:an+Number(Hn[Hn.length-1])};ft||mn==null||mn(bn),xe.dragNode=null}}},xe.cleanDragState=function(){var qe=xe.state.draggingNodeKey;qe!==null&&xe.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),xe.dragStartMousePosition=null,xe.currentMouseOverDroppableNodeKey=null},xe.triggerExpandActionExpand=function(qe,Lt){var Bt=xe.state,ft=Bt.expandedKeys,Gt=Bt.flattenNodes,Sn=Lt.expanded,an=Lt.key,rn=Lt.isLeaf;if(!(rn||qe.shiftKey||qe.metaKey||qe.ctrlKey)){var zn=Gt.filter(function(mn){return mn.key===an})[0],kn=(0,Ye.F)((0,ut.Z)((0,ut.Z)({},(0,Ye.H8)(an,xe.getTreeNodeRequiredProps())),{},{data:zn.data}));xe.setExpandedKeys(Sn?(0,un._5)(ft,an):(0,un.L0)(ft,an)),xe.onNodeExpand(qe,kn)}},xe.onNodeClick=function(qe,Lt){var Bt=xe.props,ft=Bt.onClick,Gt=Bt.expandAction;Gt==="click"&&xe.triggerExpandActionExpand(qe,Lt),ft==null||ft(qe,Lt)},xe.onNodeDoubleClick=function(qe,Lt){var Bt=xe.props,ft=Bt.onDoubleClick,Gt=Bt.expandAction;Gt==="doubleClick"&&xe.triggerExpandActionExpand(qe,Lt),ft==null||ft(qe,Lt)},xe.onNodeSelect=function(qe,Lt){var Bt=xe.state.selectedKeys,ft=xe.state,Gt=ft.keyEntities,Sn=ft.fieldNames,an=xe.props,rn=an.onSelect,zn=an.multiple,kn=Lt.selected,mn=Lt[Sn.key],ei=!kn;ei?zn?Bt=(0,un.L0)(Bt,mn):Bt=[mn]:Bt=(0,un._5)(Bt,mn);var Pi=Bt.map(function(Hn){var bn=(0,St.Z)(Gt,Hn);return bn?bn.node:null}).filter(function(Hn){return Hn});xe.setUncontrolledState({selectedKeys:Bt}),rn==null||rn(Bt,{event:"select",selected:ei,node:Lt,selectedNodes:Pi,nativeEvent:qe.nativeEvent})},xe.onNodeCheck=function(qe,Lt,Bt){var ft=xe.state,Gt=ft.keyEntities,Sn=ft.checkedKeys,an=ft.halfCheckedKeys,rn=xe.props,zn=rn.checkStrictly,kn=rn.onCheck,mn=Lt.key,ei,Pi={event:"check",node:Lt,checked:Bt,nativeEvent:qe.nativeEvent};if(zn){var Hn=Bt?(0,un.L0)(Sn,mn):(0,un._5)(Sn,mn),bn=(0,un._5)(an,mn);ei={checked:Hn,halfChecked:bn},Pi.checkedNodes=Hn.map(function(gi){return(0,St.Z)(Gt,gi)}).filter(function(gi){return gi}).map(function(gi){return gi.node}),xe.setUncontrolledState({checkedKeys:Hn})}else{var wi=(0,_n.S)([].concat((0,Ge.Z)(Sn),[mn]),!0,Gt),Zi=wi.checkedKeys,Hi=wi.halfCheckedKeys;if(!Bt){var rr=new Set(Zi);rr.delete(mn);var _r=(0,_n.S)(Array.from(rr),{checked:!1,halfCheckedKeys:Hi},Gt);Zi=_r.checkedKeys,Hi=_r.halfCheckedKeys}ei=Zi,Pi.checkedNodes=[],Pi.checkedNodesPositions=[],Pi.halfCheckedKeys=Hi,Zi.forEach(function(gi){var di=(0,St.Z)(Gt,gi);if(di){var xi=di.node,$i=di.pos;Pi.checkedNodes.push(xi),Pi.checkedNodesPositions.push({node:xi,pos:$i})}}),xe.setUncontrolledState({checkedKeys:Zi},!1,{halfCheckedKeys:Hi})}kn==null||kn(ei,Pi)},xe.onNodeLoad=function(qe){var Lt=qe.key,Bt=new Promise(function(ft,Gt){xe.setState(function(Sn){var an=Sn.loadedKeys,rn=an===void 0?[]:an,zn=Sn.loadingKeys,kn=zn===void 0?[]:zn,mn=xe.props,ei=mn.loadData,Pi=mn.onLoad;if(!ei||rn.indexOf(Lt)!==-1||kn.indexOf(Lt)!==-1)return null;var Hn=ei(qe);return Hn.then(function(){var bn=xe.state.loadedKeys,wi=(0,un.L0)(bn,Lt);Pi==null||Pi(wi,{event:"load",node:qe}),xe.setUncontrolledState({loadedKeys:wi}),xe.setState(function(Zi){return{loadingKeys:(0,un._5)(Zi.loadingKeys,Lt)}}),ft()}).catch(function(bn){if(xe.setState(function(Zi){return{loadingKeys:(0,un._5)(Zi.loadingKeys,Lt)}}),xe.loadingRetryTimes[Lt]=(xe.loadingRetryTimes[Lt]||0)+1,xe.loadingRetryTimes[Lt]>=Zn){var wi=xe.state.loadedKeys;(0,te.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),xe.setUncontrolledState({loadedKeys:(0,un.L0)(wi,Lt)}),ft()}Gt(bn)}),{loadingKeys:(0,un.L0)(kn,Lt)}})});return Bt.catch(function(){}),Bt},xe.onNodeMouseEnter=function(qe,Lt){var Bt=xe.props.onMouseEnter;Bt==null||Bt({event:qe,node:Lt})},xe.onNodeMouseLeave=function(qe,Lt){var Bt=xe.props.onMouseLeave;Bt==null||Bt({event:qe,node:Lt})},xe.onNodeContextMenu=function(qe,Lt){var Bt=xe.props.onRightClick;Bt&&(qe.preventDefault(),Bt({event:qe,node:Lt}))},xe.onFocus=function(){var qe=xe.props.onFocus;xe.setState({focused:!0});for(var Lt=arguments.length,Bt=new Array(Lt),ft=0;ft<Lt;ft++)Bt[ft]=arguments[ft];qe==null||qe.apply(void 0,Bt)},xe.onBlur=function(){var qe=xe.props.onBlur;xe.setState({focused:!1}),xe.onActiveChange(null);for(var Lt=arguments.length,Bt=new Array(Lt),ft=0;ft<Lt;ft++)Bt[ft]=arguments[ft];qe==null||qe.apply(void 0,Bt)},xe.getTreeNodeRequiredProps=function(){var qe=xe.state,Lt=qe.expandedKeys,Bt=qe.selectedKeys,ft=qe.loadedKeys,Gt=qe.loadingKeys,Sn=qe.checkedKeys,an=qe.halfCheckedKeys,rn=qe.dragOverNodeKey,zn=qe.dropPosition,kn=qe.keyEntities;return{expandedKeys:Lt||[],selectedKeys:Bt||[],loadedKeys:ft||[],loadingKeys:Gt||[],checkedKeys:Sn||[],halfCheckedKeys:an||[],dragOverNodeKey:rn,dropPosition:zn,keyEntities:kn}},xe.setExpandedKeys=function(qe){var Lt=xe.state,Bt=Lt.treeData,ft=Lt.fieldNames,Gt=(0,Ye.oH)(Bt,qe,ft);xe.setUncontrolledState({expandedKeys:qe,flattenNodes:Gt},!0)},xe.onNodeExpand=function(qe,Lt){var Bt=xe.state.expandedKeys,ft=xe.state,Gt=ft.listChanging,Sn=ft.fieldNames,an=xe.props,rn=an.onExpand,zn=an.loadData,kn=Lt.expanded,mn=Lt[Sn.key];if(!Gt){var ei=Bt.indexOf(mn),Pi=!kn;if((0,te.ZP)(kn&&ei!==-1||!kn&&ei===-1,"Expand state not sync with index check"),Pi?Bt=(0,un.L0)(Bt,mn):Bt=(0,un._5)(Bt,mn),xe.setExpandedKeys(Bt),rn==null||rn(Bt,{node:Lt,expanded:Pi,nativeEvent:qe.nativeEvent}),Pi&&zn){var Hn=xe.onNodeLoad(Lt);Hn&&Hn.then(function(){var bn=(0,Ye.oH)(xe.state.treeData,Bt,Sn);xe.setUncontrolledState({flattenNodes:bn})}).catch(function(){var bn=xe.state.expandedKeys,wi=(0,un._5)(bn,mn);xe.setExpandedKeys(wi)})}}},xe.onListChangeStart=function(){xe.setUncontrolledState({listChanging:!0})},xe.onListChangeEnd=function(){setTimeout(function(){xe.setUncontrolledState({listChanging:!1})})},xe.onActiveChange=function(qe){var Lt=xe.state.activeKey,Bt=xe.props.onActiveChange;Lt!==qe&&(xe.setState({activeKey:qe}),qe!==null&&xe.scrollTo({key:qe}),Bt==null||Bt(qe))},xe.getActiveItem=function(){var qe=xe.state,Lt=qe.activeKey,Bt=qe.flattenNodes;return Lt===null?null:Bt.find(function(ft){var Gt=ft.key;return Gt===Lt})||null},xe.offsetActiveKey=function(qe){var Lt=xe.state,Bt=Lt.flattenNodes,ft=Lt.activeKey,Gt=Bt.findIndex(function(rn){var zn=rn.key;return zn===ft});Gt===-1&&qe<0&&(Gt=Bt.length),Gt=(Gt+qe+Bt.length)%Bt.length;var Sn=Bt[Gt];if(Sn){var an=Sn.key;xe.onActiveChange(an)}else xe.onActiveChange(null)},xe.onKeyDown=function(qe){var Lt=xe.state,Bt=Lt.activeKey,ft=Lt.expandedKeys,Gt=Lt.checkedKeys,Sn=Lt.fieldNames,an=xe.props,rn=an.onKeyDown,zn=an.checkable,kn=an.selectable;switch(qe.which){case vt.Z.UP:{xe.offsetActiveKey(-1),qe.preventDefault();break}case vt.Z.DOWN:{xe.offsetActiveKey(1),qe.preventDefault();break}}var mn=xe.getActiveItem();if(mn&&mn.data){var ei=xe.getTreeNodeRequiredProps(),Pi=mn.data.isLeaf===!1||!!(mn.data[Sn.children]||[]).length,Hn=(0,Ye.F)((0,ut.Z)((0,ut.Z)({},(0,Ye.H8)(Bt,ei)),{},{data:mn.data,active:!0}));switch(qe.which){case vt.Z.LEFT:{Pi&&ft.includes(Bt)?xe.onNodeExpand({},Hn):mn.parent&&xe.onActiveChange(mn.parent.key),qe.preventDefault();break}case vt.Z.RIGHT:{Pi&&!ft.includes(Bt)?xe.onNodeExpand({},Hn):mn.children&&mn.children.length&&xe.onActiveChange(mn.children[0].key),qe.preventDefault();break}case vt.Z.ENTER:case vt.Z.SPACE:{zn&&!Hn.disabled&&Hn.checkable!==!1&&!Hn.disableCheckbox?xe.onNodeCheck({},Hn,!Gt.includes(Bt)):!zn&&kn&&!Hn.disabled&&Hn.selectable!==!1&&xe.onNodeSelect({},Hn);break}}}rn==null||rn(qe)},xe.setUncontrolledState=function(qe){var Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!xe.destroyed){var ft=!1,Gt=!0,Sn={};Object.keys(qe).forEach(function(an){if(an in xe.props){Gt=!1;return}ft=!0,Sn[an]=qe[an]}),ft&&(!Lt||Gt)&&xe.setState((0,ut.Z)((0,ut.Z)({},Sn),Bt))}},xe.scrollTo=function(qe){xe.listRef.current.scrollTo(qe)},xe}return(0,Me.Z)(Oe,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var ct=this.props.activeKey;ct!==void 0&&ct!==this.state.activeKey&&(this.setState({activeKey:ct}),ct!==null&&this.scrollTo({key:ct}))}},{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 ct,Mt=this.state,at=Mt.focused,qe=Mt.flattenNodes,Lt=Mt.keyEntities,Bt=Mt.draggingNodeKey,ft=Mt.activeKey,Gt=Mt.dropLevelOffset,Sn=Mt.dropContainerKey,an=Mt.dropTargetKey,rn=Mt.dropPosition,zn=Mt.dragOverNodeKey,kn=Mt.indent,mn=this.props,ei=mn.prefixCls,Pi=mn.className,Hn=mn.style,bn=mn.showLine,wi=mn.focusable,Zi=mn.tabIndex,Hi=Zi===void 0?0:Zi,rr=mn.selectable,_r=mn.showIcon,gi=mn.icon,di=mn.switcherIcon,xi=mn.draggable,$i=mn.checkable,Ri=mn.checkStrictly,Kr=mn.disabled,Sr=mn.motion,Ne=mn.loadData,Ci=mn.filterTreeNode,wr=mn.height,Pn=mn.itemHeight,Si=mn.virtual,Wi=mn.titleRender,qi=mn.dropIndicatorRender,$n=mn.onContextMenu,qn=mn.onScroll,Zt=mn.direction,$t=mn.rootClassName,Qe=mn.rootStyle,on=(0,Ie.Z)(this.props,{aria:!0,data:!0}),cn;return xi&&((0,We.Z)(xi)==="object"?cn=xi:typeof xi=="function"?cn={nodeDraggable:xi}:cn={}),ee.createElement(de.k.Provider,{value:{prefixCls:ei,selectable:rr,showIcon:_r,icon:gi,switcherIcon:di,draggable:cn,draggingNodeKey:Bt,checkable:$i,checkStrictly:Ri,disabled:Kr,keyEntities:Lt,dropLevelOffset:Gt,dropContainerKey:Sn,dropTargetKey:an,dropPosition:rn,dragOverNodeKey:zn,indent:kn,direction:Zt,dropIndicatorRender:qi,loadData:Ne,filterTreeNode:Ci,titleRender:Wi,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:lt()(ei,Pi,$t,(ct={},(0,ke.Z)(ct,"".concat(ei,"-show-line"),bn),(0,ke.Z)(ct,"".concat(ei,"-focused"),at),(0,ke.Z)(ct,"".concat(ei,"-active-focused"),ft!==null),ct)),style:Qe},ee.createElement(Gn,(0,le.Z)({ref:this.listRef,prefixCls:ei,style:Hn,data:qe,disabled:Kr,selectable:rr,checkable:!!$i,motion:Sr,dragging:Bt!==null,height:wr,itemHeight:Pn,virtual:Si,focusable:wi,focused:at,tabIndex:Hi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:$n,onScroll:qn},this.getTreeNodeRequiredProps(),on))))}}],[{key:"getDerivedStateFromProps",value:function(ct,Mt){var at=Mt.prevProps,qe={prevProps:ct};function Lt(wi){return!at&&wi in ct||at&&at[wi]!==ct[wi]}var Bt,ft=Mt.fieldNames;if(Lt("fieldNames")&&(ft=(0,Ye.w$)(ct.fieldNames),qe.fieldNames=ft),Lt("treeData")?Bt=ct.treeData:Lt("children")&&((0,te.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Bt=(0,Ye.zn)(ct.children)),Bt){qe.treeData=Bt;var Gt=(0,Ye.I8)(Bt,{fieldNames:ft});qe.keyEntities=(0,ut.Z)((0,ke.Z)({},tt,_t),Gt.keyEntities)}var Sn=qe.keyEntities||Mt.keyEntities;if(Lt("expandedKeys")||at&&Lt("autoExpandParent"))qe.expandedKeys=ct.autoExpandParent||!at&&ct.defaultExpandParent?(0,un.r7)(ct.expandedKeys,Sn):ct.expandedKeys;else if(!at&&ct.defaultExpandAll){var an=(0,ut.Z)({},Sn);delete an[tt],qe.expandedKeys=Object.keys(an).map(function(wi){return an[wi].key})}else!at&&ct.defaultExpandedKeys&&(qe.expandedKeys=ct.autoExpandParent||ct.defaultExpandParent?(0,un.r7)(ct.defaultExpandedKeys,Sn):ct.defaultExpandedKeys);if(qe.expandedKeys||delete qe.expandedKeys,Bt||qe.expandedKeys){var rn=(0,Ye.oH)(Bt||Mt.treeData,qe.expandedKeys||Mt.expandedKeys,ft);qe.flattenNodes=rn}if(ct.selectable&&(Lt("selectedKeys")?qe.selectedKeys=(0,un.BT)(ct.selectedKeys,ct):!at&&ct.defaultSelectedKeys&&(qe.selectedKeys=(0,un.BT)(ct.defaultSelectedKeys,ct))),ct.checkable){var zn;if(Lt("checkedKeys")?zn=(0,un.E6)(ct.checkedKeys)||{}:!at&&ct.defaultCheckedKeys?zn=(0,un.E6)(ct.defaultCheckedKeys)||{}:Bt&&(zn=(0,un.E6)(ct.checkedKeys)||{checkedKeys:Mt.checkedKeys,halfCheckedKeys:Mt.halfCheckedKeys}),zn){var kn=zn,mn=kn.checkedKeys,ei=mn===void 0?[]:mn,Pi=kn.halfCheckedKeys,Hn=Pi===void 0?[]:Pi;if(!ct.checkStrictly){var bn=(0,_n.S)(ei,!0,Sn);ei=bn.checkedKeys,Hn=bn.halfCheckedKeys}qe.checkedKeys=ei,qe.halfCheckedKeys=Hn}}return Lt("loadedKeys")&&(qe.loadedKeys=ct.loadedKeys),qe}}]),Oe}(ee.Component);ci.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},ci.TreeNode=je.Z;var Ze=ci,be=Ze},35654:function(On,pn,pe){"use strict";pe.d(pn,{BT:function(){return ee},E6:function(){return he},L0:function(){return $e},OM:function(){return te},_5:function(){return wt},r7:function(){return ve},wA:function(){return lt},yx:function(){return Ft}});var le=pe(19127),ke=pe(20135),We=pe(48736),ut=pe(59301),Ge=pe(39417),Ue=pe(67841),Me=pe(71430),Ct=null;function wt(Ee,Be){if(!Ee)return[];var Le=Ee.slice(),ze=Le.indexOf(Be);return ze>=0&&Le.splice(ze,1),Le}function $e(Ee,Be){var Le=(Ee||[]).slice();return Le.indexOf(Be)===-1&&Le.push(Be),Le}function Ft(Ee){return Ee.split("-")}function lt(Ee,Be){var Le=[],ze=(0,Ue.Z)(Be,Ee);function je(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Xe.forEach(function(Ye){var dt=Ye.key,He=Ye.children;Le.push(dt),je(He)})}return je(ze.children),Le}function vt(Ee){if(Ee.parent){var Be=Ft(Ee.pos);return Number(Be[Be.length-1])===Ee.parent.children.length-1}return!1}function Ie(Ee){var Be=Ft(Ee.pos);return Number(Be[Be.length-1])===0}function te(Ee,Be,Le,ze,je,Xe,Ye,dt,He,Nt){var ot,Tt=Ee.clientX,xt=Ee.clientY,Ot=Ee.target.getBoundingClientRect(),Wt=Ot.top,Dt=Ot.height,tt=(Nt==="rtl"?-1:1)*(((je==null?void 0:je.x)||0)-Tt),Ve=(tt-12)/ze,_t=(0,Ue.Z)(dt,Le.props.eventKey);if(xt<Wt+Dt/2){var vn=Ye.findIndex(function(be){return be.key===_t.key}),yn=vn<=0?0:vn-1,zt=Ye[yn].key;_t=(0,Ue.Z)(dt,zt)}var qt=_t.key,ln=_t,Gn=_t.key,un=0,_n=0;if(!He.includes(qt))for(var St=0;St<Ve&&vt(_t);St+=1)_t=_t.parent,_n+=1;var Zn=Be.props.data,ci=_t.node,Ze=!0;return Ie(_t)&&_t.level===0&&xt<Wt+Dt/2&&Xe({dragNode:Zn,dropNode:ci,dropPosition:-1})&&_t.key===Le.props.eventKey?un=-1:(ln.children||[]).length&&He.includes(Gn)?Xe({dragNode:Zn,dropNode:ci,dropPosition:0})?un=0:Ze=!1:_n===0?Ve>-1.5?Xe({dragNode:Zn,dropNode:ci,dropPosition:1})?un=1:Ze=!1:Xe({dragNode:Zn,dropNode:ci,dropPosition:0})?un=0:Xe({dragNode:Zn,dropNode:ci,dropPosition:1})?un=1:Ze=!1:Xe({dragNode:Zn,dropNode:ci,dropPosition:1})?un=1:Ze=!1,{dropPosition:un,dropLevelOffset:_n,dropTargetKey:_t.key,dropTargetPos:_t.pos,dragOverNodeKey:Gn,dropContainerKey:un===0?null:((ot=_t.parent)===null||ot===void 0?void 0:ot.key)||null,dropAllowed:Ze}}function ee(Ee,Be){if(Ee){var Le=Be.multiple;return Le?Ee.slice():Ee.length?[Ee[0]]:Ee}}var de=function(Be){return Be};function se(Ee,Be){if(!Ee)return[];var Le=Be||{},ze=Le.processProps,je=ze===void 0?de:ze,Xe=Array.isArray(Ee)?Ee:[Ee];return Xe.map(function(Ye){var dt=Ye.children,He=_objectWithoutProperties(Ye,Ct),Nt=se(dt,Be);return React.createElement(TreeNode,_extends({key:He.key},je(He)),Nt)})}function he(Ee){if(!Ee)return null;var Be;if(Array.isArray(Ee))Be={checkedKeys:Ee,halfCheckedKeys:void 0};else if((0,ke.Z)(Ee)==="object")Be={checkedKeys:Ee.checked||void 0,halfCheckedKeys:Ee.halfChecked||void 0};else return(0,We.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Be}function ve(Ee,Be){var Le=new Set;function ze(je){if(!Le.has(je)){var Xe=(0,Ue.Z)(Be,je);if(Xe){Le.add(je);var Ye=Xe.parent,dt=Xe.node;dt.disabled||Ye&&ze(Ye.key)}}}return(Ee||[]).forEach(function(je){ze(je)}),(0,le.Z)(Le)}},90782:function(On,pn,pe){"use strict";pe.d(pn,{S:function(){return Me}});var le=pe(48736),ke=pe(67841);function We(Ct,wt){var $e=new Set;return Ct.forEach(function(Ft){wt.has(Ft)||$e.add(Ft)}),$e}function ut(Ct){var wt=Ct||{},$e=wt.disabled,Ft=wt.disableCheckbox,lt=wt.checkable;return!!($e||Ft)||lt===!1}function Ge(Ct,wt,$e,Ft){for(var lt=new Set(Ct),vt=new Set,Ie=0;Ie<=$e;Ie+=1){var te=wt.get(Ie)||new Set;te.forEach(function(he){var ve=he.key,Ee=he.node,Be=he.children,Le=Be===void 0?[]:Be;lt.has(ve)&&!Ft(Ee)&&Le.filter(function(ze){return!Ft(ze.node)}).forEach(function(ze){lt.add(ze.key)})})}for(var ee=new Set,de=$e;de>=0;de-=1){var se=wt.get(de)||new Set;se.forEach(function(he){var ve=he.parent,Ee=he.node;if(!(Ft(Ee)||!he.parent||ee.has(he.parent.key))){if(Ft(he.parent.node)){ee.add(ve.key);return}var Be=!0,Le=!1;(ve.children||[]).filter(function(ze){return!Ft(ze.node)}).forEach(function(ze){var je=ze.key,Xe=lt.has(je);Be&&!Xe&&(Be=!1),!Le&&(Xe||vt.has(je))&&(Le=!0)}),Be&&lt.add(ve.key),Le&&vt.add(ve.key),ee.add(ve.key)}})}return{checkedKeys:Array.from(lt),halfCheckedKeys:Array.from(We(vt,lt))}}function Ue(Ct,wt,$e,Ft,lt){for(var vt=new Set(Ct),Ie=new Set(wt),te=0;te<=Ft;te+=1){var ee=$e.get(te)||new Set;ee.forEach(function(ve){var Ee=ve.key,Be=ve.node,Le=ve.children,ze=Le===void 0?[]:Le;!vt.has(Ee)&&!Ie.has(Ee)&&!lt(Be)&&ze.filter(function(je){return!lt(je.node)}).forEach(function(je){vt.delete(je.key)})})}Ie=new Set;for(var de=new Set,se=Ft;se>=0;se-=1){var he=$e.get(se)||new Set;he.forEach(function(ve){var Ee=ve.parent,Be=ve.node;if(!(lt(Be)||!ve.parent||de.has(ve.parent.key))){if(lt(ve.parent.node)){de.add(Ee.key);return}var Le=!0,ze=!1;(Ee.children||[]).filter(function(je){return!lt(je.node)}).forEach(function(je){var Xe=je.key,Ye=vt.has(Xe);Le&&!Ye&&(Le=!1),!ze&&(Ye||Ie.has(Xe))&&(ze=!0)}),Le||vt.delete(Ee.key),ze&&Ie.add(Ee.key),de.add(Ee.key)}})}return{checkedKeys:Array.from(vt),halfCheckedKeys:Array.from(We(Ie,vt))}}function Me(Ct,wt,$e,Ft){var lt=[],vt;Ft?vt=Ft:vt=ut;var Ie=new Set(Ct.filter(function(se){var he=!!(0,ke.Z)($e,se);return he||lt.push(se),he})),te=new Map,ee=0;Object.keys($e).forEach(function(se){var he=$e[se],ve=he.level,Ee=te.get(ve);Ee||(Ee=new Set,te.set(ve,Ee)),Ee.add(he),ee=Math.max(ee,ve)}),(0,le.ZP)(!lt.length,"Tree missing follow keys: ".concat(lt.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var de;return wt===!0?de=Ge(Ie,te,ee,vt):de=Ue(Ie,wt.halfCheckedKeys,te,ee,vt),de}},67841:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return le}});function le(ke,We){return ke[We]}},71430:function(On,pn,pe){"use strict";pe.d(pn,{F:function(){return ve},H8:function(){return he},I8:function(){return se},km:function(){return lt},oH:function(){return ee},w$:function(){return vt},zn:function(){return te}});var le=pe(20135),ke=pe(19127),We=pe(44127),ut=pe(6620),Ge=pe(11592),Ue=pe(2738),Me=pe(48736),Ct=pe(67841),wt=["children"];function $e(Ee,Be){return"".concat(Ee,"-").concat(Be)}function Ft(Ee){return Ee&&Ee.type&&Ee.type.isTreeNode}function lt(Ee,Be){return Ee!=null?Ee:Be}function vt(Ee){var Be=Ee||{},Le=Be.title,ze=Be._title,je=Be.key,Xe=Be.children,Ye=Le||"title";return{title:Ye,_title:ze||[Ye],key:je||"key",children:Xe||"children"}}function Ie(Ee,Be){var Le=new Map;function ze(je){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(je||[]).forEach(function(Ye){var dt=Ye[Be.key],He=Ye[Be.children];warning(dt!=null,"Tree node must have a certain key: [".concat(Xe).concat(dt,"]"));var Nt=String(dt);warning(!Le.has(Nt)||dt===null||dt===void 0,"Same 'key' exist in the Tree: ".concat(Nt)),Le.set(Nt,!0),ze(He,"".concat(Xe).concat(Nt," > "))})}ze(Ee)}function te(Ee){function Be(Le){var ze=(0,Ge.Z)(Le);return ze.map(function(je){if(!Ft(je))return(0,Me.ZP)(!je,"Tree/TreeNode can only accept TreeNode as children."),null;var Xe=je.key,Ye=je.props,dt=Ye.children,He=(0,ut.Z)(Ye,wt),Nt=(0,We.Z)({key:Xe},He),ot=Be(dt);return ot.length&&(Nt.children=ot),Nt}).filter(function(je){return je})}return Be(Ee)}function ee(Ee,Be,Le){var ze=vt(Le),je=ze._title,Xe=ze.key,Ye=ze.children,dt=new Set(Be===!0?[]:Be),He=[];function Nt(ot){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return ot.map(function(xt,Ot){for(var Wt=$e(Tt?Tt.pos:"0",Ot),Dt=lt(xt[Xe],Wt),tt,Ve=0;Ve<je.length;Ve+=1){var _t=je[Ve];if(xt[_t]!==void 0){tt=xt[_t];break}}var vn=(0,We.Z)((0,We.Z)({},(0,Ue.Z)(xt,[].concat((0,ke.Z)(je),[Xe,Ye]))),{},{title:tt,key:Dt,parent:Tt,pos:Wt,children:null,data:xt,isStart:[].concat((0,ke.Z)(Tt?Tt.isStart:[]),[Ot===0]),isEnd:[].concat((0,ke.Z)(Tt?Tt.isEnd:[]),[Ot===ot.length-1])});return He.push(vn),Be===!0||dt.has(Dt)?vn.children=Nt(xt[Ye]||[],vn):vn.children=[],vn})}return Nt(Ee),He}function de(Ee,Be,Le){var ze={};(0,le.Z)(Le)==="object"?ze=Le:ze={externalGetKey:Le},ze=ze||{};var je=ze,Xe=je.childrenPropName,Ye=je.externalGetKey,dt=je.fieldNames,He=vt(dt),Nt=He.key,ot=He.children,Tt=Xe||ot,xt;Ye?typeof Ye=="string"?xt=function(Dt){return Dt[Ye]}:typeof Ye=="function"&&(xt=function(Dt){return Ye(Dt)}):xt=function(Dt,tt){return lt(Dt[Nt],tt)};function Ot(Wt,Dt,tt,Ve){var _t=Wt?Wt[Tt]:Ee,vn=Wt?$e(tt.pos,Dt):"0",yn=Wt?[].concat((0,ke.Z)(Ve),[Wt]):[];if(Wt){var zt=xt(Wt,vn),qt={node:Wt,index:Dt,pos:vn,key:zt,parentPos:tt.node?tt.pos:null,level:tt.level+1,nodes:yn};Be(qt)}_t&&_t.forEach(function(ln,Gn){Ot(ln,Gn,{node:Wt,pos:vn,level:tt?tt.level+1:-1},yn)})}Ot(null)}function se(Ee){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=Be.initWrapper,ze=Be.processEntity,je=Be.onProcessFinished,Xe=Be.externalGetKey,Ye=Be.childrenPropName,dt=Be.fieldNames,He=arguments.length>2?arguments[2]:void 0,Nt=Xe||He,ot={},Tt={},xt={posEntities:ot,keyEntities:Tt};return Le&&(xt=Le(xt)||xt),de(Ee,function(Ot){var Wt=Ot.node,Dt=Ot.index,tt=Ot.pos,Ve=Ot.key,_t=Ot.parentPos,vn=Ot.level,yn=Ot.nodes,zt={node:Wt,nodes:yn,index:Dt,key:Ve,pos:tt,level:vn},qt=lt(Ve,tt);ot[tt]=zt,Tt[qt]=zt,zt.parent=ot[_t],zt.parent&&(zt.parent.children=zt.parent.children||[],zt.parent.children.push(zt)),ze&&ze(zt,xt)},{externalGetKey:Nt,childrenPropName:Ye,fieldNames:dt}),je&&je(xt),xt}function he(Ee,Be){var Le=Be.expandedKeys,ze=Be.selectedKeys,je=Be.loadedKeys,Xe=Be.loadingKeys,Ye=Be.checkedKeys,dt=Be.halfCheckedKeys,He=Be.dragOverNodeKey,Nt=Be.dropPosition,ot=Be.keyEntities,Tt=(0,Ct.Z)(ot,Ee),xt={eventKey:Ee,expanded:Le.indexOf(Ee)!==-1,selected:ze.indexOf(Ee)!==-1,loaded:je.indexOf(Ee)!==-1,loading:Xe.indexOf(Ee)!==-1,checked:Ye.indexOf(Ee)!==-1,halfChecked:dt.indexOf(Ee)!==-1,pos:String(Tt?Tt.pos:""),dragOver:He===Ee&&Nt===0,dragOverGapTop:He===Ee&&Nt===-1,dragOverGapBottom:He===Ee&&Nt===1};return xt}function ve(Ee){var Be=Ee.data,Le=Ee.expanded,ze=Ee.selected,je=Ee.checked,Xe=Ee.loaded,Ye=Ee.loading,dt=Ee.halfChecked,He=Ee.dragOver,Nt=Ee.dragOverGapTop,ot=Ee.dragOverGapBottom,Tt=Ee.pos,xt=Ee.active,Ot=Ee.eventKey,Wt=(0,We.Z)((0,We.Z)({},Be),{},{expanded:Le,selected:ze,checked:je,loaded:Xe,loading:Ye,halfChecked:dt,dragOver:He,dragOverGapTop:Nt,dragOverGapBottom:ot,pos:Tt,active:xt,key:Ot});return"props"in Wt||Object.defineProperty(Wt,"props",{get:function(){return(0,Me.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Ee}}),Wt}},8224:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ke}});var le=pe(4676);function ke(We,ut,Ge,Ue){var Me=le.unstable_batchedUpdates?function(wt){le.unstable_batchedUpdates(Ge,wt)}:Ge;return We!=null&&We.addEventListener&&We.addEventListener(ut,Me,Ue),{remove:function(){We!=null&&We.removeEventListener&&We.removeEventListener(ut,Me,Ue)}}}},55468:function(On,pn,pe){"use strict";pe.d(pn,{g1:function(){return Ft},os:function(){return vt}});var le=/margin|padding|width|height|max|min|offset/,ke={left:!0,top:!0},We={cssFloat:1,styleFloat:1,float:1};function ut(Ie){return Ie.nodeType===1?Ie.ownerDocument.defaultView.getComputedStyle(Ie,null):{}}function Ge(Ie,te,ee){if(te=te.toLowerCase(),ee==="auto"){if(te==="height")return Ie.offsetHeight;if(te==="width")return Ie.offsetWidth}return te in ke||(ke[te]=le.test(te)),ke[te]?parseFloat(ee)||0:ee}function Ue(Ie,te){var ee=arguments.length,de=ut(Ie);return te=We[te]?"cssFloat"in Ie.style?"cssFloat":"styleFloat":te,ee===1?de:Ge(Ie,te,de[te]||Ie.style[te])}function Me(Ie,te,ee){var de=arguments.length;if(te=We[te]?"cssFloat"in Ie.style?"cssFloat":"styleFloat":te,de===3)return typeof ee=="number"&&le.test(te)&&(ee="".concat(ee,"px")),Ie.style[te]=ee,ee;for(var se in te)te.hasOwnProperty(se)&&Me(Ie,se,te[se]);return ut(Ie)}function Ct(Ie){return Ie===document.body?document.documentElement.clientWidth:Ie.offsetWidth}function wt(Ie){return Ie===document.body?window.innerHeight||document.documentElement.clientHeight:Ie.offsetHeight}function $e(){var Ie=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),te=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ie,height:te}}function Ft(){var Ie=document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight;return{width:Ie,height:te}}function lt(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function vt(Ie){var te=Ie.getBoundingClientRect(),ee=document.documentElement;return{left:te.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:te.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24514:function(On,pn,pe){"use strict";pe.d(pn,{G:function(){return ut}});var le=pe(47273),ke=function(Ue){if((0,le.Z)()&&window.document.documentElement){var Me=Array.isArray(Ue)?Ue:[Ue],Ct=window.document.documentElement;return Me.some(function(wt){return wt in Ct.style})}return!1},We=function(Ue,Me){if(!ke(Ue))return!1;var Ct=document.createElement("div"),wt=Ct.style[Ue];return Ct.style[Ue]=Me,Ct.style[Ue]!==wt};function ut(Ge,Ue){return!Array.isArray(Ge)&&Ue!==void 0?We(Ge,Ue):ke(Ge)}},24916:function(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return ci}});var le=pe(96663),ke=pe(20135),We=pe(44127),ut=pe(90493),Ge=pe(72071),Ue=pe(6620),Me=pe(92310),Ct=pe.n(Me),wt=pe(29301),$e=pe(70425),Ft=pe(34280),lt=pe(59301),vt=pe(4676),Ie=lt.forwardRef(function(Ze,be){var Pe=Ze.height,Ae=Ze.offsetY,Oe=Ze.offsetX,xe=Ze.children,ct=Ze.prefixCls,Mt=Ze.onInnerResize,at=Ze.innerProps,qe=Ze.rtl,Lt=Ze.extra,Bt={},ft={display:"flex",flexDirection:"column"};return Ae!==void 0&&(Bt={height:Pe,position:"relative",overflow:"hidden"},ft=(0,We.Z)((0,We.Z)({},ft),{},(0,ut.Z)((0,ut.Z)((0,ut.Z)((0,ut.Z)((0,ut.Z)({transform:"translateY(".concat(Ae,"px)")},qe?"marginRight":"marginLeft",-Oe),"position","absolute"),"left",0),"right",0),"top",0))),lt.createElement("div",{style:Bt},lt.createElement(wt.Z,{onResize:function(Sn){var an=Sn.offsetHeight;an&&Mt&&Mt()}},lt.createElement("div",(0,le.Z)({style:ft,className:Ct()((0,ut.Z)({},"".concat(ct,"-holder-inner"),ct)),ref:be},at),xe,Lt)))});Ie.displayName="Filler";var te=Ie;function ee(Ze){var be=Ze.children,Pe=Ze.setRef,Ae=lt.useCallback(function(Oe){Pe(Oe)},[]);return lt.cloneElement(be,{ref:Ae})}function de(Ze,be,Pe,Ae,Oe,xe,ct,Mt){var at=Mt.getKey;return Ze.slice(be,Pe+1).map(function(qe,Lt){var Bt=be+Lt,ft=ct(qe,Bt,{style:{width:Ae},offsetX:Oe}),Gt=at(qe);return lt.createElement(ee,{key:Gt,setRef:function(an){return xe(qe,an)}},ft)})}function se(Ze,be,Pe,Ae){var Oe=Pe-Ze,xe=be-Pe,ct=Math.min(Oe,xe)*2;if(Ae<=ct){var Mt=Math.floor(Ae/2);return Ae%2?Pe+Mt+1:Pe-Mt}return Oe>xe?Pe-(Ae-xe):Pe+(Ae-Oe)}function he(Ze,be,Pe){var Ae=Ze.length,Oe=be.length,xe,ct;if(Ae===0&&Oe===0)return null;Ae<Oe?(xe=Ze,ct=be):(xe=be,ct=Ze);var Mt={__EMPTY_ITEM__:!0};function at(Sn){return Sn!==void 0?Pe(Sn):Mt}for(var qe=null,Lt=Math.abs(Ae-Oe)!==1,Bt=0;Bt<ct.length;Bt+=1){var ft=at(xe[Bt]),Gt=at(ct[Bt]);if(ft!==Gt){qe=Bt,Lt=Lt||ft!==at(ct[Bt+1]);break}}return qe===null?null:{index:qe,multiple:Lt}}function ve(Ze,be,Pe){var Ae=lt.useState(Ze),Oe=(0,Ge.Z)(Ae,2),xe=Oe[0],ct=Oe[1],Mt=lt.useState(null),at=(0,Ge.Z)(Mt,2),qe=at[0],Lt=at[1];return lt.useEffect(function(){var Bt=he(xe||[],Ze||[],be);(Bt==null?void 0:Bt.index)!==void 0&&(Pe==null||Pe(Bt.index),Lt(Ze[Bt.index])),ct(Ze)},[Ze]),[qe]}var Ee=pe(16089),Be=(typeof navigator=="undefined"?"undefined":(0,ke.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Le=Be,ze=function(Ze,be,Pe,Ae){var Oe=(0,lt.useRef)(!1),xe=(0,lt.useRef)(null);function ct(){clearTimeout(xe.current),Oe.current=!0,xe.current=setTimeout(function(){Oe.current=!1},50)}var Mt=(0,lt.useRef)({top:Ze,bottom:be,left:Pe,right:Ae});return Mt.current.top=Ze,Mt.current.bottom=be,Mt.current.left=Pe,Mt.current.right=Ae,function(at,qe){var Lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Bt=at?qe<0&&Mt.current.left||qe>0&&Mt.current.right:qe<0&&Mt.current.top||qe>0&&Mt.current.bottom;return Lt&&Bt?(clearTimeout(xe.current),Oe.current=!1):(!Bt||Oe.current)&&ct(),!Oe.current&&Bt}};function je(Ze,be,Pe,Ae,Oe,xe,ct){var Mt=(0,lt.useRef)(0),at=(0,lt.useRef)(null),qe=(0,lt.useRef)(null),Lt=(0,lt.useRef)(!1),Bt=ze(be,Pe,Ae,Oe);function ft(kn,mn){if(Ee.Z.cancel(at.current),!Bt(!1,mn)){var ei=kn;if(!ei._virtualHandled)ei._virtualHandled=!0;else return;Mt.current+=mn,qe.current=mn,Le||ei.preventDefault(),at.current=(0,Ee.Z)(function(){var Pi=Lt.current?10:1;ct(Mt.current*Pi,!1),Mt.current=0})}}function Gt(kn,mn){ct(mn,!0),Le||kn.preventDefault()}var Sn=(0,lt.useRef)(null),an=(0,lt.useRef)(null);function rn(kn){if(Ze){Ee.Z.cancel(an.current),an.current=(0,Ee.Z)(function(){Sn.current=null},2);var mn=kn.deltaX,ei=kn.deltaY,Pi=kn.shiftKey,Hn=mn,bn=ei;(Sn.current==="sx"||!Sn.current&&Pi&&ei&&!mn)&&(Hn=ei,bn=0,Sn.current="sx");var wi=Math.abs(Hn),Zi=Math.abs(bn);Sn.current===null&&(Sn.current=xe&&wi>Zi?"x":"y"),Sn.current==="y"?ft(kn,bn):Gt(kn,Hn)}}function zn(kn){Ze&&(Lt.current=kn.detail===qe.current)}return[rn,zn]}function Xe(Ze,be,Pe,Ae){var Oe=lt.useMemo(function(){return[new Map,[]]},[Ze,Pe.id,Ae]),xe=(0,Ge.Z)(Oe,2),ct=xe[0],Mt=xe[1],at=function(Lt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Lt,ft=ct.get(Lt),Gt=ct.get(Bt);if(ft===void 0||Gt===void 0)for(var Sn=Ze.length,an=Mt.length;an<Sn;an+=1){var rn,zn=Ze[an],kn=be(zn);ct.set(kn,an);var mn=(rn=Pe.get(kn))!==null&&rn!==void 0?rn:Ae;if(Mt[an]=(Mt[an-1]||0)+mn,kn===Lt&&(ft=an),kn===Bt&&(Gt=an),ft!==void 0&&Gt!==void 0)break}return{top:Mt[ft-1]||0,bottom:Mt[Gt]}};return at}var Ye=pe(52884),dt=pe(95727),He=function(){function Ze(){(0,Ye.Z)(this,Ze),(0,ut.Z)(this,"maps",void 0),(0,ut.Z)(this,"id",0),(0,ut.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,dt.Z)(Ze,[{key:"set",value:function(Pe,Ae){this.maps[Pe]=Ae,this.id+=1,this.diffKeys.add(Pe)}},{key:"get",value:function(Pe){return this.maps[Pe]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Ze}(),Nt=He;function ot(Ze){var be=parseFloat(Ze);return isNaN(be)?0:be}function Tt(Ze,be,Pe){var Ae=lt.useState(0),Oe=(0,Ge.Z)(Ae,2),xe=Oe[0],ct=Oe[1],Mt=(0,lt.useRef)(new Map),at=(0,lt.useRef)(new Nt),qe=(0,lt.useRef)(0);function Lt(){qe.current+=1}function Bt(){var Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Lt();var Sn=function(){var zn=!1;Mt.current.forEach(function(kn,mn){if(kn&&kn.offsetParent){var ei=kn.offsetHeight,Pi=getComputedStyle(kn),Hn=Pi.marginTop,bn=Pi.marginBottom,wi=ot(Hn),Zi=ot(bn),Hi=ei+wi+Zi;at.current.get(mn)!==Hi&&(at.current.set(mn,Hi),zn=!0)}}),zn&&ct(function(kn){return kn+1})};if(Gt)Sn();else{qe.current+=1;var an=qe.current;Promise.resolve().then(function(){an===qe.current&&Sn()})}}function ft(Gt,Sn){var an=Ze(Gt),rn=Mt.current.get(an);Sn?(Mt.current.set(an,Sn),Bt()):Mt.current.delete(an),!rn!=!Sn&&(Sn?be==null||be(Gt):Pe==null||Pe(Gt))}return(0,lt.useEffect)(function(){return Lt},[]),[ft,Bt,at.current,xe]}var xt=14/15;function Ot(Ze,be,Pe){var Ae=(0,lt.useRef)(!1),Oe=(0,lt.useRef)(0),xe=(0,lt.useRef)(0),ct=(0,lt.useRef)(null),Mt=(0,lt.useRef)(null),at,qe=function(Gt){if(Ae.current){var Sn=Math.ceil(Gt.touches[0].pageX),an=Math.ceil(Gt.touches[0].pageY),rn=Oe.current-Sn,zn=xe.current-an,kn=Math.abs(rn)>Math.abs(zn);kn?Oe.current=Sn:xe.current=an;var mn=Pe(kn,kn?rn:zn,!1,Gt);mn&&Gt.preventDefault(),clearInterval(Mt.current),mn&&(Mt.current=setInterval(function(){kn?rn*=xt:zn*=xt;var ei=Math.floor(kn?rn:zn);(!Pe(kn,ei,!0)||Math.abs(ei)<=.1)&&clearInterval(Mt.current)},16))}},Lt=function(){Ae.current=!1,at()},Bt=function(Gt){at(),Gt.touches.length===1&&!Ae.current&&(Ae.current=!0,Oe.current=Math.ceil(Gt.touches[0].pageX),xe.current=Math.ceil(Gt.touches[0].pageY),ct.current=Gt.target,ct.current.addEventListener("touchmove",qe,{passive:!1}),ct.current.addEventListener("touchend",Lt,{passive:!0}))};at=function(){ct.current&&(ct.current.removeEventListener("touchmove",qe),ct.current.removeEventListener("touchend",Lt))},(0,Ft.Z)(function(){return Ze&&be.current.addEventListener("touchstart",Bt,{passive:!0}),function(){var ft;(ft=be.current)===null||ft===void 0||ft.removeEventListener("touchstart",Bt),at(),clearInterval(Mt.current)}},[Ze])}function Wt(Ze){return Math.floor(Math.pow(Ze,.5))}function Dt(Ze,be){var Pe="touches"in Ze?Ze.touches[0]:Ze;return Pe[be?"pageX":"pageY"]-window[be?"scrollX":"scrollY"]}function tt(Ze,be,Pe){lt.useEffect(function(){var Ae=be.current;if(Ze&&Ae){var Oe=!1,xe,ct,Mt=function(){Ee.Z.cancel(xe)},at=function ft(){Mt(),xe=(0,Ee.Z)(function(){Pe(ct),ft()})},qe=function(Gt){if(!Gt.target.draggable){var Sn=Gt;Sn._virtualHandled||(Sn._virtualHandled=!0,Oe=!0)}},Lt=function(){Oe=!1,Mt()},Bt=function(Gt){if(Oe){var Sn=Dt(Gt,!1),an=Ae.getBoundingClientRect(),rn=an.top,zn=an.bottom;if(Sn<=rn){var kn=rn-Sn;ct=-Wt(kn),at()}else if(Sn>=zn){var mn=Sn-zn;ct=Wt(mn),at()}else Mt()}};return Ae.addEventListener("mousedown",qe),Ae.ownerDocument.addEventListener("mouseup",Lt),Ae.ownerDocument.addEventListener("mousemove",Bt),function(){Ae.removeEventListener("mousedown",qe),Ae.ownerDocument.removeEventListener("mouseup",Lt),Ae.ownerDocument.removeEventListener("mousemove",Bt),Mt()}}},[Ze])}var Ve=10;function _t(Ze,be,Pe,Ae,Oe,xe,ct,Mt){var at=lt.useRef(),qe=lt.useState(null),Lt=(0,Ge.Z)(qe,2),Bt=Lt[0],ft=Lt[1];return(0,Ft.Z)(function(){if(Bt&&Bt.times<Ve){if(!Ze.current){ft(function(Sr){return(0,We.Z)({},Sr)});return}xe();var Gt=Bt.targetAlign,Sn=Bt.originAlign,an=Bt.index,rn=Bt.offset,zn=Ze.current.clientHeight,kn=!1,mn=Gt,ei=null;if(zn){for(var Pi=Gt||Sn,Hn=0,bn=0,wi=0,Zi=Math.min(be.length-1,an),Hi=0;Hi<=Zi;Hi+=1){var rr=Oe(be[Hi]);bn=Hn;var _r=Pe.get(rr);wi=bn+(_r===void 0?Ae:_r),Hn=wi}for(var gi=Pi==="top"?rn:zn-rn,di=Zi;di>=0;di-=1){var xi=Oe(be[di]),$i=Pe.get(xi);if($i===void 0){kn=!0;break}if(gi-=$i,gi<=0)break}switch(Pi){case"top":ei=bn-rn;break;case"bottom":ei=wi-zn+rn;break;default:{var Ri=Ze.current.scrollTop,Kr=Ri+zn;bn<Ri?mn="top":wi>Kr&&(mn="bottom")}}ei!==null&&ct(ei),ei!==Bt.lastTop&&(kn=!0)}kn&&ft((0,We.Z)((0,We.Z)({},Bt),{},{times:Bt.times+1,targetAlign:mn,lastTop:ei}))}},[Bt,Ze.current]),function(Gt){if(Gt==null){Mt();return}if(Ee.Z.cancel(at.current),typeof Gt=="number")ct(Gt);else if(Gt&&(0,ke.Z)(Gt)==="object"){var Sn,an=Gt.align;"index"in Gt?Sn=Gt.index:Sn=be.findIndex(function(kn){return Oe(kn)===Gt.key});var rn=Gt.offset,zn=rn===void 0?0:rn;ft({times:0,index:Sn,offset:zn,originAlign:an})}}}var vn=lt.forwardRef(function(Ze,be){var Pe=Ze.prefixCls,Ae=Ze.rtl,Oe=Ze.scrollOffset,xe=Ze.scrollRange,ct=Ze.onStartMove,Mt=Ze.onStopMove,at=Ze.onScroll,qe=Ze.horizontal,Lt=Ze.spinSize,Bt=Ze.containerSize,ft=Ze.style,Gt=Ze.thumbStyle,Sn=Ze.showScrollBar,an=lt.useState(!1),rn=(0,Ge.Z)(an,2),zn=rn[0],kn=rn[1],mn=lt.useState(null),ei=(0,Ge.Z)(mn,2),Pi=ei[0],Hn=ei[1],bn=lt.useState(null),wi=(0,Ge.Z)(bn,2),Zi=wi[0],Hi=wi[1],rr=!Ae,_r=lt.useRef(),gi=lt.useRef(),di=lt.useState(Sn),xi=(0,Ge.Z)(di,2),$i=xi[0],Ri=xi[1],Kr=lt.useRef(),Sr=function(){Sn===!0||Sn===!1||(clearTimeout(Kr.current),Ri(!0),Kr.current=setTimeout(function(){Ri(!1)},3e3))},Ne=xe-Bt||0,Ci=Bt-Lt||0,wr=lt.useMemo(function(){if(Oe===0||Ne===0)return 0;var Qe=Oe/Ne;return Qe*Ci},[Oe,Ne,Ci]),Pn=function(on){on.stopPropagation(),on.preventDefault()},Si=lt.useRef({top:wr,dragging:zn,pageY:Pi,startTop:Zi});Si.current={top:wr,dragging:zn,pageY:Pi,startTop:Zi};var Wi=function(on){kn(!0),Hn(Dt(on,qe)),Hi(Si.current.top),ct(),on.stopPropagation(),on.preventDefault()};lt.useEffect(function(){var Qe=function(ht){ht.preventDefault()},on=_r.current,cn=gi.current;return on.addEventListener("touchstart",Qe,{passive:!1}),cn.addEventListener("touchstart",Wi,{passive:!1}),function(){on.removeEventListener("touchstart",Qe),cn.removeEventListener("touchstart",Wi)}},[]);var qi=lt.useRef();qi.current=Ne;var $n=lt.useRef();$n.current=Ci,lt.useEffect(function(){if(zn){var Qe,on=function(ht){var en=Si.current,fn=en.dragging,Rn=en.pageY,Qn=en.startTop;Ee.Z.cancel(Qe);var Et=_r.current.getBoundingClientRect(),wn=Bt/(qe?Et.width:Et.height);if(fn){var Kn=(Dt(ht,qe)-Rn)*wn,Ei=Qn;!rr&&qe?Ei-=Kn:Ei+=Kn;var tn=qi.current,sn=$n.current,In=sn?Ei/sn:0,Oi=Math.ceil(In*tn);Oi=Math.max(Oi,0),Oi=Math.min(Oi,tn),Qe=(0,Ee.Z)(function(){at(Oi,qe)})}},cn=function(){kn(!1),Mt()};return window.addEventListener("mousemove",on,{passive:!0}),window.addEventListener("touchmove",on,{passive:!0}),window.addEventListener("mouseup",cn,{passive:!0}),window.addEventListener("touchend",cn,{passive:!0}),function(){window.removeEventListener("mousemove",on),window.removeEventListener("touchmove",on),window.removeEventListener("mouseup",cn),window.removeEventListener("touchend",cn),Ee.Z.cancel(Qe)}}},[zn]),lt.useEffect(function(){return Sr(),function(){clearTimeout(Kr.current)}},[Oe]),lt.useImperativeHandle(be,function(){return{delayHidden:Sr}});var qn="".concat(Pe,"-scrollbar"),Zt={position:"absolute",visibility:$i?null:"hidden"},$t={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return qe?(Zt.height=8,Zt.left=0,Zt.right=0,Zt.bottom=0,$t.height="100%",$t.width=Lt,rr?$t.left=wr:$t.right=wr):(Zt.width=8,Zt.top=0,Zt.bottom=0,rr?Zt.right=0:Zt.left=0,$t.width="100%",$t.height=Lt,$t.top=wr),lt.createElement("div",{ref:_r,className:Ct()(qn,(0,ut.Z)((0,ut.Z)((0,ut.Z)({},"".concat(qn,"-horizontal"),qe),"".concat(qn,"-vertical"),!qe),"".concat(qn,"-visible"),$i)),style:(0,We.Z)((0,We.Z)({},Zt),ft),onMouseDown:Pn,onMouseMove:Sr},lt.createElement("div",{ref:gi,className:Ct()("".concat(qn,"-thumb"),(0,ut.Z)({},"".concat(qn,"-thumb-moving"),zn)),style:(0,We.Z)((0,We.Z)({},$t),Gt),onMouseDown:Wi}))}),yn=vn,zt=20;function qt(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Pe=Ze/be*Ze;return isNaN(Pe)&&(Pe=0),Pe=Math.max(Pe,zt),Math.floor(Pe)}var ln=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Gn=[],un={overflowY:"auto",overflowAnchor:"none"};function _n(Ze,be){var Pe=Ze.prefixCls,Ae=Pe===void 0?"rc-virtual-list":Pe,Oe=Ze.className,xe=Ze.height,ct=Ze.itemHeight,Mt=Ze.fullHeight,at=Mt===void 0?!0:Mt,qe=Ze.style,Lt=Ze.data,Bt=Ze.children,ft=Ze.itemKey,Gt=Ze.virtual,Sn=Ze.direction,an=Ze.scrollWidth,rn=Ze.component,zn=rn===void 0?"div":rn,kn=Ze.onScroll,mn=Ze.onVirtualScroll,ei=Ze.onVisibleChange,Pi=Ze.innerProps,Hn=Ze.extraRender,bn=Ze.styles,wi=Ze.showScrollBar,Zi=wi===void 0?"optional":wi,Hi=(0,Ue.Z)(Ze,ln),rr=lt.useCallback(function(Lo){return typeof ft=="function"?ft(Lo):Lo==null?void 0:Lo[ft]},[ft]),_r=Tt(rr,null,null),gi=(0,Ge.Z)(_r,4),di=gi[0],xi=gi[1],$i=gi[2],Ri=gi[3],Kr=!!(Gt!==!1&&xe&&ct),Sr=lt.useMemo(function(){return Object.values($i.maps).reduce(function(Lo,po){return Lo+po},0)},[$i.id,$i.maps]),Ne=Kr&&Lt&&(Math.max(ct*Lt.length,Sr)>xe||!!an),Ci=Sn==="rtl",wr=Ct()(Ae,(0,ut.Z)({},"".concat(Ae,"-rtl"),Ci),Oe),Pn=Lt||Gn,Si=(0,lt.useRef)(),Wi=(0,lt.useRef)(),qi=(0,lt.useRef)(),$n=(0,lt.useState)(0),qn=(0,Ge.Z)($n,2),Zt=qn[0],$t=qn[1],Qe=(0,lt.useState)(0),on=(0,Ge.Z)(Qe,2),cn=on[0],At=on[1],ht=(0,lt.useState)(!1),en=(0,Ge.Z)(ht,2),fn=en[0],Rn=en[1],Qn=function(){Rn(!0)},Et=function(){Rn(!1)},wn={getKey:rr};function Kn(Lo){$t(function(po){var la;typeof Lo=="function"?la=Lo(po):la=Lo;var Eo=Fr(la);return Si.current.scrollTop=Eo,Eo})}var Ei=(0,lt.useRef)({start:0,end:Pn.length}),tn=(0,lt.useRef)(),sn=ve(Pn,rr),In=(0,Ge.Z)(sn,1),Oi=In[0];tn.current=Oi;var Di=lt.useMemo(function(){if(!Kr)return{scrollHeight:void 0,start:0,end:Pn.length-1,offset:void 0};if(!Ne){var Lo;return{scrollHeight:((Lo=Wi.current)===null||Lo===void 0?void 0:Lo.offsetHeight)||0,start:0,end:Pn.length-1,offset:void 0}}for(var po=0,la,Eo,Na,os=Pn.length,xo=0;xo<os;xo+=1){var Qr=Pn[xo],pi=rr(Qr),io=$i.get(pi),ro=po+(io===void 0?ct:io);ro>=Zt&&la===void 0&&(la=xo,Eo=po),ro>Zt+xe&&Na===void 0&&(Na=xo),po=ro}return la===void 0&&(la=0,Eo=0,Na=Math.ceil(xe/ct)),Na===void 0&&(Na=Pn.length-1),Na=Math.min(Na+1,Pn.length-1),{scrollHeight:po,start:la,end:Na,offset:Eo}},[Ne,Kr,Zt,Pn,Ri,xe]),vi=Di.scrollHeight,Ti=Di.start,Li=Di.end,sr=Di.offset;Ei.current.start=Ti,Ei.current.end=Li,lt.useLayoutEffect(function(){var Lo=$i.getRecord();if(Lo.size===1){var po=Array.from(Lo)[0],la=Pn[Ti];if(la){var Eo=rr(la);if(Eo===po){var Na=$i.get(po),os=Na-ct;Kn(function(xo){return xo+os})}}}$i.resetRecord()},[vi]);var Zr=lt.useState({width:0,height:xe}),Vr=(0,Ge.Z)(Zr,2),Tn=Vr[0],Po=Vr[1],Xr=function(po){Po({width:po.offsetWidth,height:po.offsetHeight})},Cr=(0,lt.useRef)(),Cn=(0,lt.useRef)(),ri=lt.useMemo(function(){return qt(Tn.width,an)},[Tn.width,an]),Yi=lt.useMemo(function(){return qt(Tn.height,vi)},[Tn.height,vi]),yr=vi-xe,er=(0,lt.useRef)(yr);er.current=yr;function Fr(Lo){var po=Lo;return Number.isNaN(er.current)||(po=Math.min(po,er.current)),po=Math.max(po,0),po}var Ur=Zt<=0,zr=Zt>=yr,Tr=cn<=0,Yr=cn>=an,Un=ze(Ur,zr,Tr,Yr),Ho=function(){return{x:Ci?-cn:cn,y:Zt}},Yn=(0,lt.useRef)(Ho()),Ao=(0,$e.useEvent)(function(Lo){if(mn){var po=(0,We.Z)((0,We.Z)({},Ho()),Lo);(Yn.current.x!==po.x||Yn.current.y!==po.y)&&(mn(po),Yn.current=po)}});function Qo(Lo,po){var la=Lo;po?((0,vt.flushSync)(function(){At(la)}),Ao()):Kn(la)}function nr(Lo){var po=Lo.currentTarget.scrollTop;po!==Zt&&Kn(po),kn==null||kn(Lo),Ao()}var qo=function(po){var la=po,Eo=an?an-Tn.width:0;return la=Math.max(la,0),la=Math.min(la,Eo),la},Go=(0,$e.useEvent)(function(Lo,po){po?((0,vt.flushSync)(function(){At(function(la){var Eo=la+(Ci?-Lo:Lo);return qo(Eo)})}),Ao()):Kn(function(la){var Eo=la+Lo;return Eo})}),Lr=je(Kr,Ur,zr,Tr,Yr,!!an,Go),br=(0,Ge.Z)(Lr,2),mo=br[0],Yo=br[1];Ot(Kr,Si,function(Lo,po,la,Eo){var Na=Eo;return Un(Lo,po,la)?!1:!Na||!Na._virtualHandled?(Na&&(Na._virtualHandled=!0),mo({preventDefault:function(){},deltaX:Lo?po:0,deltaY:Lo?0:po}),!0):!1}),tt(Ne,Si,function(Lo){Kn(function(po){return po+Lo})}),(0,Ft.Z)(function(){function Lo(la){var Eo=Ur&&la.detail<0,Na=zr&&la.detail>0;Kr&&!Eo&&!Na&&la.preventDefault()}var po=Si.current;return po.addEventListener("wheel",mo,{passive:!1}),po.addEventListener("DOMMouseScroll",Yo,{passive:!0}),po.addEventListener("MozMousePixelScroll",Lo,{passive:!1}),function(){po.removeEventListener("wheel",mo),po.removeEventListener("DOMMouseScroll",Yo),po.removeEventListener("MozMousePixelScroll",Lo)}},[Kr,Ur,zr]),(0,Ft.Z)(function(){if(an){var Lo=qo(cn);At(Lo),Ao({x:Lo})}},[Tn.width,an]);var Ki=function(){var po,la;(po=Cr.current)===null||po===void 0||po.delayHidden(),(la=Cn.current)===null||la===void 0||la.delayHidden()},st=_t(Si,Pn,$i,ct,rr,function(){return xi(!0)},Kn,Ki);lt.useImperativeHandle(be,function(){return{nativeElement:qi.current,getScrollInfo:Ho,scrollTo:function(po){function la(Eo){return Eo&&(0,ke.Z)(Eo)==="object"&&("left"in Eo||"top"in Eo)}la(po)?(po.left!==void 0&&At(qo(po.left)),st(po.top)):st(po)}}}),(0,Ft.Z)(function(){if(ei){var Lo=Pn.slice(Ti,Li+1);ei(Lo,Pn)}},[Ti,Li,Pn]);var sa=Xe(Pn,rr,$i,ct),va=Hn==null?void 0:Hn({start:Ti,end:Li,virtual:Ne,offsetX:cn,offsetY:sr,rtl:Ci,getSize:sa}),Ma=de(Pn,Ti,Li,an,cn,di,Bt,wn),hs=null;xe&&(hs=(0,We.Z)((0,ut.Z)({},at?"height":"maxHeight",xe),un),Kr&&(hs.overflowY="hidden",an&&(hs.overflowX="hidden"),fn&&(hs.pointerEvents="none")));var Ga={};return Ci&&(Ga.dir="rtl"),lt.createElement("div",(0,le.Z)({ref:qi,style:(0,We.Z)((0,We.Z)({},qe),{},{position:"relative"}),className:wr},Ga,Hi),lt.createElement(wt.Z,{onResize:Xr},lt.createElement(zn,{className:"".concat(Ae,"-holder"),style:hs,ref:Si,onScroll:nr,onMouseEnter:Ki},lt.createElement(te,{prefixCls:Ae,height:vi,offsetX:cn,offsetY:sr,scrollWidth:an,onInnerResize:xi,ref:Wi,innerProps:Pi,rtl:Ci,extra:va},Ma))),Ne&&vi>xe&&lt.createElement(yn,{ref:Cr,prefixCls:Ae,scrollOffset:Zt,scrollRange:vi,rtl:Ci,onScroll:Qo,onStartMove:Qn,onStopMove:Et,spinSize:Yi,containerSize:Tn.height,style:bn==null?void 0:bn.verticalScrollBar,thumbStyle:bn==null?void 0:bn.verticalScrollBarThumb,showScrollBar:Zi}),Ne&&an>Tn.width&&lt.createElement(yn,{ref:Cn,prefixCls:Ae,scrollOffset:cn,scrollRange:an,rtl:Ci,onScroll:Qo,onStartMove:Qn,onStopMove:Et,spinSize:ri,containerSize:Tn.width,horizontal:!0,style:bn==null?void 0:bn.horizontalScrollBar,thumbStyle:bn==null?void 0:bn.horizontalScrollBarThumb,showScrollBar:Zi}))}var St=lt.forwardRef(_n);St.displayName="List";var Zn=St,ci=Zn},54203:function(On,pn,pe){"use strict";pe.d(pn,{Z5:function(){return wg},_l:function(){return hu},bK:function(){return Pc}});var le=pe(59301),ke=pe(75229);function We(Se,Ce){Se.prototype=Object.create(Ce.prototype),Se.prototype.constructor=Se,(0,ke.Z)(Se,Ce)}var ut=pe(96663),Ge=pe(59781),Ue=le.createContext(null),Me=null;function Ct(Se){Se()}var wt=Ct,$e=function(Ce){return wt=Ce},Ft=function(){return wt};function lt(){var Se=Ft(),Ce=null,Te=null;return{clear:function(){Ce=null,Te=null},notify:function(){Se(function(){for(var Pt=Ce;Pt;)Pt.callback(),Pt=Pt.next})},get:function(){for(var Pt=[],yt=Ce;yt;)Pt.push(yt),yt=yt.next;return Pt},subscribe:function(Pt){var yt=!0,kt=Te={callback:Pt,next:null,prev:Te};return kt.prev?kt.prev.next=kt:Ce=kt,function(){!yt||Ce===null||(yt=!1,kt.next?kt.next.prev=kt.prev:Te=kt.prev,kt.prev?kt.prev.next=kt.next:Ce=kt.next)}}}}var vt={notify:function(){},get:function(){return[]}};function Ie(Se,Ce){var Te,Ke=vt;function Pt(Bn){return xn(),Ke.subscribe(Bn)}function yt(){Ke.notify()}function kt(){An.onStateChange&&An.onStateChange()}function Ht(){return!!Te}function xn(){Te||(Te=Ce?Ce.addNestedSub(kt):Se.subscribe(kt),Ke=lt())}function Wn(){Te&&(Te(),Te=void 0,Ke.clear(),Ke=vt)}var An={addNestedSub:Pt,notifyNestedSubs:yt,handleChangeWrapper:kt,isSubscribed:Ht,trySubscribe:xn,tryUnsubscribe:Wn,getListeners:function(){return Ke}};return An}var te=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?le.useLayoutEffect:le.useEffect;function ee(Se){var Ce=Se.store,Te=Se.context,Ke=Se.children,Pt=(0,le.useMemo)(function(){var Ht=Ie(Ce);return{store:Ce,subscription:Ht}},[Ce]),yt=(0,le.useMemo)(function(){return Ce.getState()},[Ce]);te(function(){var Ht=Pt.subscription;return Ht.onStateChange=Ht.notifyNestedSubs,Ht.trySubscribe(),yt!==Ce.getState()&&Ht.notifyNestedSubs(),function(){Ht.tryUnsubscribe(),Ht.onStateChange=null}},[Pt,yt]);var kt=Te||Ue;return le.createElement(kt.Provider,{value:Pt},Ke)}var de=ee,se=pe(30176),he=pe(94266),ve=pe.n(he),Ee=pe(53410),Be=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Le=["reactReduxForwardedRef"],ze=[],je=[null,null],Xe=function(Ce){try{return JSON.stringify(Ce)}catch(Te){return String(Ce)}};function Ye(Se,Ce){var Te=Se[1];return[Ce.payload,Te+1]}function dt(Se,Ce,Te){te(function(){return Se.apply(void 0,Ce)},Te)}function He(Se,Ce,Te,Ke,Pt,yt,kt){Se.current=Ke,Ce.current=Pt,Te.current=!1,yt.current&&(yt.current=null,kt())}function Nt(Se,Ce,Te,Ke,Pt,yt,kt,Ht,xn,Wn){if(Se){var An=!1,Bn=null,Fn=function(){if(!An){var Gr=Ce.getState(),no,yo;try{no=Ke(Gr,Pt.current)}catch(ko){yo=ko,Bn=ko}yo||(Bn=null),no===yt.current?kt.current||xn():(yt.current=no,Ht.current=no,kt.current=!0,Wn({type:"STORE_UPDATED",payload:{error:yo}}))}};Te.onStateChange=Fn,Te.trySubscribe(),Fn();var ni=function(){if(An=!0,Te.tryUnsubscribe(),Te.onStateChange=null,Bn)throw Bn};return ni}}var ot=function(){return[null,0]};function Tt(Se,Ce){Ce===void 0&&(Ce={});var Te=Ce,Ke=Te.getDisplayName,Pt=Ke===void 0?function(ds){return"ConnectAdvanced("+ds+")"}:Ke,yt=Te.methodName,kt=yt===void 0?"connectAdvanced":yt,Ht=Te.renderCountProp,xn=Ht===void 0?void 0:Ht,Wn=Te.shouldHandleStateChanges,An=Wn===void 0?!0:Wn,Bn=Te.storeKey,Fn=Bn===void 0?"store":Bn,ni=Te.withRef,Ii=ni===void 0?!1:ni,Gr=Te.forwardRef,no=Gr===void 0?!1:Gr,yo=Te.context,ko=yo===void 0?Ue:yo,na=(0,se.Z)(Te,Be);if(0)var Jo;var Ia=ko;return function(ks){var Ql=ks.displayName||ks.name||"Component",Is=Pt(Ql),Wl=(0,ut.Z)({},na,{getDisplayName:Pt,methodName:kt,renderCountProp:xn,shouldHandleStateChanges:An,storeKey:Fn,displayName:Is,wrappedComponentName:Ql,WrappedComponent:ks}),_u=na.pure;function Xu(Il){return Se(Il.dispatch,Wl)}var hd=_u?le.useMemo:function(Il){return Il()};function Lc(Il){var Nd=(0,le.useMemo)(function(){var kl=Il.reactReduxForwardedRef,zc=(0,se.Z)(Il,Le);return[Il.context,kl,zc]},[Il]),Gl=Nd[0],fd=Nd[1],vf=Nd[2],gd=(0,le.useMemo)(function(){return Gl&&Gl.Consumer&&(0,Ee.isContextConsumer)(le.createElement(Gl.Consumer,null))?Gl:Ia},[Gl,Ia]),ha=(0,le.useContext)(gd),Wh=!!Il.store&&!!Il.store.getState&&!!Il.store.dispatch,Lg=!!ha&&!!ha.store,pd=Wh?Il.store:ha.store,Qd=(0,le.useMemo)(function(){return Xu(pd)},[pd]),Fh=(0,le.useMemo)(function(){if(!An)return je;var kl=Ie(pd,Wh?null:ha.subscription),zc=kl.notifyNestedSubs.bind(kl);return[kl,zc]},[pd,Wh,ha]),Cc=Fh[0],Yf=Fh[1],Xf=(0,le.useMemo)(function(){return Wh?ha:(0,ut.Z)({},ha,{subscription:Cc})},[Wh,ha,Cc]),op=(0,le.useReducer)(Ye,ze,ot),Wp=op[0],Ng=Wp[0],yf=op[1];if(Ng&&Ng.error)throw Ng.error;var ap=(0,le.useRef)(),Ag=(0,le.useRef)(vf),xf=(0,le.useRef)(),Sf=(0,le.useRef)(!1),Dg=hd(function(){return xf.current&&vf===Ag.current?xf.current:Qd(pd.getState(),vf)},[pd,Ng,vf]);dt(He,[Ag,ap,Sf,vf,Dg,xf,Yf]),dt(Nt,[An,pd,Cc,Qd,Ag,ap,Sf,xf,Yf,yf],[pd,Cc,Qd]);var Ya=(0,le.useMemo)(function(){return le.createElement(ks,(0,ut.Z)({},Dg,{ref:fd}))},[fd,ks,Dg]),Ju=(0,le.useMemo)(function(){return An?le.createElement(gd.Provider,{value:Xf},Ya):Ya},[gd,Ya,Xf]);return Ju}var wc=_u?le.memo(Lc):Lc;if(wc.WrappedComponent=ks,wc.displayName=Lc.displayName=Is,no){var gu=le.forwardRef(function(Nd,Gl){return le.createElement(wc,(0,ut.Z)({},Nd,{reactReduxForwardedRef:Gl}))});return gu.displayName=Is,gu.WrappedComponent=ks,ve()(gu,ks)}return ve()(wc,ks)}}function xt(Se,Ce){return Se===Ce?Se!==0||Ce!==0||1/Se===1/Ce:Se!==Se&&Ce!==Ce}function Ot(Se,Ce){if(xt(Se,Ce))return!0;if(typeof Se!="object"||Se===null||typeof Ce!="object"||Ce===null)return!1;var Te=Object.keys(Se),Ke=Object.keys(Ce);if(Te.length!==Ke.length)return!1;for(var Pt=0;Pt<Te.length;Pt++)if(!Object.prototype.hasOwnProperty.call(Ce,Te[Pt])||!xt(Se[Te[Pt]],Ce[Te[Pt]]))return!1;return!0}function Wt(Se,Ce){var Te={},Ke=function(kt){var Ht=Se[kt];typeof Ht=="function"&&(Te[kt]=function(){return Ce(Ht.apply(void 0,arguments))})};for(var Pt in Se)Ke(Pt);return Te}function Dt(Se){return function(Te,Ke){var Pt=Se(Te,Ke);function yt(){return Pt}return yt.dependsOnOwnProps=!1,yt}}function tt(Se){return Se.dependsOnOwnProps!==null&&Se.dependsOnOwnProps!==void 0?!!Se.dependsOnOwnProps:Se.length!==1}function Ve(Se,Ce){return function(Ke,Pt){var yt=Pt.displayName,kt=function(xn,Wn){return kt.dependsOnOwnProps?kt.mapToProps(xn,Wn):kt.mapToProps(xn)};return kt.dependsOnOwnProps=!0,kt.mapToProps=function(xn,Wn){kt.mapToProps=Se,kt.dependsOnOwnProps=tt(Se);var An=kt(xn,Wn);return typeof An=="function"&&(kt.mapToProps=An,kt.dependsOnOwnProps=tt(An),An=kt(xn,Wn)),An},kt}}function _t(Se){return typeof Se=="function"?Ve(Se,"mapDispatchToProps"):void 0}function vn(Se){return Se?void 0:Dt(function(Ce){return{dispatch:Ce}})}function yn(Se){return Se&&typeof Se=="object"?Dt(function(Ce){return Wt(Se,Ce)}):void 0}var zt=[_t,vn,yn];function qt(Se){return typeof Se=="function"?Ve(Se,"mapStateToProps"):void 0}function ln(Se){return Se?void 0:Dt(function(){return{}})}var Gn=[qt,ln];function un(Se,Ce,Te){return(0,ut.Z)({},Te,Se,Ce)}function _n(Se){return function(Te,Ke){var Pt=Ke.displayName,yt=Ke.pure,kt=Ke.areMergedPropsEqual,Ht=!1,xn;return function(An,Bn,Fn){var ni=Se(An,Bn,Fn);return Ht?(!yt||!kt(ni,xn))&&(xn=ni):(Ht=!0,xn=ni),xn}}}function St(Se){return typeof Se=="function"?_n(Se):void 0}function Zn(Se){return Se?void 0:function(){return un}}var ci=[St,Zn],Ze=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function be(Se,Ce,Te,Ke){return function(yt,kt){return Te(Se(yt,kt),Ce(Ke,kt),kt)}}function Pe(Se,Ce,Te,Ke,Pt){var yt=Pt.areStatesEqual,kt=Pt.areOwnPropsEqual,Ht=Pt.areStatePropsEqual,xn=!1,Wn,An,Bn,Fn,ni;function Ii(na,Jo){return Wn=na,An=Jo,Bn=Se(Wn,An),Fn=Ce(Ke,An),ni=Te(Bn,Fn,An),xn=!0,ni}function Gr(){return Bn=Se(Wn,An),Ce.dependsOnOwnProps&&(Fn=Ce(Ke,An)),ni=Te(Bn,Fn,An),ni}function no(){return Se.dependsOnOwnProps&&(Bn=Se(Wn,An)),Ce.dependsOnOwnProps&&(Fn=Ce(Ke,An)),ni=Te(Bn,Fn,An),ni}function yo(){var na=Se(Wn,An),Jo=!Ht(na,Bn);return Bn=na,Jo&&(ni=Te(Bn,Fn,An)),ni}function ko(na,Jo){var Ia=!kt(Jo,An),ds=!yt(na,Wn,Jo,An);return Wn=na,An=Jo,Ia&&ds?Gr():Ia?no():ds?yo():ni}return function(Jo,Ia){return xn?ko(Jo,Ia):Ii(Jo,Ia)}}function Ae(Se,Ce){var Te=Ce.initMapStateToProps,Ke=Ce.initMapDispatchToProps,Pt=Ce.initMergeProps,yt=(0,se.Z)(Ce,Ze),kt=Te(Se,yt),Ht=Ke(Se,yt),xn=Pt(Se,yt),Wn=yt.pure?Pe:be;return Wn(kt,Ht,xn,Se,yt)}var Oe=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function xe(Se,Ce,Te){for(var Ke=Ce.length-1;Ke>=0;Ke--){var Pt=Ce[Ke](Se);if(Pt)return Pt}return function(yt,kt){throw new Error("Invalid value of type "+typeof Se+" for "+Te+" argument when connecting component "+kt.wrappedComponentName+".")}}function ct(Se,Ce){return Se===Ce}function Mt(Se){var Ce=Se===void 0?{}:Se,Te=Ce.connectHOC,Ke=Te===void 0?Tt:Te,Pt=Ce.mapStateToPropsFactories,yt=Pt===void 0?Gn:Pt,kt=Ce.mapDispatchToPropsFactories,Ht=kt===void 0?zt:kt,xn=Ce.mergePropsFactories,Wn=xn===void 0?ci:xn,An=Ce.selectorFactory,Bn=An===void 0?Ae:An;return function(ni,Ii,Gr,no){no===void 0&&(no={});var yo=no,ko=yo.pure,na=ko===void 0?!0:ko,Jo=yo.areStatesEqual,Ia=Jo===void 0?ct:Jo,ds=yo.areOwnPropsEqual,ks=ds===void 0?Ot:ds,Ql=yo.areStatePropsEqual,Is=Ql===void 0?Ot:Ql,Wl=yo.areMergedPropsEqual,_u=Wl===void 0?Ot:Wl,Xu=(0,se.Z)(yo,Oe),hd=xe(ni,yt,"mapStateToProps"),Lc=xe(Ii,Ht,"mapDispatchToProps"),wc=xe(Gr,Wn,"mergeProps");return Ke(Bn,(0,ut.Z)({methodName:"connect",getDisplayName:function(Il){return"Connect("+Il+")"},shouldHandleStateChanges:!!ni,initMapStateToProps:hd,initMapDispatchToProps:Lc,initMergeProps:wc,pure:na,areStatesEqual:Ia,areOwnPropsEqual:ks,areStatePropsEqual:Is,areMergedPropsEqual:_u},Xu))}}var at=Mt();function qe(){var Se=useContext(ReactReduxContext);return Se}function Lt(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultReduxContext:function(){return useContext(Se)};return function(){var Ke=Ce(),Pt=Ke.store;return Pt}}var Bt=null;function ft(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultStore:createStoreHook(Se);return function(){var Ke=Ce();return Ke.dispatch}}var Gt=null,Sn=function(Ce,Te){return Ce===Te};function an(Se,Ce,Te,Ke){var Pt=useReducer(function(Ii){return Ii+1},0),yt=Pt[1],kt=useMemo(function(){return createSubscription(Te,Ke)},[Te,Ke]),Ht=useRef(),xn=useRef(),Wn=useRef(),An=useRef(),Bn=Te.getState(),Fn;try{if(Se!==xn.current||Bn!==Wn.current||Ht.current){var ni=Se(Bn);An.current===void 0||!Ce(ni,An.current)?Fn=ni:Fn=An.current}else Fn=An.current}catch(Ii){throw Ht.current&&(Ii.message+=`
The error may be correlated with this previous error:
`+Ht.current.stack+`
`),Ii}return useIsomorphicLayoutEffect(function(){xn.current=Se,Wn.current=Bn,An.current=Fn,Ht.current=void 0}),useIsomorphicLayoutEffect(function(){function Ii(){try{var Gr=Te.getState();if(Gr===Wn.current)return;var no=xn.current(Gr);if(Ce(no,An.current))return;An.current=no,Wn.current=Gr}catch(yo){Ht.current=yo}yt()}return kt.onStateChange=Ii,kt.trySubscribe(),Ii(),function(){return kt.tryUnsubscribe()}},[Te,kt]),Fn}function rn(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultReduxContext:function(){return useContext(Se)};return function(Ke,Pt){Pt===void 0&&(Pt=Sn);var yt=Ce(),kt=yt.store,Ht=yt.subscription,xn=an(Ke,Pt,kt,Ht);return useDebugValue(xn),xn}}var zn=null,kn=pe(4676);$e(kn.unstable_batchedUpdates);function mn(Se,Ce){if(Se.length!==Ce.length)return!1;for(var Te=0;Te<Se.length;Te++)if(Se[Te]!==Ce[Te])return!1;return!0}function ei(Se,Ce){var Te=(0,le.useState)(function(){return{inputs:Ce,result:Se()}})[0],Ke=(0,le.useRef)(!0),Pt=(0,le.useRef)(Te),yt=Ke.current||!!(Ce&&Pt.current.inputs&&mn(Ce,Pt.current.inputs)),kt=yt?Pt.current:{inputs:Ce,result:Se()};return(0,le.useEffect)(function(){Ke.current=!1,Pt.current=kt},[kt]),kt.result}function Pi(Se,Ce){return ei(function(){return Se},Ce)}var Hn=ei,bn=Pi,wi=!0,Zi="Invariant failed";function Hi(Se,Ce){if(!Se){if(wi)throw new Error(Zi);var Te=typeof Ce=="function"?Ce():Ce,Ke=Te?"".concat(Zi,": ").concat(Te):Zi;throw new Error(Ke)}}var rr=function(Ce){var Te=Ce.top,Ke=Ce.right,Pt=Ce.bottom,yt=Ce.left,kt=Ke-yt,Ht=Pt-Te,xn={top:Te,right:Ke,bottom:Pt,left:yt,width:kt,height:Ht,x:yt,y:Te,center:{x:(Ke+yt)/2,y:(Pt+Te)/2}};return xn},_r=function(Ce,Te){return{top:Ce.top-Te.top,left:Ce.left-Te.left,bottom:Ce.bottom+Te.bottom,right:Ce.right+Te.right}},gi=function(Ce,Te){return{top:Ce.top+Te.top,left:Ce.left+Te.left,bottom:Ce.bottom-Te.bottom,right:Ce.right-Te.right}},di=function(Ce,Te){return{top:Ce.top+Te.y,left:Ce.left+Te.x,bottom:Ce.bottom+Te.y,right:Ce.right+Te.x}},xi={top:0,right:0,bottom:0,left:0},$i=function(Ce){var Te=Ce.borderBox,Ke=Ce.margin,Pt=Ke===void 0?xi:Ke,yt=Ce.border,kt=yt===void 0?xi:yt,Ht=Ce.padding,xn=Ht===void 0?xi:Ht,Wn=rr(_r(Te,Pt)),An=rr(gi(Te,kt)),Bn=rr(gi(An,xn));return{marginBox:Wn,borderBox:rr(Te),paddingBox:An,contentBox:Bn,margin:Pt,border:kt,padding:xn}},Ri=function(Ce){var Te=Ce.slice(0,-2),Ke=Ce.slice(-2);if(Ke!=="px")return 0;var Pt=Number(Te);return isNaN(Pt)&&Hi(!1),Pt},Kr=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Sr=function(Ce,Te){var Ke=Ce.borderBox,Pt=Ce.border,yt=Ce.margin,kt=Ce.padding,Ht=di(Ke,Te);return $i({borderBox:Ht,border:Pt,margin:yt,padding:kt})},Ne=function(Ce,Te){return Te===void 0&&(Te=Kr()),Sr(Ce,Te)},Ci=function(Ce,Te){var Ke={top:Ri(Te.marginTop),right:Ri(Te.marginRight),bottom:Ri(Te.marginBottom),left:Ri(Te.marginLeft)},Pt={top:Ri(Te.paddingTop),right:Ri(Te.paddingRight),bottom:Ri(Te.paddingBottom),left:Ri(Te.paddingLeft)},yt={top:Ri(Te.borderTopWidth),right:Ri(Te.borderRightWidth),bottom:Ri(Te.borderBottomWidth),left:Ri(Te.borderLeftWidth)};return $i({borderBox:Ce,margin:Ke,padding:Pt,border:yt})},wr=function(Ce){var Te=Ce.getBoundingClientRect(),Ke=window.getComputedStyle(Ce);return Ci(Te,Ke)},Pn=Number.isNaN||function(Ce){return typeof Ce=="number"&&Ce!==Ce};function Si(Se,Ce){return!!(Se===Ce||Pn(Se)&&Pn(Ce))}function Wi(Se,Ce){if(Se.length!==Ce.length)return!1;for(var Te=0;Te<Se.length;Te++)if(!Si(Se[Te],Ce[Te]))return!1;return!0}function qi(Se,Ce){Ce===void 0&&(Ce=Wi);var Te,Ke=[],Pt,yt=!1;function kt(){for(var Ht=[],xn=0;xn<arguments.length;xn++)Ht[xn]=arguments[xn];return yt&&Te===this&&Ce(Ht,Ke)||(Pt=Se.apply(this,Ht),yt=!0,Te=this,Ke=Ht),Pt}return kt}var $n=qi,qn=function(Ce){var Te=[],Ke=null,Pt=function(){for(var kt=arguments.length,Ht=new Array(kt),xn=0;xn<kt;xn++)Ht[xn]=arguments[xn];Te=Ht,!Ke&&(Ke=requestAnimationFrame(function(){Ke=null,Ce.apply(void 0,Te)}))};return Pt.cancel=function(){Ke&&(cancelAnimationFrame(Ke),Ke=null)},Pt},Zt=qn,$t=!0,Qe=/[ \t]{2,}/g,on=/^[ \t]*/gm,cn=function(Ce){return Ce.replace(Qe," ").replace(on,"").trim()},At=function(Ce){return cn(`
%creact-beautiful-dnd
%c`+cn(Ce)+`
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
`)},ht=function(Ce){return[At(Ce),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},en="__react-beautiful-dnd-disable-dev-warnings";function fn(Se,Ce){var Te;$t||typeof window!="undefined"&&window[en]||(Te=console)[Se].apply(Te,ht(Ce))}var Rn=fn.bind(null,"warn"),Qn=fn.bind(null,"error");function Et(){}function wn(Se,Ce){return(0,ut.Z)({},Se,{},Ce)}function Kn(Se,Ce,Te){var Ke=Ce.map(function(Pt){var yt=wn(Te,Pt.options);return Se.addEventListener(Pt.eventName,Pt.fn,yt),function(){Se.removeEventListener(Pt.eventName,Pt.fn,yt)}});return function(){Ke.forEach(function(yt){yt()})}}var Ei=!0,tn="Invariant failed";function sn(Se){this.message=Se}sn.prototype.toString=function(){return this.message};function In(Se,Ce){if(!Se)throw Ei?new sn(tn):new sn(tn+": "+(Ce||""))}var Oi=function(Se){We(Ce,Se);function Ce(){for(var Ke,Pt=arguments.length,yt=new Array(Pt),kt=0;kt<Pt;kt++)yt[kt]=arguments[kt];return Ke=Se.call.apply(Se,[this].concat(yt))||this,Ke.callbacks=null,Ke.unbind=Et,Ke.onWindowError=function(Ht){var xn=Ke.getCallbacks();xn.isDragging()&&xn.tryAbort();var Wn=Ht.error;Wn instanceof sn&&Ht.preventDefault()},Ke.getCallbacks=function(){if(!Ke.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return Ke.callbacks},Ke.setCallbacks=function(Ht){Ke.callbacks=Ht},Ke}var Te=Ce.prototype;return Te.componentDidMount=function(){this.unbind=Kn(window,[{eventName:"error",fn:this.onWindowError}])},Te.componentWillUnmount=function(){this.unbind()},Te.componentDidCatch=function(Pt){if(Pt instanceof sn){this.setState({});return}throw Pt},Te.render=function(){return this.props.children(this.setCallbacks)},Ce}(le.Component),Di=`
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
`,vi=function(Ce){return Ce+1},Ti=function(Ce){return`
You have lifted an item in position `+vi(Ce.source.index)+`
`},Li=function(Ce,Te){var Ke=Ce.droppableId===Te.droppableId,Pt=vi(Ce.index),yt=vi(Te.index);return Ke?`
You have moved the item from position `+Pt+`
to position `+yt+`
`:`
You have moved the item from position `+Pt+`
in list `+Ce.droppableId+`
to list `+Te.droppableId+`
in position `+yt+`
`},sr=function(Ce,Te,Ke){var Pt=Te.droppableId===Ke.droppableId;return Pt?`
The item `+Ce+`
has been combined with `+Ke.draggableId:`
The item `+Ce+`
in list `+Te.droppableId+`
has been combined with `+Ke.draggableId+`
in list `+Ke.droppableId+`
`},Zr=function(Ce){var Te=Ce.destination;if(Te)return Li(Ce.source,Te);var Ke=Ce.combine;return Ke?sr(Ce.draggableId,Ce.source,Ke):"You are over an area that cannot be dropped on"},Vr=function(Ce){return`
The item has returned to its starting position
of `+vi(Ce.index)+`
`},Tn=function(Ce){if(Ce.reason==="CANCEL")return`
Movement cancelled.
`+Vr(Ce.source)+`
`;var Te=Ce.destination,Ke=Ce.combine;return Te?`
You have dropped the item.
`+Li(Ce.source,Te)+`
`:Ke?`
You have dropped the item.
`+sr(Ce.draggableId,Ce.source,Ke)+`
`:`
The item has been dropped while not over a drop area.
`+Vr(Ce.source)+`
`},Po={dragHandleUsageInstructions:Di,onDragStart:Ti,onDragUpdate:Zr,onDragEnd:Tn},Xr={x:0,y:0},Cr=function(Ce,Te){return{x:Ce.x+Te.x,y:Ce.y+Te.y}},Cn=function(Ce,Te){return{x:Ce.x-Te.x,y:Ce.y-Te.y}},ri=function(Ce,Te){return Ce.x===Te.x&&Ce.y===Te.y},Yi=function(Ce){return{x:Ce.x!==0?-Ce.x:0,y:Ce.y!==0?-Ce.y:0}},yr=function(Ce,Te,Ke){var Pt;return Ke===void 0&&(Ke=0),Pt={},Pt[Ce]=Te,Pt[Ce==="x"?"y":"x"]=Ke,Pt},er=function(Ce,Te){return Math.sqrt(Math.pow(Te.x-Ce.x,2)+Math.pow(Te.y-Ce.y,2))},Fr=function(Ce,Te){return Math.min.apply(Math,Te.map(function(Ke){return er(Ce,Ke)}))},Ur=function(Ce){return function(Te){return{x:Ce(Te.x),y:Ce(Te.y)}}},zr=function(Se,Ce){var Te=rr({top:Math.max(Ce.top,Se.top),right:Math.min(Ce.right,Se.right),bottom:Math.min(Ce.bottom,Se.bottom),left:Math.max(Ce.left,Se.left)});return Te.width<=0||Te.height<=0?null:Te},Tr=function(Ce,Te){return{top:Ce.top+Te.y,left:Ce.left+Te.x,bottom:Ce.bottom+Te.y,right:Ce.right+Te.x}},Yr=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}]},Un={top:0,right:0,bottom:0,left:0},Ho=function(Ce,Te){return Te?Tr(Ce,Te.scroll.diff.displacement):Ce},Yn=function(Ce,Te,Ke){if(Ke&&Ke.increasedBy){var Pt;return(0,ut.Z)({},Ce,(Pt={},Pt[Te.end]=Ce[Te.end]+Ke.increasedBy[Te.line],Pt))}return Ce},Ao=function(Ce,Te){return Te&&Te.shouldClipSubject?zr(Te.pageMarginBox,Ce):rr(Ce)},Qo=function(Se){var Ce=Se.page,Te=Se.withPlaceholder,Ke=Se.axis,Pt=Se.frame,yt=Ho(Ce.marginBox,Pt),kt=Yn(yt,Ke,Te),Ht=Ao(kt,Pt);return{page:Ce,withPlaceholder:Te,active:Ht}},nr=function(Se,Ce){Se.frame||In(!1);var Te=Se.frame,Ke=Cn(Ce,Te.scroll.initial),Pt=Yi(Ke),yt=(0,ut.Z)({},Te,{scroll:{initial:Te.scroll.initial,current:Ce,diff:{value:Ke,displacement:Pt},max:Te.scroll.max}}),kt=Qo({page:Se.subject.page,withPlaceholder:Se.subject.withPlaceholder,axis:Se.axis,frame:yt}),Ht=(0,ut.Z)({},Se,{frame:yt,subject:kt});return Ht};function qo(Se){return Number.isInteger?Number.isInteger(Se):typeof Se=="number"&&isFinite(Se)&&Math.floor(Se)===Se}function Go(Se){return Object.values?Object.values(Se):Object.keys(Se).map(function(Ce){return Se[Ce]})}function Lr(Se,Ce){if(Se.findIndex)return Se.findIndex(Ce);for(var Te=0;Te<Se.length;Te++)if(Ce(Se[Te]))return Te;return-1}function br(Se,Ce){if(Se.find)return Se.find(Ce);var Te=Lr(Se,Ce);if(Te!==-1)return Se[Te]}function mo(Se){return Array.prototype.slice.call(Se)}var Yo=$n(function(Se){return Se.reduce(function(Ce,Te){return Ce[Te.descriptor.id]=Te,Ce},{})}),Ki=$n(function(Se){return Se.reduce(function(Ce,Te){return Ce[Te.descriptor.id]=Te,Ce},{})}),st=$n(function(Se){return Go(Se)}),sa=$n(function(Se){return Go(Se)}),va=$n(function(Se,Ce){var Te=sa(Ce).filter(function(Ke){return Se===Ke.descriptor.droppableId}).sort(function(Ke,Pt){return Ke.descriptor.index-Pt.descriptor.index});return Te});function Ma(Se){return Se.at&&Se.at.type==="REORDER"?Se.at.destination:null}function hs(Se){return Se.at&&Se.at.type==="COMBINE"?Se.at.combine:null}var Ga=$n(function(Se,Ce){return Ce.filter(function(Te){return Te.descriptor.id!==Se.descriptor.id})}),Lo=function(Se){var Ce=Se.isMovingForward,Te=Se.draggable,Ke=Se.destination,Pt=Se.insideDestination,yt=Se.previousImpact;if(!Ke.isCombineEnabled)return null;var kt=Ma(yt);if(!kt)return null;function Ht(Gr){var no={type:"COMBINE",combine:{draggableId:Gr,droppableId:Ke.descriptor.id}};return(0,ut.Z)({},yt,{at:no})}var xn=yt.displaced.all,Wn=xn.length?xn[0]:null;if(Ce)return Wn?Ht(Wn):null;var An=Ga(Te,Pt);if(!Wn){if(!An.length)return null;var Bn=An[An.length-1];return Ht(Bn.descriptor.id)}var Fn=Lr(An,function(Gr){return Gr.descriptor.id===Wn});Fn===-1&&In(!1);var ni=Fn-1;if(ni<0)return null;var Ii=An[ni];return Ht(Ii.descriptor.id)},po=function(Se,Ce){return Se.descriptor.droppableId===Ce.descriptor.id},la={point:Xr,value:0},Eo={invisible:{},visible:{},all:[]},Na={displaced:Eo,displacedBy:la,at:null},os=function(Se,Ce){return function(Te){return Se<=Te&&Te<=Ce}},xo=function(Se){var Ce=os(Se.top,Se.bottom),Te=os(Se.left,Se.right);return function(Ke){var Pt=Ce(Ke.top)&&Ce(Ke.bottom)&&Te(Ke.left)&&Te(Ke.right);if(Pt)return!0;var yt=Ce(Ke.top)||Ce(Ke.bottom),kt=Te(Ke.left)||Te(Ke.right),Ht=yt&&kt;if(Ht)return!0;var xn=Ke.top<Se.top&&Ke.bottom>Se.bottom,Wn=Ke.left<Se.left&&Ke.right>Se.right,An=xn&&Wn;if(An)return!0;var Bn=xn&&kt||Wn&&yt;return Bn}},Qr=function(Se){var Ce=os(Se.top,Se.bottom),Te=os(Se.left,Se.right);return function(Ke){var Pt=Ce(Ke.top)&&Ce(Ke.bottom)&&Te(Ke.left)&&Te(Ke.right);return Pt}},pi={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},io={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},ro=function(Se){return function(Ce){var Te=os(Ce.top,Ce.bottom),Ke=os(Ce.left,Ce.right);return function(Pt){return Se===pi?Te(Pt.top)&&Te(Pt.bottom):Ke(Pt.left)&&Ke(Pt.right)}}},Ja=function(Ce,Te){var Ke=Te.frame?Te.frame.scroll.diff.displacement:Xr;return Tr(Ce,Ke)},Ca=function(Ce,Te,Ke){return Te.subject.active?Ke(Te.subject.active)(Ce):!1},fa=function(Ce,Te,Ke){return Ke(Te)(Ce)},$a=function(Ce){var Te=Ce.target,Ke=Ce.destination,Pt=Ce.viewport,yt=Ce.withDroppableDisplacement,kt=Ce.isVisibleThroughFrameFn,Ht=yt?Ja(Te,Ke):Te;return Ca(Ht,Ke,kt)&&fa(Ht,Pt,kt)},Qa=function(Ce){return $a((0,ut.Z)({},Ce,{isVisibleThroughFrameFn:xo}))},Es=function(Ce){return $a((0,ut.Z)({},Ce,{isVisibleThroughFrameFn:Qr}))},ys=function(Ce){return $a((0,ut.Z)({},Ce,{isVisibleThroughFrameFn:ro(Ce.destination.axis)}))},Zs=function(Ce,Te,Ke){if(typeof Ke=="boolean")return Ke;if(!Te)return!0;var Pt=Te.invisible,yt=Te.visible;if(Pt[Ce])return!1;var kt=yt[Ce];return kt?kt.shouldAnimate:!0};function Mn(Se,Ce){var Te=Se.page.marginBox,Ke={top:Ce.point.y,right:0,bottom:0,left:Ce.point.x};return rr(_r(Te,Ke))}function Ss(Se){var Ce=Se.afterDragging,Te=Se.destination,Ke=Se.displacedBy,Pt=Se.viewport,yt=Se.forceShouldAnimate,kt=Se.last;return Ce.reduce(function(xn,Wn){var An=Mn(Wn,Ke),Bn=Wn.descriptor.id;xn.all.push(Bn);var Fn=Qa({target:An,destination:Te,viewport:Pt,withDroppableDisplacement:!0});if(!Fn)return xn.invisible[Wn.descriptor.id]=!0,xn;var ni=Zs(Bn,kt,yt),Ii={draggableId:Bn,shouldAnimate:ni};return xn.visible[Bn]=Ii,xn},{all:[],visible:{},invisible:{}})}function ra(Se,Ce){if(!Se.length)return 0;var Te=Se[Se.length-1].descriptor.index;return Ce.inHomeList?Te:Te+1}function hl(Se){var Ce=Se.insideDestination,Te=Se.inHomeList,Ke=Se.displacedBy,Pt=Se.destination,yt=ra(Ce,{inHomeList:Te});return{displaced:Eo,displacedBy:Ke,at:{type:"REORDER",destination:{droppableId:Pt.descriptor.id,index:yt}}}}function Ol(Se){var Ce=Se.draggable,Te=Se.insideDestination,Ke=Se.destination,Pt=Se.viewport,yt=Se.displacedBy,kt=Se.last,Ht=Se.index,xn=Se.forceShouldAnimate,Wn=po(Ce,Ke);if(Ht==null)return hl({insideDestination:Te,inHomeList:Wn,displacedBy:yt,destination:Ke});var An=br(Te,function(Gr){return Gr.descriptor.index===Ht});if(!An)return hl({insideDestination:Te,inHomeList:Wn,displacedBy:yt,destination:Ke});var Bn=Ga(Ce,Te),Fn=Te.indexOf(An),ni=Bn.slice(Fn),Ii=Ss({afterDragging:ni,destination:Ke,displacedBy:yt,last:kt,viewport:Pt.frame,forceShouldAnimate:xn});return{displaced:Ii,displacedBy:yt,at:{type:"REORDER",destination:{droppableId:Ke.descriptor.id,index:Ht}}}}function ns(Se,Ce){return!!Ce.effected[Se]}var yu=function(Se){var Ce=Se.isMovingForward,Te=Se.destination,Ke=Se.draggables,Pt=Se.combine,yt=Se.afterCritical;if(!Te.isCombineEnabled)return null;var kt=Pt.draggableId,Ht=Ke[kt],xn=Ht.descriptor.index,Wn=ns(kt,yt);return Wn?Ce?xn:xn-1:Ce?xn+1:xn},eu=function(Se){var Ce=Se.isMovingForward,Te=Se.isInHomeList,Ke=Se.insideDestination,Pt=Se.location;if(!Ke.length)return null;var yt=Pt.index,kt=Ce?yt+1:yt-1,Ht=Ke[0].descriptor.index,xn=Ke[Ke.length-1].descriptor.index,Wn=Te?xn:xn+1;return kt<Ht||kt>Wn?null:kt},ps=function(Se){var Ce=Se.isMovingForward,Te=Se.isInHomeList,Ke=Se.draggable,Pt=Se.draggables,yt=Se.destination,kt=Se.insideDestination,Ht=Se.previousImpact,xn=Se.viewport,Wn=Se.afterCritical,An=Ht.at;if(An||In(!1),An.type==="REORDER"){var Bn=eu({isMovingForward:Ce,isInHomeList:Te,location:An.destination,insideDestination:kt});return Bn==null?null:Ol({draggable:Ke,insideDestination:kt,destination:yt,viewport:xn,last:Ht.displaced,displacedBy:Ht.displacedBy,index:Bn})}var Fn=yu({isMovingForward:Ce,destination:yt,displaced:Ht.displaced,draggables:Pt,combine:An.combine,afterCritical:Wn});return Fn==null?null:Ol({draggable:Ke,insideDestination:kt,destination:yt,viewport:xn,last:Ht.displaced,displacedBy:Ht.displacedBy,index:Fn})},Ba=function(Se){var Ce=Se.displaced,Te=Se.afterCritical,Ke=Se.combineWith,Pt=Se.displacedBy,yt=!!(Ce.visible[Ke]||Ce.invisible[Ke]);return ns(Ke,Te)?yt?Xr:Yi(Pt.point):yt?Pt.point:Xr},tu=function(Se){var Ce=Se.afterCritical,Te=Se.impact,Ke=Se.draggables,Pt=hs(Te);Pt||In(!1);var yt=Pt.draggableId,kt=Ke[yt].page.borderBox.center,Ht=Ba({displaced:Te.displaced,afterCritical:Ce,combineWith:yt,displacedBy:Te.displacedBy});return Cr(kt,Ht)},Do=function(Ce,Te){return Te.margin[Ce.start]+Te.borderBox[Ce.size]/2},Ea=function(Ce,Te){return Te.margin[Ce.end]+Te.borderBox[Ce.size]/2},ca=function(Ce,Te,Ke){return Te[Ce.crossAxisStart]+Ke.margin[Ce.crossAxisStart]+Ke.borderBox[Ce.crossAxisSize]/2},hr=function(Ce){var Te=Ce.axis,Ke=Ce.moveRelativeTo,Pt=Ce.isMoving;return yr(Te.line,Ke.marginBox[Te.end]+Do(Te,Pt),ca(Te,Ke.marginBox,Pt))},Rs=function(Ce){var Te=Ce.axis,Ke=Ce.moveRelativeTo,Pt=Ce.isMoving;return yr(Te.line,Ke.marginBox[Te.start]-Ea(Te,Pt),ca(Te,Ke.marginBox,Pt))},ls=function(Ce){var Te=Ce.axis,Ke=Ce.moveInto,Pt=Ce.isMoving;return yr(Te.line,Ke.contentBox[Te.start]+Do(Te,Pt),ca(Te,Ke.contentBox,Pt))},sl=function(Se){var Ce=Se.impact,Te=Se.draggable,Ke=Se.draggables,Pt=Se.droppable,yt=Se.afterCritical,kt=va(Pt.descriptor.id,Ke),Ht=Te.page,xn=Pt.axis;if(!kt.length)return ls({axis:xn,moveInto:Pt.page,isMoving:Ht});var Wn=Ce.displaced,An=Ce.displacedBy,Bn=Wn.all[0];if(Bn){var Fn=Ke[Bn];if(ns(Bn,yt))return Rs({axis:xn,moveRelativeTo:Fn.page,isMoving:Ht});var ni=Sr(Fn.page,An.point);return Rs({axis:xn,moveRelativeTo:ni,isMoving:Ht})}var Ii=kt[kt.length-1];if(Ii.descriptor.id===Te.descriptor.id)return Ht.borderBox.center;if(ns(Ii.descriptor.id,yt)){var Gr=Sr(Ii.page,Yi(yt.displacedBy.point));return hr({axis:xn,moveRelativeTo:Gr,isMoving:Ht})}return hr({axis:xn,moveRelativeTo:Ii.page,isMoving:Ht})},jl=function(Se,Ce){var Te=Se.frame;return Te?Cr(Ce,Te.scroll.diff.displacement):Ce},ou=function(Ce){var Te=Ce.impact,Ke=Ce.draggable,Pt=Ce.droppable,yt=Ce.draggables,kt=Ce.afterCritical,Ht=Ke.page.borderBox.center,xn=Te.at;return!Pt||!xn?Ht:xn.type==="REORDER"?sl({impact:Te,draggable:Ke,draggables:yt,droppable:Pt,afterCritical:kt}):tu({impact:Te,draggables:yt,afterCritical:kt})},Ji=function(Se){var Ce=ou(Se),Te=Se.droppable,Ke=Te?jl(Te,Ce):Ce;return Ke},Cs=function(Se,Ce){var Te=Cn(Ce,Se.scroll.initial),Ke=Yi(Te),Pt=rr({top:Ce.y,bottom:Ce.y+Se.frame.height,left:Ce.x,right:Ce.x+Se.frame.width}),yt={frame:Pt,scroll:{initial:Se.scroll.initial,max:Se.scroll.max,current:Ce,diff:{value:Te,displacement:Ke}}};return yt};function Us(Se,Ce){return Se.map(function(Te){return Ce[Te]})}function $l(Se,Ce){for(var Te=0;Te<Ce.length;Te++){var Ke=Ce[Te].visible[Se];if(Ke)return Ke}return null}var Tl=function(Se){var Ce=Se.impact,Te=Se.viewport,Ke=Se.destination,Pt=Se.draggables,yt=Se.maxScrollChange,kt=Cs(Te,Cr(Te.scroll.current,yt)),Ht=Ke.frame?nr(Ke,Cr(Ke.frame.scroll.current,yt)):Ke,xn=Ce.displaced,Wn=Ss({afterDragging:Us(xn.all,Pt),destination:Ke,displacedBy:Ce.displacedBy,viewport:kt.frame,last:xn,forceShouldAnimate:!1}),An=Ss({afterDragging:Us(xn.all,Pt),destination:Ht,displacedBy:Ce.displacedBy,viewport:Te.frame,last:xn,forceShouldAnimate:!1}),Bn={},Fn={},ni=[xn,Wn,An];xn.all.forEach(function(Gr){var no=$l(Gr,ni);if(no){Fn[Gr]=no;return}Bn[Gr]=!0});var Ii=(0,ut.Z)({},Ce,{displaced:{all:xn.all,invisible:Bn,visible:Fn}});return Ii},Kl=function(Se,Ce){return Cr(Se.scroll.diff.displacement,Ce)},Oo=function(Se){var Ce=Se.pageBorderBoxCenter,Te=Se.draggable,Ke=Se.viewport,Pt=Kl(Ke,Ce),yt=Cn(Pt,Te.page.borderBox.center);return Cr(Te.client.borderBox.center,yt)},ic=function(Se){var Ce=Se.draggable,Te=Se.destination,Ke=Se.newPageBorderBoxCenter,Pt=Se.viewport,yt=Se.withDroppableDisplacement,kt=Se.onlyOnMainAxis,Ht=kt===void 0?!1:kt,xn=Cn(Ke,Ce.page.borderBox.center),Wn=Tr(Ce.page.borderBox,xn),An={target:Wn,destination:Te,withDroppableDisplacement:yt,viewport:Pt};return Ht?ys(An):Es(An)},zl=function(Se){var Ce=Se.isMovingForward,Te=Se.draggable,Ke=Se.destination,Pt=Se.draggables,yt=Se.previousImpact,kt=Se.viewport,Ht=Se.previousPageBorderBoxCenter,xn=Se.previousClientSelection,Wn=Se.afterCritical;if(!Ke.isEnabled)return null;var An=va(Ke.descriptor.id,Pt),Bn=po(Te,Ke),Fn=Lo({isMovingForward:Ce,draggable:Te,destination:Ke,insideDestination:An,previousImpact:yt})||ps({isMovingForward:Ce,isInHomeList:Bn,draggable:Te,draggables:Pt,destination:Ke,insideDestination:An,previousImpact:yt,viewport:kt,afterCritical:Wn});if(!Fn)return null;var ni=Ji({impact:Fn,draggable:Te,droppable:Ke,draggables:Pt,afterCritical:Wn}),Ii=ic({draggable:Te,destination:Ke,newPageBorderBoxCenter:ni,viewport:kt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(Ii){var Gr=Oo({pageBorderBoxCenter:ni,draggable:Te,viewport:kt});return{clientSelection:Gr,impact:Fn,scrollJumpRequest:null}}var no=Cn(ni,Ht),yo=Tl({impact:Fn,viewport:kt,destination:Ke,draggables:Pt,maxScrollChange:no});return{clientSelection:xn,impact:yo,scrollJumpRequest:no}},En=function(Ce){var Te=Ce.subject.active;return Te||In(!1),Te},Nn=function(Se){var Ce=Se.isMovingForward,Te=Se.pageBorderBoxCenter,Ke=Se.source,Pt=Se.droppables,yt=Se.viewport,kt=Ke.subject.active;if(!kt)return null;var Ht=Ke.axis,xn=os(kt[Ht.start],kt[Ht.end]),Wn=st(Pt).filter(function(Bn){return Bn!==Ke}).filter(function(Bn){return Bn.isEnabled}).filter(function(Bn){return!!Bn.subject.active}).filter(function(Bn){return xo(yt.frame)(En(Bn))}).filter(function(Bn){var Fn=En(Bn);return Ce?kt[Ht.crossAxisEnd]<Fn[Ht.crossAxisEnd]:Fn[Ht.crossAxisStart]<kt[Ht.crossAxisStart]}).filter(function(Bn){var Fn=En(Bn),ni=os(Fn[Ht.start],Fn[Ht.end]);return xn(Fn[Ht.start])||xn(Fn[Ht.end])||ni(kt[Ht.start])||ni(kt[Ht.end])}).sort(function(Bn,Fn){var ni=En(Bn)[Ht.crossAxisStart],Ii=En(Fn)[Ht.crossAxisStart];return Ce?ni-Ii:Ii-ni}).filter(function(Bn,Fn,ni){return En(Bn)[Ht.crossAxisStart]===En(ni[0])[Ht.crossAxisStart]});if(!Wn.length)return null;if(Wn.length===1)return Wn[0];var An=Wn.filter(function(Bn){var Fn=os(En(Bn)[Ht.start],En(Bn)[Ht.end]);return Fn(Te[Ht.line])});return An.length===1?An[0]:An.length>1?An.sort(function(Bn,Fn){return En(Bn)[Ht.start]-En(Fn)[Ht.start]})[0]:Wn.sort(function(Bn,Fn){var ni=Fr(Te,Yr(En(Bn))),Ii=Fr(Te,Yr(En(Fn)));return ni!==Ii?ni-Ii:En(Bn)[Ht.start]-En(Fn)[Ht.start]})[0]},ai=function(Ce,Te){var Ke=Ce.page.borderBox.center;return ns(Ce.descriptor.id,Te)?Cn(Ke,Te.displacedBy.point):Ke},Qi=function(Ce,Te){var Ke=Ce.page.borderBox;return ns(Ce.descriptor.id,Te)?Tr(Ke,Yi(Te.displacedBy.point)):Ke},Gi=function(Se){var Ce=Se.pageBorderBoxCenter,Te=Se.viewport,Ke=Se.destination,Pt=Se.insideDestination,yt=Se.afterCritical,kt=Pt.filter(function(Ht){return Es({target:Qi(Ht,yt),destination:Ke,viewport:Te.frame,withDroppableDisplacement:!0})}).sort(function(Ht,xn){var Wn=er(Ce,jl(Ke,ai(Ht,yt))),An=er(Ce,jl(Ke,ai(xn,yt)));return Wn<An?-1:An<Wn?1:Ht.descriptor.index-xn.descriptor.index});return kt[0]||null},ki=$n(function(Ce,Te){var Ke=Te[Ce.line];return{value:Ke,point:yr(Ce.line,Ke)}}),_i=function(Ce,Te,Ke){var Pt=Ce.axis;if(Ce.descriptor.mode==="virtual")return yr(Pt.line,Te[Pt.line]);var yt=Ce.subject.page.contentBox[Pt.size],kt=va(Ce.descriptor.id,Ke),Ht=kt.reduce(function(An,Bn){return An+Bn.client.marginBox[Pt.size]},0),xn=Ht+Te[Pt.line],Wn=xn-yt;return Wn<=0?null:yr(Pt.line,Wn)},oi=function(Ce,Te){return(0,ut.Z)({},Ce,{scroll:(0,ut.Z)({},Ce.scroll,{max:Te})})},Mi=function(Ce,Te,Ke){var Pt=Ce.frame;po(Te,Ce)&&In(!1),Ce.subject.withPlaceholder&&In(!1);var yt=ki(Ce.axis,Te.displaceBy).point,kt=_i(Ce,yt,Ke),Ht={placeholderSize:yt,increasedBy:kt,oldFrameMaxScroll:Ce.frame?Ce.frame.scroll.max:null};if(!Pt){var xn=Qo({page:Ce.subject.page,withPlaceholder:Ht,axis:Ce.axis,frame:Ce.frame});return(0,ut.Z)({},Ce,{subject:xn})}var Wn=kt?Cr(Pt.scroll.max,kt):Pt.scroll.max,An=oi(Pt,Wn),Bn=Qo({page:Ce.subject.page,withPlaceholder:Ht,axis:Ce.axis,frame:An});return(0,ut.Z)({},Ce,{subject:Bn,frame:An})},cr=function(Ce){var Te=Ce.subject.withPlaceholder;Te||In(!1);var Ke=Ce.frame;if(!Ke){var Pt=Qo({page:Ce.subject.page,axis:Ce.axis,frame:null,withPlaceholder:null});return(0,ut.Z)({},Ce,{subject:Pt})}var yt=Te.oldFrameMaxScroll;yt||In(!1);var kt=oi(Ke,yt),Ht=Qo({page:Ce.subject.page,axis:Ce.axis,frame:kt,withPlaceholder:null});return(0,ut.Z)({},Ce,{subject:Ht,frame:kt})},Hr=function(Se){var Ce=Se.previousPageBorderBoxCenter,Te=Se.moveRelativeTo,Ke=Se.insideDestination,Pt=Se.draggable,yt=Se.draggables,kt=Se.destination,Ht=Se.viewport,xn=Se.afterCritical;if(!Te){if(Ke.length)return null;var Wn={displaced:Eo,displacedBy:la,at:{type:"REORDER",destination:{droppableId:kt.descriptor.id,index:0}}},An=Ji({impact:Wn,draggable:Pt,droppable:kt,draggables:yt,afterCritical:xn}),Bn=po(Pt,kt)?kt:Mi(kt,Pt,yt),Fn=ic({draggable:Pt,destination:Bn,newPageBorderBoxCenter:An,viewport:Ht.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return Fn?Wn:null}var ni=Ce[kt.axis.line]<=Te.page.borderBox.center[kt.axis.line],Ii=function(){var no=Te.descriptor.index;return Te.descriptor.id===Pt.descriptor.id||ni?no:no+1}(),Gr=ki(kt.axis,Pt.displaceBy);return Ol({draggable:Pt,insideDestination:Ke,destination:kt,viewport:Ht,displacedBy:Gr,last:Eo,index:Ii})},ga=function(Se){var Ce=Se.isMovingForward,Te=Se.previousPageBorderBoxCenter,Ke=Se.draggable,Pt=Se.isOver,yt=Se.draggables,kt=Se.droppables,Ht=Se.viewport,xn=Se.afterCritical,Wn=Nn({isMovingForward:Ce,pageBorderBoxCenter:Te,source:Pt,droppables:kt,viewport:Ht});if(!Wn)return null;var An=va(Wn.descriptor.id,yt),Bn=Gi({pageBorderBoxCenter:Te,viewport:Ht,destination:Wn,insideDestination:An,afterCritical:xn}),Fn=Hr({previousPageBorderBoxCenter:Te,destination:Wn,draggable:Ke,draggables:yt,moveRelativeTo:Bn,insideDestination:An,viewport:Ht,afterCritical:xn});if(!Fn)return null;var ni=Ji({impact:Fn,draggable:Ke,droppable:Wn,draggables:yt,afterCritical:xn}),Ii=Oo({pageBorderBoxCenter:ni,draggable:Ke,viewport:Ht});return{clientSelection:Ii,impact:Fn,scrollJumpRequest:null}},$o=function(Se){var Ce=Se.at;return Ce?Ce.type==="REORDER"?Ce.destination.droppableId:Ce.combine.droppableId:null},Ua=function(Ce,Te){var Ke=$o(Ce);return Ke?Te[Ke]:null},Ka=function(Se){var Ce=Se.state,Te=Se.type,Ke=Ua(Ce.impact,Ce.dimensions.droppables),Pt=!!Ke,yt=Ce.dimensions.droppables[Ce.critical.droppable.id],kt=Ke||yt,Ht=kt.axis.direction,xn=Ht==="vertical"&&(Te==="MOVE_UP"||Te==="MOVE_DOWN")||Ht==="horizontal"&&(Te==="MOVE_LEFT"||Te==="MOVE_RIGHT");if(xn&&!Pt)return null;var Wn=Te==="MOVE_DOWN"||Te==="MOVE_RIGHT",An=Ce.dimensions.draggables[Ce.critical.draggable.id],Bn=Ce.current.page.borderBoxCenter,Fn=Ce.dimensions,ni=Fn.draggables,Ii=Fn.droppables;return xn?zl({isMovingForward:Wn,previousPageBorderBoxCenter:Bn,draggable:An,destination:kt,draggables:ni,viewport:Ce.viewport,previousClientSelection:Ce.current.client.selection,previousImpact:Ce.impact,afterCritical:Ce.afterCritical}):ga({isMovingForward:Wn,previousPageBorderBoxCenter:Bn,draggable:An,isOver:kt,draggables:ni,droppables:Ii,viewport:Ce.viewport,afterCritical:Ce.afterCritical})};function No(Se){return Se.phase==="DRAGGING"||Se.phase==="COLLECTING"}function qr(Se){var Ce=os(Se.top,Se.bottom),Te=os(Se.left,Se.right);return function(Pt){return Ce(Pt.y)&&Te(Pt.x)}}function Fi(Se,Ce){return Se.left<Ce.right&&Se.right>Ce.left&&Se.top<Ce.bottom&&Se.bottom>Ce.top}function eo(Se){var Ce=Se.pageBorderBox,Te=Se.draggable,Ke=Se.candidates,Pt=Te.page.borderBox.center,yt=Ke.map(function(kt){var Ht=kt.axis,xn=yr(kt.axis.line,Ce.center[Ht.line],kt.page.borderBox.center[Ht.crossAxisLine]);return{id:kt.descriptor.id,distance:er(Pt,xn)}}).sort(function(kt,Ht){return Ht.distance-kt.distance});return yt[0]?yt[0].id:null}function Ko(Se){var Ce=Se.pageBorderBox,Te=Se.draggable,Ke=Se.droppables,Pt=st(Ke).filter(function(yt){if(!yt.isEnabled)return!1;var kt=yt.subject.active;if(!kt||!Fi(Ce,kt))return!1;if(qr(kt)(Ce.center))return!0;var Ht=yt.axis,xn=kt.center[Ht.crossAxisLine],Wn=Ce[Ht.crossAxisStart],An=Ce[Ht.crossAxisEnd],Bn=os(kt[Ht.crossAxisStart],kt[Ht.crossAxisEnd]),Fn=Bn(Wn),ni=Bn(An);return!Fn&&!ni?!0:Fn?Wn<xn:An>xn});return Pt.length?Pt.length===1?Pt[0].descriptor.id:eo({pageBorderBox:Ce,draggable:Te,candidates:Pt}):null}var ma=function(Ce,Te){return rr(Tr(Ce,Te))},ya=function(Se,Ce){var Te=Se.frame;return Te?ma(Ce,Te.scroll.diff.value):Ce};function bo(Se){var Ce=Se.displaced,Te=Se.id;return!!(Ce.visible[Te]||Ce.invisible[Te])}function oa(Se){var Ce=Se.draggable,Te=Se.closest,Ke=Se.inHomeList;return Te?Ke&&Te.descriptor.index>Ce.descriptor.index?Te.descriptor.index-1:Te.descriptor.index:null}var Io=function(Se){var Ce=Se.pageBorderBoxWithDroppableScroll,Te=Se.draggable,Ke=Se.destination,Pt=Se.insideDestination,yt=Se.last,kt=Se.viewport,Ht=Se.afterCritical,xn=Ke.axis,Wn=ki(Ke.axis,Te.displaceBy),An=Wn.value,Bn=Ce[xn.start],Fn=Ce[xn.end],ni=Ga(Te,Pt),Ii=br(ni,function(no){var yo=no.descriptor.id,ko=no.page.borderBox.center[xn.line],na=ns(yo,Ht),Jo=bo({displaced:yt,id:yo});return na?Jo?Fn<=ko:Bn<ko-An:Jo?Fn<=ko+An:Bn<ko}),Gr=oa({draggable:Te,closest:Ii,inHomeList:po(Te,Ke)});return Ol({draggable:Te,insideDestination:Pt,destination:Ke,viewport:kt,last:yt,displacedBy:Wn,index:Gr})},Dr=4,Da=function(Se){var Ce=Se.draggable,Te=Se.pageBorderBoxWithDroppableScroll,Ke=Se.previousImpact,Pt=Se.destination,yt=Se.insideDestination,kt=Se.afterCritical;if(!Pt.isCombineEnabled)return null;var Ht=Pt.axis,xn=ki(Pt.axis,Ce.displaceBy),Wn=xn.value,An=Te[Ht.start],Bn=Te[Ht.end],Fn=Ga(Ce,yt),ni=br(Fn,function(Gr){var no=Gr.descriptor.id,yo=Gr.page.borderBox,ko=yo[Ht.size],na=ko/Dr,Jo=ns(no,kt),Ia=bo({displaced:Ke.displaced,id:no});return Jo?Ia?Bn>yo[Ht.start]+na&&Bn<yo[Ht.end]-na:An>yo[Ht.start]-Wn+na&&An<yo[Ht.end]-Wn-na:Ia?Bn>yo[Ht.start]+Wn+na&&Bn<yo[Ht.end]+Wn-na:An>yo[Ht.start]+na&&An<yo[Ht.end]-na});if(!ni)return null;var Ii={displacedBy:xn,displaced:Ke.displaced,at:{type:"COMBINE",combine:{draggableId:ni.descriptor.id,droppableId:Pt.descriptor.id}}};return Ii},Ha=function(Se){var Ce=Se.pageOffset,Te=Se.draggable,Ke=Se.draggables,Pt=Se.droppables,yt=Se.previousImpact,kt=Se.viewport,Ht=Se.afterCritical,xn=ma(Te.page.borderBox,Ce),Wn=Ko({pageBorderBox:xn,draggable:Te,droppables:Pt});if(!Wn)return Na;var An=Pt[Wn],Bn=va(An.descriptor.id,Ke),Fn=ya(An,xn);return Da({pageBorderBoxWithDroppableScroll:Fn,draggable:Te,previousImpact:yt,destination:An,insideDestination:Bn,afterCritical:Ht})||Io({pageBorderBoxWithDroppableScroll:Fn,draggable:Te,destination:An,insideDestination:Bn,last:yt.displaced,viewport:kt,afterCritical:Ht})},La=function(Se,Ce){var Te;return(0,ut.Z)({},Se,(Te={},Te[Ce.descriptor.id]=Ce,Te))},fl=function(Ce){var Te=Ce.previousImpact,Ke=Ce.impact,Pt=Ce.droppables,yt=$o(Te),kt=$o(Ke);if(!yt||yt===kt)return Pt;var Ht=Pt[yt];if(!Ht.subject.withPlaceholder)return Pt;var xn=cr(Ht);return La(Pt,xn)},xu=function(Se){var Ce=Se.draggable,Te=Se.draggables,Ke=Se.droppables,Pt=Se.previousImpact,yt=Se.impact,kt=fl({previousImpact:Pt,impact:yt,droppables:Ke}),Ht=$o(yt);if(!Ht)return kt;var xn=Ke[Ht];if(po(Ce,xn)||xn.subject.withPlaceholder)return kt;var Wn=Mi(xn,Ce,Te);return La(kt,Wn)},Jt=function(Se){var Ce=Se.state,Te=Se.clientSelection,Ke=Se.dimensions,Pt=Se.viewport,yt=Se.impact,kt=Se.scrollJumpRequest,Ht=Pt||Ce.viewport,xn=Ke||Ce.dimensions,Wn=Te||Ce.current.client.selection,An=Cn(Wn,Ce.initial.client.selection),Bn={offset:An,selection:Wn,borderBoxCenter:Cr(Ce.initial.client.borderBoxCenter,An)},Fn={selection:Cr(Bn.selection,Ht.scroll.current),borderBoxCenter:Cr(Bn.borderBoxCenter,Ht.scroll.current),offset:Cr(Bn.offset,Ht.scroll.diff.value)},ni={client:Bn,page:Fn};if(Ce.phase==="COLLECTING")return(0,ut.Z)({phase:"COLLECTING"},Ce,{dimensions:xn,viewport:Ht,current:ni});var Ii=xn.draggables[Ce.critical.draggable.id],Gr=yt||Ha({pageOffset:Fn.offset,draggable:Ii,draggables:xn.draggables,droppables:xn.droppables,previousImpact:Ce.impact,viewport:Ht,afterCritical:Ce.afterCritical}),no=xu({draggable:Ii,impact:Gr,previousImpact:Ce.impact,draggables:xn.draggables,droppables:xn.droppables}),yo=(0,ut.Z)({},Ce,{current:ni,dimensions:{draggables:xn.draggables,droppables:no},impact:Gr,viewport:Ht,scrollJumpRequest:kt||null,forceShouldAnimate:kt?!1:null});return yo};function Yt(Se,Ce){return Se.map(function(Te){return Ce[Te]})}var Dn=function(Se){var Ce=Se.impact,Te=Se.viewport,Ke=Se.draggables,Pt=Se.destination,yt=Se.forceShouldAnimate,kt=Ce.displaced,Ht=Yt(kt.all,Ke),xn=Ss({afterDragging:Ht,destination:Pt,displacedBy:Ce.displacedBy,viewport:Te.frame,forceShouldAnimate:yt,last:kt});return(0,ut.Z)({},Ce,{displaced:xn})},nt=function(Se){var Ce=Se.impact,Te=Se.draggable,Ke=Se.droppable,Pt=Se.draggables,yt=Se.viewport,kt=Se.afterCritical,Ht=Ji({impact:Ce,draggable:Te,draggables:Pt,droppable:Ke,afterCritical:kt});return Oo({pageBorderBoxCenter:Ht,draggable:Te,viewport:yt})},Qt=function(Se){var Ce=Se.state,Te=Se.dimensions,Ke=Se.viewport;Ce.movementMode!=="SNAP"&&In(!1);var Pt=Ce.impact,yt=Ke||Ce.viewport,kt=Te||Ce.dimensions,Ht=kt.draggables,xn=kt.droppables,Wn=Ht[Ce.critical.draggable.id],An=$o(Pt);An||In(!1);var Bn=xn[An],Fn=Dn({impact:Pt,viewport:yt,destination:Bn,draggables:Ht}),ni=nt({impact:Fn,draggable:Wn,droppable:Bn,draggables:Ht,viewport:yt,afterCritical:Ce.afterCritical});return Jt({impact:Fn,clientSelection:ni,state:Ce,dimensions:kt,viewport:yt})},lr=function(Se){return{index:Se.index,droppableId:Se.droppableId}},Ir=function(Se){var Ce=Se.draggable,Te=Se.home,Ke=Se.draggables,Pt=Se.viewport,yt=ki(Te.axis,Ce.displaceBy),kt=va(Te.descriptor.id,Ke),Ht=kt.indexOf(Ce);Ht===-1&&In(!1);var xn=kt.slice(Ht+1),Wn=xn.reduce(function(ni,Ii){return ni[Ii.descriptor.id]=!0,ni},{}),An={inVirtualList:Te.descriptor.mode==="virtual",displacedBy:yt,effected:Wn},Bn=Ss({afterDragging:xn,destination:Te,displacedBy:yt,last:null,viewport:Pt.frame,forceShouldAnimate:!1}),Fn={displaced:Bn,displacedBy:yt,at:{type:"REORDER",destination:lr(Ce.descriptor)}};return{impact:Fn,afterCritical:An}},mr=function(Se,Ce){return{draggables:Se.draggables,droppables:La(Se.droppables,Ce)}},ur=function(Ce){},Bi=function(Ce){},Pr=function(Se){var Ce=Se.draggable,Te=Se.offset,Ke=Se.initialWindowScroll,Pt=Sr(Ce.client,Te),yt=Ne(Pt,Ke),kt=(0,ut.Z)({},Ce,{placeholder:(0,ut.Z)({},Ce.placeholder,{client:Pt}),client:Pt,page:yt});return kt},to=function(Se){var Ce=Se.frame;return Ce||In(!1),Ce},So=function(Se){var Ce=Se.additions,Te=Se.updatedDroppables,Ke=Se.viewport,Pt=Ke.scroll.diff.value;return Ce.map(function(yt){var kt=yt.descriptor.droppableId,Ht=Te[kt],xn=to(Ht),Wn=xn.scroll.diff.value,An=Cr(Pt,Wn),Bn=Pr({draggable:yt,offset:An,initialWindowScroll:Ke.scroll.initial});return Bn})},fr=function(Se){var Ce=Se.state,Te=Se.published;ur();var Ke=Te.modified.map(function(na){var Jo=Ce.dimensions.droppables[na.droppableId],Ia=nr(Jo,na.scroll);return Ia}),Pt=(0,ut.Z)({},Ce.dimensions.droppables,{},Yo(Ke)),yt=Ki(So({additions:Te.additions,updatedDroppables:Pt,viewport:Ce.viewport})),kt=(0,ut.Z)({},Ce.dimensions.draggables,{},yt);Te.removals.forEach(function(na){delete kt[na]});var Ht={droppables:Pt,draggables:kt},xn=$o(Ce.impact),Wn=xn?Ht.droppables[xn]:null,An=Ht.draggables[Ce.critical.draggable.id],Bn=Ht.droppables[Ce.critical.droppable.id],Fn=Ir({draggable:An,home:Bn,draggables:kt,viewport:Ce.viewport}),ni=Fn.impact,Ii=Fn.afterCritical,Gr=Wn&&Wn.isCombineEnabled?Ce.impact:ni,no=Ha({pageOffset:Ce.current.page.offset,draggable:Ht.draggables[Ce.critical.draggable.id],draggables:Ht.draggables,droppables:Ht.droppables,previousImpact:Gr,viewport:Ce.viewport,afterCritical:Ii});Bi();var yo=(0,ut.Z)({phase:"DRAGGING"},Ce,{phase:"DRAGGING",impact:no,onLiftImpact:ni,dimensions:Ht,afterCritical:Ii,forceShouldAnimate:!1});if(Ce.phase==="COLLECTING")return yo;var ko=(0,ut.Z)({phase:"DROP_PENDING"},yo,{phase:"DROP_PENDING",reason:Ce.reason,isWaiting:!1});return ko},pr=function(Ce){return Ce.movementMode==="SNAP"},vr=function(Ce,Te,Ke){var Pt=mr(Ce.dimensions,Te);return!pr(Ce)||Ke?Jt({state:Ce,dimensions:Pt}):Qt({state:Ce,dimensions:Pt})};function ji(Se){return Se.isDragging&&Se.movementMode==="SNAP"?(0,ut.Z)({phase:"DRAGGING"},Se,{scrollJumpRequest:null}):Se}var Ai={phase:"IDLE",completed:null,shouldFlush:!1},Wr=function(Se,Ce){if(Se===void 0&&(Se=Ai),Ce.type==="FLUSH")return(0,ut.Z)({},Ai,{shouldFlush:!0});if(Ce.type==="INITIAL_PUBLISH"){Se.phase!=="IDLE"&&In(!1);var Te=Ce.payload,Ke=Te.critical,Pt=Te.clientSelection,yt=Te.viewport,kt=Te.dimensions,Ht=Te.movementMode,xn=kt.draggables[Ke.draggable.id],Wn=kt.droppables[Ke.droppable.id],An={selection:Pt,borderBoxCenter:xn.client.borderBox.center,offset:Xr},Bn={client:An,page:{selection:Cr(An.selection,yt.scroll.initial),borderBoxCenter:Cr(An.selection,yt.scroll.initial),offset:Cr(An.selection,yt.scroll.diff.value)}},Fn=st(kt.droppables).every(function(Xf){return!Xf.isFixedOnPage}),ni=Ir({draggable:xn,home:Wn,draggables:kt.draggables,viewport:yt}),Ii=ni.impact,Gr=ni.afterCritical,no={phase:"DRAGGING",isDragging:!0,critical:Ke,movementMode:Ht,dimensions:kt,initial:Bn,current:Bn,isWindowScrollAllowed:Fn,impact:Ii,afterCritical:Gr,onLiftImpact:Ii,viewport:yt,scrollJumpRequest:null,forceShouldAnimate:null};return no}if(Ce.type==="COLLECTION_STARTING"){if(Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING")return Se;Se.phase!=="DRAGGING"&&In(!1);var yo=(0,ut.Z)({phase:"COLLECTING"},Se,{phase:"COLLECTING"});return yo}if(Ce.type==="PUBLISH_WHILE_DRAGGING")return Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING"||In(!1),fr({state:Se,published:Ce.payload});if(Ce.type==="MOVE"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||In(!1);var ko=Ce.payload.client;return ri(ko,Se.current.client.selection)?Se:Jt({state:Se,clientSelection:ko,impact:pr(Se)?Se.impact:null})}if(Ce.type==="UPDATE_DROPPABLE_SCROLL"){if(Se.phase==="DROP_PENDING"||Se.phase==="COLLECTING")return ji(Se);No(Se)||In(!1);var na=Ce.payload,Jo=na.id,Ia=na.newScroll,ds=Se.dimensions.droppables[Jo];if(!ds)return Se;var ks=nr(ds,Ia);return vr(Se,ks,!1)}if(Ce.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||In(!1);var Ql=Ce.payload,Is=Ql.id,Wl=Ql.isEnabled,_u=Se.dimensions.droppables[Is];_u||In(!1),_u.isEnabled===Wl&&In(!1);var Xu=(0,ut.Z)({},_u,{isEnabled:Wl});return vr(Se,Xu,!0)}if(Ce.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||In(!1);var hd=Ce.payload,Lc=hd.id,wc=hd.isCombineEnabled,gu=Se.dimensions.droppables[Lc];gu||In(!1),gu.isCombineEnabled===wc&&In(!1);var Il=(0,ut.Z)({},gu,{isCombineEnabled:wc});return vr(Se,Il,!0)}if(Ce.type==="MOVE_BY_WINDOW_SCROLL"){if(Se.phase==="DROP_PENDING"||Se.phase==="DROP_ANIMATING")return Se;No(Se)||In(!1),Se.isWindowScrollAllowed||In(!1);var Nd=Ce.payload.newScroll;if(ri(Se.viewport.scroll.current,Nd))return ji(Se);var Gl=Cs(Se.viewport,Nd);return pr(Se)?Qt({state:Se,viewport:Gl}):Jt({state:Se,viewport:Gl})}if(Ce.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!No(Se))return Se;var fd=Ce.payload.maxScroll;if(ri(fd,Se.viewport.scroll.max))return Se;var vf=(0,ut.Z)({},Se.viewport,{scroll:(0,ut.Z)({},Se.viewport.scroll,{max:fd})});return(0,ut.Z)({phase:"DRAGGING"},Se,{viewport:vf})}if(Ce.type==="MOVE_UP"||Ce.type==="MOVE_DOWN"||Ce.type==="MOVE_LEFT"||Ce.type==="MOVE_RIGHT"){if(Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING")return Se;Se.phase!=="DRAGGING"&&In(!1);var gd=Ka({state:Se,type:Ce.type});return gd?Jt({state:Se,impact:gd.impact,clientSelection:gd.clientSelection,scrollJumpRequest:gd.scrollJumpRequest}):Se}if(Ce.type==="DROP_PENDING"){var ha=Ce.payload.reason;Se.phase!=="COLLECTING"&&In(!1);var Wh=(0,ut.Z)({phase:"DROP_PENDING"},Se,{phase:"DROP_PENDING",isWaiting:!0,reason:ha});return Wh}if(Ce.type==="DROP_ANIMATE"){var Lg=Ce.payload,pd=Lg.completed,Qd=Lg.dropDuration,Fh=Lg.newHomeClientOffset;Se.phase==="DRAGGING"||Se.phase==="DROP_PENDING"||In(!1);var Cc={phase:"DROP_ANIMATING",completed:pd,dropDuration:Qd,newHomeClientOffset:Fh,dimensions:Se.dimensions};return Cc}if(Ce.type==="DROP_COMPLETE"){var Yf=Ce.payload.completed;return{phase:"IDLE",completed:Yf,shouldFlush:!1}}return Se},zo=function(Ce){return{type:"BEFORE_INITIAL_CAPTURE",payload:Ce}},Br=function(Ce){return{type:"LIFT",payload:Ce}},Er=function(Ce){return{type:"INITIAL_PUBLISH",payload:Ce}},Or=function(Ce){return{type:"PUBLISH_WHILE_DRAGGING",payload:Ce}},kr=function(){return{type:"COLLECTION_STARTING",payload:null}},gr=function(Ce){return{type:"UPDATE_DROPPABLE_SCROLL",payload:Ce}},Aa=function(Ce){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:Ce}},_o=function(Ce){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:Ce}},xa=function(Ce){return{type:"MOVE",payload:Ce}},Wa=function(Ce){return{type:"MOVE_BY_WINDOW_SCROLL",payload:Ce}},wo=function(Ce){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:Ce}},Oa=function(){return{type:"MOVE_UP",payload:null}},El=function(){return{type:"MOVE_DOWN",payload:null}},Nr=function(){return{type:"MOVE_RIGHT",payload:null}},_s=function(){return{type:"MOVE_LEFT",payload:null}},jo=function(){return{type:"FLUSH",payload:null}},Hs=function(Ce){return{type:"DROP_ANIMATE",payload:Ce}},gl=function(Ce){return{type:"DROP_COMPLETE",payload:Ce}},rc=function(Ce){return{type:"DROP",payload:Ce}},ad=function(Ce){return{type:"DROP_PENDING",payload:Ce}},kc=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function oc(Se){if(!(Se.length<=1)){for(var Ce=Se.map(function(Ht){return Ht.descriptor.index}),Te={},Ke=1;Ke<Ce.length;Ke++){var Pt=Ce[Ke],yt=Ce[Ke-1];Pt!==yt+1&&(Te[Pt]=!0)}if(Object.keys(Te).length)var kt=Ce.map(function(Ht){var xn=!!Te[Ht];return xn?"[\u{1F525}"+Ht+"]":""+Ht}).join(", ")}}function vc(Se,Ce){if(0)var Te}var as=function(Se){return function(Ce){var Te=Ce.getState,Ke=Ce.dispatch;return function(Pt){return function(yt){if(yt.type!=="LIFT"){Pt(yt);return}var kt=yt.payload,Ht=kt.id,xn=kt.clientSelection,Wn=kt.movementMode,An=Te();An.phase==="DROP_ANIMATING"&&Ke(gl({completed:An.completed})),Te().phase!=="IDLE"&&In(!1),Ke(jo()),Ke(zo({draggableId:Ht,movementMode:Wn}));var Bn={shouldPublishImmediately:Wn==="SNAP"},Fn={draggableId:Ht,scrollOptions:Bn},ni=Se.startPublishing(Fn),Ii=ni.critical,Gr=ni.dimensions,no=ni.viewport;vc(Ii,Gr),Ke(Er({critical:Ii,dimensions:Gr,clientSelection:xn,movementMode:Wn,viewport:no}))}}}},du=function(Se){return function(){return function(Ce){return function(Te){Te.type==="INITIAL_PUBLISH"&&Se.dragging(),Te.type==="DROP_ANIMATE"&&Se.dropping(Te.payload.completed.result.reason),(Te.type==="FLUSH"||Te.type==="DROP_COMPLETE")&&Se.resting(),Ce(Te)}}}},Rc={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},ac={opacity:{drop:0,combining:.7},scale:{drop:.75}},Rd={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},au=Rd.outOfTheWay+"s "+Rc.outOfTheWay,su={fluid:"opacity "+au,snap:"transform "+au+", opacity "+au,drop:function(Ce){var Te=Ce+"s "+Rc.drop;return"transform "+Te+", opacity "+Te},outOfTheWay:"transform "+au,placeholder:"height "+au+", width "+au+", margin "+au},Wu=function(Ce){return ri(Ce,Xr)?null:"translate("+Ce.x+"px, "+Ce.y+"px)"},Au={moveTo:Wu,drop:function(Ce,Te){var Ke=Wu(Ce);return Ke?Te?Ke+" scale("+ac.scale.drop+")":Ke:null}},yc=Rd.minDropTime,bd=Rd.maxDropTime,_d=bd-yc,Fd=1500,ch=.6,li=function(Se){var Ce=Se.current,Te=Se.destination,Ke=Se.reason,Pt=er(Ce,Te);if(Pt<=0)return yc;if(Pt>=Fd)return bd;var yt=Pt/Fd,kt=yc+_d*yt,Ht=Ke==="CANCEL"?kt*ch:kt;return Number(Ht.toFixed(2))},fo=function(Se){var Ce=Se.impact,Te=Se.draggable,Ke=Se.dimensions,Pt=Se.viewport,yt=Se.afterCritical,kt=Ke.draggables,Ht=Ke.droppables,xn=$o(Ce),Wn=xn?Ht[xn]:null,An=Ht[Te.descriptor.droppableId],Bn=nt({impact:Ce,draggable:Te,draggables:kt,afterCritical:yt,droppable:Wn||An,viewport:Pt}),Fn=Cn(Bn,Te.client.borderBox.center);return Fn},Xa=function(Se){var Ce=Se.draggables,Te=Se.reason,Ke=Se.lastImpact,Pt=Se.home,yt=Se.viewport,kt=Se.onLiftImpact;if(!Ke.at||Te!=="DROP"){var Ht=Dn({draggables:Ce,impact:kt,destination:Pt,viewport:yt,forceShouldAnimate:!0});return{impact:Ht,didDropInsideDroppable:!1}}if(Ke.at.type==="REORDER")return{impact:Ke,didDropInsideDroppable:!0};var xn=(0,ut.Z)({},Ke,{displaced:Eo});return{impact:xn,didDropInsideDroppable:!0}},rt=function(Se){var Ce=Se.getState,Te=Se.dispatch;return function(Ke){return function(Pt){if(Pt.type!=="DROP"){Ke(Pt);return}var yt=Ce(),kt=Pt.payload.reason;if(yt.phase==="COLLECTING"){Te(ad({reason:kt}));return}if(yt.phase!=="IDLE"){var Ht=yt.phase==="DROP_PENDING"&&yt.isWaiting;Ht&&In(!1),yt.phase==="DRAGGING"||yt.phase==="DROP_PENDING"||In(!1);var xn=yt.critical,Wn=yt.dimensions,An=Wn.draggables[yt.critical.draggable.id],Bn=Xa({reason:kt,lastImpact:yt.impact,afterCritical:yt.afterCritical,onLiftImpact:yt.onLiftImpact,home:yt.dimensions.droppables[yt.critical.droppable.id],viewport:yt.viewport,draggables:yt.dimensions.draggables}),Fn=Bn.impact,ni=Bn.didDropInsideDroppable,Ii=ni?Ma(Fn):null,Gr=ni?hs(Fn):null,no={index:xn.draggable.index,droppableId:xn.droppable.id},yo={draggableId:An.descriptor.id,type:An.descriptor.type,source:no,reason:kt,mode:yt.movementMode,destination:Ii,combine:Gr},ko=fo({impact:Fn,draggable:An,dimensions:Wn,viewport:yt.viewport,afterCritical:yt.afterCritical}),na={critical:yt.critical,afterCritical:yt.afterCritical,result:yo,impact:Fn},Jo=!ri(yt.current.client.offset,ko)||!!yo.combine;if(!Jo){Te(gl({completed:na}));return}var Ia=li({current:yt.current.client.offset,destination:ko,reason:kt}),ds={newHomeClientOffset:ko,dropDuration:Ia,completed:na};Te(Hs(ds))}}}},et=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Ut(Se){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(Te){Te.target!==window&&Te.target!==window.document||Se()}}}function Xt(Se){var Ce=Se.onWindowScroll;function Te(){Ce(et())}var Ke=Zt(Te),Pt=Ut(Ke),yt=Et;function kt(){return yt!==Et}function Ht(){kt()&&In(!1),yt=Kn(window,[Pt])}function xn(){kt()||In(!1),Ke.cancel(),yt(),yt=Et}return{start:Ht,stop:xn,isActive:kt}}var gn=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},nn=function(Se){var Ce=Xt({onWindowScroll:function(Ke){Se.dispatch(Wa({newScroll:Ke}))}});return function(Te){return function(Ke){!Ce.isActive()&&Ke.type==="INITIAL_PUBLISH"&&Ce.start(),Ce.isActive()&&gn(Ke)&&Ce.stop(),Te(Ke)}}},Vn=function(Se){var Ce=!1,Te=!1,Ke=setTimeout(function(){Te=!0}),Pt=function(kt){Ce||Te||(Ce=!0,Se(kt),clearTimeout(Ke))};return Pt.wasCalled=function(){return Ce},Pt},jn=function(){var Se=[],Ce=function(yt){var kt=Lr(Se,function(Wn){return Wn.timerId===yt});kt===-1&&In(!1);var Ht=Se.splice(kt,1),xn=Ht[0];xn.callback()},Te=function(yt){var kt=setTimeout(function(){return Ce(kt)}),Ht={timerId:kt,callback:yt};Se.push(Ht)},Ke=function(){if(Se.length){var yt=[].concat(Se);Se.length=0,yt.forEach(function(kt){clearTimeout(kt.timerId),kt.callback()})}};return{add:Te,flush:Ke}},Xn=function(Ce,Te){return Ce==null&&Te==null?!0:Ce==null||Te==null?!1:Ce.droppableId===Te.droppableId&&Ce.index===Te.index},yi=function(Ce,Te){return Ce==null&&Te==null?!0:Ce==null||Te==null?!1:Ce.draggableId===Te.draggableId&&Ce.droppableId===Te.droppableId},Jn=function(Ce,Te){if(Ce===Te)return!0;var Ke=Ce.draggable.id===Te.draggable.id&&Ce.draggable.droppableId===Te.draggable.droppableId&&Ce.draggable.type===Te.draggable.type&&Ce.draggable.index===Te.draggable.index,Pt=Ce.droppable.id===Te.droppable.id&&Ce.droppable.type===Te.droppable.type;return Ke&&Pt},mi=function(Ce,Te){ur(),Te(),Bi()},or=function(Ce,Te){return{draggableId:Ce.draggable.id,type:Ce.droppable.type,source:{droppableId:Ce.droppable.id,index:Ce.draggable.index},mode:Te}},Vi=function(Ce,Te,Ke,Pt){if(!Ce){Ke(Pt(Te));return}var yt=Vn(Ke),kt={announce:yt};Ce(Te,kt),yt.wasCalled()||Ke(Pt(Te))},Ui=function(Se,Ce){var Te=jn(),Ke=null,Pt=function(Fn,ni){Ke&&In(!1),mi("onBeforeCapture",function(){var Ii=Se().onBeforeCapture;if(Ii){var Gr={draggableId:Fn,mode:ni};Ii(Gr)}})},yt=function(Fn,ni){Ke&&In(!1),mi("onBeforeDragStart",function(){var Ii=Se().onBeforeDragStart;Ii&&Ii(or(Fn,ni))})},kt=function(Fn,ni){Ke&&In(!1);var Ii=or(Fn,ni);Ke={mode:ni,lastCritical:Fn,lastLocation:Ii.source,lastCombine:null},Te.add(function(){mi("onDragStart",function(){return Vi(Se().onDragStart,Ii,Ce,Po.onDragStart)})})},Ht=function(Fn,ni){var Ii=Ma(ni),Gr=hs(ni);Ke||In(!1);var no=!Jn(Fn,Ke.lastCritical);no&&(Ke.lastCritical=Fn);var yo=!Xn(Ke.lastLocation,Ii);yo&&(Ke.lastLocation=Ii);var ko=!yi(Ke.lastCombine,Gr);if(ko&&(Ke.lastCombine=Gr),!(!no&&!yo&&!ko)){var na=(0,ut.Z)({},or(Fn,Ke.mode),{combine:Gr,destination:Ii});Te.add(function(){mi("onDragUpdate",function(){return Vi(Se().onDragUpdate,na,Ce,Po.onDragUpdate)})})}},xn=function(){Ke||In(!1),Te.flush()},Wn=function(Fn){Ke||In(!1),Ke=null,mi("onDragEnd",function(){return Vi(Se().onDragEnd,Fn,Ce,Po.onDragEnd)})},An=function(){if(Ke){var Fn=(0,ut.Z)({},or(Ke.lastCritical,Ke.mode),{combine:null,destination:null,reason:"CANCEL"});Wn(Fn)}};return{beforeCapture:Pt,beforeStart:yt,start:kt,update:Ht,flush:xn,drop:Wn,abort:An}},Jr=function(Se,Ce){var Te=Ui(Se,Ce);return function(Ke){return function(Pt){return function(yt){if(yt.type==="BEFORE_INITIAL_CAPTURE"){Te.beforeCapture(yt.payload.draggableId,yt.payload.movementMode);return}if(yt.type==="INITIAL_PUBLISH"){var kt=yt.payload.critical;Te.beforeStart(kt,yt.payload.movementMode),Pt(yt),Te.start(kt,yt.payload.movementMode);return}if(yt.type==="DROP_COMPLETE"){var Ht=yt.payload.completed.result;Te.flush(),Pt(yt),Te.drop(Ht);return}if(Pt(yt),yt.type==="FLUSH"){Te.abort();return}var xn=Ke.getState();xn.phase==="DRAGGING"&&Te.update(xn.critical,xn.impact)}}}},ir=function(Se){return function(Ce){return function(Te){if(Te.type!=="DROP_ANIMATION_FINISHED"){Ce(Te);return}var Ke=Se.getState();Ke.phase!=="DROP_ANIMATING"&&In(!1),Se.dispatch(gl({completed:Ke.completed}))}}},Rr=function(Se){var Ce=null,Te=null;function Ke(){Te&&(cancelAnimationFrame(Te),Te=null),Ce&&(Ce(),Ce=null)}return function(Pt){return function(yt){if((yt.type==="FLUSH"||yt.type==="DROP_COMPLETE"||yt.type==="DROP_ANIMATION_FINISHED")&&Ke(),Pt(yt),yt.type==="DROP_ANIMATE"){var kt={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var xn=Se.getState();xn.phase==="DROP_ANIMATING"&&Se.dispatch(kc())}};Te=requestAnimationFrame(function(){Te=null,Ce=Kn(window,[kt])})}}}},jr=function(Se){return function(){return function(Ce){return function(Te){(Te.type==="DROP_COMPLETE"||Te.type==="FLUSH"||Te.type==="DROP_ANIMATE")&&Se.stopPublishing(),Ce(Te)}}}},vo=function(Se){var Ce=!1;return function(){return function(Te){return function(Ke){if(Ke.type==="INITIAL_PUBLISH"){Ce=!0,Se.tryRecordFocus(Ke.payload.critical.draggable.id),Te(Ke),Se.tryRestoreFocusRecorded();return}if(Te(Ke),!!Ce){if(Ke.type==="FLUSH"){Ce=!1,Se.tryRestoreFocusRecorded();return}if(Ke.type==="DROP_COMPLETE"){Ce=!1;var Pt=Ke.payload.completed.result;Pt.combine&&Se.tryShiftRecord(Pt.draggableId,Pt.combine.draggableId),Se.tryRestoreFocusRecorded()}}}}}},Vo=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},ua=function(Se){return function(Ce){return function(Te){return function(Ke){if(Vo(Ke)){Se.stop(),Te(Ke);return}if(Ke.type==="INITIAL_PUBLISH"){Te(Ke);var Pt=Ce.getState();Pt.phase!=="DRAGGING"&&In(!1),Se.start(Pt);return}Te(Ke),Se.scroll(Ce.getState())}}}},oo=function(Se){return function(Ce){return function(Te){if(Ce(Te),Te.type==="PUBLISH_WHILE_DRAGGING"){var Ke=Se.getState();Ke.phase==="DROP_PENDING"&&(Ke.isWaiting||Se.dispatch(rc({reason:Ke.reason})))}}}},Wo=Ge.qC,Ta=function(Se){var Ce=Se.dimensionMarshal,Te=Se.focusMarshal,Ke=Se.styleMarshal,Pt=Se.getResponders,yt=Se.announce,kt=Se.autoScroller;return(0,Ge.MT)(Wr,Wo((0,Ge.md)(du(Ke),jr(Ce),as(Ce),rt,ir,Rr,oo,ua(kt),nn,vo(Te),Jr(Pt,yt))))},uo=function(){return{additions:{},removals:{},modified:{}}};function To(Se){var Ce=Se.registry,Te=Se.callbacks,Ke=uo(),Pt=null,yt=function(){Pt||(Te.collectionStarting(),Pt=requestAnimationFrame(function(){Pt=null,ur();var An=Ke,Bn=An.additions,Fn=An.removals,ni=An.modified,Ii=Object.keys(Bn).map(function(yo){return Ce.draggable.getById(yo).getDimension(Xr)}).sort(function(yo,ko){return yo.descriptor.index-ko.descriptor.index}),Gr=Object.keys(ni).map(function(yo){var ko=Ce.droppable.getById(yo),na=ko.callbacks.getScrollWhileDragging();return{droppableId:yo,scroll:na}}),no={additions:Ii,removals:Object.keys(Fn),modified:Gr};Ke=uo(),Bi(),Te.publish(no)}))},kt=function(An){var Bn=An.descriptor.id;Ke.additions[Bn]=An,Ke.modified[An.descriptor.droppableId]=!0,Ke.removals[Bn]&&delete Ke.removals[Bn],yt()},Ht=function(An){var Bn=An.descriptor;Ke.removals[Bn.id]=!0,Ke.modified[Bn.droppableId]=!0,Ke.additions[Bn.id]&&delete Ke.additions[Bn.id],yt()},xn=function(){Pt&&(cancelAnimationFrame(Pt),Pt=null,Ke=uo())};return{add:kt,remove:Ht,stop:xn}}var co=function(Se){var Ce=Se.scrollHeight,Te=Se.scrollWidth,Ke=Se.height,Pt=Se.width,yt=Cn({x:Te,y:Ce},{x:Pt,y:Ke}),kt={x:Math.max(0,yt.x),y:Math.max(0,yt.y)};return kt},Ar=function(){var Se=document.documentElement;return Se||In(!1),Se},Fo=function(){var Se=Ar(),Ce=co({scrollHeight:Se.scrollHeight,scrollWidth:Se.scrollWidth,width:Se.clientWidth,height:Se.clientHeight});return Ce},ta=function(){var Se=et(),Ce=Fo(),Te=Se.y,Ke=Se.x,Pt=Ar(),yt=Pt.clientWidth,kt=Pt.clientHeight,Ht=Ke+yt,xn=Te+kt,Wn=rr({top:Te,left:Ke,right:Ht,bottom:xn}),An={frame:Wn,scroll:{initial:Se,current:Se,max:Ce,diff:{value:Xr,displacement:Xr}}};return An},Sa=function(Se){var Ce=Se.critical,Te=Se.scrollOptions,Ke=Se.registry;ur();var Pt=ta(),yt=Pt.scroll.current,kt=Ce.droppable,Ht=Ke.droppable.getAllByType(kt.type).map(function(Bn){return Bn.callbacks.getDimensionAndWatchScroll(yt,Te)}),xn=Ke.draggable.getAllByType(Ce.draggable.type).map(function(Bn){return Bn.getDimension(yt)}),Wn={draggables:Ki(xn),droppables:Yo(Ht)};Bi();var An={dimensions:Wn,critical:Ce,viewport:Pt};return An};function Pa(Se,Ce,Te){if(Te.descriptor.id===Ce.id||Te.descriptor.type!==Ce.type)return!1;var Ke=Se.droppable.getById(Te.descriptor.droppableId);return Ke.descriptor.mode==="virtual"}var ao=function(Se,Ce){var Te=null,Ke=To({callbacks:{publish:Ce.publishWhileDragging,collectionStarting:Ce.collectionStarting},registry:Se}),Pt=function(ni,Ii){Se.droppable.exists(ni)||In(!1),Te&&Ce.updateDroppableIsEnabled({id:ni,isEnabled:Ii})},yt=function(ni,Ii){Te&&(Se.droppable.exists(ni)||In(!1),Ce.updateDroppableIsCombineEnabled({id:ni,isCombineEnabled:Ii}))},kt=function(ni,Ii){Te&&(Se.droppable.exists(ni)||In(!1),Ce.updateDroppableScroll({id:ni,newScroll:Ii}))},Ht=function(ni,Ii){Te&&Se.droppable.getById(ni).callbacks.scroll(Ii)},xn=function(){if(Te){Ke.stop();var ni=Te.critical.droppable;Se.droppable.getAllByType(ni.type).forEach(function(Ii){return Ii.callbacks.dragStopped()}),Te.unsubscribe(),Te=null}},Wn=function(ni){Te||In(!1);var Ii=Te.critical.draggable;ni.type==="ADDITION"&&Pa(Se,Ii,ni.value)&&Ke.add(ni.value),ni.type==="REMOVAL"&&Pa(Se,Ii,ni.value)&&Ke.remove(ni.value)},An=function(ni){Te&&In(!1);var Ii=Se.draggable.getById(ni.draggableId),Gr=Se.droppable.getById(Ii.descriptor.droppableId),no={draggable:Ii.descriptor,droppable:Gr.descriptor},yo=Se.subscribe(Wn);return Te={critical:no,unsubscribe:yo},Sa({critical:no,registry:Se,scrollOptions:ni.scrollOptions})},Bn={updateDroppableIsEnabled:Pt,updateDroppableIsCombineEnabled:yt,scrollDroppable:Ht,updateDroppableScroll:kt,startPublishing:An,stopPublishing:xn};return Bn},ka=function(Se,Ce){return Se.phase==="IDLE"?!0:Se.phase!=="DROP_ANIMATING"||Se.completed.result.draggableId===Ce?!1:Se.completed.result.reason==="DROP"},Va=function(Se){window.scrollBy(Se.x,Se.y)},bs=$n(function(Se){return st(Se).filter(function(Ce){return!(!Ce.isEnabled||!Ce.frame)})}),us=function(Ce,Te){var Ke=br(bs(Te),function(Pt){return Pt.frame||In(!1),qr(Pt.frame.pageMarginBox)(Ce)});return Ke},qs=function(Se){var Ce=Se.center,Te=Se.destination,Ke=Se.droppables;if(Te){var Pt=Ke[Te];return Pt.frame?Pt:null}var yt=us(Ce,Ke);return yt},Ls={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(Ce){return Math.pow(Ce,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},Za=function(Se,Ce){var Te=Se[Ce.size]*Ls.startFromPercentage,Ke=Se[Ce.size]*Ls.maxScrollAtPercentage,Pt={startScrollingFrom:Te,maxScrollValueAt:Ke};return Pt},aa=function(Se){var Ce=Se.startOfRange,Te=Se.endOfRange,Ke=Se.current,Pt=Te-Ce;if(Pt===0)return 0;var yt=Ke-Ce,kt=yt/Pt;return kt},fs=1,el=function(Se,Ce){if(Se>Ce.startScrollingFrom)return 0;if(Se<=Ce.maxScrollValueAt)return Ls.maxPixelScroll;if(Se===Ce.startScrollingFrom)return fs;var Te=aa({startOfRange:Ce.maxScrollValueAt,endOfRange:Ce.startScrollingFrom,current:Se}),Ke=1-Te,Pt=Ls.maxPixelScroll*Ls.ease(Ke);return Math.ceil(Pt)},Ws=Ls.durationDampening.accelerateAt,cl=Ls.durationDampening.stopDampeningAt,ba=function(Se,Ce){var Te=Ce,Ke=cl,Pt=Date.now(),yt=Pt-Te;if(yt>=cl)return Se;if(yt<Ws)return fs;var kt=aa({startOfRange:Ws,endOfRange:Ke,current:yt}),Ht=Se*Ls.ease(kt);return Math.ceil(Ht)},da=function(Se){var Ce=Se.distanceToEdge,Te=Se.thresholds,Ke=Se.dragStartTime,Pt=Se.shouldUseTimeDampening,yt=el(Ce,Te);return yt===0?0:Pt?Math.max(ba(yt,Ke),fs):yt},wa=function(Se){var Ce=Se.container,Te=Se.distanceToEdges,Ke=Se.dragStartTime,Pt=Se.axis,yt=Se.shouldUseTimeDampening,kt=Za(Ce,Pt),Ht=Te[Pt.end]<Te[Pt.start];return Ht?da({distanceToEdge:Te[Pt.end],thresholds:kt,dragStartTime:Ke,shouldUseTimeDampening:yt}):-1*da({distanceToEdge:Te[Pt.start],thresholds:kt,dragStartTime:Ke,shouldUseTimeDampening:yt})},Xo=function(Se){var Ce=Se.container,Te=Se.subject,Ke=Se.proposedScroll,Pt=Te.height>Ce.height,yt=Te.width>Ce.width;return!yt&&!Pt?Ke:yt&&Pt?null:{x:yt?0:Ke.x,y:Pt?0:Ke.y}},Ps=Ur(function(Se){return Se===0?0:Se}),Uo=function(Se){var Ce=Se.dragStartTime,Te=Se.container,Ke=Se.subject,Pt=Se.center,yt=Se.shouldUseTimeDampening,kt={top:Pt.y-Te.top,right:Te.right-Pt.x,bottom:Te.bottom-Pt.y,left:Pt.x-Te.left},Ht=wa({container:Te,distanceToEdges:kt,dragStartTime:Ce,axis:pi,shouldUseTimeDampening:yt}),xn=wa({container:Te,distanceToEdges:kt,dragStartTime:Ce,axis:io,shouldUseTimeDampening:yt}),Wn=Ps({x:xn,y:Ht});if(ri(Wn,Xr))return null;var An=Xo({container:Te,subject:Ke,proposedScroll:Wn});return An?ri(An,Xr)?null:An:null},Ra=Ur(function(Se){return Se===0?0:Se>0?1:-1}),ss=function(){var Se=function(Te,Ke){return Te<0?Te:Te>Ke?Te-Ke:0};return function(Ce){var Te=Ce.current,Ke=Ce.max,Pt=Ce.change,yt=Cr(Te,Pt),kt={x:Se(yt.x,Ke.x),y:Se(yt.y,Ke.y)};return ri(kt,Xr)?null:kt}}(),cs=function(Ce){var Te=Ce.max,Ke=Ce.current,Pt=Ce.change,yt={x:Math.max(Ke.x,Te.x),y:Math.max(Ke.y,Te.y)},kt=Ra(Pt),Ht=ss({max:yt,current:Ke,change:kt});return!Ht||kt.x!==0&&Ht.x===0||kt.y!==0&&Ht.y===0},Al=function(Ce,Te){return cs({current:Ce.scroll.current,max:Ce.scroll.max,change:Te})},bl=function(Ce,Te){if(!Al(Ce,Te))return null;var Ke=Ce.scroll.max,Pt=Ce.scroll.current;return ss({current:Pt,max:Ke,change:Te})},Vl=function(Ce,Te){var Ke=Ce.frame;return Ke?cs({current:Ke.scroll.current,max:Ke.scroll.max,change:Te}):!1},Fs=function(Ce,Te){var Ke=Ce.frame;return!Ke||!Vl(Ce,Te)?null:ss({current:Ke.scroll.current,max:Ke.scroll.max,change:Te})},Zl=function(Se){var Ce=Se.viewport,Te=Se.subject,Ke=Se.center,Pt=Se.dragStartTime,yt=Se.shouldUseTimeDampening,kt=Uo({dragStartTime:Pt,container:Ce.frame,subject:Te,center:Ke,shouldUseTimeDampening:yt});return kt&&Al(Ce,kt)?kt:null},dl=function(Se){var Ce=Se.droppable,Te=Se.subject,Ke=Se.center,Pt=Se.dragStartTime,yt=Se.shouldUseTimeDampening,kt=Ce.frame;if(!kt)return null;var Ht=Uo({dragStartTime:Pt,container:kt.pageMarginBox,subject:Te,center:Ke,shouldUseTimeDampening:yt});return Ht&&Vl(Ce,Ht)?Ht:null},Fl=function(Se){var Ce=Se.state,Te=Se.dragStartTime,Ke=Se.shouldUseTimeDampening,Pt=Se.scrollWindow,yt=Se.scrollDroppable,kt=Ce.current.page.borderBoxCenter,Ht=Ce.dimensions.draggables[Ce.critical.draggable.id],xn=Ht.page.marginBox;if(Ce.isWindowScrollAllowed){var Wn=Ce.viewport,An=Zl({dragStartTime:Te,viewport:Wn,subject:xn,center:kt,shouldUseTimeDampening:Ke});if(An){Pt(An);return}}var Bn=qs({center:kt,destination:$o(Ce.impact),droppables:Ce.dimensions.droppables});if(Bn){var Fn=dl({dragStartTime:Te,droppable:Bn,subject:xn,center:kt,shouldUseTimeDampening:Ke});Fn&&yt(Bn.descriptor.id,Fn)}},_c=function(Se){var Ce=Se.scrollWindow,Te=Se.scrollDroppable,Ke=Zt(Ce),Pt=Zt(Te),yt=null,kt=function(An){yt||In(!1);var Bn=yt,Fn=Bn.shouldUseTimeDampening,ni=Bn.dragStartTime;Fl({state:An,scrollWindow:Ke,scrollDroppable:Pt,dragStartTime:ni,shouldUseTimeDampening:Fn})},Ht=function(An){ur(),yt&&In(!1);var Bn=Date.now(),Fn=!1,ni=function(){Fn=!0};Fl({state:An,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:ni,scrollDroppable:ni}),yt={dragStartTime:Bn,shouldUseTimeDampening:Fn},Bi(),Fn&&kt(An)},xn=function(){yt&&(Ke.cancel(),Pt.cancel(),yt=null)};return{start:Ht,stop:xn,scroll:kt}},Bs=function(Se){var Ce=Se.move,Te=Se.scrollDroppable,Ke=Se.scrollWindow,Pt=function(Wn,An){var Bn=Cr(Wn.current.client.selection,An);Ce({client:Bn})},yt=function(Wn,An){if(!Vl(Wn,An))return An;var Bn=Fs(Wn,An);if(!Bn)return Te(Wn.descriptor.id,An),null;var Fn=Cn(An,Bn);Te(Wn.descriptor.id,Fn);var ni=Cn(An,Fn);return ni},kt=function(Wn,An,Bn){if(!Wn||!Al(An,Bn))return Bn;var Fn=bl(An,Bn);if(!Fn)return Ke(Bn),null;var ni=Cn(Bn,Fn);Ke(ni);var Ii=Cn(Bn,ni);return Ii},Ht=function(Wn){var An=Wn.scrollJumpRequest;if(An){var Bn=$o(Wn.impact);Bn||In(!1);var Fn=yt(Wn.dimensions.droppables[Bn],An);if(Fn){var ni=Wn.viewport,Ii=kt(Wn.isWindowScrollAllowed,ni,Fn);Ii&&Pt(Wn,Ii)}}};return Ht},Ts=function(Se){var Ce=Se.scrollDroppable,Te=Se.scrollWindow,Ke=Se.move,Pt=_c({scrollWindow:Te,scrollDroppable:Ce}),yt=Bs({move:Ke,scrollWindow:Te,scrollDroppable:Ce}),kt=function(Wn){if(Wn.phase==="DRAGGING"){if(Wn.movementMode==="FLUID"){Pt.scroll(Wn);return}Wn.scrollJumpRequest&&yt(Wn)}},Ht={scroll:kt,start:Pt.start,stop:Pt.stop};return Ht},Ms="data-rbd",Gs=function(){var Se=Ms+"-drag-handle";return{base:Se,draggableId:Se+"-draggable-id",contextId:Se+"-context-id"}}(),pl=function(){var Se=Ms+"-draggable";return{base:Se,contextId:Se+"-context-id",id:Se+"-id"}}(),is=function(){var Se=Ms+"-droppable";return{base:Se,contextId:Se+"-context-id",id:Se+"-id"}}(),js={contextId:Ms+"-scroll-container-context-id"},Dl=function(Ce){return function(Te){return"["+Te+'="'+Ce+'"]'}},Ul=function(Ce,Te){return Ce.map(function(Ke){var Pt=Ke.styles[Te];return Pt?Ke.selector+" { "+Pt+" }":""}).join(" ")},Gu="pointer-events: none;",Du=function(Se){var Ce=Dl(Se),Te=function(){var Ht=`
cursor: -webkit-grab;
cursor: grab;
`;return{selector:Ce(Gs.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:Ht,dragging:Gu,dropAnimating:Ht}}}(),Ke=function(){var Ht=`
transition: `+su.outOfTheWay+`;
`;return{selector:Ce(pl.contextId),styles:{dragging:Ht,dropAnimating:Ht,userCancel:Ht}}}(),Pt={selector:Ce(is.contextId),styles:{always:"overflow-anchor: none;"}},yt={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;
`}},kt=[Ke,Te,Pt,yt];return{always:Ul(kt,"always"),resting:Ul(kt,"resting"),dragging:Ul(kt,"dragging"),dropAnimating:Ul(kt,"dropAnimating"),userCancel:Ul(kt,"userCancel")}},ml=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?le.useLayoutEffect:le.useEffect,Iu=function(){var Ce=document.querySelector("head");return Ce||In(!1),Ce},Ou=function(Ce){var Te=document.createElement("style");return Ce&&Te.setAttribute("nonce",Ce),Te.type="text/css",Te};function Ns(Se,Ce){var Te=Hn(function(){return Du(Se)},[Se]),Ke=(0,le.useRef)(null),Pt=(0,le.useRef)(null),yt=bn($n(function(Bn){var Fn=Pt.current;Fn||In(!1),Fn.textContent=Bn}),[]),kt=bn(function(Bn){var Fn=Ke.current;Fn||In(!1),Fn.textContent=Bn},[]);ml(function(){!Ke.current&&!Pt.current||In(!1);var Bn=Ou(Ce),Fn=Ou(Ce);return Ke.current=Bn,Pt.current=Fn,Bn.setAttribute(Ms+"-always",Se),Fn.setAttribute(Ms+"-dynamic",Se),Iu().appendChild(Bn),Iu().appendChild(Fn),kt(Te.always),yt(Te.resting),function(){var ni=function(Gr){var no=Gr.current;no||In(!1),Iu().removeChild(no),Gr.current=null};ni(Ke),ni(Pt)}},[Ce,kt,yt,Te.always,Te.resting,Se]);var Ht=bn(function(){return yt(Te.dragging)},[yt,Te.dragging]),xn=bn(function(Bn){if(Bn==="DROP"){yt(Te.dropAnimating);return}yt(Te.userCancel)},[yt,Te.dropAnimating,Te.userCancel]),Wn=bn(function(){Pt.current&&yt(Te.resting)},[yt,Te.resting]),An=Hn(function(){return{dragging:Ht,dropping:xn,resting:Wn}},[Ht,xn,Wn]);return An}var Hl=function(Se){return Se&&Se.ownerDocument?Se.ownerDocument.defaultView:window};function $s(Se){return Se instanceof Hl(Se).HTMLElement}function zs(Se,Ce){var Te="["+Gs.contextId+'="'+Se+'"]',Ke=mo(document.querySelectorAll(Te));if(!Ke.length)return null;var Pt=br(Ke,function(yt){return yt.getAttribute(Gs.draggableId)===Ce});return!Pt||!$s(Pt)?null:Pt}function $u(Se){var Ce=(0,le.useRef)({}),Te=(0,le.useRef)(null),Ke=(0,le.useRef)(null),Pt=(0,le.useRef)(!1),yt=bn(function(Fn,ni){var Ii={id:Fn,focus:ni};return Ce.current[Fn]=Ii,function(){var no=Ce.current,yo=no[Fn];yo!==Ii&&delete no[Fn]}},[]),kt=bn(function(Fn){var ni=zs(Se,Fn);ni&&ni!==document.activeElement&&ni.focus()},[Se]),Ht=bn(function(Fn,ni){Te.current===Fn&&(Te.current=ni)},[]),xn=bn(function(){Ke.current||Pt.current&&(Ke.current=requestAnimationFrame(function(){Ke.current=null;var Fn=Te.current;Fn&&kt(Fn)}))},[kt]),Wn=bn(function(Fn){Te.current=null;var ni=document.activeElement;ni&&ni.getAttribute(Gs.draggableId)===Fn&&(Te.current=Fn)},[]);ml(function(){return Pt.current=!0,function(){Pt.current=!1;var Fn=Ke.current;Fn&&cancelAnimationFrame(Fn)}},[]);var An=Hn(function(){return{register:yt,tryRecordFocus:Wn,tryRestoreFocusRecorded:xn,tryShiftRecord:Ht}},[yt,Wn,xn,Ht]);return An}function Vc(){var Se={draggables:{},droppables:{}},Ce=[];function Te(Bn){return Ce.push(Bn),function(){var ni=Ce.indexOf(Bn);ni!==-1&&Ce.splice(ni,1)}}function Ke(Bn){Ce.length&&Ce.forEach(function(Fn){return Fn(Bn)})}function Pt(Bn){return Se.draggables[Bn]||null}function yt(Bn){var Fn=Pt(Bn);return Fn||In(!1),Fn}var kt={register:function(Fn){Se.draggables[Fn.descriptor.id]=Fn,Ke({type:"ADDITION",value:Fn})},update:function(Fn,ni){var Ii=Se.draggables[ni.descriptor.id];Ii&&Ii.uniqueId===Fn.uniqueId&&(delete Se.draggables[ni.descriptor.id],Se.draggables[Fn.descriptor.id]=Fn)},unregister:function(Fn){var ni=Fn.descriptor.id,Ii=Pt(ni);Ii&&Fn.uniqueId===Ii.uniqueId&&(delete Se.draggables[ni],Ke({type:"REMOVAL",value:Fn}))},getById:yt,findById:Pt,exists:function(Fn){return!!Pt(Fn)},getAllByType:function(Fn){return Go(Se.draggables).filter(function(ni){return ni.descriptor.type===Fn})}};function Ht(Bn){return Se.droppables[Bn]||null}function xn(Bn){var Fn=Ht(Bn);return Fn||In(!1),Fn}var Wn={register:function(Fn){Se.droppables[Fn.descriptor.id]=Fn},unregister:function(Fn){var ni=Ht(Fn.descriptor.id);ni&&Fn.uniqueId===ni.uniqueId&&delete Se.droppables[Fn.descriptor.id]},getById:xn,findById:Ht,exists:function(Fn){return!!Ht(Fn)},getAllByType:function(Fn){return Go(Se.droppables).filter(function(ni){return ni.descriptor.type===Fn})}};function An(){Se.draggables={},Se.droppables={},Ce.length=0}return{draggable:kt,droppable:Wn,subscribe:Te,clean:An}}function sc(){var Se=Hn(Vc,[]);return(0,le.useEffect)(function(){return function(){requestAnimationFrame(Se.clean)}},[Se]),Se}var lc=le.createContext(null),Ku=function(){var Se=document.body;return Se||In(!1),Se},Tu={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},ws=function(Ce){return"rbd-announcement-"+Ce};function Ys(Se){var Ce=Hn(function(){return ws(Se)},[Se]),Te=(0,le.useRef)(null);(0,le.useEffect)(function(){var yt=document.createElement("div");return Te.current=yt,yt.id=Ce,yt.setAttribute("aria-live","assertive"),yt.setAttribute("aria-atomic","true"),(0,ut.Z)(yt.style,Tu),Ku().appendChild(yt),function(){setTimeout(function(){var xn=Ku();xn.contains(yt)&&xn.removeChild(yt),yt===Te.current&&(Te.current=null)})}},[Ce]);var Ke=bn(function(Pt){var yt=Te.current;if(yt){yt.textContent=Pt;return}},[]);return Ke}var vl=0,Xs={separator:"::"};function ms(){vl=0}function yl(Se,Ce){return Ce===void 0&&(Ce=Xs),Hn(function(){return""+Se+Ce.separator+vl++},[Ce.separator,Se])}function Su(Se){var Ce=Se.contextId,Te=Se.uniqueId;return"rbd-hidden-text-"+Ce+"-"+Te}function xc(Se){var Ce=Se.contextId,Te=Se.text,Ke=yl("hidden-text",{separator:"-"}),Pt=Hn(function(){return Su({contextId:Ce,uniqueId:Ke})},[Ke,Ce]);return(0,le.useEffect)(function(){var kt=document.createElement("div");return kt.id=Pt,kt.textContent=Te,kt.style.display="none",Ku().appendChild(kt),function(){var xn=Ku();xn.contains(kt)&&xn.removeChild(kt)}},[Pt,Te]),Pt}var jd=le.createContext(null),dn={react:"^16.8.5","react-dom":"^16.8.5"},sd=/(\d+)\.(\d+)\.(\d+)/,Bc=function(Ce){var Te=sd.exec(Ce);Te==null&&In(!1);var Ke=Number(Te[1]),Pt=Number(Te[2]),yt=Number(Te[3]);return{major:Ke,minor:Pt,patch:yt,raw:Ce}},df=function(Ce,Te){return Te.major>Ce.major?!0:Te.major<Ce.major?!1:Te.minor>Ce.minor?!0:Te.minor<Ce.minor?!1:Te.patch>=Ce.patch},zd=function(Se,Ce){var Te=Bc(Se),Ke=Bc(Ce);df(Te,Ke)},Zd=`
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
`,Rh=function(Se){var Ce=Se.doctype;Ce&&(Ce.name.toLowerCase(),Ce.publicId)};function Qg(Se){}function Bl(Se,Ce){}function dh(){Bl(function(){zd(dn.react,le.version),Rh(document)},[])}function Hd(Se){var Ce=(0,le.useRef)(Se);return(0,le.useEffect)(function(){Ce.current=Se}),Ce}function hh(){var Se=null;function Ce(){return!!Se}function Te(kt){return kt===Se}function Ke(kt){Se&&In(!1);var Ht={abandon:kt};return Se=Ht,Ht}function Pt(){Se||In(!1),Se=null}function yt(){Se&&(Se.abandon(),Pt())}return{isClaimed:Ce,isActive:Te,claim:Ke,release:Pt,tryAbandon:yt}}var hf=9,Hf=13,fh=27,gh=32,Vu=33,Wd=34,ff=35,Mc=36,ld=37,Gd=38,Bd=39,Pu=40,Md,_h=(Md={},Md[Hf]=!0,Md[hf]=!0,Md),ku=function(Se){_h[Se.keyCode]&&Se.preventDefault()},Uc=function(){var Se="visibilitychange";if(typeof document=="undefined")return Se;var Ce=[Se,"ms"+Se,"webkit"+Se,"moz"+Se,"o"+Se],Te=br(Ce,function(Ke){return"on"+Ke in document});return Te||Se}(),ph=0,mh=5;function ud(Se,Ce){return Math.abs(Ce.x-Se.x)>=mh||Math.abs(Ce.y-Se.y)>=mh}var lu={type:"IDLE"};function jh(Se){var Ce=Se.cancel,Te=Se.completed,Ke=Se.getPhase,Pt=Se.setPhase;return[{eventName:"mousemove",fn:function(kt){var Ht=kt.button,xn=kt.clientX,Wn=kt.clientY;if(Ht===ph){var An={x:xn,y:Wn},Bn=Ke();if(Bn.type==="DRAGGING"){kt.preventDefault(),Bn.actions.move(An);return}Bn.type!=="PENDING"&&In(!1);var Fn=Bn.point;if(ud(Fn,An)){kt.preventDefault();var ni=Bn.actions.fluidLift(An);Pt({type:"DRAGGING",actions:ni})}}}},{eventName:"mouseup",fn:function(kt){var Ht=Ke();if(Ht.type!=="DRAGGING"){Ce();return}kt.preventDefault(),Ht.actions.drop({shouldBlockNextClick:!0}),Te()}},{eventName:"mousedown",fn:function(kt){Ke().type==="DRAGGING"&&kt.preventDefault(),Ce()}},{eventName:"keydown",fn:function(kt){var Ht=Ke();if(Ht.type==="PENDING"){Ce();return}if(kt.keyCode===fh){kt.preventDefault(),Ce();return}ku(kt)}},{eventName:"resize",fn:Ce},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){Ke().type==="PENDING"&&Ce()}},{eventName:"webkitmouseforcedown",fn:function(kt){var Ht=Ke();if(Ht.type==="IDLE"&&In(!1),Ht.actions.shouldRespectForcePress()){Ce();return}kt.preventDefault()}},{eventName:Uc,fn:Ce}]}function Ml(Se){var Ce=(0,le.useRef)(lu),Te=(0,le.useRef)(Et),Ke=Hn(function(){return{eventName:"mousedown",fn:function(Bn){if(!Bn.defaultPrevented&&Bn.button===ph&&!(Bn.ctrlKey||Bn.metaKey||Bn.shiftKey||Bn.altKey)){var Fn=Se.findClosestDraggableId(Bn);if(Fn){var ni=Se.tryGetLock(Fn,kt,{sourceEvent:Bn});if(ni){Bn.preventDefault();var Ii={x:Bn.clientX,y:Bn.clientY};Te.current(),Wn(ni,Ii)}}}}}},[Se]),Pt=Hn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(Bn){if(!Bn.defaultPrevented){var Fn=Se.findClosestDraggableId(Bn);if(Fn){var ni=Se.findOptionsForDraggable(Fn);ni&&(ni.shouldRespectForcePress||Se.canGetLock(Fn)&&Bn.preventDefault())}}}}},[Se]),yt=bn(function(){var Bn={passive:!1,capture:!0};Te.current=Kn(window,[Pt,Ke],Bn)},[Pt,Ke]),kt=bn(function(){var An=Ce.current;An.type!=="IDLE"&&(Ce.current=lu,Te.current(),yt())},[yt]),Ht=bn(function(){var An=Ce.current;kt(),An.type==="DRAGGING"&&An.actions.cancel({shouldBlockNextClick:!0}),An.type==="PENDING"&&An.actions.abort()},[kt]),xn=bn(function(){var Bn={capture:!0,passive:!1},Fn=jh({cancel:Ht,completed:kt,getPhase:function(){return Ce.current},setPhase:function(Ii){Ce.current=Ii}});Te.current=Kn(window,Fn,Bn)},[Ht,kt]),Wn=bn(function(Bn,Fn){Ce.current.type!=="IDLE"&&In(!1),Ce.current={type:"PENDING",point:Fn,actions:Bn},xn()},[xn]);ml(function(){return yt(),function(){Te.current()}},[yt])}var gs;function Js(){}var nu=(gs={},gs[Wd]=!0,gs[Vu]=!0,gs[Mc]=!0,gs[ff]=!0,gs);function uc(Se,Ce){function Te(){Ce(),Se.cancel()}function Ke(){Ce(),Se.drop()}return[{eventName:"keydown",fn:function(yt){if(yt.keyCode===fh){yt.preventDefault(),Te();return}if(yt.keyCode===gh){yt.preventDefault(),Ke();return}if(yt.keyCode===Pu){yt.preventDefault(),Se.moveDown();return}if(yt.keyCode===Gd){yt.preventDefault(),Se.moveUp();return}if(yt.keyCode===Bd){yt.preventDefault(),Se.moveRight();return}if(yt.keyCode===ld){yt.preventDefault(),Se.moveLeft();return}if(nu[yt.keyCode]){yt.preventDefault();return}ku(yt)}},{eventName:"mousedown",fn:Te},{eventName:"mouseup",fn:Te},{eventName:"click",fn:Te},{eventName:"touchstart",fn:Te},{eventName:"resize",fn:Te},{eventName:"wheel",fn:Te,options:{passive:!0}},{eventName:Uc,fn:Te}]}function cc(Se){var Ce=(0,le.useRef)(Js),Te=Hn(function(){return{eventName:"keydown",fn:function(yt){if(yt.defaultPrevented||yt.keyCode!==gh)return;var kt=Se.findClosestDraggableId(yt);if(!kt)return;var Ht=Se.tryGetLock(kt,An,{sourceEvent:yt});if(!Ht)return;yt.preventDefault();var xn=!0,Wn=Ht.snapLift();Ce.current();function An(){xn||In(!1),xn=!1,Ce.current(),Ke()}Ce.current=Kn(window,uc(Wn,An),{capture:!0,passive:!1})}}},[Se]),Ke=bn(function(){var yt={passive:!1,capture:!0};Ce.current=Kn(window,[Te],yt)},[Te]);ml(function(){return Ke(),function(){Ce.current()}},[Ke])}var $d={type:"IDLE"},cd=120,vh=.15;function Sc(Se){var Ce=Se.cancel,Te=Se.getPhase;return[{eventName:"orientationchange",fn:Ce},{eventName:"resize",fn:Ce},{eventName:"contextmenu",fn:function(Pt){Pt.preventDefault()}},{eventName:"keydown",fn:function(Pt){if(Te().type!=="DRAGGING"){Ce();return}Pt.keyCode===fh&&Pt.preventDefault(),Ce()}},{eventName:Uc,fn:Ce}]}function Yc(Se){var Ce=Se.cancel,Te=Se.completed,Ke=Se.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(yt){var kt=Ke();if(kt.type!=="DRAGGING"){Ce();return}kt.hasMoved=!0;var Ht=yt.touches[0],xn=Ht.clientX,Wn=Ht.clientY,An={x:xn,y:Wn};yt.preventDefault(),kt.actions.move(An)}},{eventName:"touchend",fn:function(yt){var kt=Ke();if(kt.type!=="DRAGGING"){Ce();return}yt.preventDefault(),kt.actions.drop({shouldBlockNextClick:!0}),Te()}},{eventName:"touchcancel",fn:function(yt){if(Ke().type!=="DRAGGING"){Ce();return}yt.preventDefault(),Ce()}},{eventName:"touchforcechange",fn:function(yt){var kt=Ke();kt.type==="IDLE"&&In(!1);var Ht=yt.touches[0];if(Ht){var xn=Ht.force>=vh;if(xn){var Wn=kt.actions.shouldRespectForcePress();if(kt.type==="PENDING"){Wn&&Ce();return}if(Wn){if(kt.hasMoved){yt.preventDefault();return}Ce();return}yt.preventDefault()}}}},{eventName:Uc,fn:Ce}]}function Wf(Se){var Ce=(0,le.useRef)($d),Te=(0,le.useRef)(Et),Ke=bn(function(){return Ce.current},[]),Pt=bn(function(ni){Ce.current=ni},[]),yt=Hn(function(){return{eventName:"touchstart",fn:function(ni){if(!ni.defaultPrevented){var Ii=Se.findClosestDraggableId(ni);if(Ii){var Gr=Se.tryGetLock(Ii,Ht,{sourceEvent:ni});if(Gr){var no=ni.touches[0],yo=no.clientX,ko=no.clientY,na={x:yo,y:ko};Te.current(),Bn(Gr,na)}}}}}},[Se]),kt=bn(function(){var ni={capture:!0,passive:!1};Te.current=Kn(window,[yt],ni)},[yt]),Ht=bn(function(){var Fn=Ce.current;Fn.type!=="IDLE"&&(Fn.type==="PENDING"&&clearTimeout(Fn.longPressTimerId),Pt($d),Te.current(),kt())},[kt,Pt]),xn=bn(function(){var Fn=Ce.current;Ht(),Fn.type==="DRAGGING"&&Fn.actions.cancel({shouldBlockNextClick:!0}),Fn.type==="PENDING"&&Fn.actions.abort()},[Ht]),Wn=bn(function(){var ni={capture:!0,passive:!1},Ii={cancel:xn,completed:Ht,getPhase:Ke},Gr=Kn(window,Yc(Ii),ni),no=Kn(window,Sc(Ii),ni);Te.current=function(){Gr(),no()}},[xn,Ke,Ht]),An=bn(function(){var ni=Ke();ni.type!=="PENDING"&&In(!1);var Ii=ni.actions.fluidLift(ni.point);Pt({type:"DRAGGING",actions:Ii,hasMoved:!1})},[Ke,Pt]),Bn=bn(function(ni,Ii){Ke().type!=="IDLE"&&In(!1);var Gr=setTimeout(An,cd);Pt({type:"PENDING",point:Ii,actions:ni,longPressTimerId:Gr}),Wn()},[Wn,Ke,Pt,An]);ml(function(){return kt(),function(){Te.current();var Ii=Ke();Ii.type==="PENDING"&&(clearTimeout(Ii.longPressTimerId),Pt($d))}},[Ke,kt,Pt]),ml(function(){var ni=Kn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return ni},[])}function Gf(Se){}var $f={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Kd(Se,Ce){if(Ce==null)return!1;var Te=!!$f[Ce.tagName.toLowerCase()];if(Te)return!0;var Ke=Ce.getAttribute("contenteditable");return Ke==="true"||Ke===""?!0:Ce===Se?!1:Kd(Se,Ce.parentElement)}function hg(Se,Ce){var Te=Ce.target;return $s(Te)?Kd(Se,Te):!1}var fg=function(Se){return rr(Se.getBoundingClientRect()).center};function gg(Se){return Se instanceof Hl(Se).Element}var Xc=function(){var Se="matches";if(typeof document=="undefined")return Se;var Ce=[Se,"msMatchesSelector","webkitMatchesSelector"],Te=br(Ce,function(Ke){return Ke in Element.prototype});return Te||Se}();function pg(Se,Ce){return Se==null?null:Se[Xc](Ce)?Se:pg(Se.parentElement,Ce)}function mg(Se,Ce){return Se.closest?Se.closest(Ce):pg(Se,Ce)}function zh(Se){return"["+Gs.contextId+'="'+Se+'"]'}function yh(Se,Ce){var Te=Ce.target;if(!gg(Te))return null;var Ke=zh(Se),Pt=mg(Te,Ke);return!Pt||!$s(Pt)?null:Pt}function vg(Se,Ce){var Te=yh(Se,Ce);return Te?Te.getAttribute(Gs.draggableId):null}function Jc(Se,Ce){var Te="["+pl.contextId+'="'+Se+'"]',Ke=mo(document.querySelectorAll(Te)),Pt=br(Ke,function(yt){return yt.getAttribute(pl.id)===Ce});return!Pt||!$s(Pt)?null:Pt}function yg(Se){Se.preventDefault()}function xh(Se){var Ce=Se.expected,Te=Se.phase,Ke=Se.isLockActive,Pt=Se.shouldWarn;return!(!Ke()||Ce!==Te)}function xg(Se){var Ce=Se.lockAPI,Te=Se.store,Ke=Se.registry,Pt=Se.draggableId;if(Ce.isClaimed())return!1;var yt=Ke.draggable.findById(Pt);return!(!yt||!yt.options.isEnabled||!ka(Te.getState(),Pt))}function Sg(Se){var Ce=Se.lockAPI,Te=Se.contextId,Ke=Se.store,Pt=Se.registry,yt=Se.draggableId,kt=Se.forceSensorStop,Ht=Se.sourceEvent,xn=xg({lockAPI:Ce,store:Ke,registry:Pt,draggableId:yt});if(!xn)return null;var Wn=Pt.draggable.getById(yt),An=Jc(Te,Wn.descriptor.id);if(!An||Ht&&!Wn.options.canDragInteractiveElements&&hg(An,Ht))return null;var Bn=Ce.claim(kt||Et),Fn="PRE_DRAG";function ni(){return Wn.options.shouldRespectForcePress}function Ii(){return Ce.isActive(Bn)}function Gr(ds,ks){xh({expected:ds,phase:Fn,isLockActive:Ii,shouldWarn:!0})&&Ke.dispatch(ks())}var no=Gr.bind(null,"DRAGGING");function yo(ds){function ks(){Ce.release(),Fn="COMPLETED"}Fn!=="PRE_DRAG"&&(ks(),Fn!=="PRE_DRAG"&&In(!1)),Ke.dispatch(Br(ds.liftActionArgs)),Fn="DRAGGING";function Ql(Is,Wl){if(Wl===void 0&&(Wl={shouldBlockNextClick:!1}),ds.cleanup(),Wl.shouldBlockNextClick){var _u=Kn(window,[{eventName:"click",fn:yg,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(_u)}ks(),Ke.dispatch(rc({reason:Is}))}return(0,ut.Z)({isActive:function(){return xh({expected:"DRAGGING",phase:Fn,isLockActive:Ii,shouldWarn:!1})},shouldRespectForcePress:ni,drop:function(Wl){return Ql("DROP",Wl)},cancel:function(Wl){return Ql("CANCEL",Wl)}},ds.actions)}function ko(ds){var ks=Zt(function(Is){no(function(){return xa({client:Is})})}),Ql=yo({liftActionArgs:{id:yt,clientSelection:ds,movementMode:"FLUID"},cleanup:function(){return ks.cancel()},actions:{move:ks}});return(0,ut.Z)({},Ql,{move:ks})}function na(){var ds={moveUp:function(){return no(Oa)},moveRight:function(){return no(Nr)},moveDown:function(){return no(El)},moveLeft:function(){return no(_s)}};return yo({liftActionArgs:{id:yt,clientSelection:fg(An),movementMode:"SNAP"},cleanup:Et,actions:ds})}function Jo(){var ds=xh({expected:"PRE_DRAG",phase:Fn,isLockActive:Ii,shouldWarn:!0});ds&&Ce.release()}var Ia={isActive:function(){return xh({expected:"PRE_DRAG",phase:Fn,isLockActive:Ii,shouldWarn:!1})},shouldRespectForcePress:ni,fluidLift:ko,snapLift:na,abort:Jo};return Ia}var Pg=[Ml,cc,Wf];function Hp(Se){var Ce=Se.contextId,Te=Se.store,Ke=Se.registry,Pt=Se.customSensors,yt=Se.enableDefaultSensors,kt=[].concat(yt?Pg:[],Pt||[]),Ht=(0,le.useState)(function(){return hh()})[0],xn=bn(function(ko,na){ko.isDragging&&!na.isDragging&&Ht.tryAbandon()},[Ht]);ml(function(){var ko=Te.getState(),na=Te.subscribe(function(){var Jo=Te.getState();xn(ko,Jo),ko=Jo});return na},[Ht,Te,xn]),ml(function(){return Ht.tryAbandon},[Ht.tryAbandon]);var Wn=bn(function(yo){return xg({lockAPI:Ht,registry:Ke,store:Te,draggableId:yo})},[Ht,Ke,Te]),An=bn(function(yo,ko,na){return Sg({lockAPI:Ht,registry:Ke,contextId:Ce,store:Te,draggableId:yo,forceSensorStop:ko,sourceEvent:na&&na.sourceEvent?na.sourceEvent:null})},[Ce,Ht,Ke,Te]),Bn=bn(function(yo){return vg(Ce,yo)},[Ce]),Fn=bn(function(yo){var ko=Ke.draggable.findById(yo);return ko?ko.options:null},[Ke.draggable]),ni=bn(function(){Ht.isClaimed()&&(Ht.tryAbandon(),Te.getState().phase!=="IDLE"&&Te.dispatch(jo()))},[Ht,Te]),Ii=bn(Ht.isClaimed,[Ht]),Gr=Hn(function(){return{canGetLock:Wn,tryGetLock:An,findClosestDraggableId:Bn,findOptionsForDraggable:Fn,tryReleaseLock:ni,isLockClaimed:Ii}},[Wn,An,Bn,Fn,ni,Ii]);Gf(kt);for(var no=0;no<kt.length;no++)kt[no](Gr)}var qg=function(Ce){return{onBeforeCapture:Ce.onBeforeCapture,onBeforeDragStart:Ce.onBeforeDragStart,onDragStart:Ce.onDragStart,onDragEnd:Ce.onDragEnd,onDragUpdate:Ce.onDragUpdate}};function Vd(Se){return Se.current||In(!1),Se.current}function Kf(Se){var Ce=Se.contextId,Te=Se.setCallbacks,Ke=Se.sensors,Pt=Se.nonce,yt=Se.dragHandleUsageInstructions,kt=(0,le.useRef)(null);dh();var Ht=Hd(Se),xn=bn(function(){return qg(Ht.current)},[Ht]),Wn=Ys(Ce),An=xc({contextId:Ce,text:yt}),Bn=Ns(Ce,Pt),Fn=bn(function(Is){Vd(kt).dispatch(Is)},[]),ni=Hn(function(){return(0,Ge.DE)({publishWhileDragging:Or,updateDroppableScroll:gr,updateDroppableIsEnabled:Aa,updateDroppableIsCombineEnabled:_o,collectionStarting:kr},Fn)},[Fn]),Ii=sc(),Gr=Hn(function(){return ao(Ii,ni)},[Ii,ni]),no=Hn(function(){return Ts((0,ut.Z)({scrollWindow:Va,scrollDroppable:Gr.scrollDroppable},(0,Ge.DE)({move:xa},Fn)))},[Gr.scrollDroppable,Fn]),yo=$u(Ce),ko=Hn(function(){return Ta({announce:Wn,autoScroller:no,dimensionMarshal:Gr,focusMarshal:yo,getResponders:xn,styleMarshal:Bn})},[Wn,no,Gr,yo,xn,Bn]);kt.current=ko;var na=bn(function(){var Is=Vd(kt),Wl=Is.getState();Wl.phase!=="IDLE"&&Is.dispatch(jo())},[]),Jo=bn(function(){var Is=Vd(kt).getState();return Is.isDragging||Is.phase==="DROP_ANIMATING"},[]),Ia=Hn(function(){return{isDragging:Jo,tryAbort:na}},[Jo,na]);Te(Ia);var ds=bn(function(Is){return ka(Vd(kt).getState(),Is)},[]),ks=bn(function(){return No(Vd(kt).getState())},[]),Ql=Hn(function(){return{marshal:Gr,focus:yo,contextId:Ce,canLift:ds,isMovementAllowed:ks,dragHandleUsageInstructionsId:An,registry:Ii}},[Ce,Gr,An,yo,ds,ks,Ii]);return Hp({contextId:Ce,store:ko,registry:Ii,customSensors:Ke,enableDefaultSensors:Se.enableDefaultSensors!==!1}),(0,le.useEffect)(function(){return na},[na]),le.createElement(jd.Provider,{value:Ql},le.createElement(de,{context:lc,store:ko},Se.children))}var gf=0;function ep(){gf=0}function Vf(){return Hn(function(){return""+gf++},[])}function Sh(){ep(),ms()}function wg(Se){var Ce=Vf(),Te=Se.dragHandleUsageInstructions||Po.dragHandleUsageInstructions;return le.createElement(Oi,null,function(Ke){return le.createElement(Kf,{nonce:Se.nonce,contextId:Ce,setCallbacks:Ke,dragHandleUsageInstructions:Te,enableDefaultSensors:Se.enableDefaultSensors,sensors:Se.sensors,onBeforeCapture:Se.onBeforeCapture,onBeforeDragStart:Se.onBeforeDragStart,onDragStart:Se.onDragStart,onDragUpdate:Se.onDragUpdate,onDragEnd:Se.onDragEnd},Se.children)})}var Ph=function(Ce){return function(Te){return Ce===Te}},tp=Ph("scroll"),Uf=Ph("auto"),np=Ph("visible"),As=function(Ce,Te){return Te(Ce.overflowX)||Te(Ce.overflowY)},Zh=function(Ce,Te){return Te(Ce.overflowX)&&Te(Ce.overflowY)},Ud=function(Ce){var Te=window.getComputedStyle(Ce),Ke={overflowX:Te.overflowX,overflowY:Te.overflowY};return As(Ke,tp)||As(Ke,Uf)},iu=function(){return!1;var Ce,Te,Ke,Pt},Ru=function Se(Ce){return Ce==null?null:Ce===document.body?iu()?Ce:null:Ce===document.documentElement?null:Ud(Ce)?Ce:Se(Ce.parentElement)},Hh=function(Se){if(Se)var Ce=Ru(Se.parentElement)},wh=function(Se){return{x:Se.scrollLeft,y:Se.scrollTop}},Cg=function Se(Ce){if(!Ce)return!1;var Te=window.getComputedStyle(Ce);return Te.position==="fixed"?!0:Se(Ce.parentElement)},Eg=function(Se){var Ce=Ru(Se),Te=Cg(Se);return{closestScrollable:Ce,isFixedOnPage:Te}},bg=function(Se){var Ce=Se.descriptor,Te=Se.isEnabled,Ke=Se.isCombineEnabled,Pt=Se.isFixedOnPage,yt=Se.direction,kt=Se.client,Ht=Se.page,xn=Se.closest,Wn=function(){if(!xn)return null;var ni=xn.scrollSize,Ii=xn.client,Gr=co({scrollHeight:ni.scrollHeight,scrollWidth:ni.scrollWidth,height:Ii.paddingBox.height,width:Ii.paddingBox.width});return{pageMarginBox:xn.page.marginBox,frameClient:Ii,scrollSize:ni,shouldClipSubject:xn.shouldClipSubject,scroll:{initial:xn.scroll,current:xn.scroll,max:Gr,diff:{value:Xr,displacement:Xr}}}}(),An=yt==="vertical"?pi:io,Bn=Qo({page:Ht,withPlaceholder:null,axis:An,frame:Wn}),Fn={descriptor:Ce,isCombineEnabled:Ke,isFixedOnPage:Pt,axis:An,isEnabled:Te,client:kt,page:Ht,frame:Wn,subject:Bn};return Fn},Fg=function(Ce,Te){var Ke=wr(Ce);if(!Te||Ce!==Te)return Ke;var Pt=Ke.paddingBox.top-Te.scrollTop,yt=Ke.paddingBox.left-Te.scrollLeft,kt=Pt+Te.scrollHeight,Ht=yt+Te.scrollWidth,xn={top:Pt,right:Ht,bottom:kt,left:yt},Wn=_r(xn,Ke.border),An=$i({borderBox:Wn,margin:Ke.margin,border:Ke.border,padding:Ke.padding});return An},Bg=function(Se){var Ce=Se.ref,Te=Se.descriptor,Ke=Se.env,Pt=Se.windowScroll,yt=Se.direction,kt=Se.isDropDisabled,Ht=Se.isCombineEnabled,xn=Se.shouldClipSubject,Wn=Ke.closestScrollable,An=Fg(Ce,Wn),Bn=Ne(An,Pt),Fn=function(){if(!Wn)return null;var Ii=wr(Wn),Gr={scrollHeight:Wn.scrollHeight,scrollWidth:Wn.scrollWidth};return{client:Ii,page:Ne(Ii,Pt),scroll:wh(Wn),scrollSize:Gr,shouldClipSubject:xn}}(),ni=bg({descriptor:Te,isEnabled:!kt,isCombineEnabled:Ht,isFixedOnPage:Ke.isFixedOnPage,direction:yt,client:An,page:Bn,closest:Fn});return ni},Yd={passive:!1},pf={passive:!0},Ld=function(Se){return Se.shouldPublishImmediately?Yd:pf};function Ks(Se){var Ce=(0,le.useContext)(Se);return Ce||In(!1),Ce}var Ch=function(Ce){return Ce&&Ce.env.closestScrollable||null};function Mg(Se){var Ce=(0,le.useRef)(null),Te=Ks(jd),Ke=yl("droppable"),Pt=Te.registry,yt=Te.marshal,kt=Hd(Se),Ht=Hn(function(){return{id:Se.droppableId,type:Se.type,mode:Se.mode}},[Se.droppableId,Se.mode,Se.type]),xn=(0,le.useRef)(Ht),Wn=Hn(function(){return $n(function(Jo,Ia){Ce.current||In(!1);var ds={x:Jo,y:Ia};yt.updateDroppableScroll(Ht.id,ds)})},[Ht.id,yt]),An=bn(function(){var Jo=Ce.current;return!Jo||!Jo.env.closestScrollable?Xr:wh(Jo.env.closestScrollable)},[]),Bn=bn(function(){var Jo=An();Wn(Jo.x,Jo.y)},[An,Wn]),Fn=Hn(function(){return Zt(Bn)},[Bn]),ni=bn(function(){var Jo=Ce.current,Ia=Ch(Jo);Jo&&Ia||In(!1);var ds=Jo.scrollOptions;if(ds.shouldPublishImmediately){Bn();return}Fn()},[Fn,Bn]),Ii=bn(function(Jo,Ia){Ce.current&&In(!1);var ds=kt.current,ks=ds.getDroppableRef();ks||In(!1);var Ql=Eg(ks),Is={ref:ks,descriptor:Ht,env:Ql,scrollOptions:Ia};Ce.current=Is;var Wl=Bg({ref:ks,descriptor:Ht,env:Ql,windowScroll:Jo,direction:ds.direction,isDropDisabled:ds.isDropDisabled,isCombineEnabled:ds.isCombineEnabled,shouldClipSubject:!ds.ignoreContainerClipping}),_u=Ql.closestScrollable;return _u&&(_u.setAttribute(js.contextId,Te.contextId),_u.addEventListener("scroll",ni,Ld(Is.scrollOptions))),Wl},[Te.contextId,Ht,ni,kt]),Gr=bn(function(){var Jo=Ce.current,Ia=Ch(Jo);return Jo&&Ia||In(!1),wh(Ia)},[]),no=bn(function(){var Jo=Ce.current;Jo||In(!1);var Ia=Ch(Jo);Ce.current=null,Ia&&(Fn.cancel(),Ia.removeAttribute(js.contextId),Ia.removeEventListener("scroll",ni,Ld(Jo.scrollOptions)))},[ni,Fn]),yo=bn(function(Jo){var Ia=Ce.current;Ia||In(!1);var ds=Ch(Ia);ds||In(!1),ds.scrollTop+=Jo.y,ds.scrollLeft+=Jo.x},[]),ko=Hn(function(){return{getDimensionAndWatchScroll:Ii,getScrollWhileDragging:Gr,dragStopped:no,scroll:yo}},[no,Ii,Gr,yo]),na=Hn(function(){return{uniqueId:Ke,descriptor:Ht,callbacks:ko}},[ko,Ht,Ke]);ml(function(){return xn.current=na.descriptor,Pt.droppable.register(na),function(){Ce.current&&no(),Pt.droppable.unregister(na)}},[ko,Ht,no,na,yt,Pt.droppable]),ml(function(){Ce.current&&yt.updateDroppableIsEnabled(xn.current.id,!Se.isDropDisabled)},[Se.isDropDisabled,yt]),ml(function(){Ce.current&&yt.updateDroppableIsCombineEnabled(xn.current.id,Se.isCombineEnabled)},[Se.isCombineEnabled,yt])}function Xd(){}var Eh={width:0,height:0,margin:Un},mf=function(Ce){var Te=Ce.isAnimatingOpenOnMount,Ke=Ce.placeholder,Pt=Ce.animate;return Te||Pt==="close"?Eh:{height:Ke.client.borderBox.height,width:Ke.client.borderBox.width,margin:Ke.client.margin}},ip=function(Ce){var Te=Ce.isAnimatingOpenOnMount,Ke=Ce.placeholder,Pt=Ce.animate,yt=mf({isAnimatingOpenOnMount:Te,placeholder:Ke,animate:Pt});return{display:Ke.display,boxSizing:"border-box",width:yt.width,height:yt.height,marginTop:yt.margin.top,marginRight:yt.margin.right,marginBottom:yt.margin.bottom,marginLeft:yt.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:Pt!=="none"?su.placeholder:null}};function Yl(Se){var Ce=(0,le.useRef)(null),Te=bn(function(){Ce.current&&(clearTimeout(Ce.current),Ce.current=null)},[]),Ke=Se.animate,Pt=Se.onTransitionEnd,yt=Se.onClose,kt=Se.contextId,Ht=(0,le.useState)(Se.animate==="open"),xn=Ht[0],Wn=Ht[1];(0,le.useEffect)(function(){return xn?Ke!=="open"?(Te(),Wn(!1),Xd):Ce.current?Xd:(Ce.current=setTimeout(function(){Ce.current=null,Wn(!1)}),Te):Xd},[Ke,xn,Te]);var An=bn(function(Fn){Fn.propertyName==="height"&&(Pt(),Ke==="close"&&yt())},[Ke,yt,Pt]),Bn=ip({isAnimatingOpenOnMount:xn,animate:Se.animate,placeholder:Se.placeholder});return le.createElement(Se.placeholder.tagName,{style:Bn,"data-rbd-placeholder-context-id":kt,onTransitionEnd:An,ref:Se.innerRef})}var rp=le.memo(Yl),Jd=le.createContext(null);function dd(Se){Se&&$s(Se)||In(!1)}function bh(Se){return typeof Se=="boolean"}function ie(Se,Ce){Ce.forEach(function(Te){return Te(Se)})}var ae=[function(Ce){var Te=Ce.props;Te.droppableId||In(!1),typeof Te.droppableId!="string"&&In(!1)},function(Ce){var Te=Ce.props;bh(Te.isDropDisabled)||In(!1),bh(Te.isCombineEnabled)||In(!1),bh(Te.ignoreContainerClipping)||In(!1)},function(Ce){var Te=Ce.getDroppableRef;dd(Te())}],ge=[function(Ce){var Te=Ce.props,Ke=Ce.getPlaceholderRef;if(Te.placeholder)var Pt=Ke()}],fe=[function(Ce){var Te=Ce.props;Te.renderClone||In(!1)},function(Ce){var Te=Ce.getPlaceholderRef;Te()&&In(!1)}];function ye(Se){Bl(function(){ie(Se,ae),Se.props.mode==="standard"&&ie(Se,ge),Se.props.mode==="virtual"&&ie(Se,fe)})}var Re=function(Se){We(Ce,Se);function Ce(){for(var Ke,Pt=arguments.length,yt=new Array(Pt),kt=0;kt<Pt;kt++)yt[kt]=arguments[kt];return Ke=Se.call.apply(Se,[this].concat(yt))||this,Ke.state={isVisible:!!Ke.props.on,data:Ke.props.on,animate:Ke.props.shouldAnimate&&Ke.props.on?"open":"none"},Ke.onClose=function(){Ke.state.animate==="close"&&Ke.setState({isVisible:!1})},Ke}Ce.getDerivedStateFromProps=function(Pt,yt){return Pt.shouldAnimate?Pt.on?{isVisible:!0,data:Pt.on,animate:"open"}:yt.isVisible?{isVisible:!0,data:yt.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!Pt.on,data:Pt.on,animate:"none"}};var Te=Ce.prototype;return Te.render=function(){if(!this.state.isVisible)return null;var Pt={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(Pt)},Ce}(le.PureComponent),Je={dragging:5e3,dropAnimating:4500},mt=function(Ce,Te){return Te?su.drop(Te.duration):Ce?su.snap:su.fluid},gt=function(Ce,Te){return Ce?Te?ac.opacity.drop:ac.opacity.combining:null},jt=function(Ce){return Ce.forceShouldAnimate!=null?Ce.forceShouldAnimate:Ce.mode==="SNAP"};function Ln(Se){var Ce=Se.dimension,Te=Ce.client,Ke=Se.offset,Pt=Se.combineWith,yt=Se.dropping,kt=!!Pt,Ht=jt(Se),xn=!!yt,Wn=xn?Au.drop(Ke,kt):Au.moveTo(Ke),An={position:"fixed",top:Te.marginBox.top,left:Te.marginBox.left,boxSizing:"border-box",width:Te.borderBox.width,height:Te.borderBox.height,transition:mt(Ht,yt),transform:Wn,opacity:gt(kt,xn),zIndex:xn?Je.dropAnimating:Je.dragging,pointerEvents:"none"};return An}function Vt(Se){return{transform:Au.moveTo(Se.offset),transition:Se.shouldAnimateDisplacement?null:"none"}}function si(Se){return Se.type==="DRAGGING"?Ln(Se):Vt(Se)}function ii(Se,Ce,Te){Te===void 0&&(Te=Xr);var Ke=window.getComputedStyle(Ce),Pt=Ce.getBoundingClientRect(),yt=Ci(Pt,Ke),kt=Ne(yt,Te),Ht={client:yt,tagName:Ce.tagName.toLowerCase(),display:Ke.display},xn={x:yt.marginBox.width,y:yt.marginBox.height},Wn={descriptor:Se,placeholder:Ht,displaceBy:xn,client:yt,page:kt};return Wn}function tr(Se){var Ce=yl("draggable"),Te=Se.descriptor,Ke=Se.registry,Pt=Se.getDraggableRef,yt=Se.canDragInteractiveElements,kt=Se.shouldRespectForcePress,Ht=Se.isEnabled,xn=Hn(function(){return{canDragInteractiveElements:yt,shouldRespectForcePress:kt,isEnabled:Ht}},[yt,Ht,kt]),Wn=bn(function(ni){var Ii=Pt();return Ii||In(!1),ii(Te,Ii,ni)},[Te,Pt]),An=Hn(function(){return{uniqueId:Ce,descriptor:Te,options:xn,getDimension:Wn}},[Te,Wn,xn,Ce]),Bn=(0,le.useRef)(An),Fn=(0,le.useRef)(!0);ml(function(){return Ke.draggable.register(Bn.current),function(){return Ke.draggable.unregister(Bn.current)}},[Ke.draggable]),ml(function(){if(Fn.current){Fn.current=!1;return}var ni=Bn.current;Bn.current=An,Ke.draggable.update(An,ni)},[An,Ke.draggable])}function dr(Se,Ce,Te){Bl(function(){function Ke(yt){return"Draggable[id: "+yt+"]: "}var Pt=Se.draggableId;Pt||In(!1),typeof Pt!="string"&&In(!1),qo(Se.index)||In(!1),Se.mapped.type!=="DRAGGING"&&(dd(Te()),Se.isEnabled&&(zs(Ce,Pt)||In(!1)))})}function Mr(Se){}function so(Se){Se.preventDefault()}function Zo(Se){var Ce=(0,le.useRef)(null),Te=bn(function(Is){Ce.current=Is},[]),Ke=bn(function(){return Ce.current},[]),Pt=Ks(jd),yt=Pt.contextId,kt=Pt.dragHandleUsageInstructionsId,Ht=Pt.registry,xn=Ks(Jd),Wn=xn.type,An=xn.droppableId,Bn=Hn(function(){return{id:Se.draggableId,index:Se.index,type:Wn,droppableId:An}},[Se.draggableId,Se.index,Wn,An]),Fn=Se.children,ni=Se.draggableId,Ii=Se.isEnabled,Gr=Se.shouldRespectForcePress,no=Se.canDragInteractiveElements,yo=Se.isClone,ko=Se.mapped,na=Se.dropAnimationFinished;if(dr(Se,yt,Ke),Mr(yo),!yo){var Jo=Hn(function(){return{descriptor:Bn,registry:Ht,getDraggableRef:Ke,canDragInteractiveElements:no,shouldRespectForcePress:Gr,isEnabled:Ii}},[Bn,Ht,Ke,no,Gr,Ii]);tr(Jo)}var Ia=Hn(function(){return Ii?{tabIndex:0,role:"button","aria-describedby":kt,"data-rbd-drag-handle-draggable-id":ni,"data-rbd-drag-handle-context-id":yt,draggable:!1,onDragStart:so}:null},[yt,kt,ni,Ii]),ds=bn(function(Is){ko.type==="DRAGGING"&&ko.dropping&&Is.propertyName==="transform"&&na()},[na,ko]),ks=Hn(function(){var Is=si(ko),Wl=ko.type==="DRAGGING"&&ko.dropping?ds:null,_u={innerRef:Te,draggableProps:{"data-rbd-draggable-context-id":yt,"data-rbd-draggable-id":ni,style:Is,onTransitionEnd:Wl},dragHandleProps:Ia};return _u},[yt,Ia,ni,ko,ds,Te]),Ql=Hn(function(){return{draggableId:Bn.id,type:Bn.type,source:{index:Bn.index,droppableId:Bn.droppableId}}},[Bn.droppableId,Bn.id,Bn.index,Bn.type]);return Fn(ks,ko.snapshot,Ql)}var Bo=function(Se,Ce){return Se===Ce},ea=function(Se){var Ce=Se.combine,Te=Se.destination;return Te?Te.droppableId:Ce?Ce.droppableId:null},_a=function(Ce){return Ce.combine?Ce.combine.draggableId:null},Mo=function(Ce){return Ce.at&&Ce.at.type==="COMBINE"?Ce.at.combine.draggableId:null};function rs(){var Se=$n(function(Pt,yt){return{x:Pt,y:yt}}),Ce=$n(function(Pt,yt,kt,Ht,xn){return{isDragging:!0,isClone:yt,isDropAnimating:!!xn,dropAnimation:xn,mode:Pt,draggingOver:kt,combineWith:Ht,combineTargetFor:null}}),Te=$n(function(Pt,yt,kt,Ht,xn,Wn,An){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:xn,combineWith:Wn,mode:yt,offset:Pt,dimension:kt,forceShouldAnimate:An,snapshot:Ce(yt,Ht,xn,Wn,null)}}}),Ke=function(yt,kt){if(yt.isDragging){if(yt.critical.draggable.id!==kt.draggableId)return null;var Ht=yt.current.client.offset,xn=yt.dimensions.draggables[kt.draggableId],Wn=$o(yt.impact),An=Mo(yt.impact),Bn=yt.forceShouldAnimate;return Te(Se(Ht.x,Ht.y),yt.movementMode,xn,kt.isClone,Wn,An,Bn)}if(yt.phase==="DROP_ANIMATING"){var Fn=yt.completed;if(Fn.result.draggableId!==kt.draggableId)return null;var ni=kt.isClone,Ii=yt.dimensions.draggables[kt.draggableId],Gr=Fn.result,no=Gr.mode,yo=ea(Gr),ko=_a(Gr),na=yt.dropDuration,Jo={duration:na,curve:Rc.drop,moveTo:yt.newHomeClientOffset,opacity:ko?ac.opacity.drop:null,scale:ko?ac.scale.drop:null};return{mapped:{type:"DRAGGING",offset:yt.newHomeClientOffset,dimension:Ii,dropping:Jo,draggingOver:yo,combineWith:ko,mode:no,forceShouldAnimate:null,snapshot:Ce(no,ni,yo,ko,Jo)}}}return null};return Ke}function rl(Se){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:Se,combineWith:null}}var ru={mapped:{type:"SECONDARY",offset:Xr,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:rl(null)}};function xl(){var Se=$n(function(kt,Ht){return{x:kt,y:Ht}}),Ce=$n(rl),Te=$n(function(kt,Ht,xn){return Ht===void 0&&(Ht=null),{mapped:{type:"SECONDARY",offset:kt,combineTargetFor:Ht,shouldAnimateDisplacement:xn,snapshot:Ce(Ht)}}}),Ke=function(Ht){return Ht?Te(Xr,Ht,!0):null},Pt=function(Ht,xn,Wn,An){var Bn=Wn.displaced.visible[Ht],Fn=!!(An.inVirtualList&&An.effected[Ht]),ni=hs(Wn),Ii=ni&&ni.draggableId===Ht?xn:null;if(!Bn){if(!Fn)return Ke(Ii);if(Wn.displaced.invisible[Ht])return null;var Gr=Yi(An.displacedBy.point),no=Se(Gr.x,Gr.y);return Te(no,Ii,!0)}if(Fn)return Ke(Ii);var yo=Wn.displacedBy.point,ko=Se(yo.x,yo.y);return Te(ko,Ii,Bn.shouldAnimate)},yt=function(Ht,xn){if(Ht.isDragging)return Ht.critical.draggable.id===xn.draggableId?null:Pt(xn.draggableId,Ht.critical.draggable.id,Ht.impact,Ht.afterCritical);if(Ht.phase==="DROP_ANIMATING"){var Wn=Ht.completed;return Wn.result.draggableId===xn.draggableId?null:Pt(xn.draggableId,Wn.result.draggableId,Wn.impact,Wn.afterCritical)}return null};return yt}var Uu=function(){var Ce=rs(),Te=xl(),Ke=function(yt,kt){return Ce(yt,kt)||Te(yt,kt)||ru};return Ke},wu={dropAnimationFinished:kc},Xl=at(Uu,wu,null,{context:lc,pure:!0,areStatePropsEqual:Bo})(Zo);function Yu(Se){var Ce=Ks(Jd),Te=Ce.isUsingCloneFor;return Te===Se.draggableId&&!Se.isClone?null:le.createElement(Xl,Se)}function hu(Se){var Ce=typeof Se.isDragDisabled=="boolean"?!Se.isDragDisabled:!0,Te=!!Se.disableInteractiveElementBlocking,Ke=!!Se.shouldRespectForcePress;return le.createElement(Yu,(0,ut.Z)({},Se,{isClone:!1,isEnabled:Ce,canDragInteractiveElements:Te,shouldRespectForcePress:Ke}))}function Jl(Se){var Ce=(0,le.useContext)(jd);Ce||In(!1);var Te=Ce.contextId,Ke=Ce.isMovementAllowed,Pt=(0,le.useRef)(null),yt=(0,le.useRef)(null),kt=Se.children,Ht=Se.droppableId,xn=Se.type,Wn=Se.mode,An=Se.direction,Bn=Se.ignoreContainerClipping,Fn=Se.isDropDisabled,ni=Se.isCombineEnabled,Ii=Se.snapshot,Gr=Se.useClone,no=Se.updateViewportMaxScroll,yo=Se.getContainerForClone,ko=bn(function(){return Pt.current},[]),na=bn(function(Xu){Pt.current=Xu},[]),Jo=bn(function(){return yt.current},[]),Ia=bn(function(Xu){yt.current=Xu},[]);ye({props:Se,getDroppableRef:ko,getPlaceholderRef:Jo});var ds=bn(function(){Ke()&&no({maxScroll:Fo()})},[Ke,no]);Mg({droppableId:Ht,type:xn,mode:Wn,direction:An,isDropDisabled:Fn,isCombineEnabled:ni,ignoreContainerClipping:Bn,getDroppableRef:ko});var ks=le.createElement(Re,{on:Se.placeholder,shouldAnimate:Se.shouldAnimatePlaceholder},function(Xu){var hd=Xu.onClose,Lc=Xu.data,wc=Xu.animate;return le.createElement(rp,{placeholder:Lc,onClose:hd,innerRef:Ia,animate:wc,contextId:Te,onTransitionEnd:ds})}),Ql=Hn(function(){return{innerRef:na,placeholder:ks,droppableProps:{"data-rbd-droppable-id":Ht,"data-rbd-droppable-context-id":Te}}},[Te,Ht,ks,na]),Is=Gr?Gr.dragging.draggableId:null,Wl=Hn(function(){return{droppableId:Ht,type:xn,isUsingCloneFor:Is}},[Ht,Is,xn]);function _u(){if(!Gr)return null;var Xu=Gr.dragging,hd=Gr.render,Lc=le.createElement(Yu,{draggableId:Xu.draggableId,index:Xu.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(wc,gu){return hd(wc,gu,Xu)});return kn.createPortal(Lc,yo())}return le.createElement(Jd.Provider,{value:Wl},kt(Ql,Ii),_u())}var Ds=function(Ce,Te){return Ce===Te.droppable.type},Sl=function(Ce,Te){return Te.draggables[Ce.draggable.id]},uu=function(){var Ce={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},Te=(0,ut.Z)({},Ce,{shouldAnimatePlaceholder:!1}),Ke=$n(function(kt){return{draggableId:kt.id,type:kt.type,source:{index:kt.index,droppableId:kt.droppableId}}}),Pt=$n(function(kt,Ht,xn,Wn,An,Bn){var Fn=An.descriptor.id,ni=An.descriptor.droppableId===kt;if(ni){var Ii=Bn?{render:Bn,dragging:Ke(An.descriptor)}:null,Gr={isDraggingOver:xn,draggingOverWith:xn?Fn:null,draggingFromThisWith:Fn,isUsingPlaceholder:!0};return{placeholder:An.placeholder,shouldAnimatePlaceholder:!1,snapshot:Gr,useClone:Ii}}if(!Ht)return Te;if(!Wn)return Ce;var no={isDraggingOver:xn,draggingOverWith:Fn,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:An.placeholder,shouldAnimatePlaceholder:!0,snapshot:no,useClone:null}}),yt=function(Ht,xn){var Wn=xn.droppableId,An=xn.type,Bn=!xn.isDropDisabled,Fn=xn.renderClone;if(Ht.isDragging){var ni=Ht.critical;if(!Ds(An,ni))return Te;var Ii=Sl(ni,Ht.dimensions),Gr=$o(Ht.impact)===Wn;return Pt(Wn,Bn,Gr,Gr,Ii,Fn)}if(Ht.phase==="DROP_ANIMATING"){var no=Ht.completed;if(!Ds(An,no.critical))return Te;var yo=Sl(no.critical,Ht.dimensions);return Pt(Wn,Bn,ea(no.result)===Wn,$o(no.impact)===Wn,yo,Fn)}if(Ht.phase==="IDLE"&&Ht.completed&&!Ht.shouldFlush){var ko=Ht.completed;if(!Ds(An,ko.critical))return Te;var na=$o(ko.impact)===Wn,Jo=!!(ko.impact.at&&ko.impact.at.type==="COMBINE"),Ia=ko.critical.droppable.id===Wn;return na?Jo?Ce:Te:Ia?Ce:Te}return Te};return yt},fu={updateViewportMaxScroll:wo};function jc(){return document.body||In(!1),document.body}var Pl={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:jc},Pc=at(uu,fu,null,{context:lc,pure:!0,areStatePropsEqual:Bo})(Jl);Pc.defaultProps=Pl},38486:function(On,pn){"use strict";var pe;var le=60103,ke=60106,We=60107,ut=60108,Ge=60114,Ue=60109,Me=60110,Ct=60112,wt=60113,$e=60120,Ft=60115,lt=60116,vt=60121,Ie=60122,te=60117,ee=60129,de=60131;if(typeof Symbol=="function"&&Symbol.for){var se=Symbol.for;le=se("react.element"),ke=se("react.portal"),We=se("react.fragment"),ut=se("react.strict_mode"),Ge=se("react.profiler"),Ue=se("react.provider"),Me=se("react.context"),Ct=se("react.forward_ref"),wt=se("react.suspense"),$e=se("react.suspense_list"),Ft=se("react.memo"),lt=se("react.lazy"),vt=se("react.block"),Ie=se("react.server.block"),te=se("react.fundamental"),ee=se("react.debug_trace_mode"),de=se("react.legacy_hidden")}function he(Nt){if(typeof Nt=="object"&&Nt!==null){var ot=Nt.$$typeof;switch(ot){case le:switch(Nt=Nt.type,Nt){case We:case Ge:case ut:case wt:case $e:return Nt;default:switch(Nt=Nt&&Nt.$$typeof,Nt){case Me:case Ct:case lt:case Ft:case Ue:return Nt;default:return ot}}case ke:return ot}}}var ve=Ue,Ee=le,Be=Ct,Le=We,ze=lt,je=Ft,Xe=ke,Ye=Ge,dt=ut,He=wt;pe=Me,pe=ve,pe=Ee,pe=Be,pe=Le,pe=ze,pe=je,pe=Xe,pe=Ye,pe=dt,pe=He,pe=function(){return!1},pe=function(){return!1},pn.isContextConsumer=function(Nt){return he(Nt)===Me},pe=function(Nt){return he(Nt)===Ue},pe=function(Nt){return typeof Nt=="object"&&Nt!==null&&Nt.$$typeof===le},pe=function(Nt){return he(Nt)===Ct},pe=function(Nt){return he(Nt)===We},pe=function(Nt){return he(Nt)===lt},pe=function(Nt){return he(Nt)===Ft},pe=function(Nt){return he(Nt)===ke},pe=function(Nt){return he(Nt)===Ge},pe=function(Nt){return he(Nt)===ut},pe=function(Nt){return he(Nt)===wt},pe=function(Nt){return typeof Nt=="string"||typeof Nt=="function"||Nt===We||Nt===Ge||Nt===ee||Nt===ut||Nt===wt||Nt===$e||Nt===de||typeof Nt=="object"&&Nt!==null&&(Nt.$$typeof===lt||Nt.$$typeof===Ft||Nt.$$typeof===Ue||Nt.$$typeof===Me||Nt.$$typeof===Ct||Nt.$$typeof===te||Nt.$$typeof===vt||Nt[0]===Ie)},pe=he},53410:function(On,pn,pe){"use strict";On.exports=pe(38486)},32637:function(On,pn,pe){"use strict";On.exports=pe.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(On){"use strict";On.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(On){"use strict";On.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII="},31328:function(On){"use strict";On.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAodJREFUOBGtU0trFEEQ/qZnM5NsWBCfSEjwQdSggmAieAv4uOnFg5eIXgTvEY+ePJqToDf9AcZDFAUF8SgEQUxAjC6+QlhX4xo0G93ZnRnr697umSyKBCyY/aqqq76q6uoF/rN4lu/BmzSsLGFM7P4kAZQCiBTR64nCw/MHvRnj+fuvI7zxtDWJJD1lQulO5TPHnkAqpuAUFKZUqg8da8xI35+/cMh77AjHJ5cakh/oqHa2ZhGHpSb+STxJZA3lqesFG1CuLAdsqLfbb/dlTwQ7GdmG9VGVBuoNfT/nHGHUSnByeAN2binmmDK1gyM7aGvl6gruPvtadCOfvVlxN0PFjsF4qxMptjl7BflirsPAVxJoQjy5eUMqq6bkMgbWF7C4HGMlsnRmZE82xtEdYSwGnRTuhCvVqG3T8bGhHpweKaFWj3HpzqI7Z16SmHxHmKbcVE7yBs+k1uBm8wh6Q4VQJvrZMkEp98EGBB2h3pFUMWJmPLKniKGtXZhZiLC/L8CLhQbmqhHefmmi3pRYOwInY65gRiiM+ZEP9Ic4c7ik+Ye3dePK/W94/bmpbVNO4u2S2rmrOmRvtkEmlHraC9EUgEzo/optVwZM4IiCLivR1WhywwrT75p4WYlkqhTT7xs4vreIke2h3KWHTaUClC/ZnsR3fOTWMnarZi/QulYhr2l0MMDorhA7NhbwodbC5Xs/9FT5d+s6lJJSzHxWJ9ov9Xw8KceYX9LrQ9+6LF6pgs4luqVIIl+G69gp0id1tk+8/byJ77+AV9UEiRTJMnQMOYycuPZpNuhS+7TF+fgkiBSr55+J9eXOm1E86wjpPzrx8aI8hd3U1yryrOcejQ9cXWveP+N/A79g8eaXNDk4AAAAAElFTkSuQmCC"},96908:function(On){"use strict";On.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(On){"use strict";On.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(On){"use strict";On.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(On,pn,pe){"use strict";pe.d(pn,{Z:function(){return Ct}});const le=wt=>typeof wt=="object"&&wt!=null&&wt.nodeType===1,ke=(wt,$e)=>(!$e||wt!=="hidden")&&wt!=="visible"&&wt!=="clip",We=(wt,$e)=>{if(wt.clientHeight<wt.scrollHeight||wt.clientWidth<wt.scrollWidth){const Ft=getComputedStyle(wt,null);return ke(Ft.overflowY,$e)||ke(Ft.overflowX,$e)||(lt=>{const vt=(Ie=>{if(!Ie.ownerDocument||!Ie.ownerDocument.defaultView)return null;try{return Ie.ownerDocument.defaultView.frameElement}catch(te){return null}})(lt);return!!vt&&(vt.clientHeight<lt.scrollHeight||vt.clientWidth<lt.scrollWidth)})(wt)}return!1},ut=(wt,$e,Ft,lt,vt,Ie,te,ee)=>Ie<wt&&te>$e||Ie>wt&&te<$e?0:Ie<=wt&&ee<=Ft||te>=$e&&ee>=Ft?Ie-wt-lt:te>$e&&ee<Ft||Ie<wt&&ee>Ft?te-$e+vt:0,Ge=wt=>{const $e=wt.parentElement;return $e==null?wt.getRootNode().host||null:$e},Ue=(wt,$e)=>{var Ft,lt,vt,Ie;if(typeof document=="undefined")return[];const{scrollMode:te,block:ee,inline:de,boundary:se,skipOverflowHiddenElements:he}=$e,ve=typeof se=="function"?se:yn=>yn!==se;if(!le(wt))throw new TypeError("Invalid target");const Ee=document.scrollingElement||document.documentElement,Be=[];let Le=wt;for(;le(Le)&&ve(Le);){if(Le=Ge(Le),Le===Ee){Be.push(Le);break}Le!=null&&Le===document.body&&We(Le)&&!We(document.documentElement)||Le!=null&&We(Le,he)&&Be.push(Le)}const ze=(lt=(Ft=window.visualViewport)==null?void 0:Ft.width)!=null?lt:innerWidth,je=(Ie=(vt=window.visualViewport)==null?void 0:vt.height)!=null?Ie:innerHeight,{scrollX:Xe,scrollY:Ye}=window,{height:dt,width:He,top:Nt,right:ot,bottom:Tt,left:xt}=wt.getBoundingClientRect(),{top:Ot,right:Wt,bottom:Dt,left:tt}=(yn=>{const zt=window.getComputedStyle(yn);return{top:parseFloat(zt.scrollMarginTop)||0,right:parseFloat(zt.scrollMarginRight)||0,bottom:parseFloat(zt.scrollMarginBottom)||0,left:parseFloat(zt.scrollMarginLeft)||0}})(wt);let Ve=ee==="start"||ee==="nearest"?Nt-Ot:ee==="end"?Tt+Dt:Nt+dt/2-Ot+Dt,_t=de==="center"?xt+He/2-tt+Wt:de==="end"?ot+Wt:xt-tt;const vn=[];for(let yn=0;yn<Be.length;yn++){const zt=Be[yn],{height:qt,width:ln,top:Gn,right:un,bottom:_n,left:St}=zt.getBoundingClientRect();if(te==="if-needed"&&Nt>=0&&xt>=0&&Tt<=je&&ot<=ze&&(zt===Ee&&!We(zt)||Nt>=Gn&&Tt<=_n&&xt>=St&&ot<=un))return vn;const Zn=getComputedStyle(zt),ci=parseInt(Zn.borderLeftWidth,10),Ze=parseInt(Zn.borderTopWidth,10),be=parseInt(Zn.borderRightWidth,10),Pe=parseInt(Zn.borderBottomWidth,10);let Ae=0,Oe=0;const xe="offsetWidth"in zt?zt.offsetWidth-zt.clientWidth-ci-be:0,ct="offsetHeight"in zt?zt.offsetHeight-zt.clientHeight-Ze-Pe:0,Mt="offsetWidth"in zt?zt.offsetWidth===0?0:ln/zt.offsetWidth:0,at="offsetHeight"in zt?zt.offsetHeight===0?0:qt/zt.offsetHeight:0;if(Ee===zt)Ae=ee==="start"?Ve:ee==="end"?Ve-je:ee==="nearest"?ut(Ye,Ye+je,je,Ze,Pe,Ye+Ve,Ye+Ve+dt,dt):Ve-je/2,Oe=de==="start"?_t:de==="center"?_t-ze/2:de==="end"?_t-ze:ut(Xe,Xe+ze,ze,ci,be,Xe+_t,Xe+_t+He,He),Ae=Math.max(0,Ae+Ye),Oe=Math.max(0,Oe+Xe);else{Ae=ee==="start"?Ve-Gn-Ze:ee==="end"?Ve-_n+Pe+ct:ee==="nearest"?ut(Gn,_n,qt,Ze,Pe+ct,Ve,Ve+dt,dt):Ve-(Gn+qt/2)+ct/2,Oe=de==="start"?_t-St-ci:de==="center"?_t-(St+ln/2)+xe/2:de==="end"?_t-un+be+xe:ut(St,un,ln,ci,be+xe,_t,_t+He,He);const{scrollLeft:qe,scrollTop:Lt}=zt;Ae=at===0?0:Math.max(0,Math.min(Lt+Ae/at,zt.scrollHeight-qt/at+ct)),Oe=Mt===0?0:Math.max(0,Math.min(qe+Oe/Mt,zt.scrollWidth-ln/Mt+xe)),Ve+=Lt-Ae,_t+=qe-Oe}vn.push({el:zt,top:Ae,left:Oe})}return vn},Me=wt=>wt===!1?{block:"end",inline:"nearest"}:($e=>$e===Object($e)&&Object.keys($e).length!==0)(wt)?wt:{block:"start",inline:"nearest"};function Ct(wt,$e){if(!wt.isConnected||!(vt=>{let Ie=vt;for(;Ie&&Ie.parentNode;){if(Ie.parentNode===document)return!0;Ie=Ie.parentNode instanceof ShadowRoot?Ie.parentNode.host:Ie.parentNode}return!1})(wt))return;const Ft=(vt=>{const Ie=window.getComputedStyle(vt);return{top:parseFloat(Ie.scrollMarginTop)||0,right:parseFloat(Ie.scrollMarginRight)||0,bottom:parseFloat(Ie.scrollMarginBottom)||0,left:parseFloat(Ie.scrollMarginLeft)||0}})(wt);if((vt=>typeof vt=="object"&&typeof vt.behavior=="function")($e))return $e.behavior(Ue(wt,$e));const lt=typeof $e=="boolean"||$e==null?void 0:$e.behavior;for(const{el:vt,top:Ie,left:te}of Ue(wt,Me($e))){const ee=Ie-Ft.top+Ft.bottom,de=te-Ft.left+Ft.right;vt.scroll({top:ee,left:de,behavior:lt})}}}}]);